@abraca/junis 2.80.0 → 2.81.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +5 -0
  3. package/dist/runtime/assets/css/jun.css +1 -1
  4. package/dist/runtime/components/JunSettings.client.d.vue.ts +3 -0
  5. package/dist/runtime/components/JunSettings.client.vue +195 -0
  6. package/dist/runtime/components/JunSettings.client.vue.d.ts +3 -0
  7. package/dist/runtime/components/JunStudioBar.client.vue +11 -23
  8. package/dist/runtime/components/renderers/JunConfigRenderer.d.vue.ts +13 -0
  9. package/dist/runtime/components/renderers/JunConfigRenderer.vue +54 -21
  10. package/dist/runtime/components/renderers/JunConfigRenderer.vue.d.ts +13 -0
  11. package/dist/runtime/composables/useJunCommands.js +15 -12
  12. package/dist/runtime/composables/useJunDocPage.d.ts +8 -1
  13. package/dist/runtime/composables/useJunDocPage.js +6 -4
  14. package/dist/runtime/composables/useJunRename.js +6 -5
  15. package/dist/runtime/composables/useJunSettings.d.ts +24 -0
  16. package/dist/runtime/composables/useJunSettings.js +48 -0
  17. package/dist/runtime/composables/useJunSiteConfig.d.ts +69 -27
  18. package/dist/runtime/composables/useJunSiteConfig.js +62 -53
  19. package/dist/runtime/layouts/jun.vue +18 -2
  20. package/dist/runtime/pages/index.vue +18 -8
  21. package/dist/runtime/plugins/jun-site-config.d.ts +17 -0
  22. package/dist/runtime/plugins/jun-site-config.js +26 -0
  23. package/dist/runtime/server/api/resolve/[...slug].get.d.ts +15 -1
  24. package/dist/runtime/server/api/resolve/[...slug].get.js +24 -2
  25. package/dist/runtime/server/utils/junCache.d.ts +15 -12
  26. package/dist/runtime/server/utils/junCache.js +4 -2
  27. package/dist/runtime/server/utils/junSlugAlias.d.ts +42 -0
  28. package/dist/runtime/server/utils/junSlugAlias.js +14 -0
  29. package/package.json +1 -1
package/dist/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=4.0.0"
6
6
  },
