From f5bfa881ceca9cd9cb450d0f023f817afef449be Mon Sep 17 00:00:00 2001 From: Sadegh Barati Date: Thu, 2 Nov 2023 13:37:16 +0330 Subject: [PATCH] feat: add `pinia` and `pinia-shared-state` for sync shared state between tabs --- .../theme/components/ComponentLoader.vue | 3 +- .../theme/components/ComponentPreview.vue | 3 +- .../theme/components/CustomizerCode.vue | 5 +- .../theme/components/StyleSwitcher.vue | 5 +- apps/www/.vitepress/theme/index.ts | 10 +++ .../.vitepress/theme/layout/MainLayout.vue | 20 +++-- .../.vitepress/theme/layout/ThemingLayout.vue | 27 ++++++- apps/www/package.json | 2 + .../registry/default/example/CardStats.vue | 5 +- .../default/example/Cards/ActivityGoal.vue | 5 +- .../registry/default/example/Cards/Metric.vue | 3 +- .../registry/new-york/example/CardStats.vue | 5 +- .../new-york/example/Cards/ActivityGoal.vue | 3 +- .../new-york/example/Cards/Metric.vue | 5 +- apps/www/src/stores/config.ts | 52 +++++++------ pnpm-lock.yaml | 78 +++++++++++++++++++ 16 files changed, 184 insertions(+), 47 deletions(-) diff --git a/apps/www/.vitepress/theme/components/ComponentLoader.vue b/apps/www/.vitepress/theme/components/ComponentLoader.vue index fa3d533e..5e926d77 100644 --- a/apps/www/.vitepress/theme/components/ComponentLoader.vue +++ b/apps/www/.vitepress/theme/components/ComponentLoader.vue @@ -1,4 +1,5 @@