From cb9011389d3ab79d3332359106bbc70eb4a79179 Mon Sep 17 00:00:00 2001 From: mistic100 Date: Tue, 3 Sep 2024 13:35:17 +0200 Subject: [PATCH] doc: playground --- .gitignore | 1 + docs/.vitepress/components/CropPlayground.vue | 81 +- docs/.vitepress/components/HomeBackground.vue | 12 +- docs/.vitepress/components/Playground.vue | 1479 ++--------------- docs/.vitepress/components/SliderInput.vue | 26 + docs/.vitepress/components/constants.ts | 4 + .../components/playground/Container.vue | 14 + .../playground/TabConfiguration.vue | 165 ++ .../components/playground/TabPanorama.vue | 218 +++ .../.vitepress/plugins/code-demo/CodeDemo.vue | 64 +- .../plugins/code-demo/extendMarkdown.ts | 4 +- docs/.vitepress/theme/index.ts | 52 +- docs/.vitepress/theme/style.scss | 41 +- docs/playground.md | 13 +- packages/core/src/model.ts | 2 +- 15 files changed, 734 insertions(+), 1442 deletions(-) create mode 100644 docs/.vitepress/components/SliderInput.vue create mode 100644 docs/.vitepress/components/constants.ts create mode 100644 docs/.vitepress/components/playground/Container.vue create mode 100644 docs/.vitepress/components/playground/TabConfiguration.vue create mode 100644 docs/.vitepress/components/playground/TabPanorama.vue diff --git a/.gitignore b/.gitignore index a0be620f3..f2c200510 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ node_modules yarn-error.log .turbo docs/.vitepress/cache +docs/.vitepress/.temp .typedoc !docs/.typedoc dist diff --git a/docs/.vitepress/components/CropPlayground.vue b/docs/.vitepress/components/CropPlayground.vue index c075aa88b..db12c4756 100644 --- a/docs/.vitepress/components/CropPlayground.vue +++ b/docs/.vitepress/components/CropPlayground.vue @@ -1,56 +1,44 @@ diff --git a/docs/.vitepress/components/HomeBackground.vue b/docs/.vitepress/components/HomeBackground.vue index 0ffaf01c9..84c80e92f 100644 --- a/docs/.vitepress/components/HomeBackground.vue +++ b/docs/.vitepress/components/HomeBackground.vue @@ -5,6 +5,7 @@ - Object.assign(this.markerForm, config); - this.markerForm.saved = true; - }, + diff --git a/docs/.vitepress/components/SliderInput.vue b/docs/.vitepress/components/SliderInput.vue new file mode 100644 index 000000000..b9f69aeae --- /dev/null +++ b/docs/.vitepress/components/SliderInput.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/docs/.vitepress/components/constants.ts b/docs/.vitepress/components/constants.ts new file mode 100644 index 000000000..2df33e29c --- /dev/null +++ b/docs/.vitepress/components/constants.ts @@ -0,0 +1,4 @@ +export const BASE_URL = 'https://photo-sphere-viewer-data.netlify.app/assets/'; +export const SPHERE = BASE_URL + 'sphere.jpg'; +export const SPHERE_DARK = BASE_URL + 'sphere-night.jpg'; +export const LOADER = BASE_URL + 'loader.gif'; diff --git a/docs/.vitepress/components/playground/Container.vue b/docs/.vitepress/components/playground/Container.vue new file mode 100644 index 000000000..9d10631cd --- /dev/null +++ b/docs/.vitepress/components/playground/Container.vue @@ -0,0 +1,14 @@ + + + diff --git a/docs/.vitepress/components/playground/TabConfiguration.vue b/docs/.vitepress/components/playground/TabConfiguration.vue new file mode 100644 index 000000000..1f89ad8d4 --- /dev/null +++ b/docs/.vitepress/components/playground/TabConfiguration.vue @@ -0,0 +1,165 @@ + + + + + diff --git a/docs/.vitepress/components/playground/TabPanorama.vue b/docs/.vitepress/components/playground/TabPanorama.vue new file mode 100644 index 000000000..adffd31fa --- /dev/null +++ b/docs/.vitepress/components/playground/TabPanorama.vue @@ -0,0 +1,218 @@ + + + diff --git a/docs/.vitepress/plugins/code-demo/CodeDemo.vue b/docs/.vitepress/plugins/code-demo/CodeDemo.vue index 2d34ab49b..7c5084cc4 100644 --- a/docs/.vitepress/plugins/code-demo/CodeDemo.vue +++ b/docs/.vitepress/plugins/code-demo/CodeDemo.vue @@ -1,41 +1,39 @@