@abraca/junis 2.87.0 → 2.90.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.
- package/dist/module.d.mts +43 -4
- package/dist/module.json +1 -1
- package/dist/module.mjs +121 -6
- package/dist/runtime/assets/css/jun.css +2 -2
- package/dist/runtime/components/JunDocSurface.d.vue.ts +20 -2
- package/dist/runtime/components/JunDocSurface.vue +27 -2
- package/dist/runtime/components/JunDocSurface.vue.d.ts +20 -2
- package/dist/runtime/components/JunHead.vue +16 -4
- package/dist/runtime/components/JunNavDock.d.vue.ts +15 -0
- package/dist/runtime/components/JunNavDock.vue +94 -0
- package/dist/runtime/components/JunNavDock.vue.d.ts +15 -0
- package/dist/runtime/components/JunNavMenu.client.d.vue.ts +15 -0
- package/dist/runtime/components/JunNavMenu.client.vue +501 -0
- package/dist/runtime/components/JunNavMenu.client.vue.d.ts +15 -0
- package/dist/runtime/components/JunNavPreview.d.vue.ts +17 -0
- package/dist/runtime/components/JunNavPreview.vue +169 -0
- package/dist/runtime/components/JunNavPreview.vue.d.ts +17 -0
- package/dist/runtime/components/JunNavigation.d.vue.ts +4 -11
- package/dist/runtime/components/JunNavigation.vue +813 -138
- package/dist/runtime/components/JunNavigation.vue.d.ts +4 -11
- package/dist/runtime/components/JunNoteLinks.vue +1 -1
- package/dist/runtime/components/JunOfflinePanel.client.d.vue.ts +3 -0
- package/dist/runtime/components/JunOfflinePanel.client.vue +293 -0
- package/dist/runtime/components/JunOfflinePanel.client.vue.d.ts +3 -0
- package/dist/runtime/components/JunPageHero.vue +3 -3
- package/dist/runtime/components/JunSectionBar.d.vue.ts +41 -0
- package/dist/runtime/components/JunSectionBar.vue +144 -0
- package/dist/runtime/components/JunSectionBar.vue.d.ts +41 -0
- package/dist/runtime/components/renderers/JunConfigRenderer.vue +618 -6
- package/dist/runtime/components/renderers/JunEntryRenderer.vue +48 -0
- package/dist/runtime/composables/useJunCommands.d.ts +1 -1
- package/dist/runtime/composables/useJunCommands.js +14 -1
- package/dist/runtime/composables/useJunCreatePage.js +7 -1
- package/dist/runtime/composables/useJunDocPage.d.ts +28 -0
- package/dist/runtime/composables/useJunDocPage.js +111 -20
- package/dist/runtime/composables/useJunGarden.d.ts +1 -1
- package/dist/runtime/composables/useJunGarden.js +3 -2
- package/dist/runtime/composables/useJunGestures.d.ts +53 -0
- package/dist/runtime/composables/useJunGestures.js +89 -0
- package/dist/runtime/composables/useJunMenuState.d.ts +4 -0
- package/dist/runtime/composables/useJunMenuState.js +5 -0
- package/dist/runtime/composables/useJunNavItems.d.ts +50 -0
- package/dist/runtime/composables/useJunNavItems.js +188 -0
- package/dist/runtime/composables/useJunNavSettings.d.ts +58 -1
- package/dist/runtime/composables/useJunNavSettings.js +110 -8
- package/dist/runtime/composables/useJunOffline.d.ts +109 -0
- package/dist/runtime/composables/useJunOffline.js +294 -0
- package/dist/runtime/composables/useJunOptions.d.ts +1 -0
- package/dist/runtime/composables/useJunSettings.d.ts +1 -1
- package/dist/runtime/composables/useJunSettings.js +2 -0
- package/dist/runtime/composables/useJunSiblings.d.ts +30 -0
- package/dist/runtime/composables/useJunSiblings.js +38 -0
- package/dist/runtime/composables/useJunSiteConfig.d.ts +70 -3
- package/dist/runtime/composables/useJunTheme.js +4 -1
- package/dist/runtime/composables/useJunViewingAccent.js +10 -0
- package/dist/runtime/layouts/jun.vue +32 -2
- package/dist/runtime/pages/doc.vue +2 -0
- package/dist/runtime/pages/index.vue +2 -0
- package/dist/runtime/server/api/health.get.d.ts +15 -0
- package/dist/runtime/server/api/health.get.js +7 -2
- package/dist/runtime/server/api/links.get.js +27 -3
- package/dist/runtime/server/api/offline.get.d.ts +10 -0
- package/dist/runtime/server/api/offline.get.js +13 -0
- package/dist/runtime/server/api/resolve/[...slug].get.d.ts +20 -0
- package/dist/runtime/server/api/resolve/[...slug].get.js +31 -0
- package/dist/runtime/server/api/search.get.d.ts +1 -1
- package/dist/runtime/server/api/search.get.js +42 -39
- package/dist/runtime/server/api/tree.get.js +3 -1
- package/dist/runtime/server/janitor/junJanitorChores.d.ts +14 -7
- package/dist/runtime/server/janitor/junJanitorChores.js +21 -3
- package/dist/runtime/server/janitor/junJanitorMachine.js +36 -4
- package/dist/runtime/server/janitor/junJanitorPerform.d.ts +15 -1
- package/dist/runtime/server/janitor/junJanitorPerform.js +13 -5
- package/dist/runtime/server/janitor/junJanitorYText.d.ts +40 -3
- package/dist/runtime/server/janitor/junJanitorYText.js +60 -14
- package/dist/runtime/server/plugins/jun-compress.d.ts +2 -0
- package/dist/runtime/server/plugins/jun-compress.js +76 -0
- package/dist/runtime/server/plugins/jun-janitor.js +132 -81
- package/dist/runtime/server/routes/jun-card.png.get.d.ts +2 -0
- package/dist/runtime/server/routes/jun-card.png.get.js +40 -0
- package/dist/runtime/server/routes/jun-sw.js.get.js +66 -13
- package/dist/runtime/server/routes/sitemap.xml.get.js +5 -18
- package/dist/runtime/server/utils/junCard.d.ts +39 -0
- package/dist/runtime/server/utils/junCard.js +159 -0
- package/dist/runtime/server/utils/junIcon.d.ts +27 -2
- package/dist/runtime/server/utils/junIcon.js +5 -5
- package/dist/runtime/server/utils/junJanitorStatus.d.ts +59 -0
- package/dist/runtime/server/utils/junJanitorStatus.js +27 -0
- package/dist/runtime/server/utils/junPages.d.ts +51 -0
- package/dist/runtime/server/utils/junPages.js +70 -0
- package/dist/runtime/types.d.ts +295 -0
- package/dist/runtime/utils/junAdopt.d.ts +43 -0
- package/dist/runtime/utils/junAdopt.js +7 -0
- package/dist/runtime/utils/junGesture.d.ts +84 -0
- package/dist/runtime/utils/junGesture.js +40 -0
- package/dist/runtime/utils/junLetters.d.ts +86 -0
- package/dist/runtime/utils/junLetters.js +173 -0
- package/dist/runtime/utils/junNavValue.d.ts +56 -0
- package/dist/runtime/utils/junNavValue.js +36 -0
- package/dist/runtime/utils/junOffline.d.ts +138 -0
- package/dist/runtime/utils/junOffline.js +73 -0
- package/dist/runtime/utils/junSearchRank.d.ts +79 -0
- package/dist/runtime/utils/junSearchRank.js +73 -0
- package/dist/runtime/utils/junSocial.d.ts +59 -0
- package/dist/runtime/utils/junSocial.js +56 -0
- package/dist/runtime/utils/junViewSpecs.d.ts +39 -1
- package/dist/runtime/utils/junViewSpecs.js +92 -1
- package/dist/types.d.mts +1 -1
- package/package.json +13 -9
|
@@ -69,6 +69,39 @@ const shapeOptions = [
|
|
|
69
69
|
{ label: "Square", value: "square", radius: "0px" },
|
|
70
70
|
{ label: "Ghost", value: "ghost", radius: "8px", bare: true }
|
|
71
71
|
];
|
|
72
|
+
const mobileModeOptions = [
|
|
73
|
+
{ label: "Track", value: "track", icon: "i-lucide-more-horizontal", hint: "The same scrolling row as the desktop. What phones had before this setting" },
|
|
74
|
+
{ label: "Sheet", value: "sheet", icon: "i-lucide-panel-bottom-open", hint: "A menu button opens a sheet from the bottom edge" },
|
|
75
|
+
{ label: "Drawer left", value: "drawer-left", icon: "i-lucide-panel-left-open", hint: "A side panel, from the left" },
|
|
76
|
+
{ label: "Drawer right", value: "drawer-right", icon: "i-lucide-panel-right-open", hint: "A side panel, from the right" },
|
|
77
|
+
{ label: "Full screen", value: "fullscreen", icon: "i-lucide-maximize", hint: "The whole viewport, one page per line" },
|
|
78
|
+
{ label: "Grid", value: "grid", icon: "i-lucide-layout-grid", hint: "The whole viewport, an icon grid" },
|
|
79
|
+
{ label: "Dock", value: "dock", icon: "i-lucide-panel-bottom", hint: "A fixed tab bar at the foot, app-style. The rest go behind \u22EF" }
|
|
80
|
+
];
|
|
81
|
+
const overflowOptions = [
|
|
82
|
+
{ label: "Scroll", value: "scroll", icon: "i-lucide-move-horizontal", hint: "The track scrolls, with arrows over its edges" },
|
|
83
|
+
{ label: "Wrap", value: "wrap", icon: "i-lucide-wrap-text", hint: "A second row. Nothing hides; the bar grows" },
|
|
84
|
+
{ label: "Menu", value: "more", icon: "i-lucide-ellipsis", hint: "What does not fit goes behind \u22EF \u2014 every page one press away" },
|
|
85
|
+
{ label: "Shrink", value: "shrink", icon: "i-lucide-minimize-2", hint: "Drop to icons rather than scroll" }
|
|
86
|
+
];
|
|
87
|
+
const childrenOptions = [
|
|
88
|
+
{ label: "None", value: "none", icon: "i-lucide-minus", hint: "Items are links and nothing else" },
|
|
89
|
+
{ label: "On hover", value: "hover", icon: "i-lucide-mouse-pointer", hint: "Sub-pages open when the pointer rests on an item" },
|
|
90
|
+
{ label: "On click", value: "click", icon: "i-lucide-chevron-down", hint: "A chevron opens them" },
|
|
91
|
+
{ label: "Mega", value: "mega", icon: "i-lucide-layout-panel-top", hint: "A wide multi-column panel" }
|
|
92
|
+
];
|
|
93
|
+
const alignOptions = [
|
|
94
|
+
{ label: "Centre", value: "center", icon: "i-lucide-align-center" },
|
|
95
|
+
{ label: "Start", value: "start", icon: "i-lucide-align-left" },
|
|
96
|
+
{ label: "End", value: "end", icon: "i-lucide-align-right" },
|
|
97
|
+
{ label: "Spread", value: "spread", icon: "i-lucide-align-horizontal-space-between" }
|
|
98
|
+
];
|
|
99
|
+
const navWidthOptions = [
|
|
100
|
+
{ label: "Contained", value: "contained", hint: "The default \u2014 a comfortable maximum" },
|
|
101
|
+
{ label: "Narrow", value: "narrow", hint: "Tighter than the reading column" },
|
|
102
|
+
{ label: "Wide", value: "wide", hint: "Most of a large screen" },
|
|
103
|
+
{ label: "Full", value: "full", hint: "Edge to edge" }
|
|
104
|
+
];
|
|
72
105
|
const navSizeOptions = [
|
|
73
106
|
{ label: "Small", value: "sm", bar: "h-1.5" },
|
|
74
107
|
{ label: "Medium", value: "md", bar: "h-2.5" },
|
|
@@ -133,7 +166,12 @@ const fontOptions = [
|
|
|
133
166
|
{ value: "default", label: "Outfit", family: '"Outfit", system-ui, sans-serif' },
|
|
134
167
|
{ value: "serif", label: "Newsreader", family: '"Newsreader", Georgia, serif' },
|
|
135
168
|
{ value: "grotesk", label: "Space Grotesk", family: '"Space Grotesk", system-ui, sans-serif' },
|
|
136
|
-
{ value: "mono", label: "JetBrains Mono", family: '"JetBrains Mono", ui-monospace, monospace' }
|
|
169
|
+
{ value: "mono", label: "JetBrains Mono", family: '"JetBrains Mono", ui-monospace, monospace' },
|
|
170
|
+
// Pairings: the specimen shows the DISPLAY face, which is the one a visitor
|
|
171
|
+
// notices first — the body face is named in the label under it.
|
|
172
|
+
{ value: "editorial", label: "Playfair + Source", family: '"Playfair Display", Georgia, serif' },
|
|
173
|
+
{ value: "humanist", label: "Fraunces + Inter", family: '"Fraunces", Georgia, serif' },
|
|
174
|
+
{ value: "technical", label: "IBM Plex", family: '"IBM Plex Mono", ui-monospace, monospace' }
|
|
137
175
|
];
|
|
138
176
|
function navChoice(key, allowed, fallback) {
|
|
139
177
|
return computed({
|
|
@@ -178,10 +216,64 @@ const navBlur = navFlag("navBlur", navigation.blur);
|
|
|
178
216
|
const navHomeItem = navFlag("navHomeItem", navigation.homeItem);
|
|
179
217
|
const navShowLogo = navFlag("navShowLogo", navigation.showLogo);
|
|
180
218
|
const navSearchButton = navFlag("navSearchButton", navigation.searchButton);
|
|
219
|
+
const SECTION_MODES = ["off", "row", "segmented", "tabs"];
|
|
220
|
+
const COUNT_MODES = ["off", "children", "new"];
|
|
221
|
+
const navSection = navChoice("navSection", SECTION_MODES, navigation.section);
|
|
222
|
+
const navCounts = navChoice("navCounts", COUNT_MODES, navigation.counts);
|
|
223
|
+
const gesturePages = navFlag("gesturePages", true);
|
|
224
|
+
const gestureEdge = navFlag("gestureEdge", true);
|
|
181
225
|
const navLogoAction = navChoice("navLogoAction", ["home", "palette"], navigation.logoAction);
|
|
182
226
|
const navCenterActive = navFlag("navCenterActive", navigation.centerActive);
|
|
183
227
|
const navTravellers = navFlag("navTravellers", navigation.travellers);
|
|
184
228
|
const navTravellersList = navFlag("navTravellersList", navigation.travellersList);
|
|
229
|
+
const navMobileMode = navChoice(
|
|
230
|
+
"navMobileMode",
|
|
231
|
+
mobileModeOptions.map((o) => o.value),
|
|
232
|
+
navigation.mobileMode
|
|
233
|
+
);
|
|
234
|
+
const navMobilePlacement = navChoice(
|
|
235
|
+
"navMobilePlacement",
|
|
236
|
+
["inherit", "top", "top-bar", "bottom"],
|
|
237
|
+
navigation.mobilePlacement
|
|
238
|
+
);
|
|
239
|
+
const navBreakpoint = navChoice(
|
|
240
|
+
"navBreakpoint",
|
|
241
|
+
["sm", "md", "lg"],
|
|
242
|
+
navigation.breakpoint
|
|
243
|
+
);
|
|
244
|
+
const navMenuIcon = navChoice(
|
|
245
|
+
"navMenuIcon",
|
|
246
|
+
["menu", "grid", "dots", "chevron"],
|
|
247
|
+
navigation.menuIcon
|
|
248
|
+
);
|
|
249
|
+
const navMenuSide = navChoice(
|
|
250
|
+
"navMenuSide",
|
|
251
|
+
["left", "right"],
|
|
252
|
+
navigation.menuSide
|
|
253
|
+
);
|
|
254
|
+
const navMobileItemMode = navChoice(
|
|
255
|
+
"navMobileItemMode",
|
|
256
|
+
["inherit", ...itemModeOptions.map((o) => o.value)],
|
|
257
|
+
navigation.mobileItemMode
|
|
258
|
+
);
|
|
259
|
+
const navMenuChildren = navFlag("navMenuChildren", navigation.menuChildren);
|
|
260
|
+
const navMenuExtras = navFlag("navMenuExtras", navigation.menuExtras);
|
|
261
|
+
const navDesktopMenu = navFlag("navDesktopMenu", navigation.desktopMenu);
|
|
262
|
+
const navOverflow = navChoice("navOverflow", overflowOptions.map((o) => o.value), navigation.overflow);
|
|
263
|
+
const navChildren = navChoice("navChildren", childrenOptions.map((o) => o.value), navigation.children);
|
|
264
|
+
const navAlign = navChoice("navAlign", alignOptions.map((o) => o.value), navigation.align);
|
|
265
|
+
const navWidth = navChoice("navWidth", navWidthOptions.map((o) => o.value), navigation.width);
|
|
266
|
+
const navRailBreakpoint = navChoice(
|
|
267
|
+
"navRailBreakpoint",
|
|
268
|
+
["md", "lg", "xl"],
|
|
269
|
+
navigation.railBreakpoint
|
|
270
|
+
);
|
|
271
|
+
const navSeparators = navFlag("navSeparators", navigation.separators);
|
|
272
|
+
const navScrollArrows = navFlag("navScrollArrows", navigation.scrollArrows);
|
|
273
|
+
const navEdgeFade = navFlag("navEdgeFade", navigation.edgeFade);
|
|
274
|
+
const navSnap = navFlag("navSnap", navigation.snap);
|
|
275
|
+
const placementIsRail = computed(() => placement.value.startsWith("rail-"));
|
|
276
|
+
const menuInUse = computed(() => navMobileMode.value !== "track" || navDesktopMenu.value);
|
|
185
277
|
const presenceBlobsAvailable = computed(
|
|
186
278
|
() => opts.features.presence !== false && opts.features.awareBlobs === true
|
|
187
279
|
);
|
|
@@ -387,6 +479,34 @@ const feedsEnabled = computed({
|
|
|
387
479
|
get: () => config.value.feedsEnabled !== false,
|
|
388
480
|
set: (v) => set({ feedsEnabled: v ? void 0 : false })
|
|
389
481
|
});
|
|
482
|
+
const offlineOffer = computed({
|
|
483
|
+
get: () => config.value.offlineOffer !== false && opts.offline.enabled,
|
|
484
|
+
set: (v) => set({ offlineOffer: v ? void 0 : false })
|
|
485
|
+
});
|
|
486
|
+
const offlineFullSite = computed({
|
|
487
|
+
get: () => config.value.offlineFullSite !== false && opts.offline.fullSite,
|
|
488
|
+
set: (v) => set({ offlineFullSite: v ? void 0 : false })
|
|
489
|
+
});
|
|
490
|
+
const offlineMedia = computed({
|
|
491
|
+
get: () => config.value.offlineMedia ?? opts.offline.media,
|
|
492
|
+
set: (v) => set({ offlineMedia: v === opts.offline.media ? void 0 : v })
|
|
493
|
+
});
|
|
494
|
+
const offlineDocSync = computed({
|
|
495
|
+
get: () => config.value.offlineDocSync ?? opts.offline.docSync,
|
|
496
|
+
set: (v) => set({ offlineDocSync: v === opts.offline.docSync ? void 0 : v })
|
|
497
|
+
});
|
|
498
|
+
const offlineBudget = computed({
|
|
499
|
+
get: () => config.value.offlineBudgetMb ?? opts.offline.budgetMb,
|
|
500
|
+
set: (v) => set({ offlineBudgetMb: v === opts.offline.budgetMb ? void 0 : v })
|
|
501
|
+
});
|
|
502
|
+
function setBudget(e) {
|
|
503
|
+
const raw = Number(e.target.value);
|
|
504
|
+
if (!Number.isFinite(raw) || raw <= 0) {
|
|
505
|
+
set({ offlineBudgetMb: void 0 });
|
|
506
|
+
return;
|
|
507
|
+
}
|
|
508
|
+
offlineBudget.value = Math.round(raw);
|
|
509
|
+
}
|
|
390
510
|
const fire = opts.campfire;
|
|
391
511
|
function fireChoice(key, allowed, fallback) {
|
|
392
512
|
return navChoice(key, allowed, fallback);
|
|
@@ -674,7 +794,7 @@ function shows(id) {
|
|
|
674
794
|
</UFormField>
|
|
675
795
|
<UFormField
|
|
676
796
|
label="Social image URL"
|
|
677
|
-
help="og:image and twitter:image."
|
|
797
|
+
help="og:image and twitter:image. Empty draws a card per page."
|
|
678
798
|
>
|
|
679
799
|
<UInput
|
|
680
800
|
:model-value="config.seoOgImage ?? ''"
|
|
@@ -684,6 +804,30 @@ function shows(id) {
|
|
|
684
804
|
@change="setText('seoOgImage', $event)"
|
|
685
805
|
/>
|
|
686
806
|
</UFormField>
|
|
807
|
+
<UFormField
|
|
808
|
+
label="Language"
|
|
809
|
+
help="A BCP-47 tag — en, de, pt-BR. What a screen reader announces in."
|
|
810
|
+
>
|
|
811
|
+
<UInput
|
|
812
|
+
:model-value="config.seoLang ?? ''"
|
|
813
|
+
:disabled="!editing"
|
|
814
|
+
placeholder="en"
|
|
815
|
+
class="w-full"
|
|
816
|
+
@change="setText('seoLang', $event)"
|
|
817
|
+
/>
|
|
818
|
+
</UFormField>
|
|
819
|
+
<UFormField
|
|
820
|
+
label="Canonical site address"
|
|
821
|
+
help="Used for canonical links and og:url. Empty uses the address the visitor arrived on."
|
|
822
|
+
>
|
|
823
|
+
<UInput
|
|
824
|
+
:model-value="config.seoSiteUrl ?? ''"
|
|
825
|
+
:disabled="!editing"
|
|
826
|
+
placeholder="https://example.com"
|
|
827
|
+
class="w-full"
|
|
828
|
+
@change="setText('seoSiteUrl', $event)"
|
|
829
|
+
/>
|
|
830
|
+
</UFormField>
|
|
687
831
|
</section>
|
|
688
832
|
|
|
689
833
|
<!-- Navigation -->
|
|
@@ -723,9 +867,12 @@ function shows(id) {
|
|
|
723
867
|
:title="opt.hint"
|
|
724
868
|
@click="placement = opt.value"
|
|
725
869
|
>
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
870
|
+
<!-- The shape, not just the word. Every one of these was a name
|
|
871
|
+
for an arrangement nobody could see without switching their
|
|
872
|
+
own site to it and reloading. -->
|
|
873
|
+
<JunNavPreview
|
|
874
|
+
:placement="opt.value"
|
|
875
|
+
:active="placement === opt.value"
|
|
729
876
|
/>
|
|
730
877
|
<span class="text-xs">{{ opt.label }}</span>
|
|
731
878
|
</button>
|
|
@@ -861,6 +1008,61 @@ function shows(id) {
|
|
|
861
1008
|
color="neutral"
|
|
862
1009
|
/>
|
|
863
1010
|
</JunConfigRow>
|
|
1011
|
+
<JunConfigRow
|
|
1012
|
+
label="Section bar"
|
|
1013
|
+
hint="The pages beside this one"
|
|
1014
|
+
>
|
|
1015
|
+
<USelect
|
|
1016
|
+
v-model="navSection"
|
|
1017
|
+
:items="[
|
|
1018
|
+
{ label: 'None', value: 'off' },
|
|
1019
|
+
{ label: 'Row', value: 'row' },
|
|
1020
|
+
{ label: 'Segmented', value: 'segmented' },
|
|
1021
|
+
{ label: 'Tabs', value: 'tabs' }
|
|
1022
|
+
]"
|
|
1023
|
+
:disabled="!editing"
|
|
1024
|
+
size="xs"
|
|
1025
|
+
class="w-32"
|
|
1026
|
+
/>
|
|
1027
|
+
</JunConfigRow>
|
|
1028
|
+
<JunConfigRow
|
|
1029
|
+
label="Item counts"
|
|
1030
|
+
hint="Pages inside, or what's new"
|
|
1031
|
+
>
|
|
1032
|
+
<USelect
|
|
1033
|
+
v-model="navCounts"
|
|
1034
|
+
:items="[
|
|
1035
|
+
{ label: 'None', value: 'off' },
|
|
1036
|
+
{ label: 'Pages inside', value: 'children' },
|
|
1037
|
+
{ label: 'New since your visit', value: 'new' }
|
|
1038
|
+
]"
|
|
1039
|
+
:disabled="!editing"
|
|
1040
|
+
size="xs"
|
|
1041
|
+
class="w-32"
|
|
1042
|
+
/>
|
|
1043
|
+
</JunConfigRow>
|
|
1044
|
+
<JunConfigRow
|
|
1045
|
+
v-if="opts.features.gestures"
|
|
1046
|
+
label="Swipe between pages"
|
|
1047
|
+
hint="Left and right, on touch"
|
|
1048
|
+
>
|
|
1049
|
+
<USwitch
|
|
1050
|
+
v-model="gesturePages"
|
|
1051
|
+
:disabled="!editing"
|
|
1052
|
+
color="neutral"
|
|
1053
|
+
/>
|
|
1054
|
+
</JunConfigRow>
|
|
1055
|
+
<JunConfigRow
|
|
1056
|
+
v-if="opts.features.gestures"
|
|
1057
|
+
label="Edge swipe opens the menu"
|
|
1058
|
+
hint="From either side"
|
|
1059
|
+
>
|
|
1060
|
+
<USwitch
|
|
1061
|
+
v-model="gestureEdge"
|
|
1062
|
+
:disabled="!editing"
|
|
1063
|
+
color="neutral"
|
|
1064
|
+
/>
|
|
1065
|
+
</JunConfigRow>
|
|
864
1066
|
<JunConfigRow
|
|
865
1067
|
label="Frosted panel"
|
|
866
1068
|
hint="Blur behind the bar"
|
|
@@ -980,9 +1182,327 @@ function shows(id) {
|
|
|
980
1182
|
</JunConfigRow>
|
|
981
1183
|
</div>
|
|
982
1184
|
|
|
1185
|
+
<!-- ── On a phone ──────────────────────────────────────────────────
|
|
1186
|
+
Its own block because it is a different navbar, not a smaller one:
|
|
1187
|
+
below the breakpoint the track can be replaced outright by a menu
|
|
1188
|
+
or a dock. `Track` is the default and is exactly what phones had
|
|
1189
|
+
before this existed. -->
|
|
1190
|
+
<div class="space-y-4 border-t border-default pt-5">
|
|
1191
|
+
<div>
|
|
1192
|
+
<p class="text-xs font-semibold text-highlighted">
|
|
1193
|
+
On a phone
|
|
1194
|
+
</p>
|
|
1195
|
+
<p class="text-[11px] text-muted">
|
|
1196
|
+
Below the breakpoint the track can step aside for a menu you can read
|
|
1197
|
+
without scrubbing sideways. Every page stays in the page source either way.
|
|
1198
|
+
</p>
|
|
1199
|
+
</div>
|
|
1200
|
+
|
|
1201
|
+
<UFormField label="Mobile navigation">
|
|
1202
|
+
<div class="grid grid-cols-2 gap-2 sm:grid-cols-4">
|
|
1203
|
+
<button
|
|
1204
|
+
v-for="opt in mobileModeOptions"
|
|
1205
|
+
:key="opt.value"
|
|
1206
|
+
type="button"
|
|
1207
|
+
:disabled="!editing"
|
|
1208
|
+
:class="[cardBase, navMobileMode === opt.value ? cardOn : cardOff]"
|
|
1209
|
+
:title="opt.hint"
|
|
1210
|
+
@click="navMobileMode = opt.value"
|
|
1211
|
+
>
|
|
1212
|
+
<JunNavPreview
|
|
1213
|
+
phone
|
|
1214
|
+
:mobile="opt.value"
|
|
1215
|
+
:active="navMobileMode === opt.value"
|
|
1216
|
+
/>
|
|
1217
|
+
<span class="text-xs">{{ opt.label }}</span>
|
|
1218
|
+
</button>
|
|
1219
|
+
</div>
|
|
1220
|
+
</UFormField>
|
|
1221
|
+
|
|
1222
|
+
<div class="grid grid-cols-1 gap-x-8 gap-y-3 sm:grid-cols-3">
|
|
1223
|
+
<JunConfigRow
|
|
1224
|
+
label="Breakpoint"
|
|
1225
|
+
hint="Below this width, the phone navbar"
|
|
1226
|
+
>
|
|
1227
|
+
<USelect
|
|
1228
|
+
v-model="navBreakpoint"
|
|
1229
|
+
:items="[
|
|
1230
|
+
{ label: 'Small (640px)', value: 'sm' },
|
|
1231
|
+
{ label: 'Medium (768px)', value: 'md' },
|
|
1232
|
+
{ label: 'Large (1024px)', value: 'lg' }
|
|
1233
|
+
]"
|
|
1234
|
+
:disabled="!editing"
|
|
1235
|
+
size="xs"
|
|
1236
|
+
class="w-40"
|
|
1237
|
+
/>
|
|
1238
|
+
</JunConfigRow>
|
|
1239
|
+
<JunConfigRow
|
|
1240
|
+
label="Bar placement"
|
|
1241
|
+
hint="Where the bar itself sits on a phone"
|
|
1242
|
+
>
|
|
1243
|
+
<USelect
|
|
1244
|
+
v-model="navMobilePlacement"
|
|
1245
|
+
:items="[
|
|
1246
|
+
{ label: 'Same as desktop', value: 'inherit' },
|
|
1247
|
+
{ label: 'Top', value: 'top' },
|
|
1248
|
+
{ label: 'Top bar', value: 'top-bar' },
|
|
1249
|
+
{ label: 'Bottom', value: 'bottom' }
|
|
1250
|
+
]"
|
|
1251
|
+
:disabled="!editing"
|
|
1252
|
+
size="xs"
|
|
1253
|
+
class="w-40"
|
|
1254
|
+
/>
|
|
1255
|
+
</JunConfigRow>
|
|
1256
|
+
<JunConfigRow
|
|
1257
|
+
label="Menu items"
|
|
1258
|
+
hint="How pages read inside the menu"
|
|
1259
|
+
:muted="!menuInUse"
|
|
1260
|
+
>
|
|
1261
|
+
<USelect
|
|
1262
|
+
v-model="navMobileItemMode"
|
|
1263
|
+
:items="[
|
|
1264
|
+
{ label: 'Same as the bar', value: 'inherit' },
|
|
1265
|
+
{ label: 'Text', value: 'text' },
|
|
1266
|
+
{ label: 'Icons', value: 'icon' },
|
|
1267
|
+
{ label: 'Icon + title', value: 'icon-text' },
|
|
1268
|
+
{ label: 'Stacked', value: 'icon-stack' }
|
|
1269
|
+
]"
|
|
1270
|
+
:disabled="!editing || !menuInUse"
|
|
1271
|
+
size="xs"
|
|
1272
|
+
class="w-40"
|
|
1273
|
+
/>
|
|
1274
|
+
</JunConfigRow>
|
|
1275
|
+
<JunConfigRow
|
|
1276
|
+
label="Trigger icon"
|
|
1277
|
+
hint="The glyph on the menu button"
|
|
1278
|
+
:muted="!menuInUse"
|
|
1279
|
+
>
|
|
1280
|
+
<USelect
|
|
1281
|
+
v-model="navMenuIcon"
|
|
1282
|
+
:items="[
|
|
1283
|
+
{ label: 'Menu', value: 'menu' },
|
|
1284
|
+
{ label: 'Grid', value: 'grid' },
|
|
1285
|
+
{ label: 'Dots', value: 'dots' },
|
|
1286
|
+
{ label: 'Chevron', value: 'chevron' }
|
|
1287
|
+
]"
|
|
1288
|
+
:disabled="!editing || !menuInUse"
|
|
1289
|
+
size="xs"
|
|
1290
|
+
class="w-40"
|
|
1291
|
+
/>
|
|
1292
|
+
</JunConfigRow>
|
|
1293
|
+
<JunConfigRow
|
|
1294
|
+
label="Trigger side"
|
|
1295
|
+
hint="Which end of the bar it sits at"
|
|
1296
|
+
:muted="!menuInUse"
|
|
1297
|
+
>
|
|
1298
|
+
<USelect
|
|
1299
|
+
v-model="navMenuSide"
|
|
1300
|
+
:items="[
|
|
1301
|
+
{ label: 'Right', value: 'right' },
|
|
1302
|
+
{ label: 'Left', value: 'left' }
|
|
1303
|
+
]"
|
|
1304
|
+
:disabled="!editing || !menuInUse"
|
|
1305
|
+
size="xs"
|
|
1306
|
+
class="w-40"
|
|
1307
|
+
/>
|
|
1308
|
+
</JunConfigRow>
|
|
1309
|
+
<JunConfigRow
|
|
1310
|
+
label="Sub-pages"
|
|
1311
|
+
hint="Child pages fold out in the menu"
|
|
1312
|
+
:muted="!menuInUse"
|
|
1313
|
+
>
|
|
1314
|
+
<USwitch
|
|
1315
|
+
v-model="navMenuChildren"
|
|
1316
|
+
:disabled="!editing || !menuInUse"
|
|
1317
|
+
color="neutral"
|
|
1318
|
+
/>
|
|
1319
|
+
</JunConfigRow>
|
|
1320
|
+
<!-- Search, the theme and the studio live in the ⌘K palette on a
|
|
1321
|
+
desktop, and a phone has no keyboard to open it with — so a
|
|
1322
|
+
menu without them takes them away from precisely the visitors
|
|
1323
|
+
who cannot reach them any other way. -->
|
|
1324
|
+
<JunConfigRow
|
|
1325
|
+
label="Menu extras"
|
|
1326
|
+
hint="Search + theme inside the menu"
|
|
1327
|
+
:muted="!menuInUse"
|
|
1328
|
+
>
|
|
1329
|
+
<USwitch
|
|
1330
|
+
v-model="navMenuExtras"
|
|
1331
|
+
:disabled="!editing || !menuInUse"
|
|
1332
|
+
color="neutral"
|
|
1333
|
+
/>
|
|
1334
|
+
</JunConfigRow>
|
|
1335
|
+
<JunConfigRow
|
|
1336
|
+
label="Menu on desktop too"
|
|
1337
|
+
hint="One button at every width"
|
|
1338
|
+
>
|
|
1339
|
+
<USwitch
|
|
1340
|
+
v-model="navDesktopMenu"
|
|
1341
|
+
:disabled="!editing"
|
|
1342
|
+
color="neutral"
|
|
1343
|
+
/>
|
|
1344
|
+
</JunConfigRow>
|
|
1345
|
+
</div>
|
|
1346
|
+
</div>
|
|
1347
|
+
|
|
1348
|
+
<!-- ── Layout & overflow ───────────────────────────────────────────
|
|
1349
|
+
What the track does with the room it has, and what happens when it
|
|
1350
|
+
runs out. Every default here describes what the navbar already
|
|
1351
|
+
did. -->
|
|
1352
|
+
<div class="space-y-4 border-t border-default pt-5">
|
|
1353
|
+
<div>
|
|
1354
|
+
<p class="text-xs font-semibold text-highlighted">
|
|
1355
|
+
Layout & overflow
|
|
1356
|
+
</p>
|
|
1357
|
+
<p class="text-[11px] text-muted">
|
|
1358
|
+
How the items sit, and what happens when there are more of them than room.
|
|
1359
|
+
</p>
|
|
1360
|
+
</div>
|
|
1361
|
+
|
|
1362
|
+
<UFormField
|
|
1363
|
+
label="When items do not fit"
|
|
1364
|
+
help="Menu is the only one where every page is reachable without a gesture."
|
|
1365
|
+
>
|
|
1366
|
+
<div class="grid grid-cols-2 gap-2 sm:grid-cols-4">
|
|
1367
|
+
<button
|
|
1368
|
+
v-for="opt in overflowOptions"
|
|
1369
|
+
:key="opt.value"
|
|
1370
|
+
type="button"
|
|
1371
|
+
:disabled="!editing"
|
|
1372
|
+
:class="[cardBase, navOverflow === opt.value ? cardOn : cardOff]"
|
|
1373
|
+
:title="opt.hint"
|
|
1374
|
+
@click="navOverflow = opt.value"
|
|
1375
|
+
>
|
|
1376
|
+
<JunNavPreview
|
|
1377
|
+
:overflow="opt.value"
|
|
1378
|
+
:active="navOverflow === opt.value"
|
|
1379
|
+
/>
|
|
1380
|
+
<span class="text-xs">{{ opt.label }}</span>
|
|
1381
|
+
</button>
|
|
1382
|
+
</div>
|
|
1383
|
+
</UFormField>
|
|
1384
|
+
|
|
1385
|
+
<UFormField
|
|
1386
|
+
label="Sub-pages"
|
|
1387
|
+
help="Child pages of a top-level page, as an overlay. Nothing here ever reflows the page."
|
|
1388
|
+
>
|
|
1389
|
+
<div class="grid grid-cols-2 gap-2 sm:grid-cols-4">
|
|
1390
|
+
<button
|
|
1391
|
+
v-for="opt in childrenOptions"
|
|
1392
|
+
:key="opt.value"
|
|
1393
|
+
type="button"
|
|
1394
|
+
:disabled="!editing"
|
|
1395
|
+
:class="[cardBase, navChildren === opt.value ? cardOn : cardOff]"
|
|
1396
|
+
:title="opt.hint"
|
|
1397
|
+
@click="navChildren = opt.value"
|
|
1398
|
+
>
|
|
1399
|
+
<UIcon
|
|
1400
|
+
:name="opt.icon"
|
|
1401
|
+
class="size-4.5 opacity-80"
|
|
1402
|
+
/>
|
|
1403
|
+
<span class="text-xs">{{ opt.label }}</span>
|
|
1404
|
+
</button>
|
|
1405
|
+
</div>
|
|
1406
|
+
</UFormField>
|
|
1407
|
+
|
|
1408
|
+
<UFormField label="Alignment">
|
|
1409
|
+
<div class="grid grid-cols-4 gap-2">
|
|
1410
|
+
<button
|
|
1411
|
+
v-for="opt in alignOptions"
|
|
1412
|
+
:key="opt.value"
|
|
1413
|
+
type="button"
|
|
1414
|
+
:disabled="!editing"
|
|
1415
|
+
:class="[cardBase, navAlign === opt.value ? cardOn : cardOff]"
|
|
1416
|
+
@click="navAlign = opt.value"
|
|
1417
|
+
>
|
|
1418
|
+
<UIcon
|
|
1419
|
+
:name="opt.icon"
|
|
1420
|
+
class="size-4.5 opacity-80"
|
|
1421
|
+
/>
|
|
1422
|
+
<span class="text-xs">{{ opt.label }}</span>
|
|
1423
|
+
</button>
|
|
1424
|
+
</div>
|
|
1425
|
+
</UFormField>
|
|
1426
|
+
|
|
1427
|
+
<div class="grid grid-cols-1 gap-x-8 gap-y-3 sm:grid-cols-3">
|
|
1428
|
+
<JunConfigRow
|
|
1429
|
+
label="Bar width"
|
|
1430
|
+
hint="How wide the panel may grow"
|
|
1431
|
+
>
|
|
1432
|
+
<USelect
|
|
1433
|
+
v-model="navWidth"
|
|
1434
|
+
:items="navWidthOptions.map((o) => ({ label: o.label, value: o.value }))"
|
|
1435
|
+
:disabled="!editing"
|
|
1436
|
+
size="xs"
|
|
1437
|
+
class="w-40"
|
|
1438
|
+
/>
|
|
1439
|
+
</JunConfigRow>
|
|
1440
|
+
<JunConfigRow
|
|
1441
|
+
label="Separators"
|
|
1442
|
+
hint="A hairline between items"
|
|
1443
|
+
>
|
|
1444
|
+
<USwitch
|
|
1445
|
+
v-model="navSeparators"
|
|
1446
|
+
:disabled="!editing"
|
|
1447
|
+
color="neutral"
|
|
1448
|
+
/>
|
|
1449
|
+
</JunConfigRow>
|
|
1450
|
+
<JunConfigRow
|
|
1451
|
+
label="Scroll arrows"
|
|
1452
|
+
hint="Chevrons over the track edges"
|
|
1453
|
+
:muted="navOverflow !== 'scroll' && navOverflow !== 'shrink'"
|
|
1454
|
+
>
|
|
1455
|
+
<USwitch
|
|
1456
|
+
v-model="navScrollArrows"
|
|
1457
|
+
:disabled="!editing"
|
|
1458
|
+
color="neutral"
|
|
1459
|
+
/>
|
|
1460
|
+
</JunConfigRow>
|
|
1461
|
+
<JunConfigRow
|
|
1462
|
+
label="Edge fade"
|
|
1463
|
+
hint="Items dissolve at the edges"
|
|
1464
|
+
>
|
|
1465
|
+
<USwitch
|
|
1466
|
+
v-model="navEdgeFade"
|
|
1467
|
+
:disabled="!editing"
|
|
1468
|
+
color="neutral"
|
|
1469
|
+
/>
|
|
1470
|
+
</JunConfigRow>
|
|
1471
|
+
<JunConfigRow
|
|
1472
|
+
label="Snap"
|
|
1473
|
+
hint="The track settles on an item"
|
|
1474
|
+
>
|
|
1475
|
+
<USwitch
|
|
1476
|
+
v-model="navSnap"
|
|
1477
|
+
:disabled="!editing"
|
|
1478
|
+
color="neutral"
|
|
1479
|
+
/>
|
|
1480
|
+
</JunConfigRow>
|
|
1481
|
+
<!-- A rail on a narrow viewport eats the page, so it falls back to
|
|
1482
|
+
the top pill. This is where it stops doing that. -->
|
|
1483
|
+
<JunConfigRow
|
|
1484
|
+
label="Rail from"
|
|
1485
|
+
hint="Below this a rail becomes the top bar"
|
|
1486
|
+
:muted="!placementIsRail"
|
|
1487
|
+
>
|
|
1488
|
+
<USelect
|
|
1489
|
+
v-model="navRailBreakpoint"
|
|
1490
|
+
:items="[
|
|
1491
|
+
{ label: 'Medium (768px)', value: 'md' },
|
|
1492
|
+
{ label: 'Large (1024px)', value: 'lg' },
|
|
1493
|
+
{ label: 'X-large (1280px)', value: 'xl' }
|
|
1494
|
+
]"
|
|
1495
|
+
:disabled="!editing || !placementIsRail"
|
|
1496
|
+
size="xs"
|
|
1497
|
+
class="w-40"
|
|
1498
|
+
/>
|
|
1499
|
+
</JunConfigRow>
|
|
1500
|
+
</div>
|
|
1501
|
+
</div>
|
|
1502
|
+
|
|
983
1503
|
<p class="text-[11px] text-muted">
|
|
984
1504
|
A page's item can carry a short <span class="font-medium">nav label</span> separate from
|
|
985
|
-
its title — right-click the item while editing.
|
|
1505
|
+
its title — right-click the item while editing, or press and hold on a phone.
|
|
986
1506
|
</p>
|
|
987
1507
|
</section>
|
|
988
1508
|
|
|
@@ -2110,6 +2630,98 @@ function shows(id) {
|
|
|
2110
2630
|
</div>
|
|
2111
2631
|
</section>
|
|
2112
2632
|
|
|
2633
|
+
<!-- Offline -->
|
|
2634
|
+
<section
|
|
2635
|
+
v-if="shows('offline')"
|
|
2636
|
+
class="space-y-5"
|
|
2637
|
+
:class="bare ? '' : 'jun-card rounded-2xl p-6'"
|
|
2638
|
+
>
|
|
2639
|
+
<header class="flex items-start gap-3">
|
|
2640
|
+
<span class="flex size-9 flex-none items-center justify-center rounded-lg bg-black/5 dark:bg-white/10">
|
|
2641
|
+
<UIcon
|
|
2642
|
+
name="i-lucide-cloud-download"
|
|
2643
|
+
class="size-4.5"
|
|
2644
|
+
/>
|
|
2645
|
+
</span>
|
|
2646
|
+
<div>
|
|
2647
|
+
<h2 class="text-sm font-semibold text-highlighted">
|
|
2648
|
+
Offline
|
|
2649
|
+
</h2>
|
|
2650
|
+
<p class="text-xs text-muted">
|
|
2651
|
+
What a reader may keep on their own device. Nothing here downloads
|
|
2652
|
+
anything — every visitor still has to ask.
|
|
2653
|
+
</p>
|
|
2654
|
+
</div>
|
|
2655
|
+
</header>
|
|
2656
|
+
|
|
2657
|
+
<div class="space-y-4">
|
|
2658
|
+
<JunConfigRow
|
|
2659
|
+
label="Offer an offline copy"
|
|
2660
|
+
hint="Adds an Offline panel to the command palette and the navigation menu. Without it, a reader still keeps the pages they open — they just cannot choose."
|
|
2661
|
+
>
|
|
2662
|
+
<USwitch
|
|
2663
|
+
v-model="offlineOffer"
|
|
2664
|
+
:disabled="!editing"
|
|
2665
|
+
color="neutral"
|
|
2666
|
+
/>
|
|
2667
|
+
</JunConfigRow>
|
|
2668
|
+
|
|
2669
|
+
<JunConfigRow
|
|
2670
|
+
label="Allow the whole site"
|
|
2671
|
+
:muted="!offlineOffer"
|
|
2672
|
+
hint="One press downloads every page. Turn it off for a site whose readers should take one page at a time."
|
|
2673
|
+
>
|
|
2674
|
+
<USwitch
|
|
2675
|
+
v-model="offlineFullSite"
|
|
2676
|
+
:disabled="!editing || !offlineOffer"
|
|
2677
|
+
color="neutral"
|
|
2678
|
+
/>
|
|
2679
|
+
</JunConfigRow>
|
|
2680
|
+
|
|
2681
|
+
<JunConfigRow
|
|
2682
|
+
label="Include images"
|
|
2683
|
+
:muted="!offlineOffer"
|
|
2684
|
+
hint="The heavy half — the only part of a copy whose size comes from your content rather than your page count. Off means saved pages show their words and not their pictures."
|
|
2685
|
+
>
|
|
2686
|
+
<USwitch
|
|
2687
|
+
v-model="offlineMedia"
|
|
2688
|
+
:disabled="!editing || !offlineOffer"
|
|
2689
|
+
color="neutral"
|
|
2690
|
+
/>
|
|
2691
|
+
</JunConfigRow>
|
|
2692
|
+
|
|
2693
|
+
<JunConfigRow
|
|
2694
|
+
label="Size limit"
|
|
2695
|
+
:muted="!offlineOffer"
|
|
2696
|
+
>
|
|
2697
|
+
<template #hint>
|
|
2698
|
+
Megabytes. A copy stops here and says so rather than filling
|
|
2699
|
+
somebody's phone.
|
|
2700
|
+
</template>
|
|
2701
|
+
<UInput
|
|
2702
|
+
:model-value="offlineBudget"
|
|
2703
|
+
type="number"
|
|
2704
|
+
min="1"
|
|
2705
|
+
step="10"
|
|
2706
|
+
class="w-24"
|
|
2707
|
+
:disabled="!editing || !offlineOffer"
|
|
2708
|
+
@change="setBudget($event)"
|
|
2709
|
+
/>
|
|
2710
|
+
</JunConfigRow>
|
|
2711
|
+
|
|
2712
|
+
<JunConfigRow
|
|
2713
|
+
label="Keep documents in sync"
|
|
2714
|
+
hint="For you, not for readers: every document onto this device so the site is editable with no connection. A much larger copy, and one nothing starts on its own."
|
|
2715
|
+
>
|
|
2716
|
+
<USwitch
|
|
2717
|
+
v-model="offlineDocSync"
|
|
2718
|
+
:disabled="!editing"
|
|
2719
|
+
color="neutral"
|
|
2720
|
+
/>
|
|
2721
|
+
</JunConfigRow>
|
|
2722
|
+
</div>
|
|
2723
|
+
</section>
|
|
2724
|
+
|
|
2113
2725
|
<!-- Visitors -->
|
|
2114
2726
|
<section
|
|
2115
2727
|
v-if="shows('visitors')"
|