@unoverse-platform/studio 0.1.89 → 0.1.90
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/package.json
CHANGED
|
@@ -23,7 +23,8 @@ import { NAV, SCREEN, navItem } from "./chrome";
|
|
|
23
23
|
|
|
24
24
|
interface TemplateSection {
|
|
25
25
|
/** static = placed as designed; copywriter = written into through its briefs;
|
|
26
|
-
* director =
|
|
26
|
+
* director = the judge: a search place (with `component`) or a delivery band
|
|
27
|
+
* (without) — one word since 2026-09-02 (§9b + §9e). */
|
|
27
28
|
kind: "static" | "copywriter" | "director";
|
|
28
29
|
/** The state instances render in at this section — what the claim matches. */
|
|
29
30
|
face: string;
|
|
@@ -36,9 +37,15 @@ interface TemplateSection {
|
|
|
36
37
|
* previews as written and filled rather than as a page of ghosts. */
|
|
37
38
|
seeds?: Record<string, Record<string, unknown>>;
|
|
38
39
|
state?: string;
|
|
39
|
-
limit?: number;
|
|
40
40
|
rules?: string;
|
|
41
41
|
preview?: string[];
|
|
42
|
+
/** Director places (§9e): the grammar, echoed for the dock table. `ask` appears
|
|
43
|
+
* only after derivation (rule 10d) — never authored. */
|
|
44
|
+
ask?: string;
|
|
45
|
+
type?: "discovery" | "intent";
|
|
46
|
+
include?: string[];
|
|
47
|
+
pick?: number;
|
|
48
|
+
items?: { min: number; max: number };
|
|
42
49
|
}
|
|
43
50
|
interface TemplateDef {
|
|
44
51
|
name: string;
|
|
@@ -73,13 +80,26 @@ const refOf = (t: TemplateDef) => (t.org ? `${t.org}/${t.name}` : t.name);
|
|
|
73
80
|
|
|
74
81
|
/** One section's description for the dock table — the three words (§9b). */
|
|
75
82
|
function sectionLabel(sec: TemplateSection): { name: string; filler: string; rules: string } {
|
|
83
|
+
// ONE WORD, TWO MODES (§9e, 2026-09-02): with `component` = a search place; without =
|
|
84
|
+
// a delivery band. Both show as the director's — the judge is the same.
|
|
85
|
+
if (sec.kind === "director" && sec.component)
|
|
86
|
+
return {
|
|
87
|
+
name: sec.component,
|
|
88
|
+
filler: "director",
|
|
89
|
+
rules: [
|
|
90
|
+
sec.items ? `items ${sec.items.min}–${sec.items.max}` : null,
|
|
91
|
+
sec.type ?? null,
|
|
92
|
+
sec.include?.length ? sec.include.join("+") : null,
|
|
93
|
+
sec.pick != null ? `pick ${sec.pick}` : null,
|
|
94
|
+
].filter(Boolean).join(" · "),
|
|
95
|
+
};
|
|
76
96
|
if (sec.kind === "director")
|
|
77
97
|
return {
|
|
78
98
|
name: "director",
|
|
79
99
|
filler: "director",
|
|
80
100
|
rules: [
|
|
81
101
|
sec.state ? `state ${sec.state}` : null,
|
|
82
|
-
sec.
|
|
102
|
+
sec.pick != null ? `pick ${sec.pick}` : null,
|
|
83
103
|
sec.rules ?? null,
|
|
84
104
|
].filter(Boolean).join(" · "),
|
|
85
105
|
};
|
|
@@ -151,11 +171,16 @@ export function TemplatesLibraryView({ theme, org }: { theme: ResolvedTheme; org
|
|
|
151
171
|
const secs = (base && current?.sections?.[base]) || [];
|
|
152
172
|
const out: { nodeId: string; ref: string; face?: string; framed: boolean; seed?: Record<string, unknown> }[] = [];
|
|
153
173
|
for (const sec of secs) {
|
|
154
|
-
|
|
174
|
+
// ONE word, two modes (§9e rule 10b, 2026-09-02): a director WITH a component is a
|
|
175
|
+
// SEARCH place — its mock is its own component's preview, seeded exactly like a
|
|
176
|
+
// linked part. Only the BAND form (no ref) seeds stand-ins. This branch predates
|
|
177
|
+
// the merge and read every director as a band, so search places seeded nothing and
|
|
178
|
+
// the template previewed with those sections simply missing.
|
|
179
|
+
if (sec.ref) {
|
|
180
|
+
out.push({ nodeId: `${sec.face}~${sec.ref}`, ref: sec.ref, face: sec.face, framed: true, seed: sec.seeds?.[sec.ref] });
|
|
181
|
+
} else if (sec.kind === "director") {
|
|
155
182
|
for (const [i, ref] of (sec.preview ?? []).entries())
|
|
156
183
|
out.push({ nodeId: `${sec.face}~${ref}~${i}`, ref, face: sec.face, framed: false, seed: sec.seeds?.[ref] });
|
|
157
|
-
} else if (sec.ref) {
|
|
158
|
-
out.push({ nodeId: `${sec.face}~${sec.ref}`, ref: sec.ref, face: sec.face, framed: true, seed: sec.seeds?.[sec.ref] });
|
|
159
184
|
}
|
|
160
185
|
}
|
|
161
186
|
return out;
|
|
@@ -590,7 +590,7 @@ export function TemplatesView({
|
|
|
590
590
|
const base = d.defaultLayout ?? Object.keys(d.layouts ?? {})[0];
|
|
591
591
|
const out: { ref: string; face: string; props: Record<string, unknown> }[] = [];
|
|
592
592
|
for (const sec of (base && d.sections?.[base]) || []) {
|
|
593
|
-
const refs = sec.kind === "director" ? (sec.preview ?? []) :
|
|
593
|
+
const refs = sec.ref ? [sec.ref] : sec.kind === "director" ? (sec.preview ?? []) : [];
|
|
594
594
|
for (const ref of refs) out.push({ ref, face: sec.face, props: sec.seeds?.[ref] ?? {} });
|
|
595
595
|
}
|
|
596
596
|
return out;
|