@joplo-app/core 0.2.2 → 0.2.4

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/compile.d.ts CHANGED
@@ -28,7 +28,8 @@ export type CompileResult = {
28
28
  project: Project | null;
29
29
  diagnostics: Diagnostic[];
30
30
  };
31
- export declare function compile(src: AuthoringProject, mode: 'dev' | 'publish'): CompileResult;
31
+ export type CompileMode = 'dev' | 'publish' | 'review';
32
+ export declare function compile(src: AuthoringProject, mode: CompileMode): CompileResult;
32
33
  /** 角色的颜色(D56):没写 color 时按声明顺序取。 */
33
34
  export declare const ROLE_COLORS: readonly ["#E8590C", "#1971C2", "#2F9E44", "#9C36B5", "#C2255C", "#0C8599"];
34
35
  export declare function relSource(root: string, s: string): string;
package/dist/compile.js CHANGED
@@ -5,15 +5,19 @@
5
5
  * - dev 模式:每个方案在每个路径上各有一个画面 `<方案>@<路径>`,其中其他功能取选定方案,本功能取该方案;
6
6
  * 另有发布视图 `@<路径>`(全部取选定方案)。
7
7
  * - publish 模式:只有发布视图;只含选定方案的场景;去掉规则、情况、问题等创作侧信息(D33)。
8
+ * - review 模式(评审版,D63):画面与场景同 dev(所有功能的所有方案),创作侧信息按 publish 的规则去掉。
8
9
  */
9
10
  import { isBind, isNode, bindPath, toCondition } from '@joplo-app/kit/node';
10
11
  import { BUILTIN_THEMES, COMPONENT_TYPES, DIRECTOR_LAYER, INTERACTIVE_TYPES, PAGE_LAYER, matchChoice, nodeLabel } from "./catalog.js";
11
12
  import { choicesOf, commonPrefix } from "./player.js";
12
- import { Project, SCHEMA_VERSION } from "./schema.js";
13
+ import { LAYER_ICONS, Project, SCHEMA_VERSION } from "./schema.js";
13
14
  const KNOWN = new Set(COMPONENT_TYPES);
14
15
  const OVERLAY = 'overlay';
15
16
  const MOCK_LABEL = { success: 'Mock success', failure: 'Mock failure', denied: 'Mock permission denied', other: 'Mock' };
