@joplo-app/core 0.7.2 → 0.7.3

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.js CHANGED
@@ -379,6 +379,10 @@ export function compile(src, mode, opts = {}) {
379
379
  const viewScenes = hasLayers ? layerScenes.map(l => l.scene) : [...ctxRoutes].map(path => sceneFor.get(sceneOf(path))).filter((x) => !!x);
380
380
  /** 某一步(所在路径 route)点到的元素自带的 onClick。 */
381
381
  const eventOf = (route, target) => hasLayers ? sceneEvents.get(layerSceneWith(target)?.id ?? '')?.get(target) : sceneEvents.get(sceneOf(route))?.get(target);
382
+ /** 写法 v2 第二步:这件作品用到的模拟请求(按名字),以及剧本实际演到的结果(name:outcome)。 */
383
+ const mocks = new Map();
384
+ const usedOutcomes = new Set();
385
+ const registerMock = (m, at) => registerMockIn(mocks, m, at, err);
382
386
  const scenarioIds = {};
383
387
  // flow({ from }) 接力:按依赖顺序编译,被接的场景先编译,记下它结尾的路径与导演层;
384
388
  // 接力场景的逐步校验(页面里找目标、焦点提示、镜头、自动字幕)都从那里开始,而不是默认起点
@@ -413,7 +417,7 @@ export function compile(src, mode, opts = {}) {
413
417
  continue;
414
418
  }
415
419
  // 写法 v2:点击步骤先执行被点元素的 onClick,再执行步骤自己写的效果。页面跟踪(go / back)看得到合并后的效果。
416
- const fl = Object.assign(Object.create(Object.getPrototypeOf(authored)), authored, { steps: withElementEvents(authored.steps, start, eventOf, warn) });
420
+ const fl = Object.assign(Object.create(Object.getPrototypeOf(authored)), authored, { steps: expandSteps(authored, start, { eventOf, warn, err, registerMock, usedOutcomes }) });
417
421
  for (const c of fl.opts.cases ?? []) {
418
422
  if (!fdef?.cases?.[c])
419
423
  err('UNKNOWN_CASE', `Scenario ${sid} covers case "${c}", which is not in feature.cases`, fl.source);
@@ -540,11 +544,11 @@ export function compile(src, mode, opts = {}) {
540
544
  for (const scene of viewScenes)
541
545
  for (const [target, ev] of sceneEvents.get(scene.id) ?? []) {
542
546
  const effects = [];
543
- for (const e of ev.effects) {
547
+ const local = (e, at) => {
544
548
  if (e.type === 'go') {
545
549
  if (!ctxRoutes.has(e.route)) {
546
- err('UNKNOWN_ROUTE', `onClick go("${e.route}") on ${target} navigates to an unknown route`, ev.at);
547
- continue;
550
+ err('UNKNOWN_ROUTE', `go("${e.route}") reached by clicking ${target} navigates to an unknown route`, at);
551
+ return;
548
552
  }
549
553
  effects.push({ type: 'navigate', sceneId: sceneOf(e.route) });
550
554
  }
@@ -552,6 +556,16 @@ export function compile(src, mode, opts = {}) {
552
556
  effects.push({ type: e.type, path: e.path, value: e.value });
553
557
  else if (e.type === 'toast')
554
558
  effects.push({ type: 'toast', text: e.text, tone: e.tone });
559
+ };
560
+ for (const e of ev.effects) {
561
+ // 观众接管时,模拟请求用第一个结果;只取本地效果(完成、旁白、镜头属于剧本)
562
+ if (e.type === 'call') {
563
+ if (registerMock(e.mock, ev.at))
564
+ for (const r of Object.values(e.mock.outcomes)[0].effects)
565
+ local(r, Object.values(e.mock.outcomes)[0].source ?? ev.at);
566
+ }
567
+ else
568
+ local(e, ev.at);
555
569
  }
556
570
  const parsed = effects.map(e => Effect.safeParse(e));
557
571
  if (parsed.some(r => !r.success)) {
@@ -577,6 +591,10 @@ export function compile(src, mode, opts = {}) {
577
591
  free[key] = { action: { type: 'click', target }, effects: parsed.map(r => r.data), ...(ev.at && rel(ev.at) ? { source: rel(ev.at) } : {}) };
578
592
  }
579
593
  }
594
+ for (const m of mocks.values())
595
+ for (const [k, r] of Object.entries(m.outcomes))
596
+ if (!usedOutcomes.has(`${m.name}:${k}`))
597
+ warn('MOCK_OUTCOME_UNUSED', `Outcome ${k} of mock ${m.name} is not shown by any slice of work ${qid}; add a slice that picks it with flow(…, { api: { ${m.name}: ['${k}'] } }), or delete the outcome`, r.source ?? m.source);
580
598
  if (fdef)
581
599
  out.features[fid].alternatives[qid] = { decisionFocus: strip ? '' : def.focus ?? '', tradeoffs: strip ? [] : def.tradeoffs ?? [], coverage };
582
600
  out.works[qid] = {
@@ -1127,7 +1145,7 @@ function tagFrom(n, from) {
1127
1145
  return { ...n, props: { ...n.props, __from: from } };
1128
1146
  }
1129
1147
  /** 元素事件里允许的效果:会改变画面状态的本地效果,加上规则关联。完成、镜头、朗读、插件效果属于剧本步骤。 */
1130
- const EVENT_EFFECTS = new Set(['set', 'append', 'toast', 'go', 'uses']);
1148
+ const EVENT_EFFECTS = new Set(['set', 'append', 'toast', 'go', 'uses', 'call']);
1131
1149
  /** onClick={effect} 或 onClick={[effect, [effect]]};不是效果时返回 null。 */
1132
1150
  function eventEffects(v) {
1133
1151
  const out = [];
@@ -1336,32 +1354,89 @@ function stepRouteBefore(steps, i, start) {
1336
1354
  return route;
1337
1355
  }
1338
1356
  /**
1339
- * 写法 v2:把被点元素的 onClick 合并进点击步骤(元素效果在前,步骤自己的效果在后)。
1340
- * 按与 stepRouteBefore 相同的顺序跟踪路径,并且看得到合并进来的 go(),所以元素跳页之后的步骤在新页面上找目标。
1357
+ * 写法 v2:展开作者写的步骤。
1358
+ * 1. 点击步骤先执行被点元素的 onClick,再执行步骤自己的效果。
1359
+ * 2. 效果里的模拟请求(mock)从这一步取出,在它后面接一个系统步骤:结果按 flow({ api }) 依次取,缺省第一个;每次调用恰好用掉一个。
1360
+ * 路径跟踪与 stepRouteBefore 同一顺序,看得到合并进来的 go() 和结果里的 go()。
1341
1361
  */
1342
- function withElementEvents(steps, start, eventOf, warn) {
1362
+ function expandSteps(fl, start, c) {
1363
+ const queue = new Map();
1364
+ const api = fl.opts.api;
1365
+ if (api !== undefined) {
1366
+ if (!api || typeof api !== 'object' || Array.isArray(api) || Object.values(api).some(v => !Array.isArray(v) || v.some(x => typeof x !== 'string')))
1367
+ c.err('FLOW_API_INVALID', `flow({ api }) maps a mock name to the outcomes this slice uses in order, for example api: { sendInvite: ['timeout', 'ok'] }; got ${JSON.stringify(api)}`, fl.source);
1368
+ else
1369
+ for (const [k, v] of Object.entries(api))
1370
+ queue.set(k, [...v]);
1371
+ }
1343
1372
  let route = start;
1344
1373
  const stack = [];
1345
- return steps.map((st) => {
1374
+ const out = [];
1375
+ const emit = (st) => {
1376
+ out.push(st);
1377
+ for (const e of st.effects)
1378
+ if (e.type === 'go') {
1379
+ stack.push(route);
1380
+ route = e.route;
1381
+ }
1382
+ };
1383
+ for (const st of fl.steps) {
1346
1384
  if (st.action.type === 'back')
1347
1385
  route = stack.pop() ?? route;
1348
- let next = st;
1386
+ let effects = st.effects;
1349
1387
  const target = st.action.type === 'click' ? st.action.target : null;
1350
- const ev = target ? eventOf(route, target) : undefined;
1388
+ const ev = target ? c.eventOf(route, target) : undefined;
1351
1389
  if (target && ev) {
1352
1390
  const writes = new Set(ev.effects.flatMap(e => e.type === 'set' || e.type === 'append' ? [e.path] : []));
1353
1391
  const repeated = st.effects.find((e) => (e.type === 'set' || e.type === 'append') && writes.has(e.path));
1354
1392
  if (repeated)
1355
- warn('STEP_REPEATS_EVENT', `This click on ${target} writes ${repeated.path}, which its onClick already writes; delete the write from the step (onClick runs first, then the step's own effects)`, st.source);
1356
- next = { ...st, effects: [...ev.effects, ...st.effects] };
1393
+ c.warn('STEP_REPEATS_EVENT', `This click on ${target} writes ${repeated.path}, which its onClick already writes; delete the write from the step (onClick runs first, then the step's own effects)`, st.source);
1394
+ effects = [...ev.effects, ...st.effects];
1357
1395
  }
1358
- for (const e of next.effects)
1359
- if (e.type === 'go') {
1360
- stack.push(route);
1361
- route = e.route;
1396
+ const calls = effects.filter((e) => e.type === 'call');
1397
+ emit(effects === st.effects && !calls.length ? st : { ...st, effects: effects.filter(e => e.type !== 'call') });
1398
+ for (const { mock: m } of calls) {
1399
+ if (!c.registerMock(m, st.source))
1400
+ continue;
1401
+ const q = queue.get(m.name);
1402
+ const pick = q ? q.shift() : Object.keys(m.outcomes)[0];
1403
+ if (pick === undefined) {
1404
+ c.err('MOCK_OUTCOMES_EXHAUSTED', `This step calls ${m.name} again, but flow({ api: { ${m.name}: [...] } }) has no outcome left; list one outcome per call, in order`, st.source);
1405
+ continue;
1362
1406
  }
1363
- return next;
1364
- });
1407
+ if (!Object.hasOwn(m.outcomes, pick)) {
1408
+ c.err('MOCK_OUTCOME_UNKNOWN', `${m.name} has no outcome "${pick}" (outcomes: ${Object.keys(m.outcomes).join(', ')})`, fl.source ?? st.source);
1409
+ continue;
1410
+ }
1411
+ const r = m.outcomes[pick];
1412
+ c.usedOutcomes.add(`${m.name}:${pick}`);
1413
+ const at = r.source ?? st.source;
1414
+ emit({ kind: 'system', action: { type: 'event', name: r.name }, ...(r.caption ? { caption: r.caption } : {}), effects: [...r.effects], ...(at ? { source: at } : {}) });
1415
+ }
1416
+ }
1417
+ for (const [name, q] of queue)
1418
+ if (q.length)
1419
+ c.err('MOCK_OUTCOMES_LEFTOVER', `flow({ api: { ${name}: [...] } }) lists ${q.length} more outcome(s) (${q.join(', ')}) than this slice calls ${name}; each call uses exactly one`, fl.source);
1420
+ return out;
1421
+ }
1422
+ const canonicalMock = (m) => JSON.stringify(m.outcomes, (k, v) => (k === 'source' ? undefined : v));
1423
+ /** 登记一件作品里的模拟请求:校验形状;同名但内容不同的两个请求报冲突。 */
1424
+ function registerMockIn(mocks, m, at, err) {
1425
+ const outcomes = m && typeof m.outcomes === 'object' && m.outcomes ? Object.values(m.outcomes) : [];
1426
+ const valid = !!m && typeof m.name === 'string' && /^[A-Za-z][A-Za-z0-9_-]{0,63}$/.test(m.name) && outcomes.length > 0
1427
+ && outcomes.every(r => !!r && r.kind === 'response' && typeof r.name === 'string' && !!r.name.trim() && Array.isArray(r.effects) && !r.effects.some(e => e.type === 'call'));
1428
+ if (!valid) {
1429
+ err('MOCK_INVALID', `mock(${JSON.stringify(m?.name)}, …) needs an id-like name and at least one outcome written as response('Event name', ...effects); a response cannot call another mock`, m?.source ?? at);
1430
+ return false;
1431
+ }
1432
+ const prev = mocks.get(m.name);
1433
+ if (prev && prev !== m && canonicalMock(prev) !== canonicalMock(m)) {
1434
+ err('MOCK_CONFLICT', `Two different mocks are named ${m.name} in this work (other: ${prev.source ?? 'unknown'}); give each request its own name`, m.source ?? at);
1435
+ return false;
1436
+ }
1437
+ if (!prev)
1438
+ mocks.set(m.name, m);
1439
+ return true;
1365
1440
  }
1366
1441
  /** 元素事件生成的本地反应用 on-<id> 作键;与作者写的 free 键重名时加序号。 */
1367
1442
  function eventFreeKey(target, taken) {
package/dist/guide.js CHANGED
@@ -178,21 +178,25 @@ Success: check reports 0 errors; outline --work explainer shows the intended sli
178
178
  For tools reading IR from @joplo-app/core, use entriesOf/entryOf for entries, featuresOf for real features in entryIds order, rolesOf(project, workId) for shared or standalone roles, sliceKey(scenario) for its author key, and visibleRoutes(project) for paths without the internal blank page. Follow scenario.workId and the projection; never split ids to infer ownership.
179
179
 
180
180
  ## Engine-only example
181
- In features/<f>/works/<key>.tsx, buildScreen is project code using the installed plugins' components. It must return enabled elements with ids email, send and result; read those plugin skills for the actual view code.
181
+ In features/<f>/works/<key>.tsx, buildScreen is project code using the installed plugins' components. It must return enabled elements with ids email, send and result, and put the onClick it receives on send; read those plugin skills for the actual view code.
182
182
  \`\`\`ts
183
- import { $, work, flow, page, set, done } from '@joplo-app/kit';
183
+ import { $, work, flow, page, set, done, mock, response } from '@joplo-app/kit';
184
184
  import { buildScreen } from './screen';
185
+ // The request and its possible results, written once
186
+ const sendLink = mock('sendLink', {
187
+ accepted: response('Accepted', set($.ui.sending, false), set($.ui.sent, true), done('Link sent')),
188
+ unknown: response('No account', set($.ui.sending, false), set($.ui.error, 'Check the address')),
189
+ });
185
190
  export default work({
186
191
  title: 'A · Recover access', summary: 'A retry keeps the entered address',
187
- routes: { '/reset': page({ title: 'Reset password' }, buildScreen()) },
192
+ routes: { '/reset': page({ title: 'Reset password' }, buildScreen({ onSend: [set($.ui.sending, true), sendLink] })) },
188
193
  state: { ui: { sending: false, error: '', sent: false } },
189
194
  scenarios: {
190
- retry: flow('Correct an address and retry', { cases: ['unknown_email'], start: '/reset' })
191
- .type('email', 'ana@example.invalid').click('send', set($.ui.sending, true))
192
- .system('No account', set($.ui.sending, false), set($.ui.error, 'Check the address'))
195
+ // The first send finds no account, the retry is accepted
196
+ retry: flow('Correct an address and retry', { cases: ['unknown_email'], start: '/reset', api: { sendLink: ['unknown', 'accepted'] } })
197
+ .type('email', 'ana@example.invalid').click('send', 'Send the link')
193
198
  .type('email', 'ana@example.com', set($.ui.error, ''))
194
- .click('send', set($.ui.sending, true))
195
- .system('Accepted', set($.ui.sending, false), set($.ui.sent, true), done('Link sent')),
199
+ .click('send', 'Send again'),
196
200
  },
197
201
  });
198
202
  \`\`\`
@@ -200,11 +204,11 @@ Declare both success and recovery cases in the feature. View code belongs to the
200
204
 
201
205
  ## Steps and effects
202
206
  - chapter(name, options) uses the same slice options as flow(); its default predecessor is the previous chapter, with from: null to restart. Use all chapter() or all flow() in one work.
203
- - flow(name, { cases?, start?, state?, from?, autoplay?, layer?, description?, expected?, mock?, outcome?, actionEntry? }). state overrides work state. description is the cover sentence; expected describes what the viewer should observe.
207
+ - flow(name, { cases?, start?, state?, from?, autoplay?, layer?, description?, expected?, mock?, outcome?, actionEntry?, api? }). The mock option is only the badge label (for example 'Mocked failure'); api picks mock() outcomes (System responses below). state overrides work state. description is the cover sentence; expected describes what the viewer should observe.
204
208
  - autoplay: false keeps an optional scenario selectable through a fork, chapter list or deep link, but skips it in sequential published-site playback. Playing that scenario manually stops at its end. Default/true preserves declaration order.
205
209
  - from: 'previousKey' continues that scenario's final route, ui/data/inputs and director layer. Validate steps and automatic captions against that ending page; dependency order does not change chapter order. Do not combine from with start. layer overrides the initial director layer.
206
210
  - .click(id), .type(id, value), .select(id, value), .toggle(id, boolean), .press(keys), .back(), .drag(id, destination), .hover(id, ms), .scroll(id, destination), .act(pluginAction, id, data). Read demo and the action-owning plugin skill for recognition requirements.
207
- - .system('event', ...effects) models a response, not a real request. .card() creates a transition. Strings are captions; other arguments are effects. Step arguments and card accept effect arrays.
211
+ - .system('event', ...effects) models a response, not a real request. For the response to something the viewer triggers (send, save, load), write a mock() instead so the viewer gets it after taking over; keep .system() for story events (time passes, another person acts). .card() creates a transition. Strings are captions; other arguments are effects. Step arguments and card accept effect arrays.
208
212
  - set(path, value) replaces; push(path, value) appends; patch(path, object) expands to sets (nested objects replace, not deep-merge). go(route) navigates in this work; back returns to the prior route.
209
213
  - stream(path, text, { pace? }) writes like set, but during playback the bound text appears character by character (a model answering, speech being transcribed); jumps, screenshots and deep links show the full text. When the new value starts with the old one, only the added characters stream, so write each step's full value (previous text + the new words) rather than juggling separate fragments. pace: 'voice' spreads the new characters over this step's narrate()/say() line, so the words land as they are spoken; the default pace is model-output speed. Only a plain text child bound to the path streams ({$.ui.reply}); stream values are translated like other on-screen text, so keep every language's successive values prefix-consistent.
210
214
  - toast(text), toast.success/error/info(text) show an engine message. done(result, outcome?) ends a scenario; outcomes success/failure/cancelled must agree with flow's badge. uses(ruleKey, ...) links rules; it is an effect, not a flow method.
@@ -220,13 +224,30 @@ id="nav_settings" onClick={go('/settings')}
220
224
  // the step only says what the viewer does and why
221
225
  flow('Invite a teammate').click('btn_invite', 'The admin opens the invite dialog')
222
226
  \`\`\`
223
- - onClick takes one effect or an array: set, push, toast, go and uses. A scripted .click(id) runs the element's onClick first, then the step's own effects. Keep captions, narrate(), say(), camera and focus cues, done(), and the .system() response in the steps.
227
+ - onClick takes one effect or an array: set, push, toast, go, uses and a mock() request. A scripted .click(id) runs the element's onClick first, then the step's own effects. Keep captions, narrate(), say(), camera and focus cues and done() in the steps; the request's result goes in mock().
224
228
  - Do not repeat the element's writes in the step (STEP_REPEATS_EVENT). Step effects stay available for what only this moment of the story does.
225
229
  - After the viewer pauses, every element with onClick works as a local reaction: go() changes page locally, uses() only links rules. Play, jump, scenario change and reset discard the local layer. A page reached only locally never advances the script; the next step still belongs to the timeline's page.
226
230
  - One id has one behavior per work: an id that appears on several pages (a layout nav link) needs the same onClick everywhere (EVENT_CONFLICT). Do not also declare work.free for that click (FREE_EVENT_CONFLICT).
227
231
  - Only onClick takes effects for now (EVENT_UNSUPPORTED). Inputs keep value={$.ui.name} and the typed value; put follow-up reactions in the step.
228
232
  - Give the controls a viewer will try (cancel, close, back, navigation) an onClick instead of marking them unmodeled; keep unmodeled for what this work deliberately leaves out.
229
233
 
234
+ ## System responses (mock / response)
235
+ Write each request and its possible results once, then let each slice pick the result it shows:
236
+ \`\`\`tsx
237
+ const sendInvite = mock('sendInvite', {
238
+ ok: response('Request succeeded (mock)', 'Sent', set($.ui.sending, false), set($.ui.open, false), done('Invite sent')),
239
+ timeout: response('Request timed out (mock)', 'Input kept', set($.ui.sending, false), set($.ui.error, 'Timeout')),
240
+ });
241
+ // on the element: onClick={[set($.ui.sending, true), sendInvite]}
242
+ success: flow('Send').click('send', 'Send the invite'), // first outcome (ok)
243
+ retry: flow('Retry', { api: { sendInvite: ['timeout', 'ok'] } }).click('send').click('send', 'Retry'),
244
+ \`\`\`
245
+ - response(name, ...args) takes the same arguments as .system(name, ...args): the first string is its caption, the rest are effects, including done(), narrate() and camera.
246
+ - In the script, every call to a mock (in an element's onClick or a step's effects) adds one system step right after that step. flow({ api: { name: [outcomes] } }) uses one outcome per call, in order; a mock the slice does not list uses its first outcome.
247
+ - After the viewer takes over, clicking the element applies the first outcome's local effects (set, push, toast, go) at once; done(), narration and camera stay in the script.
248
+ - The mock name is unique within a work; outcomes are the cases the design must show. Every outcome should appear in some slice (MOCK_OUTCOME_UNUSED).
249
+ - A response cannot call another mock. Use .system() for an event nobody triggers on stage.
250
+
230
251
  ## Reusable effect factories
231
252
  Step arguments and card effects accept nested arrays, flattened in order. Compose helpers that return patch() plus other effects instead of copying transition state. Only done() completes a scenario; unknown effect objects report EFFECT_INVALID.
232
253
  \`\`\`ts
@@ -638,6 +659,13 @@ Example: features/invite/works/a.tsx:12:5 warning UNBOUND_INTERACTIVE Interac
638
659
  - EVENT_CONFLICT: the same id has different onClick on two stages of one work; give the elements different ids, or make the behavior identical (shared layout links).
639
660
  - FREE_EVENT_CONFLICT: a work.free click reaction duplicates an element's onClick; move its effects into onClick and delete the free entry.
640
661
  - STEP_REPEATS_EVENT (warning): the step writes a path its target's onClick already writes; delete the write from the step.
662
+ - MOCK_INVALID: mock(name, outcomes) needs an id-like name and at least one response('Event name', ...effects); a response cannot call another mock.
663
+ - MOCK_CONFLICT: two different mocks share one name in a work; give each request its own name, or reuse the same mock object.
664
+ - MOCK_OUTCOME_UNKNOWN: flow({ api }) names an outcome the mock does not have; copy one from the outcomes listed in the message.
665
+ - MOCK_OUTCOMES_EXHAUSTED: the slice calls the mock more times than flow({ api }) lists outcomes; list one outcome per call, in order.
666
+ - MOCK_OUTCOMES_LEFTOVER: flow({ api }) lists more outcomes than the slice calls that mock (or names a mock the slice never calls); remove the extra entries.
667
+ - MOCK_OUTCOME_UNUSED (warning): no slice of the work shows this outcome; add a slice that picks it with flow({ api }), or delete the outcome.
668
+ - FLOW_API_INVALID: flow({ api }) maps mock names to arrays of outcome names, for example api: { sendInvite: ['timeout', 'ok'] }.
641
669
  - ACTION_INVALID / ACTION_UNKNOWN / ACTION_DATA_INVALID / ACTION_TARGET_INVALID / ACTION_DESTINATION_MISSING / ACTION_DESTINATION_INVALID / PLUGIN_ACTION_INVALID: check the action shape, enabled plugin declaration, exact payload fields/ranges, allowed target type, and drag/scroll endpoint. Read the plugin skill; keep endpoints in the current stage, then rerun check.
642
670
  - UNKNOWN_COMPONENT: Choose a supported name from components; do not invent components.
643
671
  - UNKNOWN_PLUGIN / PLUGIN_PARENT / PLUGIN_INVALID / PLUGIN_DUPLICATE / PLUGIN_RUNTIME_MISSING: plugin components need their package in config({ plugins: [...] }) once, written inside the parent named in the message; a missing runtime means reinstall the package (npx joplo skill plugins).
@@ -1029,7 +1057,7 @@ The engine supplies authoring, compilation, state, scheduling and host services.
1029
1057
  6. joplo components inspects only the enabled manifests; a named query gives that component's declarations and example. For full recipes/behavior read its plugin skill.
1030
1058
 
1031
1059
  ## Optional 3D
1032
- The starter does not include 3D or its large browser dependency. To add it: npm install @joplo-app/plugin-3d@0.7.2; default-import scene3d from that package in joplo.config.ts, add scene3d to config.plugins, then run npx joplo skill install. Read npx joplo skill scene3d, scene3d/models and scene3d/generation for rendering, existing assets and optional local generation. A key is unnecessary for existing assets; dry-run before approving any generation.
1060
+ The starter does not include 3D or its large browser dependency. To add it: npm install @joplo-app/plugin-3d@0.7.3; default-import scene3d from that package in joplo.config.ts, add scene3d to config.plugins, then run npx joplo skill install. Read npx joplo skill scene3d, scene3d/models and scene3d/generation for rendering, existing assets and optional local generation. A key is unnecessary for existing assets; dry-run before approving any generation.
1033
1061
 
1034
1062
  ## Errors and trust
1035
1063
  - UNKNOWN_PLUGIN: the element's author package is not enabled. Use its package provenance in the diagnostic to install/import it and add it to config.plugins. UNKNOWN_COMPONENT: no enabled manifest declares that element or intrinsic tag; read the installed catalogs.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joplo-app/core",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "description": "Joplo 作品引擎:编译、校验与确定性播放,支持独立作品和功能方案评审",
5
5
  "license": "PolyForm-Shield-1.0.0",
6
6
  "type": "module",
@@ -35,7 +35,7 @@
35
35
  "dist"
36
36
  ],
37
37
  "dependencies": {
38
- "@joplo-app/kit": "0.7.2",
38
+ "@joplo-app/kit": "0.7.3",
39
39
  "zod": "4.6.7"
40
40
  },
41
41
  "engines": {