@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.
Files changed (109) hide show
  1. package/dist/module.d.mts +43 -4
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +121 -6
  4. package/dist/runtime/assets/css/jun.css +2 -2
  5. package/dist/runtime/components/JunDocSurface.d.vue.ts +20 -2
  6. package/dist/runtime/components/JunDocSurface.vue +27 -2
  7. package/dist/runtime/components/JunDocSurface.vue.d.ts +20 -2
  8. package/dist/runtime/components/JunHead.vue +16 -4
  9. package/dist/runtime/components/JunNavDock.d.vue.ts +15 -0
  10. package/dist/runtime/components/JunNavDock.vue +94 -0
  11. package/dist/runtime/components/JunNavDock.vue.d.ts +15 -0
  12. package/dist/runtime/components/JunNavMenu.client.d.vue.ts +15 -0
  13. package/dist/runtime/components/JunNavMenu.client.vue +501 -0
  14. package/dist/runtime/components/JunNavMenu.client.vue.d.ts +15 -0
  15. package/dist/runtime/components/JunNavPreview.d.vue.ts +17 -0
  16. package/dist/runtime/components/JunNavPreview.vue +169 -0
  17. package/dist/runtime/components/JunNavPreview.vue.d.ts +17 -0
  18. package/dist/runtime/components/JunNavigation.d.vue.ts +4 -11
  19. package/dist/runtime/components/JunNavigation.vue +813 -138
  20. package/dist/runtime/components/JunNavigation.vue.d.ts +4 -11
  21. package/dist/runtime/components/JunNoteLinks.vue +1 -1
  22. package/dist/runtime/components/JunOfflinePanel.client.d.vue.ts +3 -0
  23. package/dist/runtime/components/JunOfflinePanel.client.vue +293 -0
  24. package/dist/runtime/components/JunOfflinePanel.client.vue.d.ts +3 -0
  25. package/dist/runtime/components/JunPageHero.vue +3 -3
  26. package/dist/runtime/components/JunSectionBar.d.vue.ts +41 -0
  27. package/dist/runtime/components/JunSectionBar.vue +144 -0
  28. package/dist/runtime/components/JunSectionBar.vue.d.ts +41 -0
  29. package/dist/runtime/components/renderers/JunConfigRenderer.vue +618 -6
  30. package/dist/runtime/components/renderers/JunEntryRenderer.vue +48 -0
  31. package/dist/runtime/composables/useJunCommands.d.ts +1 -1
  32. package/dist/runtime/composables/useJunCommands.js +14 -1
  33. package/dist/runtime/composables/useJunCreatePage.js +7 -1
  34. package/dist/runtime/composables/useJunDocPage.d.ts +28 -0
  35. package/dist/runtime/composables/useJunDocPage.js +111 -20
  36. package/dist/runtime/composables/useJunGarden.d.ts +1 -1
  37. package/dist/runtime/composables/useJunGarden.js +3 -2
  38. package/dist/runtime/composables/useJunGestures.d.ts +53 -0
  39. package/dist/runtime/composables/useJunGestures.js +89 -0
  40. package/dist/runtime/composables/useJunMenuState.d.ts +4 -0
  41. package/dist/runtime/composables/useJunMenuState.js +5 -0
  42. package/dist/runtime/composables/useJunNavItems.d.ts +50 -0
  43. package/dist/runtime/composables/useJunNavItems.js +188 -0
  44. package/dist/runtime/composables/useJunNavSettings.d.ts +58 -1
  45. package/dist/runtime/composables/useJunNavSettings.js +110 -8
  46. package/dist/runtime/composables/useJunOffline.d.ts +109 -0
  47. package/dist/runtime/composables/useJunOffline.js +294 -0
  48. package/dist/runtime/composables/useJunOptions.d.ts +1 -0
  49. package/dist/runtime/composables/useJunSettings.d.ts +1 -1
  50. package/dist/runtime/composables/useJunSettings.js +2 -0
  51. package/dist/runtime/composables/useJunSiblings.d.ts +30 -0
  52. package/dist/runtime/composables/useJunSiblings.js +38 -0
  53. package/dist/runtime/composables/useJunSiteConfig.d.ts +70 -3
  54. package/dist/runtime/composables/useJunTheme.js +4 -1
  55. package/dist/runtime/composables/useJunViewingAccent.js +10 -0
  56. package/dist/runtime/layouts/jun.vue +32 -2
  57. package/dist/runtime/pages/doc.vue +2 -0
  58. package/dist/runtime/pages/index.vue +2 -0
  59. package/dist/runtime/server/api/health.get.d.ts +15 -0
  60. package/dist/runtime/server/api/health.get.js +7 -2
  61. package/dist/runtime/server/api/links.get.js +27 -3
  62. package/dist/runtime/server/api/offline.get.d.ts +10 -0
  63. package/dist/runtime/server/api/offline.get.js +13 -0
  64. package/dist/runtime/server/api/resolve/[...slug].get.d.ts +20 -0
  65. package/dist/runtime/server/api/resolve/[...slug].get.js +31 -0
  66. package/dist/runtime/server/api/search.get.d.ts +1 -1
  67. package/dist/runtime/server/api/search.get.js +42 -39
  68. package/dist/runtime/server/api/tree.get.js +3 -1
  69. package/dist/runtime/server/janitor/junJanitorChores.d.ts +14 -7
  70. package/dist/runtime/server/janitor/junJanitorChores.js +21 -3
  71. package/dist/runtime/server/janitor/junJanitorMachine.js +36 -4
  72. package/dist/runtime/server/janitor/junJanitorPerform.d.ts +15 -1
  73. package/dist/runtime/server/janitor/junJanitorPerform.js +13 -5
  74. package/dist/runtime/server/janitor/junJanitorYText.d.ts +40 -3
  75. package/dist/runtime/server/janitor/junJanitorYText.js +60 -14
  76. package/dist/runtime/server/plugins/jun-compress.d.ts +2 -0
  77. package/dist/runtime/server/plugins/jun-compress.js +76 -0
  78. package/dist/runtime/server/plugins/jun-janitor.js +132 -81
  79. package/dist/runtime/server/routes/jun-card.png.get.d.ts +2 -0
  80. package/dist/runtime/server/routes/jun-card.png.get.js +40 -0
  81. package/dist/runtime/server/routes/jun-sw.js.get.js +66 -13
  82. package/dist/runtime/server/routes/sitemap.xml.get.js +5 -18
  83. package/dist/runtime/server/utils/junCard.d.ts +39 -0
  84. package/dist/runtime/server/utils/junCard.js +159 -0
  85. package/dist/runtime/server/utils/junIcon.d.ts +27 -2
  86. package/dist/runtime/server/utils/junIcon.js +5 -5
  87. package/dist/runtime/server/utils/junJanitorStatus.d.ts +59 -0
  88. package/dist/runtime/server/utils/junJanitorStatus.js +27 -0
  89. package/dist/runtime/server/utils/junPages.d.ts +51 -0
  90. package/dist/runtime/server/utils/junPages.js +70 -0
  91. package/dist/runtime/types.d.ts +295 -0
  92. package/dist/runtime/utils/junAdopt.d.ts +43 -0
  93. package/dist/runtime/utils/junAdopt.js +7 -0
  94. package/dist/runtime/utils/junGesture.d.ts +84 -0
  95. package/dist/runtime/utils/junGesture.js +40 -0
  96. package/dist/runtime/utils/junLetters.d.ts +86 -0
  97. package/dist/runtime/utils/junLetters.js +173 -0
  98. package/dist/runtime/utils/junNavValue.d.ts +56 -0
  99. package/dist/runtime/utils/junNavValue.js +36 -0
  100. package/dist/runtime/utils/junOffline.d.ts +138 -0
  101. package/dist/runtime/utils/junOffline.js +73 -0
  102. package/dist/runtime/utils/junSearchRank.d.ts +79 -0
  103. package/dist/runtime/utils/junSearchRank.js +73 -0
  104. package/dist/runtime/utils/junSocial.d.ts +59 -0
  105. package/dist/runtime/utils/junSocial.js +56 -0
  106. package/dist/runtime/utils/junViewSpecs.d.ts +39 -1
  107. package/dist/runtime/utils/junViewSpecs.js +92 -1
  108. package/dist/types.d.mts +1 -1
  109. package/package.json +13 -9
@@ -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
- interface NavigationItem {
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 __VLS_9: {}, __VLS_83: {};
5
+ declare var __VLS_14: {}, __VLS_118: {};
13
6
  type __VLS_Slots = {} & {
14
- logo?: (props: typeof __VLS_9) => any;
7
+ logo?: (props: typeof __VLS_14) => any;
15
8
  } & {
16
- actions?: (props: typeof __VLS_83) => any;
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>;