7
- "version": "2.80.0",
7
+ "version": "2.81.0",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -222,6 +222,10 @@ const BUILTIN_META_EXCLUDE_KEYS = [
222
222
  "images",
223
223
  "seedTest",
224
224
  "siteConfig",
225
+ // The ENTIRE site configuration, stored on the space document's tree entry.
226
+ // The root is also a real page, so without this the settings surface as
227
+ // sixty meta chips on the home page — and one of them stringifies an object.
228
+ "junSite",
225
229
  "redirectPermanent",
226
230
  "navLabel",
227
231
  "signerId",
@@ -821,6 +825,7 @@ Switch them off with \`jun.pageTypes: { ${missing.map((e) => `${e.key}: false`).
821
825
  src: resolver.resolve("./runtime/plugins/jun-drag-affordance.client"),
822
826
  mode: "client"
823
827
  });
828
+ addPlugin({ src: resolver.resolve("./runtime/plugins/jun-site-config") });
824
829
  if (options.layoutName !== false) {
825
830
  addLayout(
826
831
  { src: resolver.resolve("./runtime/layouts/jun.vue") },
@@ -10,4 +10,4 @@
10
10
  dark:from-neutral-900/65 dark:to-neutral-900/45
11
11
  border border-white/10 dark:border-white/5
12
12
  ring-1 ring-black/5 dark:ring-white/10
13
- shadow-lg shadow-black/10}}@layer base{.jun-flow-page{padding-top:6rem}html[data-jun-nav=bottom] .jun-flow-page,html[data-jun-nav=rail-left] .jun-flow-page,html[data-jun-nav=rail-right] .jun-flow-page{padding-top:2rem}html[data-jun-nav=rail-left] .jun-flow-page{padding-left:var(--jun-nav-rail-w,0)}html[data-jun-nav=rail-right] .jun-flow-page{padding-right:var(--jun-nav-rail-w,0)}html[data-jun-nav=bottom] .jun-flow-page{padding-bottom:7rem}body,html{color-scheme:light dark;overscroll-behavior-y:none;scroll-behavior:smooth}body{-webkit-tap-highlight-color:transparent;padding-top:env(safe-area-inset-top);touch-action:manipulation}html{overflow-y:scroll;scrollbar-gutter:stable}:root[style*="--scrollbar-width"] body,body[data-scroll-locked]{margin-right:0!important;padding-right:0!important}html.jun-viewport-bound,html.jun-viewport-bound body{height:100vh;overflow:hidden}::-webkit-scrollbar{height:10px;width:10px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:var(--ui-border);border:2px solid transparent;border-radius:9999px}::-webkit-scrollbar-thumb:hover{background-color:var(--ui-border-accented)}::-webkit-scrollbar-corner{background:transparent}*{scrollbar-color:var(--ui-border) transparent;scrollbar-width:thin}.jun-scrollbar-hide::-webkit-scrollbar{display:none}.jun-scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}.ProseMirror[contenteditable=false] .meta-field-chip,.ProseMirror[contenteditable=false] [data-type=document-meta],.aeditor-breadcrumb{display:none!important}html[data-jun-player] body{padding-bottom:calc(4rem + env(safe-area-inset-bottom, 0px))}html[data-jun-player][data-jun-nav=bottom] body{padding-bottom:0}.jun-player{bottom:calc(1rem + env(safe-area-inset-bottom, 0px));left:50%;max-width:min(22rem,calc(100vw - 10rem));translate:-50% 0;width:-moz-max-content;width:max-content}html[data-jun-nav=bottom] .jun-player{bottom:auto;max-width:min(22rem,calc(100vw - 2rem));top:calc(1rem + env(safe-area-inset-top, 0px))}.jun-player-sheet{bottom:calc(1.5rem + env(safe-area-inset-bottom, 0px) + var(--jun-player-h, 0px));left:50%;translate:-50% 0;width:min(22rem,calc(100vw - 10rem))}html[data-jun-nav=bottom] .jun-player-sheet{bottom:auto;top:calc(1.5rem + env(safe-area-inset-top, 0px) + var(--jun-player-h, 0px));width:min(22rem,calc(100vw - 2rem))}}:root{--ui-primary:#000;--ui-container:70rem;--jun-nav-h:3rem;--jun-nav-offset:calc(var(--jun-nav-h) + env(safe-area-inset-top, 0px));--jun-chrome-top:0px;--jun-chrome-bottom:0px;--jun-chrome-left-top:0px;--jun-chrome-left-bottom:0px;--jun-chrome-right-top:0px;--jun-chrome-right-bottom:0px;--jun-sun-from:#24242a;--jun-sun-to:#0f0f12;--jun-sun-core:#fff;--jun-sun-glow:#18181b}.dark{--ui-primary:#fff;--jun-sun-from:#fafafa;--jun-sun-to:#e4e4e7;--jun-sun-core:#101013;--jun-sun-glow:#f4f4f5}.jun-nav-docked{border-left-color:transparent;border-radius:0;border-right-color:transparent;border-top-color:transparent;height:var(--jun-nav-offset);max-width:none;padding-top:env(safe-area-inset-top,0)}.jun-panel-page{top:var(--jun-nav-offset)}.a-map-toolbar-bar,.graph-toolbar-bar{backdrop-filter:blur(8px)!important;background:linear-gradient(180deg,#fff,hsla(0,0%,100%,.4))!important;border:1px solid hsla(0,0%,100%,.1)!important;border-radius:9999px!important;bottom:calc(1.5rem + env(safe-area-inset-bottom, 0px))!important;box-shadow:0 20px 25px -5px rgba(0,0,0,.12),0 8px 10px -6px rgba(0,0,0,.1),0 0 0 1px rgba(0,0,0,.05)!important;gap:4px!important;padding:4px 10px!important}.dark .a-map-toolbar-bar,.dark .graph-toolbar-bar{background:linear-gradient(180deg,#18181b,rgba(24,24,27,.7))!important;border-color:rgba(0,0,0,.05)!important;box-shadow:0 20px 25px -5px rgba(0,0,0,.4),0 8px 10px -6px rgba(0,0,0,.3),0 0 0 1px hsla(0,0%,100%,.1)!important}.a-map-toolbar-bar .toolbar-divider,.graph-toolbar-bar .toolbar-divider{background:rgba(0,0,0,.12)!important}.dark .a-map-toolbar-bar .toolbar-divider,.dark .graph-toolbar-bar .toolbar-divider{background:hsla(0,0%,100%,.15)!important}.graph-minimap{top:6rem!important}.jun-fade-enter-active,.jun-fade-leave-active{transition:opacity .22s ease}.jun-fade-enter-from,.jun-fade-leave-to{opacity:0}html[data-jun-restore] .jun-fade-enter-active,html[data-jun-restore] .jun-fade-leave-active{transition:none}.aa-presence-blobs__blob{filter:none;-webkit-mask-image:radial-gradient(closest-side,#000 0,rgba(0,0,0,.62) 42%,rgba(0,0,0,.22) 68%,transparent 100%);mask-image:radial-gradient(closest-side,#000 0,rgba(0,0,0,.62) 42%,rgba(0,0,0,.22) 68%,transparent 100%);opacity:.3}:root:not(.dark) .aa-presence-blobs__blob{opacity:.2}:root:not(.dark) .jun-presence-blobs{mix-blend-mode:multiply}:root:not(.dark) .jun-presence-blobs__blob{opacity:.24}:root:not(.dark) .jun-presence-blobs__blob:not(.is-anchored){opacity:.15}.jun-logo{transition:transform .4s cubic-bezier(.22,1,.36,1),filter .4s ease,opacity .5s ease}.jun-logo-dot,.jun-sun-core{transform-box:fill-box;transform-origin:center;transition:transform .4s cubic-bezier(.22,1,.36,1)}.jun-logo-dot:nth-of-type(2){transition-delay:.04s}.jun-logo-dot:nth-of-type(3){transition-delay:.08s}.jun-sun-halo{transform-box:fill-box;transform-origin:center;transition:opacity .4s ease,transform .4s cubic-bezier(.22,1,.36,1)}:is(.jun-logo:hover,:is(a,button,summary,.jun-logo-lockup):hover .jun-logo):not(.jun-logo--sun){transform:scale(1.04)}:is(.jun-logo:hover,:is(a,button,summary,.jun-logo-lockup):hover .jun-logo) .jun-logo-dot{transform:scale(1.18)}:is(.jun-logo--sun:hover,:is(a,button,summary,.jun-logo-lockup):hover .jun-logo--sun) .jun-sun-halo{opacity:.8;transform:scale(1.14)}:is(.jun-logo--sun:hover,:is(a,button,summary,.jun-logo-lockup):hover .jun-logo--sun) .jun-sun-core{transform:scale(1.1)}:is(.jun-logo:active,:is(a,button,summary):active .jun-logo):not(.jun-logo--sun){transform:scale(.96)}:is(.jun-logo--sun:active,:is(a,button,summary):active .jun-logo--sun) .jun-sun-core{transform:scale(.9)}.jun-logo-bang:empty{display:none}.jun-logo-bang{display:inline-block;font-weight:700;padding-inline:.02em;transition:transform .4s cubic-bezier(.22,1,.36,1)}:is(a,button,summary,.jun-logo-lockup):hover .jun-logo-bang{transform:translateY(-.06em)}.jun-logo-lockup.is-sun .jun-logo-bang{color:var(--jun-sun-glow)}@media (prefers-reduced-motion:reduce){.jun-logo,.jun-logo-bang,.jun-logo-dot,.jun-sun-core,.jun-sun-halo{transition:none}}html.doc-dragging .ProseMirror{border-radius:8px;outline:2px dashed rgba(0,0,0,.18);outline-offset:8px;transition:outline-color .2s ease}html.dark.doc-dragging .ProseMirror,html.doc-dragging.dark .ProseMirror{outline-color:hsla(0,0%,100%,.22)}html.doc-dragging [data-doc-drop-zone]{border-radius:10px;outline:2px dashed rgba(0,0,0,.14);outline-offset:4px}html.dark.doc-dragging [data-doc-drop-zone],html.doc-dragging.dark [data-doc-drop-zone]{outline-color:hsla(0,0%,100%,.18)}html.theme-switching,html.theme-switching *{transition:background-color .45s ease,color .45s ease,border-color .45s ease,fill .45s ease,stroke .45s ease!important}@media (prefers-reduced-motion:reduce){.jun-fade-enter-active,.jun-fade-leave-active{transition:none}html.theme-switching,html.theme-switching *{transition:none!important}}html.jun-surface-soft *,html.jun-surface-soft :after,html.jun-surface-soft :before,html.jun-surface-solid *,html.jun-surface-solid :after,html.jun-surface-solid :before{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}html.jun-surface-soft .jun-blur,html.jun-surface-soft .jun-blur-gradient,html.jun-surface-soft .jun-blur-inverted,html.jun-surface-soft .jun-campfire-banner,html.jun-surface-soft .jun-campfire-panel,html.jun-surface-soft .jun-campfire-pill,html.jun-surface-soft .jun-chrome{backdrop-filter:blur(8px)!important;-webkit-backdrop-filter:blur(8px)!important}html.jun-surface-solid .jun-blur,html.jun-surface-solid .jun-blur-gradient,html.jun-surface-solid .jun-card,html.jun-surface-solid .jun-chrome{background-color:rgba(250,250,252,.97)!important;background-image:none!important}html.jun-surface-solid.dark .jun-blur,html.jun-surface-solid.dark .jun-blur-gradient,html.jun-surface-solid.dark .jun-card,html.jun-surface-solid.dark .jun-chrome{background-color:rgba(24,24,27,.97)!important}html.jun-surface-solid .jun-campfire-banner,html.jun-surface-solid .jun-campfire-panel,html.jun-surface-solid .jun-campfire-pill{background:hsla(0,0%,100%,.97)!important}html.jun-surface-solid.dark .jun-campfire-banner,html.jun-surface-solid.dark .jun-campfire-panel,html.jun-surface-solid.dark .jun-campfire-pill{background:rgba(24,24,27,.97)!important}html.jun-surface-solid .jun-blur-inverted{background-color:rgba(250,250,252,.92)!important;background-image:none!important}html.jun-surface-solid.dark .jun-blur-inverted{background-color:rgba(14,15,17,.92)!important}.jun-palette-panel{display:flex;flex-direction:column;left:var(--jun-palette-left,50vw);max-height:var(--jun-palette-max-h,min(60vh,34rem));max-width:none;overflow:hidden;position:fixed;top:var(--jun-palette-top,5.5rem);transform-origin:var(--jun-palette-origin,top center);translate:var(--jun-palette-tx,-50%) var(--jun-palette-ty,0);width:var(--jun-palette-w,min(42rem,calc(100vw - 2rem)))}.jun-palette-panel[data-state=open]{animation:jun-palette-in .26s cubic-bezier(.22,1,.36,1) both}.jun-palette-panel[data-state=closed]{animation:jun-palette-out .13s ease-in both}@keyframes jun-palette-in{0%{opacity:0;transform:var(--jun-palette-from,translateY(-8px)) scale(.97)}to{opacity:1;transform:none}}@keyframes jun-palette-out{0%{opacity:1;transform:none}to{opacity:0;transform:var(--jun-palette-from,translateY(-8px)) scale(.98)}}.jun-palette-cursor{border-radius:.375rem;left:.5rem;pointer-events:none;position:absolute;right:.5rem;top:0;transition:transform .26s cubic-bezier(.22,1,.36,1),height .26s cubic-bezier(.22,1,.36,1),opacity .16s ease}.jun-palette-cursor.is-placing{transition:none}.jun-palette-stagger>*{animation:jun-palette-row-in .32s cubic-bezier(.22,1,.36,1) both}@keyframes jun-palette-row-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}.jun-pal-move{transition:transform .28s cubic-bezier(.22,1,.36,1)}.jun-pal-enter-active{transition:opacity .2s ease,transform .2s cubic-bezier(.22,1,.36,1)}.jun-pal-leave-active{left:0;position:absolute;right:0;transition:opacity .12s ease,transform .12s ease}.jun-pal-enter-from,.jun-pal-leave-to{opacity:0;transform:translateY(-4px)}.jun-palette-snippet mark{background:transparent;color:inherit;font-weight:600;text-decoration:underline;text-underline-offset:2px}@media (prefers-reduced-motion:reduce){.jun-palette-panel[data-state=closed],.jun-palette-panel[data-state=open],.jun-palette-stagger>*{animation:none}.jun-pal-enter-active,.jun-pal-leave-active,.jun-pal-move,.jun-palette-cursor{transition:none}}html[data-jun-nav=bottom] .jun-player-enter-from,html[data-jun-nav=bottom] .jun-player-leave-to{transform:translateY(-1.5rem)}@media (prefers-reduced-motion:reduce){html[data-jun-nav=bottom] .jun-player-enter-from,html[data-jun-nav=bottom] .jun-player-leave-to{transform:none}}.jun-bar{--jun-bar-stack:0px;--jun-bar-inset:0px;position:fixed;transition:top .45s cubic-bezier(.22,1,.36,1),right .45s cubic-bezier(.22,1,.36,1),bottom .45s cubic-bezier(.22,1,.36,1),left .45s cubic-bezier(.22,1,.36,1),box-shadow .35s ease;z-index:60}.jun-bar-pill{align-items:center;display:flex;-webkit-user-select:none;-moz-user-select:none;user-select:none}.jun-bar[data-jun-corner=top-left]{left:calc(var(--jun-chrome-left-top, 0px) + var(--jun-bar-inset) + var(--jun-chrome-x-left, 1rem) + env(safe-area-inset-left, 0px))}.jun-bar[data-jun-corner=bottom-left]{left:calc(var(--jun-chrome-left-bottom, 0px) + var(--jun-bar-inset) + var(--jun-chrome-x-left, 1rem) + env(safe-area-inset-left, 0px))}.jun-bar[data-jun-corner=top-right]{right:calc(var(--jun-chrome-right-top, 0px) + var(--jun-bar-inset) + var(--jun-chrome-x-right, 1rem) + env(safe-area-inset-right, 0px))}.jun-bar[data-jun-corner=bottom-right]{right:calc(var(--jun-chrome-right-bottom, 0px) + var(--jun-bar-inset) + var(--jun-chrome-x-right, 1rem) + env(safe-area-inset-right, 0px))}.jun-bar[data-jun-corner^=bottom]{bottom:calc(var(--jun-chrome-bottom, 0px) + var(--jun-bar-stack) + var(--jun-chrome-y-bottom, 1rem) + env(safe-area-inset-bottom, 0px))}.jun-bar[data-jun-corner^=top]{top:calc(var(--jun-chrome-top, 0px) + var(--jun-bar-stack) + var(--jun-chrome-y-top, 1rem) + env(safe-area-inset-top, 0px))}.jun-bar-pill,.jun-bar-trigger{border-radius:var(--jun-chrome-radius,9999px)}.jun-hearth-embers{height:1px;pointer-events:none;width:1px;z-index:61}.jun-bar.is-opaque{backdrop-filter:none;-webkit-backdrop-filter:none;background-color:rgba(250,250,252,.97);background-image:none}:root.dark .jun-bar.is-opaque{background-color:rgba(24,24,27,.97)}.jun-bar-trigger{touch-action:none;-webkit-touch-callout:none}.jun-bar.is-pressing{box-shadow:0 12px 32px -8px rgba(0,0,0,.28)}.jun-bar.is-on{background-color:var(--color-neutral-900);background-image:none;border-color:transparent;color:var(--color-neutral-50)}:root.dark .jun-bar.is-on{background-color:var(--color-neutral-100);color:var(--color-neutral-900)}.jun-studio-bar{min-height:2.375rem;min-width:4rem}.jun-bar-knob{background-color:var(--color-neutral-900);bottom:1px;box-shadow:0 1px 3px rgba(0,0,0,.2);color:var(--color-neutral-50);left:1px;position:absolute;top:1px;transition:left .42s cubic-bezier(.22,1,.36,1),translate .42s cubic-bezier(.22,1,.36,1),background-color .3s ease,color .3s ease,box-shadow .3s ease;translate:0 0;width:2.25rem}:root.dark .jun-bar-knob{background-color:var(--color-neutral-100);color:var(--color-neutral-900)}.jun-bar.is-on .jun-bar-knob{background-color:var(--color-neutral-50);box-shadow:0 1px 4px rgba(0,0,0,.3);color:var(--color-neutral-900);left:calc(100% - 1px);translate:-100% 0}:root.dark .jun-bar.is-on .jun-bar-knob{background-color:var(--color-neutral-900);color:var(--color-neutral-100)}.jun-bar-row{padding:0;transition:padding .42s cubic-bezier(.22,1,.36,1)}.jun-bar.is-expanded .jun-bar-row{padding-left:2.5rem;padding-right:.5rem}.jun-bar.is-expanded.is-on .jun-bar-row{padding-left:.625rem;padding-right:2.625rem}.jun-bar-sep{background:currentColor;flex:none;height:1rem;margin-inline:.125rem;opacity:.18;width:1px}.jun-bar-title{border-bottom:1px solid color-mix(in srgb,currentColor 22%,transparent);color:inherit}.jun-bar-title::-moz-placeholder{color:currentColor;opacity:.45}.jun-bar-title::placeholder{color:currentColor;opacity:.45}.jun-bar-title:focus{border-bottom-color:color-mix(in srgb,currentColor 55%,transparent)}.jun-bar-health{box-shadow:0 0 0 2px var(--color-neutral-50)}.jun-bar.is-on .jun-bar-health,:root.dark .jun-bar-health{box-shadow:0 0 0 2px var(--color-neutral-900)}:root.dark .jun-bar.is-on .jun-bar-health{box-shadow:0 0 0 2px var(--color-neutral-100)}.jun-bar .jun-bar-trigger:hover,.jun-bar [data-jun-action]:hover{background-color:color-mix(in srgb,currentColor 10%,transparent)}[data-jun-action].is-hot{background-color:color-mix(in srgb,currentColor 18%,transparent);transform:scale(1.06)}[data-jun-action]{transition:background-color .15s ease,transform .15s cubic-bezier(.22,1,.36,1)}@media (prefers-reduced-motion:reduce){.jun-bar,.jun-bar-knob,.jun-bar-row,[data-jun-action]{transition:none}[data-jun-action].is-hot{transform:none}}
13
+ shadow-lg shadow-black/10}}@layer base{.jun-flow-page{padding-top:6rem}html[data-jun-nav=bottom] .jun-flow-page,html[data-jun-nav=rail-left] .jun-flow-page,html[data-jun-nav=rail-right] .jun-flow-page{padding-top:2rem}html[data-jun-nav=rail-left] .jun-flow-page{padding-left:var(--jun-nav-rail-w,0)}html[data-jun-nav=rail-right] .jun-flow-page{padding-right:var(--jun-nav-rail-w,0)}html[data-jun-nav=bottom] .jun-flow-page{padding-bottom:7rem}body,html{color-scheme:light dark;overscroll-behavior-y:none;scroll-behavior:smooth}body{-webkit-tap-highlight-color:transparent;padding-top:env(safe-area-inset-top);touch-action:manipulation}html{overflow-y:scroll;scrollbar-gutter:stable}:root[style*="--scrollbar-width"] body,body[data-scroll-locked]{margin-right:0!important;padding-right:0!important}html.jun-viewport-bound,html.jun-viewport-bound body{height:100vh;overflow:hidden}::-webkit-scrollbar{height:10px;width:10px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:var(--ui-border);border:2px solid transparent;border-radius:9999px}::-webkit-scrollbar-thumb:hover{background-color:var(--ui-border-accented)}::-webkit-scrollbar-corner{background:transparent}*{scrollbar-color:var(--ui-border) transparent;scrollbar-width:thin}.jun-scrollbar-hide::-webkit-scrollbar{display:none}.jun-scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}.ProseMirror[contenteditable=false] .meta-field-chip,.ProseMirror[contenteditable=false] [data-type=document-meta],.aeditor-breadcrumb{display:none!important}html[data-jun-player] body{padding-bottom:calc(4rem + env(safe-area-inset-bottom, 0px))}html[data-jun-player][data-jun-nav=bottom] body{padding-bottom:0}.jun-player{bottom:calc(1rem + env(safe-area-inset-bottom, 0px));left:50%;max-width:min(22rem,calc(100vw - 10rem));translate:-50% 0;width:-moz-max-content;width:max-content}html[data-jun-nav=bottom] .jun-player{bottom:auto;max-width:min(22rem,calc(100vw - 2rem));top:calc(1rem + env(safe-area-inset-top, 0px))}.jun-player-sheet{bottom:calc(1.5rem + env(safe-area-inset-bottom, 0px) + var(--jun-player-h, 0px));left:50%;translate:-50% 0;width:min(22rem,calc(100vw - 10rem))}html[data-jun-nav=bottom] .jun-player-sheet{bottom:auto;top:calc(1.5rem + env(safe-area-inset-top, 0px) + var(--jun-player-h, 0px));width:min(22rem,calc(100vw - 2rem))}}:root{--ui-primary:#000;--ui-container:70rem;--jun-nav-h:3rem;--jun-nav-offset:calc(var(--jun-nav-h) + env(safe-area-inset-top, 0px));--jun-chrome-top:0px;--jun-chrome-bottom:0px;--jun-chrome-left-top:0px;--jun-chrome-left-bottom:0px;--jun-chrome-right-top:0px;--jun-chrome-right-bottom:0px;--jun-sun-from:#24242a;--jun-sun-to:#0f0f12;--jun-sun-core:#fff;--jun-sun-glow:#18181b}.dark{--ui-primary:#fff;--jun-sun-from:#fafafa;--jun-sun-to:#e4e4e7;--jun-sun-core:#101013;--jun-sun-glow:#f4f4f5}.jun-nav-docked{border-left-color:transparent;border-radius:0;border-right-color:transparent;border-top-color:transparent;height:var(--jun-nav-offset);max-width:none;padding-top:env(safe-area-inset-top,0)}.jun-panel-page{top:var(--jun-nav-offset)}.a-map-toolbar-bar,.graph-toolbar-bar{backdrop-filter:blur(8px)!important;background:linear-gradient(180deg,#fff,hsla(0,0%,100%,.4))!important;border:1px solid hsla(0,0%,100%,.1)!important;border-radius:9999px!important;bottom:calc(1.5rem + env(safe-area-inset-bottom, 0px))!important;box-shadow:0 20px 25px -5px rgba(0,0,0,.12),0 8px 10px -6px rgba(0,0,0,.1),0 0 0 1px rgba(0,0,0,.05)!important;gap:4px!important;padding:4px 10px!important}.dark .a-map-toolbar-bar,.dark .graph-toolbar-bar{background:linear-gradient(180deg,#18181b,rgba(24,24,27,.7))!important;border-color:rgba(0,0,0,.05)!important;box-shadow:0 20px 25px -5px rgba(0,0,0,.4),0 8px 10px -6px rgba(0,0,0,.3),0 0 0 1px hsla(0,0%,100%,.1)!important}.a-map-toolbar-bar .toolbar-divider,.graph-toolbar-bar .toolbar-divider{background:rgba(0,0,0,.12)!important}.dark .a-map-toolbar-bar .toolbar-divider,.dark .graph-toolbar-bar .toolbar-divider{background:hsla(0,0%,100%,.15)!important}.graph-minimap{top:6rem!important}.jun-fade-enter-active,.jun-fade-leave-active{transition:opacity .22s ease}.jun-fade-enter-from,.jun-fade-leave-to{opacity:0}html[data-jun-restore] .jun-fade-enter-active,html[data-jun-restore] .jun-fade-leave-active{transition:none}.aa-presence-blobs__blob{filter:none;-webkit-mask-image:radial-gradient(closest-side,#000 0,rgba(0,0,0,.62) 42%,rgba(0,0,0,.22) 68%,transparent 100%);mask-image:radial-gradient(closest-side,#000 0,rgba(0,0,0,.62) 42%,rgba(0,0,0,.22) 68%,transparent 100%);opacity:.3}:root:not(.dark) .aa-presence-blobs__blob{opacity:.2}:root:not(.dark) .jun-presence-blobs{mix-blend-mode:multiply}:root:not(.dark) .jun-presence-blobs__blob{opacity:.24}:root:not(.dark) .jun-presence-blobs__blob:not(.is-anchored){opacity:.15}.jun-logo{transition:transform .4s cubic-bezier(.22,1,.36,1),filter .4s ease,opacity .5s ease}.jun-logo-dot,.jun-sun-core{transform-box:fill-box;transform-origin:center;transition:transform .4s cubic-bezier(.22,1,.36,1)}.jun-logo-dot:nth-of-type(2){transition-delay:.04s}.jun-logo-dot:nth-of-type(3){transition-delay:.08s}.jun-sun-halo{transform-box:fill-box;transform-origin:center;transition:opacity .4s ease,transform .4s cubic-bezier(.22,1,.36,1)}:is(.jun-logo:hover,:is(a,button,summary,.jun-logo-lockup):hover .jun-logo):not(.jun-logo--sun){transform:scale(1.04)}:is(.jun-logo:hover,:is(a,button,summary,.jun-logo-lockup):hover .jun-logo) .jun-logo-dot{transform:scale(1.18)}:is(.jun-logo--sun:hover,:is(a,button,summary,.jun-logo-lockup):hover .jun-logo--sun) .jun-sun-halo{opacity:.8;transform:scale(1.14)}:is(.jun-logo--sun:hover,:is(a,button,summary,.jun-logo-lockup):hover .jun-logo--sun) .jun-sun-core{transform:scale(1.1)}:is(.jun-logo:active,:is(a,button,summary):active .jun-logo):not(.jun-logo--sun){transform:scale(.96)}:is(.jun-logo--sun:active,:is(a,button,summary):active .jun-logo--sun) .jun-sun-core{transform:scale(.9)}.jun-logo-bang:empty{display:none}.jun-logo-bang{display:inline-block;font-weight:700;padding-inline:.02em;transition:transform .4s cubic-bezier(.22,1,.36,1)}:is(a,button,summary,.jun-logo-lockup):hover .jun-logo-bang{transform:translateY(-.06em)}.jun-logo-lockup.is-sun .jun-logo-bang{color:var(--jun-sun-glow)}@media (prefers-reduced-motion:reduce){.jun-logo,.jun-logo-bang,.jun-logo-dot,.jun-sun-core,.jun-sun-halo{transition:none}}html.doc-dragging .ProseMirror{border-radius:8px;outline:2px dashed rgba(0,0,0,.18);outline-offset:8px;transition:outline-color .2s ease}html.dark.doc-dragging .ProseMirror,html.doc-dragging.dark .ProseMirror{outline-color:hsla(0,0%,100%,.22)}html.doc-dragging [data-doc-drop-zone]{border-radius:10px;outline:2px dashed rgba(0,0,0,.14);outline-offset:4px}html.dark.doc-dragging [data-doc-drop-zone],html.doc-dragging.dark [data-doc-drop-zone]{outline-color:hsla(0,0%,100%,.18)}html.theme-switching,html.theme-switching *{transition:background-color .45s ease,color .45s ease,border-color .45s ease,fill .45s ease,stroke .45s ease!important}@media (prefers-reduced-motion:reduce){.jun-fade-enter-active,.jun-fade-leave-active{transition:none}html.theme-switching,html.theme-switching *{transition:none!important}}html.jun-surface-soft *,html.jun-surface-soft :after,html.jun-surface-soft :before,html.jun-surface-solid *,html.jun-surface-solid :after,html.jun-surface-solid :before{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}html.jun-surface-soft .jun-blur,html.jun-surface-soft .jun-blur-gradient,html.jun-surface-soft .jun-blur-inverted,html.jun-surface-soft .jun-campfire-banner,html.jun-surface-soft .jun-campfire-panel,html.jun-surface-soft .jun-campfire-pill,html.jun-surface-soft .jun-chrome{backdrop-filter:blur(8px)!important;-webkit-backdrop-filter:blur(8px)!important}html.jun-surface-solid .jun-blur,html.jun-surface-solid .jun-blur-gradient,html.jun-surface-solid .jun-card,html.jun-surface-solid .jun-chrome{background-color:rgba(250,250,252,.97)!important;background-image:none!important}html.jun-surface-solid.dark .jun-blur,html.jun-surface-solid.dark .jun-blur-gradient,html.jun-surface-solid.dark .jun-card,html.jun-surface-solid.dark .jun-chrome{background-color:rgba(24,24,27,.97)!important}html.jun-surface-solid .jun-campfire-banner,html.jun-surface-solid .jun-campfire-panel,html.jun-surface-solid .jun-campfire-pill{background:hsla(0,0%,100%,.97)!important}html.jun-surface-solid.dark .jun-campfire-banner,html.jun-surface-solid.dark .jun-campfire-panel,html.jun-surface-solid.dark .jun-campfire-pill{background:rgba(24,24,27,.97)!important}html.jun-surface-solid .jun-blur-inverted{background-color:rgba(250,250,252,.92)!important;background-image:none!important}html.jun-surface-solid.dark .jun-blur-inverted{background-color:rgba(14,15,17,.92)!important}.jun-palette-panel{display:flex;flex-direction:column;left:var(--jun-palette-left,50vw);max-height:var(--jun-palette-max-h,min(60vh,34rem));max-width:none;overflow:hidden;position:fixed;top:var(--jun-palette-top,5.5rem);transform-origin:var(--jun-palette-origin,top center);translate:var(--jun-palette-tx,-50%) var(--jun-palette-ty,0);width:var(--jun-palette-w,min(42rem,calc(100vw - 2rem)))}.jun-palette-panel[data-state=open]{animation:jun-palette-in .26s cubic-bezier(.22,1,.36,1) both}.jun-palette-panel[data-state=closed]{animation:jun-palette-out .13s ease-in both}@keyframes jun-palette-in{0%{opacity:0;transform:var(--jun-palette-from,translateY(-8px)) scale(.97)}to{opacity:1;transform:none}}@keyframes jun-palette-out{0%{opacity:1;transform:none}to{opacity:0;transform:var(--jun-palette-from,translateY(-8px)) scale(.98)}}.jun-palette-cursor{border-radius:.375rem;left:.5rem;pointer-events:none;position:absolute;right:.5rem;top:0;transition:transform .26s cubic-bezier(.22,1,.36,1),height .26s cubic-bezier(.22,1,.36,1),opacity .16s ease}.jun-palette-cursor.is-placing{transition:none}.jun-settings-panel{display:flex;flex-direction:column;height:min(46rem,calc(100vh - 4rem));left:50vw;max-height:none;max-width:none;overflow:hidden;position:fixed;top:50vh;transform-origin:center;translate:-50% -50%;width:min(56rem,calc(100vw - 2rem))}.jun-settings-panel[data-state=open]{animation:jun-settings-in .26s cubic-bezier(.22,1,.36,1) both}.jun-settings-panel[data-state=closed]{animation:jun-settings-out .13s ease-in both}@keyframes jun-settings-in{0%{opacity:0;transform:scale(.97)}to{opacity:1;transform:none}}@keyframes jun-settings-out{0%{opacity:1;transform:none}to{opacity:0;transform:scale(.98)}}@media (max-width:767px){.jun-settings-panel{border-radius:.75rem;height:calc(100dvh - 2rem);width:calc(100vw - 1rem)}}.jun-settings-marker{transition:top .22s cubic-bezier(.22,1,.36,1),height .22s cubic-bezier(.22,1,.36,1)}@media (prefers-reduced-motion:reduce){.jun-settings-panel[data-state=closed],.jun-settings-panel[data-state=open]{animation-duration:1ms}.jun-settings-marker{transition:none}}.jun-palette-stagger>*{animation:jun-palette-row-in .32s cubic-bezier(.22,1,.36,1) both}@keyframes jun-palette-row-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}.jun-pal-move{transition:transform .28s cubic-bezier(.22,1,.36,1)}.jun-pal-enter-active{transition:opacity .2s ease,transform .2s cubic-bezier(.22,1,.36,1)}.jun-pal-leave-active{left:0;position:absolute;right:0;transition:opacity .12s ease,transform .12s ease}.jun-pal-enter-from,.jun-pal-leave-to{opacity:0;transform:translateY(-4px)}.jun-palette-snippet mark{background:transparent;color:inherit;font-weight:600;text-decoration:underline;text-underline-offset:2px}@media (prefers-reduced-motion:reduce){.jun-palette-panel[data-state=closed],.jun-palette-panel[data-state=open],.jun-palette-stagger>*{animation:none}.jun-pal-enter-active,.jun-pal-leave-active,.jun-pal-move,.jun-palette-cursor{transition:none}}html[data-jun-nav=bottom] .jun-player-enter-from,html[data-jun-nav=bottom] .jun-player-leave-to{transform:translateY(-1.5rem)}@media (prefers-reduced-motion:reduce){html[data-jun-nav=bottom] .jun-player-enter-from,html[data-jun-nav=bottom] .jun-player-leave-to{transform:none}}.jun-bar{--jun-bar-stack:0px;--jun-bar-inset:0px;position:fixed;transition:top .45s cubic-bezier(.22,1,.36,1),right .45s cubic-bezier(.22,1,.36,1),bottom .45s cubic-bezier(.22,1,.36,1),left .45s cubic-bezier(.22,1,.36,1),box-shadow .35s ease;z-index:60}.jun-bar-pill{align-items:center;display:flex;-webkit-user-select:none;-moz-user-select:none;user-select:none}.jun-bar[data-jun-corner=top-left]{left:calc(var(--jun-chrome-left-top, 0px) + var(--jun-bar-inset) + var(--jun-chrome-x-left, 1rem) + env(safe-area-inset-left, 0px))}.jun-bar[data-jun-corner=bottom-left]{left:calc(var(--jun-chrome-left-bottom, 0px) + var(--jun-bar-inset) + var(--jun-chrome-x-left, 1rem) + env(safe-area-inset-left, 0px))}.jun-bar[data-jun-corner=top-right]{right:calc(var(--jun-chrome-right-top, 0px) + var(--jun-bar-inset) + var(--jun-chrome-x-right, 1rem) + env(safe-area-inset-right, 0px))}.jun-bar[data-jun-corner=bottom-right]{right:calc(var(--jun-chrome-right-bottom, 0px) + var(--jun-bar-inset) + var(--jun-chrome-x-right, 1rem) + env(safe-area-inset-right, 0px))}.jun-bar[data-jun-corner^=bottom]{bottom:calc(var(--jun-chrome-bottom, 0px) + var(--jun-bar-stack) + var(--jun-chrome-y-bottom, 1rem) + env(safe-area-inset-bottom, 0px))}.jun-bar[data-jun-corner^=top]{top:calc(var(--jun-chrome-top, 0px) + var(--jun-bar-stack) + var(--jun-chrome-y-top, 1rem) + env(safe-area-inset-top, 0px))}.jun-bar-pill,.jun-bar-trigger{border-radius:var(--jun-chrome-radius,9999px)}.jun-hearth-embers{height:1px;pointer-events:none;width:1px;z-index:61}.jun-bar.is-opaque{backdrop-filter:none;-webkit-backdrop-filter:none;background-color:rgba(250,250,252,.97);background-image:none}:root.dark .jun-bar.is-opaque{background-color:rgba(24,24,27,.97)}.jun-bar-trigger{touch-action:none;-webkit-touch-callout:none}.jun-bar.is-pressing{box-shadow:0 12px 32px -8px rgba(0,0,0,.28)}.jun-bar.is-on{background-color:var(--color-neutral-900);background-image:none;border-color:transparent;color:var(--color-neutral-50)}:root.dark .jun-bar.is-on{background-color:var(--color-neutral-100);color:var(--color-neutral-900)}.jun-studio-bar{min-height:2.375rem;min-width:4rem}.jun-bar-knob{background-color:var(--color-neutral-900);bottom:1px;box-shadow:0 1px 3px rgba(0,0,0,.2);color:var(--color-neutral-50);left:1px;position:absolute;top:1px;transition:left .42s cubic-bezier(.22,1,.36,1),translate .42s cubic-bezier(.22,1,.36,1),background-color .3s ease,color .3s ease,box-shadow .3s ease;translate:0 0;width:2.25rem}:root.dark .jun-bar-knob{background-color:var(--color-neutral-100);color:var(--color-neutral-900)}.jun-bar.is-on .jun-bar-knob{background-color:var(--color-neutral-50);box-shadow:0 1px 4px rgba(0,0,0,.3);color:var(--color-neutral-900);left:calc(100% - 1px);translate:-100% 0}:root.dark .jun-bar.is-on .jun-bar-knob{background-color:var(--color-neutral-900);color:var(--color-neutral-100)}.jun-bar-row{padding:0;transition:padding .42s cubic-bezier(.22,1,.36,1)}.jun-bar.is-expanded .jun-bar-row{padding-left:2.5rem;padding-right:.5rem}.jun-bar.is-expanded.is-on .jun-bar-row{padding-left:.625rem;padding-right:2.625rem}.jun-bar-sep{background:currentColor;flex:none;height:1rem;margin-inline:.125rem;opacity:.18;width:1px}.jun-bar-title{border-bottom:1px solid color-mix(in srgb,currentColor 22%,transparent);color:inherit}.jun-bar-title::-moz-placeholder{color:currentColor;opacity:.45}.jun-bar-title::placeholder{color:currentColor;opacity:.45}.jun-bar-title:focus{border-bottom-color:color-mix(in srgb,currentColor 55%,transparent)}.jun-bar-health{box-shadow:0 0 0 2px var(--color-neutral-50)}.jun-bar.is-on .jun-bar-health,:root.dark .jun-bar-health{box-shadow:0 0 0 2px var(--color-neutral-900)}:root.dark .jun-bar.is-on .jun-bar-health{box-shadow:0 0 0 2px var(--color-neutral-100)}.jun-bar .jun-bar-trigger:hover,.jun-bar [data-jun-action]:hover{background-color:color-mix(in srgb,currentColor 10%,transparent)}[data-jun-action].is-hot{background-color:color-mix(in srgb,currentColor 18%,transparent);transform:scale(1.06)}[data-jun-action]{transition:background-color .15s ease,transform .15s cubic-bezier(.22,1,.36,1)}@media (prefers-reduced-motion:reduce){.jun-bar,.jun-bar-knob,.jun-bar-row,[data-jun-action]{transition:none}[data-jun-action].is-hot{transform:none}}
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,195 @@
1
+ <script setup>
2
+ import { computed, nextTick, onMounted, ref, watch } from "vue";
3
+ import { useMediaQuery } from "@vueuse/core";
4
+ import {
5
+ defineShortcuts,
6
+ useJunSettings,
7
+ useJunSiteConfig,
8
+ useJunStudio
9
+ } from "#imports";
10
+ const { open, section, drilled, activeSection, sections, selectSection, backToList } = useJunSettings();
11
+ const { canEdit } = useJunStudio();
12
+ const site = useJunSiteConfig();
13
+ const mounted = ref(false);
14
+ onMounted(() => {
15
+ mounted.value = true;
16
+ });
17
+ const isNarrow = useMediaQuery("(max-width: 767px)");
18
+ const narrow = computed(() => mounted.value && isNarrow.value);
19
+ const showingList = computed(() => narrow.value && !drilled.value);
20
+ const showingSection = computed(() => !narrow.value || drilled.value);
21
+ const railEl = ref(null);
22
+ const marker = ref(null);
23
+ function measureMarker() {
24
+ const rail = railEl.value;
25
+ if (!rail) return;
26
+ const active = rail.querySelector('[data-jun-active="true"]');
27
+ if (!active) {
28
+ marker.value = null;
29
+ return;
30
+ }
31
+ marker.value = { top: active.offsetTop, height: active.offsetHeight };
32
+ }
33
+ watch(
34
+ [section, open, narrow],
35
+ () => {
36
+ void nextTick(measureMarker);
37
+ },
38
+ { immediate: true }
39
+ );
40
+ watch(open, (isOpen) => {
41
+ if (!isOpen) return;
42
+ site.ensure();
43
+ if (!narrow.value) drilled.value = true;
44
+ });
45
+ function onSelect(id) {
46
+ selectSection(id);
47
+ }
48
+ defineShortcuts({
49
+ "meta_,": () => {
50
+ if (!canEdit.value) return;
51
+ open.value = !open.value;
52
+ }
53
+ });
54
+ </script>
55
+
56
+ <template>
57
+ <UModal
58
+ v-model:open="open"
59
+ :dismissible="true"
60
+ :ui="{
61
+ // The SURFACE only. Position, size and motion are in `jun.css`, computed
62
+ // from nothing — unlike the palette this does not dock to the navbar, it
63
+ // is a workspace and it centres. Same glass recipe on the content element
64
+ // ITSELF, never on a child: the wrapper clips overflow and a ring is an
65
+ // outset shadow, so a ring on a child gets shaved off.
66
+ content: 'jun-settings-panel jun-blur-gradient rounded-xl divide-y-0 shadow-none border-1 border-white/10 dark:border-black/5 ring-1 ring-black/5 dark:ring-white/10',
67
+ overlay: 'bg-black/[0.06] dark:bg-black/35'
68
+ }"
69
+ >
70
+ <template #content>
71
+ <div class="flex min-h-0 flex-1 flex-col overflow-hidden rounded-xl">
72
+ <!-- Header. Same 3rem rhythm as the palette's input row. -->
73
+ <div class="flex h-12 shrink-0 items-center gap-2 border-b border-black/5 px-3 dark:border-white/10">
74
+ <button
75
+ v-if="narrow && drilled"
76
+ type="button"
77
+ class="flex size-7 shrink-0 items-center justify-center rounded-md opacity-70 transition-opacity hover:opacity-100"
78
+ aria-label="Back to all settings"
79
+ @click="backToList()"
80
+ >
81
+ <UIcon
82
+ name="i-lucide-chevron-left"
83
+ class="size-4"
84
+ />
85
+ </button>
86
+ <UIcon
87
+ v-else
88
+ name="i-lucide-settings-2"
89
+ class="ml-1 size-4 shrink-0 opacity-60"
90
+ />
91
+
92
+ <span class="min-w-0 flex-1 truncate text-sm tracking-widest">
93
+ {{ narrow && drilled ? activeSection.label : "Site settings" }}
94
+ </span>
95
+
96
+ <!-- The one status worth the space: a silently read-only settings
97
+ panel is the failure this makes loud, the same way the studio
98
+ bar's health dot does for the page in front of you. -->
99
+ <span
100
+ v-if="!canEdit"
101
+ class="shrink-0 rounded-full bg-black/5 px-2 py-0.5 text-[0.6875rem] opacity-70 dark:bg-white/10"
102
+ >read-only</span>
103
+
104
+ <button
105
+ type="button"
106
+ class="hidden shrink-0 opacity-60 transition-opacity hover:opacity-100 sm:inline-flex"
107
+ aria-label="Close"
108
+ title="Close"
109
+ @click="open = false"
110
+ >
111
+ <UKbd value="esc" />
112
+ </button>
113
+ </div>
114
+
115
+ <!-- Body. `min-h-0` on the row AND on both columns, or the panel's
116
+ height cap does nothing and the sections spill past the rounded
117
+ corner — the rail placements learned this the same way. -->
118
+ <div class="flex min-h-0 flex-1 overflow-hidden">
119
+ <!-- The rail / the list. One element, two shapes: on a wide panel it
120
+ is a fixed-width column beside the section, on a narrow one it
121
+ fills the panel and the section replaces it. -->
122
+ <nav
123
+ v-if="!narrow || showingList"
124
+ ref="railEl"
125
+ class="jun-settings-rail relative min-h-0 shrink-0 overflow-y-auto py-2"
126
+ :class="narrow ? 'w-full flex-1 px-2' : 'w-52 border-r border-black/5 px-2 dark:border-white/10'"
127
+ aria-label="Settings sections"
128
+ >
129
+ <!-- The marker. Absolutely positioned and transitioned, so it
130
+ GLIDES between items instead of two items swapping a class. -->
131
+ <div
132
+ v-if="marker && !narrow"
133
+ class="jun-settings-marker pointer-events-none absolute right-2 left-2 rounded-md bg-black/[0.06] dark:bg-white/[0.08]"
134
+ :style="{ top: `${marker.top}px`, height: `${marker.height}px` }"
135
+ />
136
+
137
+ <button
138
+ v-for="s in sections"
139
+ :key="s.id"
140
+ type="button"
141
+ :data-jun-active="s.id === section ? 'true' : 'false'"
142
+ class="relative flex w-full cursor-pointer items-center gap-2.5 rounded-md px-2.5 text-left transition-opacity"
143
+ :class="[
144
+ narrow ? 'py-2.5' : 'py-2',
145
+ s.id === section && !narrow ? 'opacity-100' : 'opacity-65 hover:opacity-100'
146
+ ]"
147
+ @click="onSelect(s.id)"
148
+ >
149
+ <UIcon
150
+ :name="s.icon"
151
+ class="size-4 shrink-0"
152
+ />
153
+ <span class="min-w-0 flex-1">
154
+ <span class="block truncate text-sm">{{ s.label }}</span>
155
+ <span
156
+ v-if="narrow"
157
+ class="block truncate text-xs opacity-55"
158
+ >{{ s.hint }}</span>
159
+ </span>
160
+ <UIcon
161
+ v-if="narrow"
162
+ name="i-lucide-chevron-right"
163
+ class="size-4 shrink-0 opacity-40"
164
+ />
165
+ </button>
166
+ </nav>
167
+
168
+ <!-- The section. Keyed on the section id so the fade runs per
169
+ section — without the key Vue patches one section's DOM into the
170
+ next and nothing transitions. -->
171
+ <div
172
+ v-if="showingSection"
173
+ class="min-h-0 min-w-0 flex-1 overflow-y-auto p-4 sm:p-5"
174
+ >
175
+ <Transition
176
+ name="jun-settings-swap"
177
+ mode="out-in"
178
+ >
179
+ <JunConfigRenderer
180
+ :key="section"
181
+ :doc-id="site.docId.value ?? ''"
182
+ :section="section"
183
+ bare
184
+ />
185
+ </Transition>
186
+ </div>
187
+ </div>
188
+ </div>
189
+ </template>
190
+ </UModal>
191
+ </template>
192
+
193
+ <style scoped>
194
+ .jun-settings-swap-enter-active,.jun-settings-swap-leave-active{transition:opacity .14s ease}.jun-settings-swap-enter-from,.jun-settings-swap-leave-to{opacity:0}
195
+ </style>
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -1,14 +1,11 @@
1
1
  <script setup>
2
2
  import { computed, ref, shallowRef, watch, onUnmounted } from "vue";
3
- import { useRouter } from "vue-router";
4
3
  import { useEventListener } from "@vueuse/core";
5
4
  import {
6
5
  useAbracadabra,
7
6
  useChildTree,
8
- useDocSlugs,
9
7
  useDocTree,
10
8
  useDocumentPermissions,
11
- useJunBrand,
12
9
  junMirrorCorner,
13
10
  useJunChromeInsets,
14
11
  useJunChromeSlot,
@@ -18,6 +15,7 @@ import {
18
15
  useJunPressDrag,
19
16
  useJunRename,
20
17
  useJunSearch,
18
+ useJunSettings,
21
19
  useJunSiteConfig,
22
20
  useJunStudio,
23
21
  usePluginRegistry,
@@ -27,12 +25,12 @@ import {
27
25
  const { canEdit, editMode, toggleEdit, setEditMode } = useJunStudio();
28
26
  const { logout, status, synced, unsyncedChanges, effectiveRole, provider, spaceDocId } = useAbracadabra();
29
27
  const toast = useToast();
30
- const brand = useJunBrand();
31
28
  const opts = useJunOptions();
32
29
  const abra = useAbracadabra();
33
30
  const { getEntry } = useDocTree();
34
31
  const registry = usePluginRegistry();
35
32
  const typeTree = useChildTree(abra.doc, "jun-studio-type-switch");
33
+ const siteConfig = useJunSiteConfig();
36
34
  const normalizeIcon = (raw) => {
37
35
  if (!raw) return "i-lucide-file";
38
36
  if (raw.startsWith("i-") || raw.includes(":")) return raw;
@@ -89,22 +87,15 @@ const typeMenuItems = computed(() => [
89
87
  function changeType(key, label) {
90
88
  const id = targetDocId.value;
91
89
  if (!id) return;
92
- const entry = typeTree.treeMap.get(id);
90
+ let entry = typeTree.treeMap.get(id);
93
91
  if (entry?.type === key) return;
94
92
  if (!entry) {
95
93
  if (!isRootTarget.value) return;
96
- const now = Date.now();
97
- typeTree.treeMap.set(id, {
98
- label: brand.value.name,
99
- parentId: null,
100
- order: 0,
101
- type: key,
102
- createdAt: now,
103
- updatedAt: now
104
- });
105
- } else {
106
- typeTree.treeMap.set(id, { ...entry, type: key, updatedAt: Date.now() });
94
+ if (!siteConfig.ensure()) return;
95
+ entry = typeTree.treeMap.get(id);
96
+ if (!entry) return;
107
97
  }
98
+ typeTree.treeMap.set(id, { ...entry, type: key, updatedAt: Date.now() });
108
99
  toast.add({ title: `Page type \u2192 ${label}`, icon: "i-lucide-repeat", color: "neutral" });
109
100
  }
110
101
  const selfTitledTypes = computed(() => new Set(opts.pageTypes));
@@ -239,20 +230,17 @@ async function onLogout() {
239
230
  }
240
231
  toast.add({ title: "Signed out", icon: "i-lucide-log-out", color: "neutral" });
241
232
  }
242
- const siteConfig = useJunSiteConfig();
243
- const { getDocUrl: configDocUrl } = useDocSlugs();
244
- const router = useRouter();
233
+ const { openSettings } = useJunSettings();
245
234
  function openSiteSettings() {
246
- const id = siteConfig.ensure();
247
- const to = id ? configDocUrl(id) : null;
248
- if (to) void router.push(to);
249
- else {
235
+ if (!siteConfig.ensure()) {
250
236
  toast.add({
251
237
  title: "Still syncing \u2014 try again in a moment",
252
238
  icon: "i-lucide-loader",
253
239
  color: "neutral"
254
240
  });
241
+ return;
255
242
  }
243
+ openSettings();
256
244
  }
257
245
  const { openSearch } = useJunSearch();
258
246
  const { createPage } = useJunCreatePage();
@@ -1,9 +1,22 @@
1
+ import type { JunSettingsSection } from '../../composables/useJunSettings.js';
1
2
  type __VLS_Props = {
2
3
  docId: string;
3
4
  docLabel?: string;
4
5
  docMeta?: Record<string, unknown>;
5
6
  childProvider?: unknown;
6
7
  editable?: boolean;
8
+ /**
9
+ * Render ONE section instead of the whole page.
10
+ *
11
+ * `<JunSettings>` mounts this inside a modal and drives the section from its
12
+ * rail; the page form (a legacy `jun-config` document, still routable) leaves
13
+ * it unset and stacks all eight as before. Two surfaces, one source — the
14
+ * alternative was eight section components and a second copy of the
15
+ * vocabularies, the two-way state and the upload handling that feed them.
16
+ */
17
+ section?: JunSettingsSection;
18
+ /** Suppress the page hero. The modal supplies its own header. */
19
+ bare?: boolean;
7
20
  };
8
21
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
22
  declare const _default: typeof __VLS_export;
@@ -7,11 +7,10 @@ import {
7
7
  junCampfireLabel,
8
8
  junCampfireReactions,
9
9
  useAbracadabra,
10
- useChildTree,
11
- useDocTree,
12
10
  useJunBackdrop,
13
11
  useJunBackgroundImage,
14
12
  useJunOptions,
13
+ useJunSiteConfig,
15
14
  useJunStudio,
16
15
  useJunUpload
17
16
  } from "#imports";
@@ -20,19 +19,16 @@ const props = defineProps({
20
19
  docLabel: { type: String, required: false },
21
20
  docMeta: { type: Object, required: false },
22
21
  childProvider: { type: null, required: false },
23
- editable: { type: Boolean, required: false }
22
+ editable: { type: Boolean, required: false },
23
+ section: { type: String, required: false },
24
+ bare: { type: Boolean, required: false }
24
25
  });
25
26
  const route = useRoute();
26
27
  const abra = useAbracadabra();
27
- const tree = useChildTree(abra.doc, props.docId);
28
- const { getEntry } = useDocTree();
29
28
  const { editing, canEdit } = useJunStudio();
30
- const config = computed(
31
- () => getEntry(props.docId)?.meta ?? props.docMeta ?? {}
32
- );
33
- function set(patch) {
34
- tree.updateMeta(props.docId, patch);
35
- }
29
+ const site = useJunSiteConfig();
30
+ const config = site.config;
31
+ const set = site.set;
36
32
  function setText(key, e) {
37
33
  const value = e.target.value.trim();
38
34
  set({ [key]: value || void 0 });
@@ -495,6 +491,9 @@ const campfireNoPanels = computed(
495
491
  const cardBase = "group flex flex-col items-center justify-center gap-1.5 rounded-lg px-2 py-3 text-center ring-1 transition-all duration-150 select-none w-full disabled:opacity-50 disabled:pointer-events-none";
496
492
  const cardOff = "ring-black/10 dark:ring-white/10 hover:ring-black/25 dark:hover:ring-white/25 hover:bg-black/[0.03] dark:hover:bg-white/[0.04] cursor-pointer";
497
493
  const cardOn = "ring-2 ring-black dark:ring-white bg-black/[0.04] dark:bg-white/[0.06]";
494
+ function shows(id) {
495
+ return !props.section || props.section === id;
496
+ }
498
497
  </script>
499
498
 
500
499
  <template>
@@ -505,9 +504,11 @@ const cardOn = "ring-2 ring-black dark:ring-white bg-black/[0.04] dark:bg-white/
505
504
 
506
505
  <div
507
506
  v-else
508
- class="mx-auto w-full max-w-3xl px-4 pb-24 sm:px-6"
507
+ class="w-full"
508
+ :class="bare ? '' : 'mx-auto max-w-3xl px-4 pb-24 sm:px-6'"
509
509
  >
510
510
  <JunPageHero
511
+ v-if="!bare"
511
512
  title="Site settings"
512
513
  subtitle="How this site presents itself. Every change is a CRDT write — live on every open tab, yours and every visitor's."
513
514
  >
@@ -525,9 +526,13 @@ const cardOn = "ring-2 ring-black dark:ring-white bg-black/[0.04] dark:bg-white/
525
526
  </template>
526
527
  </JunPageHero>
527
528
 
528
- <div class="mt-10 space-y-8">
529
+ <div :class="bare ? 'space-y-8' : 'mt-10 space-y-8'">
529
530
  <!-- Identity -->
530
- <section class="jun-card space-y-5 rounded-2xl p-6">
531
+ <section
532
+ v-if="shows('identity')"
533
+ class="space-y-5"
534
+ :class="bare ? '' : 'jun-card rounded-2xl p-6'"
535
+ >
531
536
  <header class="flex items-start gap-3">
532
537
  <span class="flex size-9 flex-none items-center justify-center rounded-lg bg-black/5 dark:bg-white/10">
533
538
  <UIcon
@@ -594,7 +599,11 @@ const cardOn = "ring-2 ring-black dark:ring-white bg-black/[0.04] dark:bg-white/
594
599
  </section>
595
600
 
596
601
  <!-- Navigation -->
597
- <section class="jun-card space-y-5 rounded-2xl p-6">
602
+ <section
603
+ v-if="shows('navigation')"
604
+ class="space-y-5"
605
+ :class="bare ? '' : 'jun-card rounded-2xl p-6'"
606
+ >
598
607
  <header class="flex items-start gap-3">
599
608
  <span class="flex size-9 flex-none items-center justify-center rounded-lg bg-black/5 dark:bg-white/10">
600
609
  <UIcon
@@ -955,7 +964,11 @@ const cardOn = "ring-2 ring-black dark:ring-white bg-black/[0.04] dark:bg-white/
955
964
  </section>
956
965
 
957
966
  <!-- Brand mark -->
958
- <section class="jun-card space-y-5 rounded-2xl p-6">
967
+ <section
968
+ v-if="shows('mark')"
969
+ class="space-y-5"
970
+ :class="bare ? '' : 'jun-card rounded-2xl p-6'"
971
+ >
959
972
  <header class="flex items-start gap-3">
960
973
  <span class="flex size-9 flex-none items-center justify-center rounded-lg bg-black/5 dark:bg-white/10">
961
974
  <UIcon
@@ -1020,7 +1033,11 @@ const cardOn = "ring-2 ring-black dark:ring-white bg-black/[0.04] dark:bg-white/
1020
1033
  </section>
1021
1034
 
1022
1035
  <!-- Theme -->
1023
- <section class="jun-card space-y-5 rounded-2xl p-6">
1036
+ <section
1037
+ v-if="shows('theme')"
1038
+ class="space-y-5"
1039
+ :class="bare ? '' : 'jun-card rounded-2xl p-6'"
1040
+ >
1024
1041
  <header class="flex items-start gap-3">
1025
1042
  <span class="flex size-9 flex-none items-center justify-center rounded-lg bg-black/5 dark:bg-white/10">
1026
1043
  <UIcon
@@ -1418,7 +1435,11 @@ const cardOn = "ring-2 ring-black dark:ring-white bg-black/[0.04] dark:bg-white/
1418
1435
  </section>
1419
1436
 
1420
1437
  <!-- Announcement -->
1421
- <section class="jun-card space-y-5 rounded-2xl p-6">
1438
+ <section
1439
+ v-if="shows('announcement')"
1440
+ class="space-y-5"
1441
+ :class="bare ? '' : 'jun-card rounded-2xl p-6'"
1442
+ >
1422
1443
  <header class="flex items-start gap-3">
1423
1444
  <span class="flex size-9 flex-none items-center justify-center rounded-lg bg-black/5 dark:bg-white/10">
1424
1445
  <UIcon
@@ -1469,7 +1490,11 @@ const cardOn = "ring-2 ring-black dark:ring-white bg-black/[0.04] dark:bg-white/
1469
1490
  </section>
1470
1491
 
1471
1492
  <!-- User Center -->
1472
- <section class="jun-card space-y-5 rounded-2xl p-6">
1493
+ <section
1494
+ v-if="shows('campfire')"
1495
+ class="space-y-5"
1496
+ :class="bare ? '' : 'jun-card rounded-2xl p-6'"
1497
+ >
1473
1498
  <header class="flex items-start gap-3">
1474
1499
  <!-- The section wears the site's own name and mark for it: this is
1475
1500
  the one place both are edited, so it doubles as their preview. -->
@@ -1898,7 +1923,11 @@ const cardOn = "ring-2 ring-black dark:ring-white bg-black/[0.04] dark:bg-white/
1898
1923
  </section>
1899
1924
 
1900
1925
  <!-- Footer -->
1901
- <section class="jun-card space-y-5 rounded-2xl p-6">
1926
+ <section
1927
+ v-if="shows('footer')"
1928
+ class="space-y-5"
1929
+ :class="bare ? '' : 'jun-card rounded-2xl p-6'"
1930
+ >
1902
1931
  <header class="flex items-start gap-3">
1903
1932
  <span class="flex size-9 flex-none items-center justify-center rounded-lg bg-black/5 dark:bg-white/10">
1904
1933
  <UIcon
@@ -1944,7 +1973,11 @@ const cardOn = "ring-2 ring-black dark:ring-white bg-black/[0.04] dark:bg-white/
1944
1973
  </section>
1945
1974
 
1946
1975
  <!-- Visitors -->
1947
- <section class="jun-card space-y-5 rounded-2xl p-6">
1976
+ <section
1977
+ v-if="shows('visitors')"
1978
+ class="space-y-5"
1979
+ :class="bare ? '' : 'jun-card rounded-2xl p-6'"
1980
+ >
1948
1981
  <header class="flex items-start gap-3">
1949
1982
  <span class="flex size-9 flex-none items-center justify-center rounded-lg bg-black/5 dark:bg-white/10">
1950
1983
  <UIcon
@@ -1,9 +1,22 @@
1
+ import type { JunSettingsSection } from '../../composables/useJunSettings.js';
1
2
  type __VLS_Props = {
2
3
  docId: string;
3
4
  docLabel?: string;
4
5
  docMeta?: Record<string, unknown>;
5
6
  childProvider?: unknown;
6
7
  editable?: boolean;
8
+ /**
9
+ * Render ONE section instead of the whole page.
10
+ *
11
+ * `<JunSettings>` mounts this inside a modal and drives the section from its
12
+ * rail; the page form (a legacy `jun-config` document, still routable) leaves
13
+ * it unset and stacks all eight as before. Two surfaces, one source — the
14
+ * alternative was eight section components and a second copy of the
15
+ * vocabularies, the two-way state and the upload handling that feed them.
16
+ */
17
+ section?: JunSettingsSection;
18
+ /** Suppress the page hero. The modal supplies its own header. */
19
+ bare?: boolean;
7
20
  };
8
21
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
22
  declare const _default: typeof __VLS_export;