@abraca/junis 2.84.0 → 2.86.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 +17 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +270 -22
- package/dist/runtime/assets/css/jun.css +1 -1
- package/dist/runtime/components/JunBlobBackdrop.client.vue +1 -1
- package/dist/runtime/components/JunCampfirePresence.client.vue +75 -10
- package/dist/runtime/components/JunCollectionIntro.d.vue.ts +11 -0
- package/dist/runtime/components/JunCollectionIntro.vue +45 -0
- package/dist/runtime/components/JunCollectionIntro.vue.d.ts +11 -0
- package/dist/runtime/components/JunConfigRow.d.vue.ts +43 -0
- package/dist/runtime/components/JunConfigRow.vue +34 -0
- package/dist/runtime/components/JunConfigRow.vue.d.ts +43 -0
- package/dist/runtime/components/JunFooter.vue +1 -1
- package/dist/runtime/components/JunHead.vue +37 -5
- package/dist/runtime/components/JunHorizontalTimeline.d.vue.ts +30 -0
- package/dist/runtime/components/JunHorizontalTimeline.vue.d.ts +30 -0
- package/dist/runtime/components/JunLinksRow.d.vue.ts +16 -1
- package/dist/runtime/components/JunLinksRow.vue +17 -7
- package/dist/runtime/components/JunLinksRow.vue.d.ts +16 -1
- package/dist/runtime/components/JunLogo.vue +10 -45
- package/dist/runtime/components/JunMedia.client.d.vue.ts +1 -1
- package/dist/runtime/components/JunMedia.client.vue.d.ts +1 -1
- package/dist/runtime/components/JunNavigation.vue +21 -4
- package/dist/runtime/components/JunNoteLinks.d.vue.ts +6 -0
- package/dist/runtime/components/JunNoteLinks.vue +57 -0
- package/dist/runtime/components/JunNoteLinks.vue.d.ts +6 -0
- package/dist/runtime/components/JunPageHero.d.vue.ts +8 -2
- package/dist/runtime/components/JunPageHero.vue +15 -3
- package/dist/runtime/components/JunPageHero.vue.d.ts +8 -2
- package/dist/runtime/components/JunPatternBackdrop.client.vue +1 -1
- package/dist/runtime/components/JunReaders.d.vue.ts +11 -0
- package/dist/runtime/components/JunReaders.vue +99 -0
- package/dist/runtime/components/JunReaders.vue.d.ts +11 -0
- package/dist/runtime/components/JunSearch.client.vue +2 -2
- package/dist/runtime/components/JunSectionPresence.client.d.vue.ts +17 -0
- package/dist/runtime/components/JunSectionPresence.client.vue +99 -0
- package/dist/runtime/components/JunSectionPresence.client.vue.d.ts +17 -0
- package/dist/runtime/components/JunShaderBackdrop.client.vue +1 -1
- package/dist/runtime/components/JunThreadComposer.d.vue.ts +37 -0
- package/dist/runtime/components/JunThreadComposer.vue +54 -0
- package/dist/runtime/components/JunThreadComposer.vue.d.ts +37 -0
- package/dist/runtime/components/JunTravellersChip.vue +35 -5
- package/dist/runtime/components/JunVideoEmbed.client.d.vue.ts +1 -1
- package/dist/runtime/components/JunVideoEmbed.client.vue.d.ts +1 -1
- package/dist/runtime/components/JunViewControl.d.vue.ts +29 -0
- package/dist/runtime/components/JunViewControl.vue +340 -0
- package/dist/runtime/components/JunViewControl.vue.d.ts +29 -0
- package/dist/runtime/components/JunViewControls.d.vue.ts +27 -0
- package/dist/runtime/components/JunViewControls.vue +94 -0
- package/dist/runtime/components/JunViewControls.vue.d.ts +27 -0
- package/dist/runtime/components/renderers/JunAppsRenderer.vue +45 -4
- package/dist/runtime/components/renderers/JunCinemaRenderer.vue +42 -4
- package/dist/runtime/components/renderers/JunConfigRenderer.vue +362 -239
- package/dist/runtime/components/renderers/JunCourseRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunCourseRenderer.vue +229 -0
- package/dist/runtime/components/renderers/JunCourseRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunCvRenderer.vue +44 -6
- package/dist/runtime/components/renderers/JunDeckRenderer.d.vue.ts +9 -0
- package/dist/runtime/components/renderers/JunDeckRenderer.vue +370 -0
- package/dist/runtime/components/renderers/JunDeckRenderer.vue.d.ts +9 -0
- package/dist/runtime/components/renderers/JunEntryRenderer.vue +157 -31
- package/dist/runtime/components/renderers/JunFestivalRenderer.vue +42 -5
- package/dist/runtime/components/renderers/JunGardenRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunGardenRenderer.vue +280 -0
- package/dist/runtime/components/renderers/JunGardenRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunGuestbookRenderer.vue +96 -14
- package/dist/runtime/components/renderers/JunHomeRenderer.vue +31 -132
- package/dist/runtime/components/renderers/JunItemRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunItemRenderer.vue +398 -0
- package/dist/runtime/components/renderers/JunItemRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunJournalRenderer.vue +141 -11
- package/dist/runtime/components/renderers/JunLibraryRenderer.vue +295 -12
- package/dist/runtime/components/renderers/JunLinksRenderer.vue +33 -1
- package/dist/runtime/components/renderers/JunLiveRenderer.vue +38 -2
- package/dist/runtime/components/renderers/JunMosaicRenderer.vue +3 -2
- package/dist/runtime/components/renderers/JunMovieRenderer.vue +32 -5
- package/dist/runtime/components/renderers/JunNowRenderer.vue +40 -7
- package/dist/runtime/components/renderers/JunPollRenderer.d.vue.ts +9 -0
- package/dist/runtime/components/renderers/JunPollRenderer.vue +231 -0
- package/dist/runtime/components/renderers/JunPollRenderer.vue.d.ts +9 -0
- package/dist/runtime/components/renderers/JunProjectRenderer.vue +74 -18
- package/dist/runtime/components/renderers/JunServicesRenderer.vue +40 -2
- package/dist/runtime/components/renderers/JunStatsRenderer.vue +37 -50
- package/dist/runtime/components/renderers/JunThreadRenderer.d.vue.ts +9 -0
- package/dist/runtime/components/renderers/JunThreadRenderer.vue +304 -0
- package/dist/runtime/components/renderers/JunThreadRenderer.vue.d.ts +9 -0
- package/dist/runtime/components/renderers/JunTrackRenderer.vue +32 -4
- package/dist/runtime/components/renderers/JunUsesRenderer.vue +57 -13
- package/dist/runtime/components/renderers/JunWallRenderer.vue +60 -5
- package/dist/runtime/composables/useJunDeck.d.ts +66 -0
- package/dist/runtime/composables/useJunDeck.js +61 -0
- package/dist/runtime/composables/useJunDocPage.d.ts +14 -11
- package/dist/runtime/composables/useJunDocPage.js +67 -3
- package/dist/runtime/composables/useJunFollow.d.ts +65 -9
- package/dist/runtime/composables/useJunFollow.js +237 -20
- package/dist/runtime/composables/useJunGarden.d.ts +67 -0
- package/dist/runtime/composables/useJunGarden.js +92 -0
- package/dist/runtime/composables/useJunOptions.d.ts +1 -0
- package/dist/runtime/composables/useJunPresence.d.ts +26 -0
- package/dist/runtime/composables/useJunPresence.js +9 -2
- package/dist/runtime/composables/useJunSections.d.ts +73 -0
- package/dist/runtime/composables/useJunSections.js +117 -0
- package/dist/runtime/composables/useJunSettings.d.ts +1 -1
- package/dist/runtime/composables/useJunSettings.js +5 -1
- package/dist/runtime/composables/useJunSiteConfig.d.ts +37 -0
- package/dist/runtime/composables/useJunTheme.js +49 -50
- package/dist/runtime/composables/useJunViewOptions.d.ts +85 -0
- package/dist/runtime/composables/useJunViewOptions.js +63 -0
- package/dist/runtime/pages/doc.vue +14 -8
- package/dist/runtime/plugins/jun-sw.client.d.ts +2 -0
- package/dist/runtime/plugins/jun-sw.client.js +36 -0
- package/dist/runtime/server/api/health.get.d.ts +19 -0
- package/dist/runtime/server/api/health.get.js +40 -0
- package/dist/runtime/server/api/links.get.d.ts +19 -0
- package/dist/runtime/server/api/links.get.js +37 -0
- package/dist/runtime/server/api/resolve/[...slug].get.d.ts +9 -0
- package/dist/runtime/server/api/resolve/[...slug].get.js +5 -0
- package/dist/runtime/server/api/stats.get.js +2 -1
- package/dist/runtime/server/janitor/junJanitorChores.js +8 -0
- package/dist/runtime/server/plugins/jun-bootstrap.js +103 -15
- package/dist/runtime/server/plugins/jun-doc-cache.js +42 -4
- package/dist/runtime/server/plugins/jun-janitor.js +9 -1
- package/dist/runtime/server/plugins/jun-rpc.js +293 -0
- package/dist/runtime/server/plugins/jun-watchdog.d.ts +2 -0
- package/dist/runtime/server/plugins/jun-watchdog.js +54 -0
- package/dist/runtime/server/routes/jun-icon.png.get.d.ts +2 -0
- package/dist/runtime/server/routes/jun-icon.png.get.js +25 -0
- package/dist/runtime/server/routes/jun-icon.svg.get.d.ts +2 -0
- package/dist/runtime/server/routes/jun-icon.svg.get.js +9 -0
- package/dist/runtime/server/routes/jun-splash.png.get.d.ts +2 -0
- package/dist/runtime/server/routes/jun-splash.png.get.js +37 -0
- package/dist/runtime/server/routes/jun-sw.js.get.d.ts +2 -0
- package/dist/runtime/server/routes/jun-sw.js.get.js +126 -0
- package/dist/runtime/server/routes/manifest.webmanifest.get.d.ts +24 -0
- package/dist/runtime/server/routes/manifest.webmanifest.get.js +51 -0
- package/dist/runtime/server/routes/sitemap.xml.get.js +2 -0
- package/dist/runtime/server/utils/junBoot.d.ts +1 -0
- package/dist/runtime/server/utils/junBoot.js +4 -0
- package/dist/runtime/server/utils/junBrand.d.ts +4 -0
- package/dist/runtime/server/utils/junBrand.js +9 -0
- package/dist/runtime/server/utils/junCache.d.ts +17 -0
- package/dist/runtime/server/utils/junCache.js +5 -0
- package/dist/runtime/server/utils/junIcon.d.ts +44 -0
- package/dist/runtime/server/utils/junIcon.js +374 -0
- package/dist/runtime/server/utils/junSeedGate.d.ts +68 -0
- package/dist/runtime/server/utils/junSeedGate.js +41 -0
- package/dist/runtime/types.d.ts +82 -3
- package/dist/runtime/utils/junCourse.d.ts +106 -0
- package/dist/runtime/utils/junCourse.js +65 -0
- package/dist/runtime/utils/junGarden.d.ts +193 -0
- package/dist/runtime/utils/junGarden.js +233 -0
- package/dist/runtime/utils/junIdentity.d.ts +121 -0
- package/dist/runtime/utils/junIdentity.js +115 -0
- package/dist/runtime/utils/junMark.d.ts +254 -0
- package/dist/runtime/utils/junMark.js +169 -0
- package/dist/runtime/utils/junMetaSchemas.js +8 -1
- package/dist/runtime/utils/junModeration.d.ts +67 -0
- package/dist/runtime/utils/junModeration.js +20 -0
- package/dist/runtime/utils/junMotion.d.ts +26 -0
- package/dist/runtime/utils/junMotion.js +31 -0
- package/dist/runtime/utils/junPeople.d.ts +43 -0
- package/dist/runtime/utils/junPeople.js +9 -0
- package/dist/runtime/utils/junPoll.d.ts +79 -0
- package/dist/runtime/utils/junPoll.js +82 -0
- package/dist/runtime/utils/junReadiness.d.ts +131 -0
- package/dist/runtime/utils/junReadiness.js +69 -0
- package/dist/runtime/utils/junSections.d.ts +115 -0
- package/dist/runtime/utils/junSections.js +45 -0
- package/dist/runtime/utils/junSlides.d.ts +66 -0
- package/dist/runtime/utils/junSlides.js +47 -0
- package/dist/runtime/utils/junThread.d.ts +81 -0
- package/dist/runtime/utils/junThread.js +75 -0
- package/dist/runtime/utils/junViewSpecs.d.ts +671 -0
- package/dist/runtime/utils/junViewSpecs.js +534 -0
- package/dist/runtime/utils/junViewValues.d.ts +125 -0
- package/dist/runtime/utils/junViewValues.js +104 -0
- package/dist/types.d.mts +1 -1
- package/package.json +5 -1
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
const HEX = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
|
|
2
|
+
export const JUN_TEXT_MAX = 120;
|
|
3
|
+
export const JUN_TAGS_MAX = 12;
|
|
4
|
+
export function junCoerceViewValue(option, raw) {
|
|
5
|
+
if (raw == null) return void 0;
|
|
6
|
+
switch (option.kind) {
|
|
7
|
+
case "toggle":
|
|
8
|
+
return typeof raw === "boolean" ? raw : void 0;
|
|
9
|
+
case "number":
|
|
10
|
+
case "range": {
|
|
11
|
+
const n = typeof raw === "number" ? raw : Number(raw);
|
|
12
|
+
if (!Number.isFinite(n)) return void 0;
|
|
13
|
+
const min = option.min ?? Number.NEGATIVE_INFINITY;
|
|
14
|
+
const max = option.max ?? Number.POSITIVE_INFINITY;
|
|
15
|
+
return Math.min(max, Math.max(min, n));
|
|
16
|
+
}
|
|
17
|
+
case "color": {
|
|
18
|
+
if (typeof raw !== "string") return void 0;
|
|
19
|
+
const v = raw.trim();
|
|
20
|
+
if (option.choices?.some((c) => c.value === v)) return v;
|
|
21
|
+
return HEX.test(v) ? v.toLowerCase() : void 0;
|
|
22
|
+
}
|
|
23
|
+
case "text": {
|
|
24
|
+
if (typeof raw !== "string") return void 0;
|
|
25
|
+
const v = raw.replace(/\s+/g, " ").trim().slice(0, option.maxLength ?? JUN_TEXT_MAX);
|
|
26
|
+
return v || void 0;
|
|
27
|
+
}
|
|
28
|
+
case "tags": {
|
|
29
|
+
if (!Array.isArray(raw)) return void 0;
|
|
30
|
+
const seen = /* @__PURE__ */ new Set();
|
|
31
|
+
const out = [];
|
|
32
|
+
for (const entry of raw) {
|
|
33
|
+
if (typeof entry !== "string") continue;
|
|
34
|
+
const v = entry.replace(/\s+/g, " ").trim().slice(0, 40);
|
|
35
|
+
const key = v.toLowerCase();
|
|
36
|
+
if (!v || seen.has(key)) continue;
|
|
37
|
+
seen.add(key);
|
|
38
|
+
out.push(v);
|
|
39
|
+
if (out.length >= JUN_TAGS_MAX) break;
|
|
40
|
+
}
|
|
41
|
+
return out.length ? out : void 0;
|
|
42
|
+
}
|
|
43
|
+
case "doc": {
|
|
44
|
+
if (typeof raw !== "string") return void 0;
|
|
45
|
+
const v = raw.trim();
|
|
46
|
+
return v || void 0;
|
|
47
|
+
}
|
|
48
|
+
case "order": {
|
|
49
|
+
if (!Array.isArray(raw)) return void 0;
|
|
50
|
+
const known = new Set((option.choices ?? []).map((c) => c.value));
|
|
51
|
+
const seen = /* @__PURE__ */ new Set();
|
|
52
|
+
const out = [];
|
|
53
|
+
for (const v of raw) {
|
|
54
|
+
if (typeof v !== "string" || !known.has(v) || seen.has(v)) continue;
|
|
55
|
+
seen.add(v);
|
|
56
|
+
out.push(v);
|
|
57
|
+
}
|
|
58
|
+
return out.length ? out : void 0;
|
|
59
|
+
}
|
|
60
|
+
default: {
|
|
61
|
+
if (typeof raw !== "string") return void 0;
|
|
62
|
+
return option.choices?.some((c) => c.value === raw) ? raw : void 0;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
export function junViewStore(option) {
|
|
67
|
+
return option.metaKey ? "meta" : "junView";
|
|
68
|
+
}
|
|
69
|
+
export function junResolveViewValue(option, stored, siteDefaults, meta = {}) {
|
|
70
|
+
const own = option.metaKey ? meta[option.metaKey] : stored[option.key];
|
|
71
|
+
return junCoerceViewValue(option, own) ?? junCoerceViewValue(option, siteDefaults[option.key]) ?? option.default;
|
|
72
|
+
}
|
|
73
|
+
export function junViewUnsetValue(option, siteDefaults) {
|
|
74
|
+
return junCoerceViewValue(option, siteDefaults[option.key]) ?? option.default;
|
|
75
|
+
}
|
|
76
|
+
export function junIsClearedValue(option, raw) {
|
|
77
|
+
switch (option.kind) {
|
|
78
|
+
case "text":
|
|
79
|
+
case "doc":
|
|
80
|
+
return typeof raw === "string" && raw.trim() === "";
|
|
81
|
+
case "tags":
|
|
82
|
+
return Array.isArray(raw) && raw.every((v) => typeof v !== "string" || v.trim() === "");
|
|
83
|
+
default:
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
export function junViewValuesEqual(a, b) {
|
|
88
|
+
if (Array.isArray(a) || Array.isArray(b)) {
|
|
89
|
+
if (!Array.isArray(a) || !Array.isArray(b)) return false;
|
|
90
|
+
return a.length === b.length && a.every((v, i) => v === b[i]);
|
|
91
|
+
}
|
|
92
|
+
return a === b;
|
|
93
|
+
}
|
|
94
|
+
export function junNextViewObject(option, stored, siteDefaults, value) {
|
|
95
|
+
const clean = junCoerceViewValue(option, value);
|
|
96
|
+
const cleared = junIsClearedValue(option, value);
|
|
97
|
+
if (clean === void 0 && !cleared) return Object.keys(stored).length ? { ...stored } : void 0;
|
|
98
|
+
const next = {};
|
|
99
|
+
for (const [k, v] of Object.entries(stored)) if (k !== option.key) next[k] = v;
|
|
100
|
+
if (clean !== void 0 && !junViewValuesEqual(clean, junViewUnsetValue(option, siteDefaults))) {
|
|
101
|
+
next[option.key] = clean;
|
|
102
|
+
}
|
|
103
|
+
return Object.keys(next).length ? next : void 0;
|
|
104
|
+
}
|
package/dist/types.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { type JunBackdropKind, type JunBrand, type JunCampfireOptions, type JunCampfirePillMode, type JunCampfirePlacement, type JunCampfireRosterStyle, type JunCampfireSize, type JunCampfireTab, type JunContextMenuOptions, type JunEmbedOptions, type JunFeatures, type JunGuestNames, type JunJanitorBaselineMode, type JunJanitorIdentity, type JunJanitorIdentityMode, type JunJanitorMode, type JunJanitorOptions, type JunJsonLdSpec, type JunLayoutPolicy, type JunMosaicOptions, type JunNavActiveStyle, type JunNavItemMode, type JunNavPlacement, type JunNavShape, type JunNavSize, type JunNavigationOptions, type JunPageTypeKey, type JunPageTypeOverride, type JunPageTypesOption, type JunPalette, type JunPaletteSet, type JunRuntimeOptions, type JunSeedNode, type JunSeedOptions, type JunServicesOptions, type JunSiteConfigDefaults } from '../dist/runtime/types.js'
|
|
1
|
+
export { type JunBackdropKind, type JunBrand, type JunCampfireOptions, type JunCampfirePillMode, type JunCampfirePlacement, type JunCampfireRosterStyle, type JunCampfireSize, type JunCampfireTab, type JunContextMenuOptions, type JunEmbedOptions, type JunFeatures, type JunGuestNames, type JunJanitorBaselineMode, type JunJanitorIdentity, type JunJanitorIdentityMode, type JunJanitorMode, type JunJanitorOptions, type JunJsonLdSpec, type JunLayoutPolicy, type JunMosaicOptions, type JunNavActiveStyle, type JunNavItemMode, type JunNavPlacement, type JunNavShape, type JunNavSize, type JunNavigationOptions, type JunPageTypeKey, type JunPageTypeOverride, type JunPageTypesOption, type JunPalette, type JunPaletteSet, type JunRendererDefaults, type JunRuntimeOptions, type JunSeedNode, type JunSeedOptions, type JunServicesOptions, type JunSiteConfigDefaults } from '../dist/runtime/types.js'
|
|
2
2
|
|
|
3
3
|
export { default } from './module.mjs'
|
|
4
4
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abraca/junis",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.86.0",
|
|
4
4
|
"description": "Website-builder Nuxt module for the Abracadabra CRDT platform — page-type renderers, presence chrome, studio editing and SSR, all driven by documents",
|
|
5
5
|
"repository": "abracadabra/jun-is",
|
|
6
6
|
"license": "MIT",
|
|
@@ -103,6 +103,10 @@
|
|
|
103
103
|
"test": "node scripts/test.mjs",
|
|
104
104
|
"parity": "node scripts/parity-ssr.mjs",
|
|
105
105
|
"parity:nav": "node scripts/parity-nav.mjs",
|
|
106
|
+
"parity:follow": "node scripts/parity-follow.mjs",
|
|
107
|
+
"parity:studio": "node scripts/parity-studio.mjs",
|
|
108
|
+
"deploy:check": "node scripts/deploy-check.mjs",
|
|
109
|
+
"pins:check": "node scripts/pins-check.mjs",
|
|
106
110
|
"typecheck": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit",
|
|
107
111
|
"release": "npm run lint && npm run prepack",
|
|
108
112
|
"docker:up": "docker compose up -d --build",
|