diff --git a/packages/demo/.gitignore b/packages/docs/.gitignore similarity index 100% rename from packages/demo/.gitignore rename to packages/docs/.gitignore diff --git a/packages/demo/.vscode/extensions.json b/packages/docs/.vscode/extensions.json similarity index 100% rename from packages/demo/.vscode/extensions.json rename to packages/docs/.vscode/extensions.json diff --git a/packages/demo/.vscode/launch.json b/packages/docs/.vscode/launch.json similarity index 100% rename from packages/demo/.vscode/launch.json rename to packages/docs/.vscode/launch.json diff --git a/packages/demo/README.md b/packages/docs/README.md similarity index 100% rename from packages/demo/README.md rename to packages/docs/README.md diff --git a/packages/demo/astro.config.mjs b/packages/docs/astro.config.mjs similarity index 100% rename from packages/demo/astro.config.mjs rename to packages/docs/astro.config.mjs diff --git a/packages/demo/package.json b/packages/docs/package.json similarity index 100% rename from packages/demo/package.json rename to packages/docs/package.json diff --git a/packages/demo/public/favicon.svg b/packages/docs/public/favicon.svg similarity index 100% rename from packages/demo/public/favicon.svg rename to packages/docs/public/favicon.svg diff --git a/packages/demo/public/logo-dark.svg b/packages/docs/public/logo-dark.svg similarity index 100% rename from packages/demo/public/logo-dark.svg rename to packages/docs/public/logo-dark.svg diff --git a/packages/demo/public/logo.svg b/packages/docs/public/logo.svg similarity index 100% rename from packages/demo/public/logo.svg rename to packages/docs/public/logo.svg diff --git a/packages/demo/src/components/PageFrame.astro b/packages/docs/src/components/PageFrame.astro similarity index 100% rename from packages/demo/src/components/PageFrame.astro rename to packages/docs/src/components/PageFrame.astro diff --git a/packages/demo/src/components/graphviz.ts b/packages/docs/src/components/graphviz.ts similarity index 100% rename from packages/demo/src/components/graphviz.ts rename to packages/docs/src/components/graphviz.ts diff --git a/packages/demo/src/components/panzoom.ts b/packages/docs/src/components/panzoom.ts similarity index 100% rename from packages/demo/src/components/panzoom.ts rename to packages/docs/src/components/panzoom.ts diff --git a/packages/demo/src/components/vizdom.ts b/packages/docs/src/components/vizdom.ts similarity index 100% rename from packages/demo/src/components/vizdom.ts rename to packages/docs/src/components/vizdom.ts diff --git a/packages/demo/src/content/config.ts b/packages/docs/src/content/config.ts similarity index 100% rename from packages/demo/src/content/config.ts rename to packages/docs/src/content/config.ts diff --git a/packages/demo/src/content/docs/diagrams/d2.mdx b/packages/docs/src/content/docs/diagrams/d2.mdx similarity index 97% rename from packages/demo/src/content/docs/diagrams/d2.mdx rename to packages/docs/src/content/docs/diagrams/d2.mdx index eefe364..220de05 100644 --- a/packages/demo/src/content/docs/diagrams/d2.mdx +++ b/packages/docs/src/content/docs/diagrams/d2.mdx @@ -74,3 +74,7 @@ You can create small Netlify plugin to install D2. See example [here](https://gi - [ ] [Export JSON graph](https://github.com/terrastruct/d2/discussions/2224) - [ ] [Class-based dark mode](https://github.com/terrastruct/d2/discussions/2225) - [ ] Link resolution callback + +## TODO + +- [ ] add documentation about `d2Options` diff --git a/packages/demo/src/content/docs/diagrams/gnuplot.mdx b/packages/docs/src/content/docs/diagrams/gnuplot.mdx similarity index 100% rename from packages/demo/src/content/docs/diagrams/gnuplot.mdx rename to packages/docs/src/content/docs/diagrams/gnuplot.mdx diff --git a/packages/demo/src/content/docs/diagrams/graphviz.mdx b/packages/docs/src/content/docs/diagrams/graphviz.mdx similarity index 95% rename from packages/demo/src/content/docs/diagrams/graphviz.mdx rename to packages/docs/src/content/docs/diagrams/graphviz.mdx index 4380196..08dfa95 100644 --- a/packages/demo/src/content/docs/diagrams/graphviz.mdx +++ b/packages/docs/src/content/docs/diagrams/graphviz.mdx @@ -93,7 +93,7 @@ Check out other [options](/start-here/configuration/). ### Configuration -You probaly want to use `inline` strategy and implement dark scheme via CSS: +You probaly want to use [`inline`](/start-here/strategy/#inline) strategy and implement dark scheme via CSS: ```css .graphviz { diff --git a/packages/demo/src/content/docs/diagrams/mermaid.mdx b/packages/docs/src/content/docs/diagrams/mermaid.mdx similarity index 100% rename from packages/demo/src/content/docs/diagrams/mermaid.mdx rename to packages/docs/src/content/docs/diagrams/mermaid.mdx diff --git a/packages/demo/src/content/docs/diagrams/vizdom.mdx b/packages/docs/src/content/docs/diagrams/vizdom.mdx similarity index 95% rename from packages/demo/src/content/docs/diagrams/vizdom.mdx rename to packages/docs/src/content/docs/diagrams/vizdom.mdx index d8de5dd..921fb3a 100644 --- a/packages/demo/src/content/docs/diagrams/vizdom.mdx +++ b/packages/docs/src/content/docs/diagrams/vizdom.mdx @@ -145,7 +145,7 @@ Check out other [options](/start-here/configuration/). ### Configuration -You probaly want to use `inline` strategy and implement dark scheme via CSS: +You probaly want to use [`inline`](/start-here/strategy/#inline) strategy and implement dark scheme via CSS: ```css .vizdom { @@ -180,3 +180,7 @@ You probaly want to use `inline` strategy and implement dark scheme via CSS: - [ ] [HTML classes are not supported](https://github.com/vizdom-dev/vizdom/issues/11) - [ ] [Text is transformed to path, so Cmd + F doesn't work](https://github.com/vizdom-dev/vizdom/issues/12) - [ ] Doesn't support some unicode chars, like `label="∅"` + +## TODO + +- [ ] Maybe rename `dataGraph` to `graphFormat`. And documentation for it \ No newline at end of file diff --git a/packages/demo/src/content/docs/examples/d2-test.md b/packages/docs/src/content/docs/examples/d2-test.md similarity index 100% rename from packages/demo/src/content/docs/examples/d2-test.md rename to packages/docs/src/content/docs/examples/d2-test.md diff --git a/packages/demo/src/content/docs/examples/gnuplot-test.md b/packages/docs/src/content/docs/examples/gnuplot-test.md similarity index 100% rename from packages/demo/src/content/docs/examples/gnuplot-test.md rename to packages/docs/src/content/docs/examples/gnuplot-test.md diff --git a/packages/demo/src/content/docs/examples/graphviz-test.md b/packages/docs/src/content/docs/examples/graphviz-test.md similarity index 100% rename from packages/demo/src/content/docs/examples/graphviz-test.md rename to packages/docs/src/content/docs/examples/graphviz-test.md diff --git a/packages/demo/src/content/docs/examples/mermaid-test.md b/packages/docs/src/content/docs/examples/mermaid-test.md similarity index 100% rename from packages/demo/src/content/docs/examples/mermaid-test.md rename to packages/docs/src/content/docs/examples/mermaid-test.md diff --git a/packages/demo/src/content/docs/examples/vizdom-test.md b/packages/docs/src/content/docs/examples/vizdom-test.md similarity index 100% rename from packages/demo/src/content/docs/examples/vizdom-test.md rename to packages/docs/src/content/docs/examples/vizdom-test.md diff --git a/packages/demo/src/content/docs/index.mdx b/packages/docs/src/content/docs/index.mdx similarity index 100% rename from packages/demo/src/content/docs/index.mdx rename to packages/docs/src/content/docs/index.mdx diff --git a/packages/demo/src/content/docs/notes/graph-libraries.md b/packages/docs/src/content/docs/notes/graph-libraries.md similarity index 100% rename from packages/demo/src/content/docs/notes/graph-libraries.md rename to packages/docs/src/content/docs/notes/graph-libraries.md diff --git a/packages/demo/src/content/docs/notes/space-time.md b/packages/docs/src/content/docs/notes/space-time.md similarity index 100% rename from packages/demo/src/content/docs/notes/space-time.md rename to packages/docs/src/content/docs/notes/space-time.md diff --git a/packages/demo/src/content/docs/other/cache.md b/packages/docs/src/content/docs/other/cache.md similarity index 100% rename from packages/demo/src/content/docs/other/cache.md rename to packages/docs/src/content/docs/other/cache.md diff --git a/packages/demo/src/content/docs/other/fenceparser.md b/packages/docs/src/content/docs/other/fenceparser.md similarity index 100% rename from packages/demo/src/content/docs/other/fenceparser.md rename to packages/docs/src/content/docs/other/fenceparser.md diff --git a/packages/demo/src/content/docs/other/pan-zoom.md b/packages/docs/src/content/docs/other/pan-zoom.md similarity index 98% rename from packages/demo/src/content/docs/other/pan-zoom.md rename to packages/docs/src/content/docs/other/pan-zoom.md index 1f05cdd..d3560eb 100644 --- a/packages/demo/src/content/docs/other/pan-zoom.md +++ b/packages/docs/src/content/docs/other/pan-zoom.md @@ -179,3 +179,7 @@ Be aware that some CSS will cause pixelation of SVG on zoom (bug in Safari), for - `will-change: transform;` - `transform: matrix3d(...);` - `transition-property: transform;` (it setles after animation, though) + +## TODO + +- [ ] some kind of threshold for small images (pan-zoom UI looks weird for small images) diff --git a/packages/demo/src/content/docs/other/rehype-code-hook.md b/packages/docs/src/content/docs/other/rehype-code-hook.md similarity index 100% rename from packages/demo/src/content/docs/other/rehype-code-hook.md rename to packages/docs/src/content/docs/other/rehype-code-hook.md diff --git a/packages/demo/src/content/docs/other/remark-code-hook.md b/packages/docs/src/content/docs/other/remark-code-hook.md similarity index 100% rename from packages/demo/src/content/docs/other/remark-code-hook.md rename to packages/docs/src/content/docs/other/remark-code-hook.md diff --git a/packages/demo/src/content/docs/other/sqlitecache.md b/packages/docs/src/content/docs/other/sqlitecache.md similarity index 100% rename from packages/demo/src/content/docs/other/sqlitecache.md rename to packages/docs/src/content/docs/other/sqlitecache.md diff --git a/packages/demo/src/content/docs/start-here/accessibility.mdx b/packages/docs/src/content/docs/start-here/accessibility.mdx similarity index 91% rename from packages/demo/src/content/docs/start-here/accessibility.mdx rename to packages/docs/src/content/docs/start-here/accessibility.mdx index 0cf4408..a02d386 100644 --- a/packages/demo/src/content/docs/start-here/accessibility.mdx +++ b/packages/docs/src/content/docs/start-here/accessibility.mdx @@ -8,7 +8,7 @@ import { Tabs, TabItem } from "@astrojs/starlight/components"; ## Alt -Works only with `strategy=file` and `strategy=data-url`. +Works only with strategy [`file`](/start-here/strategy/#file) and [`data-url`](/start-here/strategy/#data-url) @@ -61,6 +61,7 @@ graph LR Bob's Burgers process for making big decisions ``` + ```mermaid strategy=inline @@ -71,4 +72,3 @@ graph LR ``` - diff --git a/packages/demo/src/content/docs/start-here/configuration.md b/packages/docs/src/content/docs/start-here/configuration.md similarity index 100% rename from packages/demo/src/content/docs/start-here/configuration.md rename to packages/docs/src/content/docs/start-here/configuration.md diff --git a/packages/demo/src/content/docs/start-here/dark-scheme.mdx b/packages/docs/src/content/docs/start-here/dark-scheme.mdx similarity index 78% rename from packages/demo/src/content/docs/start-here/dark-scheme.mdx rename to packages/docs/src/content/docs/start-here/dark-scheme.mdx index 45efade..bf6d96c 100644 --- a/packages/demo/src/content/docs/start-here/dark-scheme.mdx +++ b/packages/docs/src/content/docs/start-here/dark-scheme.mdx @@ -66,11 +66,11 @@ html[data-theme="dark"] .beoe-light { ## Strategy vs dark scheme -| | `class` | `media` | -| ---------- | --------- | ------- | -| `inline` | maybe (1) | no | -| `data-url` | yes | yes | -| `file` | yes | yes | +| | `class` | `media` | +| -------------------------------------------- | --------- | ------- | +| [`inline`](/start-here/strategy/#inline) | maybe (1) | no | +| [`data-url`](/start-here/strategy/#data-url) | yes | yes | +| [`file`](/start-here/strategy/#file) | yes | yes | (1) - for example, works for Mermaid, but doesn't work for D2 (check with light mode): @@ -83,6 +83,7 @@ import { Tabs, TabItem } from "@astrojs/starlight/components"; direction: right a -> b -> c -> d -> e ``` + @@ -92,5 +93,6 @@ direction: right a -> b -> c -> d -> e ``` ```` + diff --git a/packages/demo/src/content/docs/start-here/getting-started.md b/packages/docs/src/content/docs/start-here/getting-started.md similarity index 100% rename from packages/demo/src/content/docs/start-here/getting-started.md rename to packages/docs/src/content/docs/start-here/getting-started.md diff --git a/packages/demo/src/content/docs/start-here/interactivity.mdx b/packages/docs/src/content/docs/start-here/interactivity.mdx similarity index 99% rename from packages/demo/src/content/docs/start-here/interactivity.mdx rename to packages/docs/src/content/docs/start-here/interactivity.mdx index 4080737..20ad916 100644 --- a/packages/demo/src/content/docs/start-here/interactivity.mdx +++ b/packages/docs/src/content/docs/start-here/interactivity.mdx @@ -6,7 +6,7 @@ sidebar: import { Tabs, TabItem } from "@astrojs/starlight/components"; -Works only with `strategy=inline`. +Works only with strategy [`inline`](/start-here/strategy/#inline). ## Searchable text diff --git a/packages/demo/src/content/docs/start-here/strategy.md b/packages/docs/src/content/docs/start-here/strategy.md similarity index 100% rename from packages/demo/src/content/docs/start-here/strategy.md rename to packages/docs/src/content/docs/start-here/strategy.md diff --git a/packages/demo/src/content/docs/start-here/styling-with-css.mdx b/packages/docs/src/content/docs/start-here/styling-with-css.mdx similarity index 94% rename from packages/demo/src/content/docs/start-here/styling-with-css.mdx rename to packages/docs/src/content/docs/start-here/styling-with-css.mdx index 64ae925..2e3b428 100644 --- a/packages/demo/src/content/docs/start-here/styling-with-css.mdx +++ b/packages/docs/src/content/docs/start-here/styling-with-css.mdx @@ -6,7 +6,7 @@ sidebar: import { Tabs, TabItem } from "@astrojs/starlight/components"; -Works only with `strategy=inline`. +Works only with strategy [`inline`](/start-here/strategy/#inline). **Basic idea**: you can target with CSS any SVG node, something like this: diff --git a/packages/demo/src/env.d.ts b/packages/docs/src/env.d.ts similarity index 100% rename from packages/demo/src/env.d.ts rename to packages/docs/src/env.d.ts diff --git a/packages/demo/src/styles/custom.css b/packages/docs/src/styles/custom.css similarity index 100% rename from packages/demo/src/styles/custom.css rename to packages/docs/src/styles/custom.css diff --git a/packages/demo/tsconfig.json b/packages/docs/tsconfig.json similarity index 100% rename from packages/demo/tsconfig.json rename to packages/docs/tsconfig.json