16
17
  export function compile(src, mode) {
18
+ /** 所有方案都参与(dev、review);创作侧信息要去掉(publish、review)。 */
19
+ const allOpts = mode !== 'publish';
20
+ const strip = mode !== 'dev';
17
21
  const diags = [];
18
22
  const rel = (s) => (s ? relSource(src.root, s) : undefined);
19
23
  const err = (code, message, at, ref) => diags.push({ severity: 'error', code, message, source: 'reference', ...(at ? { at: rel(at) } : {}), ...(ref ? { ref } : {}) });
@@ -27,6 +31,7 @@ export function compile(src, mode) {
27
31
  mode,
28
32
  routes: {},
29
33
  features: {},
34
+ featureIds: [],
30
35
  cases: {},
31
36
  options: {},
32
37
  rules: {},
@@ -34,9 +39,22 @@ export function compile(src, mode) {
34
39
  scenarios: {},
35
40
  issues: {},
36
41
  };
42
+ // ---------- 1. 选出参与的方案 ----------
43
+ // 排序只在编译时决定;显式列表不依赖对象键的枚举顺序,发布模式也保留这份演示内容。
44
+ for (const [fid, f] of Object.entries(src.features)) {
45
+ if (f.def.order !== undefined && (typeof f.def.order !== 'number' || !Number.isFinite(f.def.order)))
46
+ err('FEATURE_ORDER_INVALID', `Feature ${fid} order must be a finite number; omit it for folder-name order`, f.def.source ?? `${f.def.file}:1:1`, { kind: 'feature', id: fid });
47
+ }
48
+ if (diags.some(d => d.severity === 'error'))
49
+ return { project: null, diagnostics: diags };
50
+ const natural = new Intl.Collator('en', { numeric: true });
51
+ const features = Object.entries(src.features).sort(([a, af], [b, bf]) => {
52
+ const ao = af.def.order ?? Infinity, bo = bf.def.order ?? Infinity;
53
+ return ao !== bo ? ao - bo : natural.compare(a, b);
54
+ });
37
55
  const allOptions = [];
38
56
  const picked = new Map(); // fid -> 选定方案
39
- for (const [fid, f] of sortedEntries(src.features)) {
57
+ for (const [fid, f] of features) {
40
58
  for (const [key, def] of sortedEntries(f.options))
41
59
  allOptions.push({ fid, key, qid: `${fid}.${key}`, def });
42
60
  const pick = f.def.pick ?? null;
@@ -50,7 +68,7 @@ export function compile(src, mode) {
50
68
  else if (mode === 'publish')
51
69
  warn('NOT_PICKED', `Feature "${f.def.name}" has no picked option and will not be published`, f.def.source);
52
70
  }
53
- const included = mode === 'dev' ? allOptions : [...picked.values()];
71
+ const included = allOpts ? allOptions : [...picked.values()];
54
72
  const baseRoutes = new Map();
55
73
  for (const [path, p] of sortedEntries(src.routes))
56
74
  baseRoutes.set(path, { path, page: p });
@@ -97,10 +115,11 @@ export function compile(src, mode) {
97
115
  };
98
116
  }
99
117
  // ---------- 3. 功能、情况、规则、问题 ----------
100
- for (const [fid, f] of sortedEntries(src.features)) {
118
+ for (const [fid, f] of features) {
101
119
  const fdef = f.def;
102
120
  if (mode === 'publish' && !picked.has(fid))
103
121
  continue;
122
+ out.featureIds.push(fid);
104
123
  const caseIds = Object.keys(fdef.cases ?? {}).map((k) => `${fid}.${k}`);
105
124
  out.features[fid] = {
106
125
  id: fid,
@@ -108,12 +127,12 @@ export function compile(src, mode) {
108
127
  goal: fdef.goal,
109
128
  roles: rolesOf(fdef.roles),
110
129
  constraints: Object.entries(fdef.constraints ?? {}).map(([id, c]) => (typeof c === 'string' ? { id, text: c, hard: true } : { id, text: c.text, hard: c.hard ?? true })),
111
- caseIds: mode === 'publish' ? [] : caseIds,
130
+ caseIds: strip ? [] : caseIds,
112
131
  optionIds: included.filter((o) => o.fid === fid).map((o) => o.qid),
113
132
  pick: picked.get(fid)?.qid ?? null,
114
133
  ...(fdef.source ? { source: rel(fdef.source) } : {}),
115
134
  };
116
- if (mode === 'publish')
135
+ if (strip)
117
136
  continue;
118
137
  for (const [k, c] of Object.entries(fdef.cases ?? {}))
119
138
  out.cases[`${fid}.${k}`] = caseOf(`${fid}.${k}`, fid, c, rel(fdef.source));
@@ -184,7 +203,7 @@ export function compile(src, mode) {
184
203
  };
185
204
  for (const r of routesIn(null))
186
205
  addScene(composeScene(r, null));
187
- if (mode === 'dev')
206
+ if (allOpts)
188
207
  for (const o of included)
189
208
  for (const r of routesIn(o))
190
209
  addScene(composeScene(r, o));
@@ -197,7 +216,7 @@ export function compile(src, mode) {
197
216
  for (const p of Object.keys(def.on ?? {}))
198
217
  if (!ctxRoutes.has(p))
199
218
  err('UNKNOWN_ROUTE', `Option ${qid} adds elements to an unknown route ${p}`, def.source);
200
- const sceneOf = (path) => (mode === 'dev' ? `${qid}@${path}` : `@${path}`);
219
+ const sceneOf = (path) => (allOpts ? `${qid}@${path}` : `@${path}`);
201
220
  if (mode === 'dev') {
202
221
  for (const [k, r] of Object.entries(def.rules ?? {}))
203
222
  out.rules[`${qid}.${k}`] = ruleOf(`${qid}.${k}`, fid, qid, r, rel);
@@ -239,7 +258,11 @@ export function compile(src, mode) {
239
258
  layerScenes.push({ key: lk, scene });
240
259
  if (ld.role !== undefined && !roleKeys.has(ld.role))
241
260
  err('ROLE_UNKNOWN', `Layer "${ld.title}" role "${ld.role}" is not in feature.roles${roleKeys.size ? ` (available: ${[...roleKeys].join(', ')})` : ' (feature.roles must use { key: role(\'Name\') })'}`, at);
242
- layers[lk] = { title: ld.title, sceneId, ...(ld.role !== undefined && roleKeys.has(ld.role) ? { role: ld.role } : {}) };
261
+ const icon = ld.icon;
262
+ const iconOk = icon !== undefined && LAYER_ICONS.includes(icon);
263
+ if (icon !== undefined && !iconOk)
264
+ err('ICON_UNKNOWN', `Layer "${ld.title}" icon "${icon}" is not a preset icon (available: ${LAYER_ICONS.join(', ')})`, at);
265
+ layers[lk] = { title: ld.title, sceneId, ...(ld.role !== undefined && roleKeys.has(ld.role) ? { role: ld.role } : {}), ...(iconOk ? { icon: icon } : {}) };
243
266
  }
244
267
  const hasLayers = layerScenes.length > 0;
245
268
  /** 元素在哪些层级里(多层都有同名 id 时都算)。 */
@@ -442,7 +465,7 @@ export function compile(src, mode) {
442
465
  caption: st.caption ?? generated.caption,
443
466
  ...(generated?.captionAuto ? { captionAuto: generated.captionAuto } : {}),
444
467
  effects,
445
- ruleIds: mode === 'publish' ? [] : ruleIds,
468
+ ruleIds: strip ? [] : ruleIds,
446
469
  shots,
447
470
  directorLayer,
448
471
  ...(explains.length ? { explain: explains.join('\n') } : {}),
@@ -459,7 +482,7 @@ export function compile(src, mode) {
459
482
  optionId: qid,
460
483
  name: fl.name,
461
484
  description: fl.opts.description ?? '',
462
- caseIds: mode === 'publish' ? [] : (fl.opts.cases ?? []).filter((c) => fdef.cases?.[c]).map((c) => `${fid}.${c}`),
485
+ caseIds: strip ? [] : (fl.opts.cases ?? []).filter((c) => fdef.cases?.[c]).map((c) => `${fid}.${c}`),
463
486
  mock: { label: fl.opts.mock ?? MOCK_LABEL[outcome], outcome, ...(fl.opts.mock === undefined ? { auto: true } : {}) },
464
487
  initial: { sceneId: sceneOf(start), ui: state.ui, data: state.data, inputs: state.inputs },
465
488
  steps,
@@ -501,8 +524,8 @@ export function compile(src, mode) {
501
524
  key: o.key,
502
525
  name: def.name,
503
526
  idea: def.idea,
504
- decisionFocus: mode === 'publish' ? '' : (def.focus ?? ''),
505
- tradeoffs: mode === 'publish' ? [] : (def.tradeoffs ?? []),
527
+ decisionFocus: strip ? '' : (def.focus ?? ''),
528
+ tradeoffs: strip ? [] : (def.tradeoffs ?? []),
506
529
  routes: touched,
507
530
  coverage,
508
531
  layers,
@@ -519,8 +542,8 @@ export function compile(src, mode) {
519
542
  err('UNKNOWN_CASE', `Rule "${r.text}" links unknown case ${c}`, r.source);
520
543
  }
521
544
  }
522
- // ---------- 7. 发布视图:去掉设计备注 ----------
523
- if (mode === 'publish') {
545
+ // ---------- 7. 发布视图与评审版:去掉设计备注与源位置 ----------
546
+ if (strip) {
524
547
  for (const s of Object.values(out.scenes))
525
548
  stripNotes(s.root);
526
549
  stripSources(out);
@@ -0,0 +1,28 @@
1
+ /**
2
+ * 嵌入模式(发布站 `?embed=1`)与 `joplo share` 预览图共用的场景选择(纯函数)。
3
+ *
4
+ * - 可播放的场景:按功能在 IR 里的顺序,每个功能的选定方案(没有选定时用第一个方案)的场景,按场景在 IR 里的顺序;
5
+ * - 默认场景是其中第一个;`scenario` 参数指向列表里的场景时从它开始,写错(不存在、为空、不是字符串)时退回默认,不报错。
6
+ *
7
+ * 只读 features / options / scenarios 的少量字段,所以既能用于完整 IR,也能用于发布站内联的发布 IR。
8
+ */
9
+ type EmbedProject = {
10
+ featureIds?: readonly string[];
11
+ features: Record<string, {
12
+ id: string;
13
+ optionIds: readonly string[];
14
+ pick?: string | null;
15
+ }>;
16
+ options: Record<string, {
17
+ id: string;
18
+ }>;
19
+ scenarios: Record<string, {
20
+ id: string;
21
+ optionId: string;
22
+ }>;
23
+ };
24
+ /** 嵌入模式里可以播放和切换的场景 ID(有序、不重复)。 */
25
+ export declare function embedScenarioIds(project: EmbedProject): string[];
26
+ /** 嵌入从哪个场景开始:requested 合法时用它,否则用默认场景;项目没有场景时为 null。 */
27
+ export declare function embedStartScenario(project: EmbedProject, requested?: unknown): string | null;
28
+ export {};
package/dist/embed.js ADDED
@@ -0,0 +1,31 @@
1
+ /**
2
+ * 嵌入模式(发布站 `?embed=1`)与 `joplo share` 预览图共用的场景选择(纯函数)。
3
+ *
4
+ * - 可播放的场景:按功能在 IR 里的顺序,每个功能的选定方案(没有选定时用第一个方案)的场景,按场景在 IR 里的顺序;
5
+ * - 默认场景是其中第一个;`scenario` 参数指向列表里的场景时从它开始,写错(不存在、为空、不是字符串)时退回默认,不报错。
6
+ *
7
+ * 只读 features / options / scenarios 的少量字段,所以既能用于完整 IR,也能用于发布站内联的发布 IR。
8
+ */
9
+ import { orderedFeatures } from "./features.js";
10
+ /** 嵌入模式里可以播放和切换的场景 ID(有序、不重复)。 */
11
+ export function embedScenarioIds(project) {
12
+ const ids = [];
13
+ const scenarios = Object.values(project.scenarios ?? {});
14
+ for (const f of orderedFeatures(project)) {
15
+ const optionIds = (f.optionIds ?? []).filter((id) => project.options?.[id]);
16
+ const optionId = f.pick && project.options?.[f.pick] ? f.pick : optionIds[0];
17
+ if (!optionId)
18
+ continue;
19
+ for (const s of scenarios)
20
+ if (s.optionId === optionId && !ids.includes(s.id))
21
+ ids.push(s.id);
22
+ }
23
+ return ids;
24
+ }
25
+ /** 嵌入从哪个场景开始:requested 合法时用它,否则用默认场景;项目没有场景时为 null。 */
26
+ export function embedStartScenario(project, requested) {
27
+ const ids = embedScenarioIds(project);
28
+ if (typeof requested === 'string' && requested && ids.includes(requested))
29
+ return requested;
30
+ return ids[0] ?? null;
31
+ }
@@ -0,0 +1,5 @@
1
+ /** 所有消费者共用编译器的功能顺序;旧 IR 只沿用已有的对象顺序,不在读取端重新排序。 */
2
+ export declare function orderedFeatures<T>(project: {
3
+ features: Record<string, T>;
4
+ featureIds?: readonly string[];
5
+ }): T[];
@@ -0,0 +1,4 @@
1
+ /** 所有消费者共用编译器的功能顺序;旧 IR 只沿用已有的对象顺序,不在读取端重新排序。 */
2
+ export function orderedFeatures(project) {
3
+ return (project.featureIds ?? Object.keys(project.features)).map(id => project.features[id]).filter((f) => f !== undefined);
4
+ }
package/dist/guide.d.ts CHANGED
@@ -18,7 +18,7 @@ export declare const SKILL_TOPICS: readonly [{
18
18
  readonly description: "Edit only the element selected by the user in the board";
19
19
  }, {
20
20
  readonly name: "publish";
21
- readonly description: "pick, build, and static site deployment";
21
+ readonly description: "pick, build, cloud sharing, review feedback, and static site deployment";
22
22
  }];
23
23
  export type SkillTopic = (typeof SKILL_TOPICS)[number]['name'];
24
24
  /** CLI 传入其 package.json 版本;行数来自同一次生成的主题正文。 */
package/dist/guide.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { COMPONENT_TYPES, GATED_CONTAINERS, INTERACTIVE_TYPES, JOPLO_PROPS, VALUE_TYPES } from "./catalog.js";
2
2
  import { JoploError } from "./result.js";
3
+ import { LAYER_ICONS } from "./schema.js";
3
4
  export const SKILL_TOPICS = [
4
5
  { name: 'authoring', description: 'Directory conventions; page / layout / option / flow syntax' },
5
6
  { name: 'demo', description: 'Layers, shots, traces, and captions for clear demos' },
@@ -7,7 +8,7 @@ export const SKILL_TOPICS = [
7
8
  { name: 'cases', description: 'Case dimensions: ask the user before starting' },
8
9
  { name: 'check', description: 'Read diagnostics and fix the indicated file and line' },
9
10
  { name: 'selection', description: 'Edit only the element selected by the user in the board' },
10
- { name: 'publish', description: 'pick, build, and static site deployment' },
11
+ { name: 'publish', description: 'pick, build, cloud sharing, review feedback, and static site deployment' },
11
12
  ];
12
13
  const related = {
13
14
  authoring: ['demo', 'components', 'cases', 'check', 'selection', 'publish'],
@@ -84,7 +85,8 @@ Read only the topics needed, usually one or two at a time. See components for co
84
85
  - config({ name, description?, theme?: theme name (9 built-ins or themes/<name>.css; see demo), layout?, home? }).
85
86
  - layout(tree); Outlet places the current page; <Slot name="actions"/> declares a slot for additions.
86
87
  - page({ title, layout?: string|false, viewport?: 'desktop'|'mobile' }, tree). See demo for devices and stages.
87
- - feature({ name, goal, cases, roles?, constraints?, rules?, questions?, pick? }).
88
+ - feature({ name, goal, cases, order?, roles?, constraints?, rules?, questions?, pick? }).
89
+ - Do not number feature names by hand; use finite numeric order. The compiler writes featureIds into IR (including publish): ascending order first, then natural folder-name order for ties or omitted values. All views read that list.
88
90
  - option({ name, idea, on?, routes?, state?, rules?, questions?, coverage?, scenarios }).
89
91
  - on: { '/members': { actions: <Button id="invite">Invite</Button> } }: add elements to a slot on an existing route.
90
92
  - routes: { '/members/new': page({ title: 'New member' }, <Stack>…</Stack>) }: add a route for this option.
@@ -160,10 +162,11 @@ See authoring for directories, state, and flow syntax. Import layer, shot, trace
160
162
  ## Captions and fitting one screen
161
163
  - Keep captions within about 24 units and explain('Additional note') within about 48. CJK characters count as 1 each; all others count as 0.5; whitespace is ignored. check warns when exceeded.
162
164
  - Captions and explain notes appear below the stage, never over it. Tell one thing per step; move long content to an explanation layer.
163
- - Autoplay waits according to text length, at least 3 seconds, and waits for shot and edge animations. Speeds: 0.5× / 1× / 1.5×.
165
+ - Autoplay reading time: CJK 8 chars/s (125ms each), Latin 15 non-whitespace chars/s; clamp to 3–7 seconds before 0.5× / 1× / 1.5× scaling. Streams, shots and edge waits can exceed 7 seconds. Shots use 700ms ease-out without overshoot.
164
166
  - Do not make viewers scroll through a long page. Fit one screen and zoom into details with shots.
165
167
  - Each page has one device, desktop by default. page({ viewport: 'mobile' }, tree) uses a Phone frame at a fixed width of 390.
166
168
  - For a mobile layer, use layer('Mobile', <MobileView/>, { viewport: 'mobile' }). Make a separate page or demo when mobile is needed (D44).
169
+ - Each layer tab shows an icon so viewers can tell layers apart when many tabs are squeezed: layer('Terminal', <Cli/>, { icon: 'terminal' }). Presets: ${LAYER_ICONS.join(', ')}. Default: mobile for mobile layers, otherwise window.
167
170
 
168
171
  ## Full-height layout: Follow stage height
169
172
  - Layers and desktop pages fill the stage, whose size follows the board window. Fixed pixel heights (h={690}) push bottom content outside short windows.
@@ -315,6 +318,7 @@ Example: features/invite/options/a.tsx:12:5 warning UNBOUND_INTERACTIVE Inter
315
318
  - FUNCTION_PROP: Replace onClick and other callbacks with flow steps and state effects.
316
319
  - UNKNOWN_CASE / UNKNOWN_RULE / INVALID_REFERENCE: Check case, rule, and reference keys and their owning option.
317
320
  - UNKNOWN_SLOT / UNKNOWN_ROUTE / UNKNOWN_LAYOUT: Check routes, layouts, and Slot declarations; add elements only to existing locations.
321
+ - FEATURE_ORDER_INVALID: feature({ order }) must be a finite number; omit it for natural folder-name order. NaN, Infinity and strings are invalid.
318
322
  - UNKNOWN_PICK: pick must be an option filename under this feature's options/.
319
323
  - NOT_PICKED: The feature has no picked option and will not publish. Compare options, then set feature.pick to the chosen filename.
320
324
  - ROUTE_EXISTS: An option route duplicates an existing route. Use on to add elements, or choose a new route.
@@ -323,6 +327,7 @@ Example: features/invite/options/a.tsx:12:5 warning UNBOUND_INTERACTIVE Inter
323
327
  - CAPTION_TOO_LONG: Shorten the caption to about 24 units: CJK characters count as 1 each, all others as 0.5; whitespace is ignored. One thing per step; move long content to an explanation layer. See demo.
324
328
  - EXPLAIN_TOO_LONG: Shorten the explain note to about 48 units, using the same CJK 1 / other 0.5 calculation. Put detailed rationale in a separate explanation layer. See demo.
325
329
  - ROLE_UNKNOWN: A layer or card role is not in feature.roles. Declare roles as { key: role('Name') }; see demo.
330
+ - ICON_UNKNOWN: A layer icon is not a preset. Use one of ${LAYER_ICONS.join(', ')}; see demo.
326
331
  - FORK_UNKNOWN: fork must target another scenario key in the same option; it cannot reference itself.
327
332
  - MARK_UNKNOWN: The mark target is absent from this step's route stage and all layers. Check the element id; currently hidden targets are valid references.
328
333
  - SHOT_UNKNOWN: The shot target is absent from this step's stage and all layers. Check its id and layer; see demo.
@@ -402,12 +407,29 @@ Deploy only dist output, not author source files. MCP, comments, and collaborati
402
407
  - On AUTH_REQUIRED, ask the user to sign in. Do not run \`joplo logout\` on the user's behalf.
403
408
  - AUTH_EXPIRED also exits 3: ask the user to sign in again. Read error.code / message / details for other failures.
404
409
  - Free links expire after 1 hour; read data.expiresAt for the exact time. Pro permanent links have expiresAt: null.
410
+ - Successful share JSON includes data.embed: { iframe, markdown, badge, preview }. To add the demo to a README, write data.embed.markdown as is; do not build badge links yourself. For a free link, tell the user the badge shows "expired" after data.expiresAt.
411
+ - data.embed.iframe embeds a player for blogs and docs: it shows a cover first; append &scenario=<scenario id> to pick the start or &autoplay=1 to skip the cover.
412
+ - share also uploads a 1200x630 preview image of the default scenario when local Playwright is installed; without it, share still succeeds and prints one "Skipped the preview image" line.
405
413
  - Pro share updates the same-server link in .joplo/cloud.json; --new creates another link and --title sets its title.
414
+ - The review version is a separate share (review: { shareId, url } in .joplo/cloud.json); it never replaces the main link. If the cloud rejects the review manifest, plain share retries once without it and still publishes.
406
415
  - npx joplo whoami --format json shows the account, plan, and limits; npx joplo logout signs out.
407
416
  - maxUploadBytes limits only newly uploaded cloud blobs. The CLI prechecks maxTotalBytes and maxFiles. TOO_LARGE details.kind distinguishes upload / total / files.
408
417
  - Credentials are stored only in JOPLO_HOME/credentials.json (default ~/.joplo). Never copy them into a project, print them, or commit them.
409
418
  - Cloud commands accept --server <url>, overriding JOPLO_CLOUD_URL; the default is https://cloud.joplo.app.
410
- - Local check / build / dev remain free and do not connect to the cloud.`,
419
+ - Local check / build / dev remain free and do not connect to the cloud.
420
+ - CI: set JOPLO_API_KEY (jpk_..., created in Settings → API keys) instead of logging in. Every cloud command then uses it; credentials.json and browser login are never touched. An invalid or revoked key returns AUTH_EXPIRED: ask the user for a new key.
421
+ - PR previews: in GitHub Actions run npx joplo share --new --pr <number> --format json; repo, commit, and run URL come from the Actions environment. Outside Actions pass --repo owner/name. data.pr.comment "skipped" means the Joplo GitHub App is not installed; tell the user, the share itself succeeded.
422
+
423
+ ## Review and feedback
424
+ - npx joplo share --review publishes the review version: every option of every feature, so reviewers can compare A/B. Rules, questions, cases, and AI assumptions still never appear in uploaded files; they go only to the review page through the request body. Plain share publishes only picked options.
425
+ - After reviewers comment and the owner decides on the review page, run npx joplo feedback --format json (uses the review share in .joplo/cloud.json, else the main share, or --share <id>). data.decisions are decisions not yet applied; data.comments are unresolved viewer comments with scenario, step, stepId, and element.
426
+ - Apply each decision to the source, then run npx joplo check:
427
+ - pick: set feature.pick in features/<f>/feature.ts to the option file name (the part after "<feature>.").
428
+ - confirm_rule: set that rule to origin: 'user', status: 'confirmed'.
429
+ - reject_rule: rewrite the rule as the note (reason) says. If the reason does not say what to do instead, mark it status: 'conflict' and ask the user; do not guess.
430
+ - answer: delete the question and add a rule with origin: 'user' (status: 'confirmed') stating the answer.
431
+ - Comments are input for discussion only; do not change the source from a comment unless the user asks.
432
+ - When check passes, mark what you applied: npx joplo feedback --applied <decision ids, comma-separated> [--ref <commit or source version>]. Mark only decisions you actually wrote back.`,
411
433
  };
412
434
  function distance(a, b) {
413
435
  let row = Array.from({ length: b.length + 1 }, (_, i) => i);
package/dist/index.d.ts CHANGED
@@ -6,3 +6,6 @@ export * from './compile.js';
6
6
  export type { Selection } from './selection.js';
7
7
  export * from './validate.js';
8
8
  export * from './guide.js';
9
+ export * from './embed.js';
10
+ export * from './features.js';
11
+ export * from './review.js';
package/dist/index.js CHANGED
@@ -6,3 +6,6 @@ export * from "./compile.js";
6
6
  // validate.ts 仍是 IR v1 版本,待 T-cli 迁移到 IR v2 后再导出。
7
7
  export * from "./validate.js";
8
8
  export * from "./guide.js";
9
+ export * from "./embed.js";
10
+ export * from "./features.js";
11
+ export * from "./review.js";
package/dist/player.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  * “上一步”通过从初始状态重放到 k-1 实现,因此恢复的是业务可见状态,而不是撤销动画。
7
7
  */
8
8
  import { type Choice } from './catalog.js';
9
- import type { Condition, Project, Scenario, Scene, SceneNode, Step } from './schema.js';
9
+ import type { Condition, LayerIcon, Project, Scenario, Scene, SceneNode, Step } from './schema.js';
10
10
  import { JoploError, type Diagnostic } from './result.js';
11
11
  export type Toast = {
12
12
  id: string;
@@ -131,6 +131,7 @@ export declare function layersOf(project: Project, scenarioId: string | null): {
131
131
  id: string;
132
132
  title: string;
133
133
  sceneId: string;
134
+ icon: LayerIcon;
134
135
  }[];
135
136
  /** 包含某个元素的层级(多层都有同名 id 时都返回)。 */
136
137
  export declare function layersWithNode(project: Project, scenarioId: string, nodeId: string): string[];
package/dist/player.js CHANGED
@@ -478,7 +478,8 @@ export function explainClick(project, state, nodeId, sceneId) {
478
478
  export function layersOf(project, scenarioId) {
479
479
  const sc = scenarioId ? project.scenarios[scenarioId] : null;
480
480
  const opt = sc ? project.options[sc.optionId] : null;
481
- return Object.entries(opt?.layers ?? {}).map(([id, l]) => ({ id, title: l.title, sceneId: l.sceneId }));
481
+ // 图标:作者写的优先;没写时手机视口用 mobile,其余用 window
482
+ return Object.entries(opt?.layers ?? {}).map(([id, l]) => ({ id, title: l.title, sceneId: l.sceneId, icon: l.icon ?? (project.scenes[l.sceneId]?.viewport === 'mobile' ? 'mobile' : 'window') }));
482
483
  }
483
484
  /** 包含某个元素的层级(多层都有同名 id 时都返回)。 */
484
485
  export function layersWithNode(project, scenarioId, nodeId) {
@@ -0,0 +1,91 @@
1
+ import type { Project } from './schema.js';
2
+ export declare const REVIEW_MANIFEST_VERSION: 1;
3
+ /** 契约 8.1:评审清单 JSON(UTF-8)最多 512 KiB。 */
4
+ export declare const REVIEW_MANIFEST_MAX_BYTES: number;
5
+ /** 字段上限(客户端截断;SaaS 的 zod 校验至少要接受这些值)。 */
6
+ export declare const REVIEW_LIMITS: {
7
+ readonly features: 100;
8
+ /** 每个功能的方案数。 */
9
+ readonly options: 20;
10
+ /** 每个功能的规则数(功能级 + 方案级)。 */
11
+ readonly rules: 300;
12
+ readonly questions: 100;
13
+ readonly tradeoffs: 20;
14
+ /** 每条规则关联的元素数。 */
15
+ readonly elementIds: 50;
16
+ readonly scenarios: 500;
17
+ /** 每个场景的步骤数。 */
18
+ readonly steps: 200;
19
+ /** 每一步关联的规则数。 */
20
+ readonly ruleIds: 50;
21
+ readonly elements: 2000;
22
+ readonly text: {
23
+ readonly name: 200;
24
+ readonly goal: 2000;
25
+ readonly idea: 2000;
26
+ readonly tradeoff: 500;
27
+ readonly rule: 2000;
28
+ readonly question: 2000;
29
+ readonly caption: 500;
30
+ readonly explain: 2000;
31
+ readonly label: 200;
32
+ };
33
+ };
34
+ export type ReviewManifestMode = 'publish' | 'review';
35
+ export type ReviewManifest = {
36
+ v: typeof REVIEW_MANIFEST_VERSION;
37
+ mode: ReviewManifestMode;
38
+ features: {
39
+ id: string;
40
+ name: string;
41
+ goal: string;
42
+ pick: string | null;
43
+ options: {
44
+ id: string;
45
+ key: string;
46
+ name: string;
47
+ idea: string;
48
+ tradeoffs: string[];
49
+ }[];
50
+ rules: {
51
+ id: string;
52
+ optionId: string | null;
53
+ text: string;
54
+ origin: string;
55
+ confirmation: string;
56
+ elementIds: string[];
57
+ }[];
58
+ questions: {
59
+ id: string;
60
+ optionId: string | null;
61
+ text: string;
62
+ severity: 'blocker' | 'major' | 'minor';
63
+ }[];
64
+ }[];
65
+ scenarios: {
66
+ id: string;
67
+ featureId: string;
68
+ optionId: string;
69
+ name: string;
70
+ steps: {
71
+ id: string;
72
+ index: number;
73
+ caption: string;
74
+ explain: string | null;
75
+ ruleIds: string[];
76
+ }[];
77
+ }[];
78
+ elements: {
79
+ id: string;
80
+ label: string;
81
+ }[];
82
+ };
83
+ /** 作者写的元素 id(和 Rule.elementIds 同一套);编译器生成的以 `_` 开头,不算。 */
84
+ export declare const AUTHOR_ELEMENT_ID: RegExp;
85
+ /** 按码点截断,超出时最后一个码点换成 “…”。 */
86
+ export declare function clipText(text: string, max: number): string;
87
+ export declare function reviewManifest(project: Project, mode: ReviewManifestMode): ReviewManifest;
88
+ /** 序列化后的 UTF-8 字节数(请求体里就是这份 JSON)。 */
89
+ export declare function reviewManifestBytes(manifest: ReviewManifest): number;
90
+ /** 超过 512 KiB 时报错:减少规则、问题、步骤说明后重试。 */
91
+ export declare function assertReviewManifestSize(manifest: ReviewManifest): void;
package/dist/review.js ADDED
@@ -0,0 +1,119 @@
1
+ /**
2
+ * 评审清单(云端契约 8.1,v1):`joplo share` 放进 `POST /api/v1/shares` 请求体的 `review` 字段,
3
+ * 不作为分享文件上传(不进 R2、不进 meta.json,分享页 Worker 读不到)。评审页据此显示方案、规则、问题和每一步涉及的规则。
4
+ *
5
+ * - 输入必须是 dev IR(只有它带规则和问题);mode = publish 时只含选定方案的内容(与 publish 构建同一范围:
6
+ * 没有选定方案的功能不出现,规则与问题只含功能级和选定方案的),mode = review 时含所有功能的所有方案。
7
+ * - id 全部沿用 IR(功能 Id、方案 / 规则 / 问题 / 场景 / 步骤的 Qid、元素 Id);步骤 index 从 0 开始。
8
+ * - 上限:字符串按 Unicode 码点截断(末尾 “…”),数组超出部分丢弃,id 永不截断(Qid ≤ 256、Id ≤ 64 由 schema 保证);
9
+ * 截断后序列化仍超过 512 KiB 时 assertReviewManifestSize 报错(share 在发任何请求之前失败),不静默丢内容。
10
+ */
11
+ import { nodeLabel } from "./catalog.js";
12
+ import { orderedFeatures } from "./features.js";
13
+ import { JoploError } from "./result.js";
14
+ export const REVIEW_MANIFEST_VERSION = 1;
15
+ /** 契约 8.1:评审清单 JSON(UTF-8)最多 512 KiB。 */
16
+ export const REVIEW_MANIFEST_MAX_BYTES = 512 * 1024;
17
+ /** 字段上限(客户端截断;SaaS 的 zod 校验至少要接受这些值)。 */
18
+ export const REVIEW_LIMITS = {
19
+ features: 100,
20
+ /** 每个功能的方案数。 */
21
+ options: 20,
22
+ /** 每个功能的规则数(功能级 + 方案级)。 */
23
+ rules: 300,
24
+ questions: 100,
25
+ tradeoffs: 20,
26
+ /** 每条规则关联的元素数。 */
27
+ elementIds: 50,
28
+ scenarios: 500,
29
+ /** 每个场景的步骤数。 */
30
+ steps: 200,
31
+ /** 每一步关联的规则数。 */
32
+ ruleIds: 50,
33
+ elements: 2000,
34
+ text: { name: 200, goal: 2000, idea: 2000, tradeoff: 500, rule: 2000, question: 2000, caption: 500, explain: 2000, label: 200 },
35
+ };
36
+ /** 作者写的元素 id(和 Rule.elementIds 同一套);编译器生成的以 `_` 开头,不算。 */
37
+ export const AUTHOR_ELEMENT_ID = /^[A-Za-z][A-Za-z0-9_-]{0,63}$/;
38
+ /** 按码点截断,超出时最后一个码点换成 “…”。 */
39
+ export function clipText(text, max) {
40
+ const chars = [...text];
41
+ return chars.length <= max ? text : `${chars.slice(0, max - 1).join('')}…`;
42
+ }
43
+ export function reviewManifest(project, mode) {
44
+ if (project.mode !== 'dev')
45
+ throw new JoploError('USAGE', `The review manifest needs the dev IR (rules and questions); got a ${project.mode} IR`);
46
+ const L = REVIEW_LIMITS;
47
+ const T = L.text;
48
+ const features = [];
49
+ const scenarios = [];
50
+ /** 参与的方案(publish:每个功能的选定方案)。 */
51
+ const included = new Set();
52
+ for (const f of orderedFeatures(project)) {
53
+ const optionIds = (mode === 'publish' ? (f.pick ? [f.pick] : []) : f.optionIds).filter((id) => project.options[id]);
54
+ if (mode === 'publish' && !optionIds.length)
55
+ continue;
56
+ for (const id of optionIds)
57
+ included.add(id);
58
+ const inScope = (optionId) => optionId === undefined || optionIds.includes(optionId);
59
+ features.push({
60
+ id: f.id,
61
+ name: clipText(f.name, T.name),
62
+ goal: clipText(f.goal, T.goal),
63
+ pick: f.pick ?? null,
64
+ options: optionIds.slice(0, L.options).map((id) => {
65
+ const o = project.options[id];
66
+ return { id: o.id, key: o.key, name: clipText(o.name, T.name), idea: clipText(o.idea, T.idea), tradeoffs: o.tradeoffs.slice(0, L.tradeoffs).map((t) => clipText(t, T.tradeoff)) };
67
+ }),
68
+ rules: Object.values(project.rules)
69
+ .filter((r) => r.featureId === f.id && inScope(r.optionId))
70
+ .slice(0, L.rules)
71
+ .map((r) => ({ id: r.id, optionId: r.optionId ?? null, text: clipText(r.text, T.rule), origin: r.origin, confirmation: r.confirmation, elementIds: r.elementIds.slice(0, L.elementIds) })),
72
+ questions: Object.values(project.issues)
73
+ .filter((q) => q.featureId === f.id && inScope(q.optionId))
74
+ .slice(0, L.questions)
75
+ .map((q) => ({ id: q.id, optionId: q.optionId ?? null, text: clipText(q.text, T.question), severity: q.severity })),
76
+ });
77
+ for (const optionId of optionIds) {
78
+ for (const s of Object.values(project.scenarios)) {
79
+ if (s.optionId !== optionId)
80
+ continue;
81
+ scenarios.push({
82
+ id: s.id,
83
+ featureId: f.id,
84
+ optionId: s.optionId,
85
+ name: clipText(s.name, T.name),
86
+ steps: s.steps.slice(0, L.steps).map((st, index) => ({ id: st.id, index, caption: clipText(st.caption, T.caption), explain: st.explain === undefined ? null : clipText(st.explain, T.explain), ruleIds: st.ruleIds.slice(0, L.ruleIds) })),
87
+ });
88
+ }
89
+ }
90
+ }
91
+ // 元素:参与方案能看到的所有画面(发布视图 `@路径`、方案的路径画面与层级画面)里的作者 id;同一个 id 取第一次出现的标签
92
+ const elements = new Map();
93
+ const visit = (n) => {
94
+ if (n.type !== '#text' && AUTHOR_ELEMENT_ID.test(n.id) && !elements.has(n.id))
95
+ elements.set(n.id, clipText(nodeLabel(n), T.label));
96
+ for (const c of n.children ?? [])
97
+ visit(c);
98
+ };
99
+ for (const scene of Object.values(project.scenes))
100
+ if (scene.optionId === null || included.has(scene.optionId))
101
+ visit(scene.root);
102
+ return {
103
+ v: REVIEW_MANIFEST_VERSION,
104
+ mode,
105
+ features: features.slice(0, L.features),
106
+ scenarios: scenarios.slice(0, L.scenarios),
107
+ elements: [...elements].slice(0, L.elements).map(([id, label]) => ({ id, label })),
108
+ };
109
+ }
110
+ /** 序列化后的 UTF-8 字节数(请求体里就是这份 JSON)。 */
111
+ export function reviewManifestBytes(manifest) {
112
+ return new TextEncoder().encode(JSON.stringify(manifest)).length;
113
+ }
114
+ /** 超过 512 KiB 时报错:减少规则、问题、步骤说明后重试。 */
115
+ export function assertReviewManifestSize(manifest) {
116
+ const actualBytes = reviewManifestBytes(manifest);
117
+ if (actualBytes > REVIEW_MANIFEST_MAX_BYTES)
118
+ throw new JoploError('EXPORT_FAILED', `The review manifest is ${actualBytes} bytes, over the 512 KiB limit (${REVIEW_MANIFEST_MAX_BYTES} bytes). Shorten or remove rules, questions, captions, or explanations, then share again; nothing was uploaded`, { details: { maxBytes: REVIEW_MANIFEST_MAX_BYTES, actualBytes } });
119
+ }
package/dist/schema.d.ts CHANGED
@@ -6,6 +6,9 @@
6
6
  */
7
7
  import { z } from 'zod';
8
8
  import { COMPONENT_TYPES } from './catalog.js';
9
+ /** 层级标签的预设图标(标签压窄时靠它认出是哪一层)。不写时:手机视口 mobile,其余 window。 */
10
+ export declare const LAYER_ICONS: readonly ["window", "browser", "mobile", "desktop", "terminal", "chat", "agent", "server", "data", "email", "doc", "flow"];
11
+ export type LayerIcon = (typeof LAYER_ICONS)[number];
9
12
  export declare const SCHEMA_VERSION: 2;
10
13
  /** 作者可写的 ID(对象键、元素 id)。 */
11
14
  export declare const Id: z.ZodString;
@@ -527,6 +530,20 @@ export declare const Option: z.ZodObject<{
527
530
  title: z.ZodString;
528
531
  sceneId: z.ZodString;
529
532
  role: z.ZodOptional<z.ZodString>;
533
+ icon: z.ZodOptional<z.ZodEnum<{
534
+ terminal: "terminal";
535
+ data: "data";
536
+ desktop: "desktop";
537
+ mobile: "mobile";
538
+ window: "window";
539
+ browser: "browser";
540
+ chat: "chat";
541
+ agent: "agent";
542
+ server: "server";
543
+ email: "email";
544
+ doc: "doc";
545
+ flow: "flow";
546
+ }>>;
530
547
  }, z.core.$strict>>>;
531
548
  source: z.ZodOptional<z.ZodString>;
532
549
  }, z.core.$strict>;
@@ -577,6 +594,7 @@ export declare const Project: z.ZodObject<{
577
594
  mode: z.ZodEnum<{
578
595
  dev: "dev";
579
596
  publish: "publish";
597
+ review: "review";
580
598
  }>;
581
599
  routes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
582
600
  path: z.ZodString;
@@ -606,6 +624,7 @@ export declare const Project: z.ZodObject<{
606
624
  pick: z.ZodDefault<z.ZodNullable<z.ZodString>>;
607
625
  source: z.ZodOptional<z.ZodString>;
608
626
  }, z.core.$strict>>>;
627
+ featureIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
609
628
  cases: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
610
629
  id: z.ZodString;
611
630
  featureId: z.ZodString;
@@ -656,6 +675,20 @@ export declare const Project: z.ZodObject<{
656
675
  title: z.ZodString;
657
676
  sceneId: z.ZodString;
658
677
  role: z.ZodOptional<z.ZodString>;
678
+ icon: z.ZodOptional<z.ZodEnum<{
679
+ terminal: "terminal";
680
+ data: "data";
681
+ desktop: "desktop";
682
+ mobile: "mobile";
683
+ window: "window";
684
+ browser: "browser";
685
+ chat: "chat";
686
+ agent: "agent";
687
+ server: "server";
688
+ email: "email";
689
+ doc: "doc";
690
+ flow: "flow";
691
+ }>>;
659
692
  }, z.core.$strict>>>;
660
693
  source: z.ZodOptional<z.ZodString>;
661
694
  }, z.core.$strict>>>;
package/dist/schema.js CHANGED
@@ -6,6 +6,8 @@
6
6
  */
7
7
  import { z } from 'zod';
8
8
  import { COMPONENT_TYPES } from "./catalog.js";
9
+ /** 层级标签的预设图标(标签压窄时靠它认出是哪一层)。不写时:手机视口 mobile,其余 window。 */
10
+ export const LAYER_ICONS = ['window', 'browser', 'mobile', 'desktop', 'terminal', 'chat', 'agent', 'server', 'data', 'email', 'doc', 'flow'];
9
11
  export const SCHEMA_VERSION = 2;
10
12
  /** 作者可写的 ID(对象键、元素 id)。 */
11
13
  export const Id = z.string().regex(/^[A-Za-z][A-Za-z0-9_-]{0,63}$/, 'ID must start with a letter and contain only letters, digits, underscores, and hyphens');
@@ -186,7 +188,8 @@ export const Option = z.strictObject({
186
188
  routes: z.array(z.string()).default([]),
187
189
  coverage: z.record(Qid, Coverage).default({}),
188
190
  /** 层级(视角):键 → 标题与这一层自己的画面(完全独立的页面)。演示信息,发布站保留。 */
189
- layers: z.record(Id, z.strictObject({ title: z.string().min(1), sceneId: Qid, role: Id.optional() })).default({}),
191
+ /** icon:作者显式选的预设图标(层级标签用);不写时由 layersOf 按视口补默认。 */
192
+ layers: z.record(Id, z.strictObject({ title: z.string().min(1), sceneId: Qid, role: Id.optional(), icon: z.enum(LAYER_ICONS).optional() })).default({}),
190
193
  source: Source,
191
194
  });
192
195
  export const RULE_ORIGINS = ['user', 'project_material', 'ai_assumption', 'code_observed', 'feedback'];
@@ -221,14 +224,22 @@ export const Project = z.strictObject({
221
224
  theme: z.string().min(1).default('sketch'),
222
225
  /** 作者主题(D51):主题名 → CSS 原文(themes/<name>.css);渲染时自动限定在舞台范围内。发布站同样打包。 */
223
226
  themes: z.record(z.string(), z.string()).default({}),
224
- /** dev = 含全部方案(本地看板);publish = 只含选定方案,且去掉创作侧信息(D33)。 */
225
- mode: z.enum(['dev', 'publish']),
227
+ /** dev = 含全部方案(本地看板);publish = 只含选定方案,且去掉创作侧信息(D33);review = 评审版:全部方案,同样去掉创作侧信息(D63)。 */
228
+ mode: z.enum(['dev', 'publish', 'review']),
226
229
  routes: z.record(z.string(), Route).default({}),
227
230
  features: z.record(Id, Feature).default({}),
231
+ /** 编译器决定的演示顺序,发布时保留。旧 IR 可省略,读取时沿用其已有顺序。 */
232
+ featureIds: z.array(Id).optional(),
228
233
  cases: z.record(Qid, Case).default({}),
229
234
  options: z.record(Qid, Option).default({}),
230
235
  rules: z.record(Qid, Rule).default({}),
231
236
  scenes: z.record(Qid, Scene).default({}),
232
237
  scenarios: z.record(Qid, Scenario).default({}),
233
238
  issues: z.record(Qid, Issue).default({}),
239
+ }).superRefine((p, ctx) => {
240
+ if (!p.featureIds)
241
+ return;
242
+ const ids = new Set(p.featureIds);
243
+ if (ids.size !== p.featureIds.length || ids.size !== Object.keys(p.features).length || p.featureIds.some(id => !p.features[id]))
244
+ ctx.addIssue({ code: 'custom', path: ['featureIds'], message: 'featureIds must list every feature exactly once' });
234
245
  });
package/dist/validate.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { orderedFeatures } from "./features.js";
1
2
  import { Project } from "./schema.js";
2
3
  import { CAPTION_MAX, EXPLAIN_MAX, INTERACTIVE_TYPES, captionLength } from "./catalog.js";
3
4
  import { walkNodes, findNode, replay } from "./player.js";
@@ -64,7 +65,7 @@ export function validate(project, opts = { mode: 'all' }) {
64
65
  for (const c of Object.values(p.cases).filter(c => !opts.optionId || c.featureId === p.options[opts.optionId]?.featureId)) {
65
66
  ref(p.features[c.featureId]?.caseIds.includes(c.id), `Case feature does not exist or does not list the case: ${c.featureId}`, c, 'case');
66
67
  }
67
- for (const f of Object.values(p.features).filter(f => !opts.optionId || f.optionIds.includes(opts.optionId))) {
68
+ for (const f of orderedFeatures(p).filter(f => !opts.optionId || f.optionIds.includes(opts.optionId))) {
68
69
  for (const id of f.caseIds)
69
70
  ref(p.cases[id]?.featureId === f.id, `Feature case is missing or belongs to another feature: ${id}`, f, 'feature');
70
71
  for (const id of f.optionIds)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joplo-app/core",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Joplo 编译器、校验器与播放器(IR v2)",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -19,7 +19,7 @@
19
19
  "dist"
20
20
  ],
21
21
  "dependencies": {
22
- "@joplo-app/kit": "0.2.2",
22
+ "@joplo-app/kit": "0.2.4",
23
23
  "zod": "4.6.7"
24
24
  },
25
25
  "engines": {