@abraca/junis 2.86.0 → 2.88.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 +4 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +82 -8
- 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 +30 -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 +478 -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/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 +486 -6
- package/dist/runtime/components/renderers/JunEntryRenderer.vue +48 -0
- package/dist/runtime/components/renderers/JunGlobeRenderer.vue +43 -26
- 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/useJunOptions.d.ts +1 -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 +51 -3
- package/dist/runtime/composables/useJunTheme.js +4 -1
- package/dist/runtime/composables/useJunViewingAccent.js +10 -0
- package/dist/runtime/layouts/jun.vue +21 -1
- package/dist/runtime/pages/doc.vue +41 -35
- package/dist/runtime/pages/index.vue +63 -35
- package/dist/runtime/plugins/jun-doc-tree.d.ts +2 -0
- package/dist/runtime/plugins/jun-doc-tree.js +26 -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/resolve/[...slug].get.d.ts +20 -0
- package/dist/runtime/server/api/resolve/[...slug].get.js +33 -2
- 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.d.ts +9 -0
- package/dist/runtime/server/api/tree.get.js +25 -0
- package/dist/runtime/server/janitor/junJanitorActor.d.ts +13 -0
- package/dist/runtime/server/janitor/junJanitorActor.js +36 -5
- 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-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/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/types.d.ts +225 -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/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 +38 -0
- package/dist/runtime/utils/junViewSpecs.js +92 -1
- package/package.json +10 -8
- /package/dist/runtime/components/{JunSectionPresence.client.d.vue.ts → JunSectionPresence.d.vue.ts} +0 -0
- /package/dist/runtime/components/{JunSectionPresence.client.vue → JunSectionPresence.vue} +0 -0
- /package/dist/runtime/components/{JunSectionPresence.client.vue.d.ts → JunSectionPresence.vue.d.ts} +0 -0
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
mobile: { type: String, required: false },
|
|
5
|
+
overflow: { type: String, required: false },
|
|
6
|
+
placement: { type: String, required: false },
|
|
7
|
+
phone: { type: Boolean, required: false, default: false },
|
|
8
|
+
active: { type: Boolean, required: false, default: false }
|
|
9
|
+
});
|
|
10
|
+
const ITEMS = [0, 1, 2, 3, 4];
|
|
11
|
+
const kind = computed(() => {
|
|
12
|
+
if (props.mobile) return `mobile:${props.mobile}`;
|
|
13
|
+
if (props.overflow) return `overflow:${props.overflow}`;
|
|
14
|
+
if (props.placement) return `placement:${props.placement}`;
|
|
15
|
+
return "placement:top";
|
|
16
|
+
});
|
|
17
|
+
const barPosition = computed(() => {
|
|
18
|
+
switch (kind.value) {
|
|
19
|
+
case "mobile:dock":
|
|
20
|
+
case "placement:bottom":
|
|
21
|
+
return "bottom";
|
|
22
|
+
case "placement:rail-left":
|
|
23
|
+
return "left";
|
|
24
|
+
case "placement:rail-right":
|
|
25
|
+
return "right";
|
|
26
|
+
default:
|
|
27
|
+
return "top";
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
const isRail = computed(() => barPosition.value === "left" || barPosition.value === "right");
|
|
31
|
+
const shape = computed(() => {
|
|
32
|
+
switch (kind.value) {
|
|
33
|
+
case "mobile:track":
|
|
34
|
+
return "items";
|
|
35
|
+
case "mobile:sheet":
|
|
36
|
+
case "mobile:drawer-left":
|
|
37
|
+
case "mobile:drawer-right":
|
|
38
|
+
case "mobile:fullscreen":
|
|
39
|
+
case "mobile:grid":
|
|
40
|
+
return "trigger";
|
|
41
|
+
case "mobile:dock":
|
|
42
|
+
return "tabs";
|
|
43
|
+
case "overflow:more":
|
|
44
|
+
return "items-more";
|
|
45
|
+
case "overflow:wrap":
|
|
46
|
+
return "items-wrapped";
|
|
47
|
+
case "overflow:shrink":
|
|
48
|
+
return "dots";
|
|
49
|
+
default:
|
|
50
|
+
return "items";
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
const overlay = computed(() => {
|
|
54
|
+
switch (kind.value) {
|
|
55
|
+
case "mobile:sheet":
|
|
56
|
+
return "sheet";
|
|
57
|
+
case "mobile:drawer-left":
|
|
58
|
+
return "drawer-left";
|
|
59
|
+
case "mobile:drawer-right":
|
|
60
|
+
return "drawer-right";
|
|
61
|
+
case "mobile:fullscreen":
|
|
62
|
+
return "full";
|
|
63
|
+
case "mobile:grid":
|
|
64
|
+
return "grid";
|
|
65
|
+
default:
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
</script>
|
|
70
|
+
|
|
71
|
+
<template>
|
|
72
|
+
<div
|
|
73
|
+
class="jun-nav-preview relative overflow-hidden rounded-md border transition-colors"
|
|
74
|
+
:class="[
|
|
75
|
+
phone ? 'aspect-[9/16] w-10' : 'aspect-[16/10] w-full',
|
|
76
|
+
active ? 'border-black/25 bg-black/[0.04] dark:border-white/25 dark:bg-white/[0.06]' : 'border-black/10 bg-black/[0.02] dark:border-white/10 dark:bg-white/[0.03]'
|
|
77
|
+
]"
|
|
78
|
+
aria-hidden="true"
|
|
79
|
+
>
|
|
80
|
+
<!-- The overlay a mode opens. Drawn first, so the bar sits over it the way
|
|
81
|
+
a trigger sits over the sheet it opened. -->
|
|
82
|
+
<div
|
|
83
|
+
v-if="overlay === 'sheet'"
|
|
84
|
+
class="absolute inset-x-1 bottom-1 h-1/2 rounded-sm bg-current opacity-[0.18]"
|
|
85
|
+
/>
|
|
86
|
+
<div
|
|
87
|
+
v-else-if="overlay === 'drawer-left'"
|
|
88
|
+
class="absolute inset-y-1 left-1 w-1/2 rounded-sm bg-current opacity-[0.18]"
|
|
89
|
+
/>
|
|
90
|
+
<div
|
|
91
|
+
v-else-if="overlay === 'drawer-right'"
|
|
92
|
+
class="absolute inset-y-1 right-1 w-1/2 rounded-sm bg-current opacity-[0.18]"
|
|
93
|
+
/>
|
|
94
|
+
<div
|
|
95
|
+
v-else-if="overlay === 'full'"
|
|
96
|
+
class="absolute inset-1 rounded-sm bg-current opacity-[0.18]"
|
|
97
|
+
/>
|
|
98
|
+
<div
|
|
99
|
+
v-else-if="overlay === 'grid'"
|
|
100
|
+
class="absolute inset-1 grid grid-cols-3 gap-0.5 rounded-sm"
|
|
101
|
+
>
|
|
102
|
+
<span
|
|
103
|
+
v-for="n in 6"
|
|
104
|
+
:key="n"
|
|
105
|
+
class="rounded-[1px] bg-current opacity-[0.22]"
|
|
106
|
+
/>
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
<!-- The bar itself. -->
|
|
110
|
+
<div
|
|
111
|
+
class="absolute flex items-center gap-0.5 rounded-sm bg-current opacity-30"
|
|
112
|
+
:class="[
|
|
113
|
+
isRail ? 'inset-y-1 w-2.5 flex-col justify-center py-1' : 'inset-x-1 h-2.5 justify-center px-1',
|
|
114
|
+
barPosition === 'top' ? 'top-1' : '',
|
|
115
|
+
barPosition === 'bottom' ? 'bottom-1' : '',
|
|
116
|
+
barPosition === 'left' ? 'left-1' : '',
|
|
117
|
+
barPosition === 'right' ? 'right-1' : ''
|
|
118
|
+
]"
|
|
119
|
+
/>
|
|
120
|
+
|
|
121
|
+
<!-- …and what is IN it, drawn over the bar in the page's own ink so the
|
|
122
|
+
two read as bar and contents rather than one block. -->
|
|
123
|
+
<div
|
|
124
|
+
class="absolute flex items-center gap-[2px]"
|
|
125
|
+
:class="[
|
|
126
|
+
isRail ? 'inset-y-1 w-2.5 flex-col justify-center' : 'inset-x-1 h-2.5 justify-center px-1.5',
|
|
127
|
+
barPosition === 'top' ? 'top-1' : '',
|
|
128
|
+
barPosition === 'bottom' ? 'bottom-1' : '',
|
|
129
|
+
barPosition === 'left' ? 'left-1' : '',
|
|
130
|
+
barPosition === 'right' ? 'right-1' : '',
|
|
131
|
+
shape === 'items-wrapped' ? 'flex-wrap content-center' : ''
|
|
132
|
+
]"
|
|
133
|
+
>
|
|
134
|
+
<template v-if="shape === 'trigger'">
|
|
135
|
+
<span class="h-[3px] w-[3px] rounded-[1px] bg-current opacity-80" />
|
|
136
|
+
</template>
|
|
137
|
+
<template v-else-if="shape === 'dots'">
|
|
138
|
+
<span
|
|
139
|
+
v-for="n in ITEMS"
|
|
140
|
+
:key="n"
|
|
141
|
+
class="size-[3px] rounded-full bg-current opacity-70"
|
|
142
|
+
/>
|
|
143
|
+
</template>
|
|
144
|
+
<template v-else-if="shape === 'tabs'">
|
|
145
|
+
<span
|
|
146
|
+
v-for="n in 4"
|
|
147
|
+
:key="n"
|
|
148
|
+
class="h-[3px] w-[5px] rounded-[1px] bg-current opacity-70"
|
|
149
|
+
/>
|
|
150
|
+
</template>
|
|
151
|
+
<template v-else-if="shape === 'items-more'">
|
|
152
|
+
<span
|
|
153
|
+
v-for="n in 3"
|
|
154
|
+
:key="n"
|
|
155
|
+
class="h-[3px] w-[7px] rounded-[1px] bg-current opacity-70"
|
|
156
|
+
/>
|
|
157
|
+
<span class="h-[3px] w-[3px] rounded-full bg-current opacity-95" />
|
|
158
|
+
</template>
|
|
159
|
+
<template v-else>
|
|
160
|
+
<span
|
|
161
|
+
v-for="n in ITEMS"
|
|
162
|
+
:key="n"
|
|
163
|
+
class="rounded-[1px] bg-current opacity-70"
|
|
164
|
+
:class="isRail ? 'my-[1px] h-[3px] w-[6px]' : 'h-[3px] w-[7px]'"
|
|
165
|
+
/>
|
|
166
|
+
</template>
|
|
167
|
+
</div>
|
|
168
|
+
</div>
|
|
169
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { JunNavMobileMode, JunNavOverflow, JunNavPlacement } from '../types.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** What to draw. Exactly one of these is honoured, in this order. */
|
|
4
|
+
mobile?: JunNavMobileMode;
|
|
5
|
+
overflow?: JunNavOverflow;
|
|
6
|
+
placement?: JunNavPlacement;
|
|
7
|
+
/** Draw it as a phone rather than a window. */
|
|
8
|
+
phone?: boolean;
|
|
9
|
+
/** Lit, because it is the option currently chosen. */
|
|
10
|
+
active?: boolean;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
13
|
+
active: boolean;
|
|
14
|
+
phone: boolean;
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
id?: string;
|
|
3
|
-
name: string;
|
|
4
|
-
href: string;
|
|
5
|
-
type?: string;
|
|
6
|
-
icon?: string;
|
|
7
|
-
current: boolean;
|
|
8
|
-
}
|
|
1
|
+
import { type JunNavigationItem as NavigationItem } from '../composables/useJunNavItems.js';
|
|
9
2
|
type __VLS_Props = {
|
|
10
3
|
navigation: NavigationItem[];
|
|
11
4
|
};
|
|
12
|
-
declare var
|
|
5
|
+
declare var __VLS_14: {}, __VLS_118: {};
|
|
13
6
|
type __VLS_Slots = {} & {
|
|
14
|
-
logo?: (props: typeof
|
|
7
|
+
logo?: (props: typeof __VLS_14) => any;
|
|
15
8
|
} & {
|
|
16
|
-
actions?: (props: typeof
|
|
9
|
+
actions?: (props: typeof __VLS_118) => any;
|
|
17
10
|
};
|
|
18
11
|
declare const __VLS_base: 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>;
|
|
19
12
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|