openplanr 3.4.0 → 3.5.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/CHANGELOG.md +28 -0
- package/dist/cli/commands/design.d.ts +3 -0
- package/dist/cli/commands/design.d.ts.map +1 -0
- package/dist/cli/commands/design.js +137 -0
- package/dist/cli/commands/design.js.map +1 -0
- package/dist/cli/commands/groups/operations.d.ts.map +1 -1
- package/dist/cli/commands/groups/operations.js +2 -0
- package/dist/cli/commands/groups/operations.js.map +1 -1
- package/dist/dashboard/.vite/manifest.json +1 -1
- package/dist/dashboard/assets/{index-CvQAlBy3.js → index-B-l_941W.js} +2 -2
- package/dist/dashboard/assets/{index-CvQAlBy3.js.map → index-B-l_941W.js.map} +1 -1
- package/dist/dashboard/dashboard-manifest.json +13 -13
- package/dist/dashboard/index.html +1 -1
- package/dist/services/design-artifact-service.d.ts +22 -0
- package/dist/services/design-artifact-service.d.ts.map +1 -1
- package/dist/services/design-artifact-service.js +76 -16
- package/dist/services/design-artifact-service.js.map +1 -1
- package/dist/services/runtime-manager/runtime-package.js +1 -1
- package/dist/services/runtime-manager/runtime-package.js.map +1 -1
- package/docs/CLI.md +29 -0
- package/lib/host-packages/adapter-registry.json +5 -5
- package/lib/host-packages/capability-map.json +1 -1
- package/lib/host-packages/claude/.claude-plugin/marketplace.json +2 -2
- package/lib/host-packages/claude/openplanr/.claude-plugin/plugin.json +1 -1
- package/lib/host-packages/claude/openplanr/.openplanr-content.json +24 -340
- package/lib/host-packages/claude/openplanr/README.md +8 -8
- package/lib/host-packages/claude/openplanr/skills/artifact/references/design-sharing.md +2 -2
- package/lib/host-packages/claude/openplanr/skills/design/SKILL.md +23 -12
- package/lib/host-packages/claude/openplanr/skills/design/references/design-system.md +2 -2
- package/lib/host-packages/claude/openplanr/skills/design/references/generation.md +3 -3
- package/lib/host-packages/claude/openplanr/skills/design/references/hosted-canvas.md +6 -3
- package/lib/host-packages/claude/openplanr/skills/design/references/review.md +6 -6
- package/lib/host-packages/claude/openplanr/skills/design/references/team-review.md +3 -4
- package/lib/host-packages/claude/openplanr/skills/design/references/utilities.md +78 -38
- package/lib/host-packages/claude/openplanr/skills/design-loop/SKILL.md +15 -7
- package/lib/host-packages/claude/openplanr/skills/design-loop/references/design-system.md +2 -2
- package/lib/host-packages/claude/openplanr/skills/design-loop/references/generation.md +3 -3
- package/lib/host-packages/claude/openplanr/skills/design-loop/references/review.md +6 -6
- package/lib/host-packages/claude/openplanr/skills/design-loop/references/team-review.md +3 -4
- package/lib/host-packages/claude/openplanr/skills/design-loop/references/utilities.md +78 -38
- package/lib/host-packages/claude/openplanr/skills/design-review/SKILL.md +25 -5
- package/lib/host-packages/claude/openplanr/skills/design-review/references/design-system.md +2 -2
- package/lib/host-packages/claude/openplanr/skills/design-review/references/generation.md +3 -3
- package/lib/host-packages/claude/openplanr/skills/design-review/references/review.md +6 -6
- package/lib/host-packages/claude/openplanr/skills/design-review/references/team-review.md +3 -4
- package/lib/host-packages/claude/openplanr/skills/design-review/references/utilities.md +78 -38
- package/lib/host-packages/claude/openplanr/skills/plan/SKILL.md +7 -3
- package/lib/host-packages/cursor/openplanr/.openplanr-content.json +23 -339
- package/lib/host-packages/cursor/openplanr/manifest.json +1 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-artifact/references/design-sharing.md +2 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-design/references/design-system.md +2 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-design/references/generation.md +3 -3
- package/lib/host-packages/cursor/openplanr/rules/planr-design/references/hosted-canvas.md +6 -3
- package/lib/host-packages/cursor/openplanr/rules/planr-design/references/review.md +6 -6
- package/lib/host-packages/cursor/openplanr/rules/planr-design/references/team-review.md +3 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-design/references/utilities.md +78 -38
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/design-system.md +2 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/generation.md +3 -3
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/review.md +6 -6
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/team-review.md +3 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/utilities.md +78 -38
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop.mdc +15 -7
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/design-system.md +2 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/generation.md +3 -3
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/review.md +6 -6
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/team-review.md +3 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/utilities.md +78 -38
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review.mdc +25 -5
- package/lib/host-packages/cursor/openplanr/rules/planr-design.mdc +23 -12
- package/lib/host-packages/cursor/openplanr/rules/planr-plan.mdc +7 -3
- package/lib/host-packages/openai/.claude-plugin/marketplace.json +2 -2
- package/lib/host-packages/openai/openplanr/.codex-plugin/plugin.json +1 -1
- package/lib/host-packages/openai/openplanr/.openplanr-content.json +27 -343
- package/lib/host-packages/openai/openplanr/skills/artifact/references/design-sharing.md +2 -2
- package/lib/host-packages/openai/openplanr/skills/design/SKILL.md +23 -12
- package/lib/host-packages/openai/openplanr/skills/design/openplanr.skill.json +0 -11
- package/lib/host-packages/openai/openplanr/skills/design/references/design-system.md +2 -2
- package/lib/host-packages/openai/openplanr/skills/design/references/generation.md +3 -3
- package/lib/host-packages/openai/openplanr/skills/design/references/hosted-canvas.md +6 -3
- package/lib/host-packages/openai/openplanr/skills/design/references/review.md +6 -6
- package/lib/host-packages/openai/openplanr/skills/design/references/team-review.md +3 -4
- package/lib/host-packages/openai/openplanr/skills/design/references/utilities.md +78 -38
- package/lib/host-packages/openai/openplanr/skills/design-loop/SKILL.md +15 -7
- package/lib/host-packages/openai/openplanr/skills/design-loop/openplanr.skill.json +0 -11
- package/lib/host-packages/openai/openplanr/skills/design-loop/references/design-system.md +2 -2
- package/lib/host-packages/openai/openplanr/skills/design-loop/references/generation.md +3 -3
- package/lib/host-packages/openai/openplanr/skills/design-loop/references/review.md +6 -6
- package/lib/host-packages/openai/openplanr/skills/design-loop/references/team-review.md +3 -4
- package/lib/host-packages/openai/openplanr/skills/design-loop/references/utilities.md +78 -38
- package/lib/host-packages/openai/openplanr/skills/design-review/SKILL.md +25 -5
- package/lib/host-packages/openai/openplanr/skills/design-review/openplanr.skill.json +0 -11
- package/lib/host-packages/openai/openplanr/skills/design-review/references/design-system.md +2 -2
- package/lib/host-packages/openai/openplanr/skills/design-review/references/generation.md +3 -3
- package/lib/host-packages/openai/openplanr/skills/design-review/references/review.md +6 -6
- package/lib/host-packages/openai/openplanr/skills/design-review/references/team-review.md +3 -4
- package/lib/host-packages/openai/openplanr/skills/design-review/references/utilities.md +78 -38
- package/lib/host-packages/openai/openplanr/skills/plan/SKILL.md +7 -3
- package/lib/host-packages/openai/openplanr/skills/plan/openplanr.skill.json +0 -11
- package/package.json +2 -2
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-artifact-shell.mjs +0 -1772
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-document.mjs +0 -2937
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-entities.mjs +0 -439
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-handoff.mjs +0 -2370
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-loopback-server.mjs +0 -359
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-parse5-parser.mjs +0 -3970
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-parse5-tokenizer.mjs +0 -3501
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-review-state-store.mjs +0 -45
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-review.mjs +0 -3376
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-runtime-home.mjs +0 -38
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-sandbox-guards.mjs +0 -1102
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-share-cli-bridge.mjs +0 -321
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-shared-artifact-support-dependencies-design-support-protocol-contracts-d707e49b.mjs +0 -1652
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-shared-artifact-support-protocol-contracts-9f6918b0.mjs +0 -1037
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-shared-design-support-0bac378d.mjs +0 -137
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design.mjs +0 -1500
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/notices/THIRD_PARTY_NOTICES.txt +0 -2023
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/lib/artifact/ui/studio-shell.css +0 -2
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/01-module-runtime.js +0 -18
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/02-artifact-review-ui.js +0 -814
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/03-protocol-contracts.js +0 -10
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/04-artifact-review-ui.js +0 -2568
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources.json +0 -60
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/package.json +0 -65
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/enhancements.css +0 -388
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/handoff-center.css +0 -81
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/share.css +0 -1
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/share.js +0 -139
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.css +0 -1159
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/01-module-runtime.js +0 -30
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/02-react.js +0 -900
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/03-react-dom-client-fiber-foundations.js +0 -2261
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/04-react-dom-client-reconciliation-hooks.js +0 -1595
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/05-react-dom-client-render-phases.js +0 -1467
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/06-react-dom-client-commit-effects.js +0 -1860
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/07-react-dom-client-work-loop-scheduling.js +0 -914
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/08-react-dom-client-dom-events-properties-hydration.js +0 -2578
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/09-react-dom-client-public-roots.js +0 -582
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/10-react.js +0 -17
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/11-artifact-review-ui.js +0 -12
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-protocol-contracts.js +0 -285
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/13-design-review-experience.js +0 -2773
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/14-studio-shell.js +0 -134
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/15-canvas-engine.js +0 -2207
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/16-design-review-experience.js +0 -16
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/17-studio-shell.js +0 -8
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/18-interface-primitives.js +0 -3883
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/19-interface-primitives.js +0 -966
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/20-studio-shell.js +0 -520
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/21-design-studio.js +0 -1597
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +0 -311
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +0 -163
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/registries/artifact-theme.json +0 -64
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.0.0/design-manifest.schema.json +0 -90
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-envelope.schema.json +0 -142
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +0 -97
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-bundle.schema.json +0 -584
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-context.schema.json +0 -191
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-handoff.schema.json +0 -407
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-metadata-payload.schema.json +0 -106
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.11.0/design-handoff-readiness.schema.json +0 -398
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.11.0/design-implementation-handoff.schema.json +0 -518
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.11.0/design-planning-lineage.schema.json +0 -106
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.11.0/design-review-metadata-payload.schema.json +0 -107
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.14.0/artifact-theme.schema.json +0 -316
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.16.0/artifact-envelope.schema.json +0 -408
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.16.0/design-review-bundle.schema.json +0 -590
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.22.0/design-document.schema.json +0 -506
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.22.0/design-review-bundle.schema.json +0 -822
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-bundle.schema.json +0 -346
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/design-protocol-contracts.mjs +0 -1232
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/design.mjs +0 -2611
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/runtime/notices/THIRD_PARTY_NOTICES.txt +0 -21
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +0 -163
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +0 -97
- package/lib/host-packages/claude/openplanr/skills/design/scripts/design.mjs +0 -12
- package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/design.mjs +0 -12
- package/lib/host-packages/claude/openplanr/skills/design-review/scripts/design.mjs +0 -12
- package/lib/host-packages/claude/openplanr/skills/plan/scripts/design.mjs +0 -12
- package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/design.mjs +0 -12
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/design.mjs +0 -12
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/design.mjs +0 -12
- package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/design.mjs +0 -12
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-artifact-shell.mjs +0 -1772
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-document.mjs +0 -2937
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-entities.mjs +0 -439
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-handoff.mjs +0 -2370
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-loopback-server.mjs +0 -359
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-parse5-parser.mjs +0 -3970
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-parse5-tokenizer.mjs +0 -3501
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-review-state-store.mjs +0 -45
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-review.mjs +0 -3376
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-runtime-home.mjs +0 -38
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-sandbox-guards.mjs +0 -1102
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-share-cli-bridge.mjs +0 -321
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-shared-artifact-support-dependencies-design-support-protocol-contracts-d707e49b.mjs +0 -1652
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-shared-artifact-support-protocol-contracts-9f6918b0.mjs +0 -1037
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-shared-design-support-0bac378d.mjs +0 -137
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design.mjs +0 -1500
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/notices/THIRD_PARTY_NOTICES.txt +0 -2023
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/lib/artifact/ui/studio-shell.css +0 -2
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/01-module-runtime.js +0 -18
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/02-artifact-review-ui.js +0 -814
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/03-protocol-contracts.js +0 -10
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/04-artifact-review-ui.js +0 -2568
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources.json +0 -60
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/package.json +0 -65
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/enhancements.css +0 -388
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/handoff-center.css +0 -81
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/share.css +0 -1
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/share.js +0 -139
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.css +0 -1159
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/01-module-runtime.js +0 -30
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/02-react.js +0 -900
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/03-react-dom-client-fiber-foundations.js +0 -2261
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/04-react-dom-client-reconciliation-hooks.js +0 -1595
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/05-react-dom-client-render-phases.js +0 -1467
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/06-react-dom-client-commit-effects.js +0 -1860
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/07-react-dom-client-work-loop-scheduling.js +0 -914
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/08-react-dom-client-dom-events-properties-hydration.js +0 -2578
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/09-react-dom-client-public-roots.js +0 -582
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/10-react.js +0 -17
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/11-artifact-review-ui.js +0 -12
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-protocol-contracts.js +0 -285
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/13-design-review-experience.js +0 -2773
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/14-studio-shell.js +0 -134
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/15-canvas-engine.js +0 -2207
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/16-design-review-experience.js +0 -16
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/17-studio-shell.js +0 -8
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/18-interface-primitives.js +0 -3883
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/19-interface-primitives.js +0 -966
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/20-studio-shell.js +0 -520
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/21-design-studio.js +0 -1597
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +0 -311
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +0 -163
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/registries/artifact-theme.json +0 -64
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.0.0/design-manifest.schema.json +0 -90
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-envelope.schema.json +0 -142
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +0 -97
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-bundle.schema.json +0 -584
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-context.schema.json +0 -191
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-handoff.schema.json +0 -407
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-metadata-payload.schema.json +0 -106
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.11.0/design-handoff-readiness.schema.json +0 -398
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.11.0/design-implementation-handoff.schema.json +0 -518
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.11.0/design-planning-lineage.schema.json +0 -106
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.11.0/design-review-metadata-payload.schema.json +0 -107
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.14.0/artifact-theme.schema.json +0 -316
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.16.0/artifact-envelope.schema.json +0 -408
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.16.0/design-review-bundle.schema.json +0 -590
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.22.0/design-document.schema.json +0 -506
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.22.0/design-review-bundle.schema.json +0 -822
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-bundle.schema.json +0 -346
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/design-protocol-contracts.mjs +0 -1232
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/design.mjs +0 -2611
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/runtime/notices/THIRD_PARTY_NOTICES.txt +0 -21
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +0 -163
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +0 -97
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-artifact-shell.mjs +0 -1772
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-document.mjs +0 -2937
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-entities.mjs +0 -439
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-handoff.mjs +0 -2370
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-loopback-server.mjs +0 -359
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-parse5-parser.mjs +0 -3970
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-parse5-tokenizer.mjs +0 -3501
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-review-state-store.mjs +0 -45
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-review.mjs +0 -3376
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-runtime-home.mjs +0 -38
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-sandbox-guards.mjs +0 -1102
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-share-cli-bridge.mjs +0 -321
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-shared-artifact-support-dependencies-design-support-protocol-contracts-d707e49b.mjs +0 -1652
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-shared-artifact-support-protocol-contracts-9f6918b0.mjs +0 -1037
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-shared-design-support-0bac378d.mjs +0 -137
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design.mjs +0 -1500
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/notices/THIRD_PARTY_NOTICES.txt +0 -2023
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/lib/artifact/ui/studio-shell.css +0 -2
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/01-module-runtime.js +0 -18
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/02-artifact-review-ui.js +0 -814
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/03-protocol-contracts.js +0 -10
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/04-artifact-review-ui.js +0 -2568
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources.json +0 -60
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/package.json +0 -65
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/enhancements.css +0 -388
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/handoff-center.css +0 -81
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/share.css +0 -1
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/share.js +0 -139
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.css +0 -1159
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/01-module-runtime.js +0 -30
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/02-react.js +0 -900
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/03-react-dom-client-fiber-foundations.js +0 -2261
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/04-react-dom-client-reconciliation-hooks.js +0 -1595
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/05-react-dom-client-render-phases.js +0 -1467
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/06-react-dom-client-commit-effects.js +0 -1860
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/07-react-dom-client-work-loop-scheduling.js +0 -914
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/08-react-dom-client-dom-events-properties-hydration.js +0 -2578
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/09-react-dom-client-public-roots.js +0 -582
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/10-react.js +0 -17
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/11-artifact-review-ui.js +0 -12
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-protocol-contracts.js +0 -285
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/13-design-review-experience.js +0 -2773
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/14-studio-shell.js +0 -134
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/15-canvas-engine.js +0 -2207
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/16-design-review-experience.js +0 -16
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/17-studio-shell.js +0 -8
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/18-interface-primitives.js +0 -3883
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/19-interface-primitives.js +0 -966
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/20-studio-shell.js +0 -520
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/21-design-studio.js +0 -1597
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +0 -311
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +0 -163
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/registries/artifact-theme.json +0 -64
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.0.0/design-manifest.schema.json +0 -90
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-envelope.schema.json +0 -142
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +0 -97
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-bundle.schema.json +0 -584
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-context.schema.json +0 -191
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-handoff.schema.json +0 -407
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-metadata-payload.schema.json +0 -106
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.11.0/design-handoff-readiness.schema.json +0 -398
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.11.0/design-implementation-handoff.schema.json +0 -518
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.11.0/design-planning-lineage.schema.json +0 -106
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.11.0/design-review-metadata-payload.schema.json +0 -107
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.14.0/artifact-theme.schema.json +0 -316
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.16.0/artifact-envelope.schema.json +0 -408
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.16.0/design-review-bundle.schema.json +0 -590
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.22.0/design-document.schema.json +0 -506
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.22.0/design-review-bundle.schema.json +0 -822
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-bundle.schema.json +0 -346
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/design-protocol-contracts.mjs +0 -1232
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/design.mjs +0 -2611
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/runtime/notices/THIRD_PARTY_NOTICES.txt +0 -21
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +0 -163
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +0 -97
- package/lib/host-packages/openai/openplanr/skills/design/scripts/design.mjs +0 -12
- package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/design.mjs +0 -12
- package/lib/host-packages/openai/openplanr/skills/design-review/scripts/design.mjs +0 -12
- package/lib/host-packages/openai/openplanr/skills/plan/scripts/design.mjs +0 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 83529dd: You can now work on a local design from the CLI with `openplanr design`:
|
|
8
|
+
|
|
9
|
+
- `inspect`, `validate` and `render` check and render a design document.
|
|
10
|
+
- `open` starts the local design studio, and `studio status` and `studio stop` report or stop it from another terminal, including a studio a design skill started.
|
|
11
|
+
- `view-context`, `export`, `verify` and `handoff` report what the studio shows, export standalone HTML, record a browser check and read the review handoff.
|
|
12
|
+
- `fonts fetch` downloads open-license fonts into the design.
|
|
13
|
+
- `capabilities --json` reports which design command contract your install serves.
|
|
14
|
+
|
|
15
|
+
These commands need the optional `planr-pipeline` package. Without it, `openplanr design capabilities` still succeeds and reports `E_DESIGN_RUNTIME_MISSING`, and the other commands stop with that code. Reinstall with `npm install -g openplanr`, without `--omit=optional`.
|
|
16
|
+
|
|
17
|
+
`openplanr artifact open` on a design gives the same reinstall step when that package is missing.
|
|
18
|
+
- e907c78: The design skills now run local design work through `openplanr design`. The OpenPlanr plugins for Claude Code, Codex and Cursor no longer ship a design runtime of their own.
|
|
19
|
+
|
|
20
|
+
- Design, Design Loop and Design Review check `openplanr design capabilities --json` before they ask you anything. On Claude Code, Design builds on Claude's hosted design canvas when it's available, and that needs no CLI.
|
|
21
|
+
- Without a working CLI, the skills still write the design document, its sources and `design-spec.md`, marked unverified, then tell you what to run:
|
|
22
|
+
- `openplanr` not found: `npm install -g openplanr`
|
|
23
|
+
- an older `openplanr`: `npm install -g openplanr@latest`
|
|
24
|
+
- `openplanr` installed with `--omit=optional`: `npm install -g openplanr` without that flag
|
|
25
|
+
- Design Review of a hosted canvas design works from the canvas comments.
|
|
26
|
+
- Plan reads a local design handoff with `openplanr design handoff`.
|
|
27
|
+
- In Codex's default sandbox the design studio can't start. The skills tell you how to run it: in your own terminal, or with Codex's local network and `~/.planr` write access turned on.
|
|
28
|
+
|
|
29
|
+
Removing a working feature normally waits for a major release. This one ships in a minor release as a deliberate exception: if you used the local design studio from the plugin without the CLI, install it with `npm install -g openplanr` and run the skill again.
|
|
30
|
+
|
|
3
31
|
## 3.4.0
|
|
4
32
|
|
|
5
33
|
### Minor Changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"design.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/design.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,OAAO,EAAU,MAAM,WAAW,CAAC;AAwFjD,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAoE5D"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { Option } from 'commander';
|
|
3
|
+
import { openExternalUrl } from '../../services/artifact-pipeline-service.js';
|
|
4
|
+
import { readDesignCapabilities, runDesignUtility, } from '../../services/design-artifact-service.js';
|
|
5
|
+
import { display, logger } from '../../utils/logger.js';
|
|
6
|
+
import { OPENPLANR_VERSION } from '../../utils/package-version.js';
|
|
7
|
+
const PATH_OPTIONS = new Set(['--output', '--report', '--dest']);
|
|
8
|
+
const view = () => new Option('--view <view>', 'canvas, prototype, or walkthrough').choices([
|
|
9
|
+
'canvas',
|
|
10
|
+
'prototype',
|
|
11
|
+
'walkthrough',
|
|
12
|
+
]);
|
|
13
|
+
const DOCUMENT_COMMANDS = [
|
|
14
|
+
['inspect', 'Report the design document and its current render', () => []],
|
|
15
|
+
['validate', 'Validate the design document without rendering', () => []],
|
|
16
|
+
['render', 'Render the design document into a new review revision', () => []],
|
|
17
|
+
[
|
|
18
|
+
'open',
|
|
19
|
+
'Open the local design studio; it runs until stopped',
|
|
20
|
+
() => [
|
|
21
|
+
view(),
|
|
22
|
+
new Option('--port <port>', 'loopback studio port'),
|
|
23
|
+
new Option('--no-open', 'do not open a browser'),
|
|
24
|
+
],
|
|
25
|
+
],
|
|
26
|
+
[
|
|
27
|
+
'view-context',
|
|
28
|
+
'Report what the local studio is showing',
|
|
29
|
+
() => [new Option('--request-time <timestamp>', 'ISO time of the request being answered')],
|
|
30
|
+
],
|
|
31
|
+
[
|
|
32
|
+
'export',
|
|
33
|
+
'Export the design as standalone HTML',
|
|
34
|
+
() => [
|
|
35
|
+
view(),
|
|
36
|
+
new Option('--format <format>', 'html'),
|
|
37
|
+
new Option('--output <path>', 'write to this new path'),
|
|
38
|
+
],
|
|
39
|
+
],
|
|
40
|
+
[
|
|
41
|
+
'verify',
|
|
42
|
+
'Record a browser verification report for the current render',
|
|
43
|
+
() => [new Option('--report <path>', 'the browser report JSON')],
|
|
44
|
+
],
|
|
45
|
+
[
|
|
46
|
+
'handoff',
|
|
47
|
+
'Inspect the design review handoff without changing any file',
|
|
48
|
+
() => [new Option('--action <action>', 'inspect').choices(['inspect']).default('inspect')],
|
|
49
|
+
],
|
|
50
|
+
];
|
|
51
|
+
/** The utility arguments for the options a user set, with paths resolved against the project. */
|
|
52
|
+
function forwarded(command, resolve) {
|
|
53
|
+
const values = command.opts();
|
|
54
|
+
return command.options.flatMap((option) => {
|
|
55
|
+
const { long } = option;
|
|
56
|
+
const value = values[option.attributeName()];
|
|
57
|
+
if (!long || long === '--json')
|
|
58
|
+
return [];
|
|
59
|
+
if (option.negate)
|
|
60
|
+
return value === false ? [long] : [];
|
|
61
|
+
return (Array.isArray(value) ? value : [value])
|
|
62
|
+
.filter((item) => typeof item === 'string')
|
|
63
|
+
.flatMap((item) => [long, PATH_OPTIONS.has(long) ? resolve(item) : item]);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
async function run(command, argv) {
|
|
67
|
+
const result = await runDesignUtility(argv, openExternalUrl);
|
|
68
|
+
const failed = result.ok === false || result.status === 'failed';
|
|
69
|
+
if (command.opts().json)
|
|
70
|
+
display.line(JSON.stringify(result));
|
|
71
|
+
else {
|
|
72
|
+
if (failed)
|
|
73
|
+
logger.warn(`Design ${argv[0]} did not pass`);
|
|
74
|
+
else
|
|
75
|
+
logger.success(`Design ${argv[0]} complete`);
|
|
76
|
+
for (const key of ['status', 'url', 'output', 'revision'])
|
|
77
|
+
if (typeof result[key] === 'string')
|
|
78
|
+
display.keyValue(`${key[0].toUpperCase()}${key.slice(1)}`, result[key]);
|
|
79
|
+
if (argv[0] === 'open')
|
|
80
|
+
logger.dim('Press Ctrl+C to stop the local design studio.');
|
|
81
|
+
}
|
|
82
|
+
if (failed)
|
|
83
|
+
process.exitCode = 1;
|
|
84
|
+
}
|
|
85
|
+
export function registerDesignCommand(program) {
|
|
86
|
+
const resolve = (value) => path.resolve(program.opts().projectDir, value);
|
|
87
|
+
const design = program
|
|
88
|
+
.command('design')
|
|
89
|
+
.description('Validate, render, review, export, and inspect local designs');
|
|
90
|
+
design
|
|
91
|
+
.command('capabilities')
|
|
92
|
+
.description('Report the design command contract this CLI and its workflow package serve')
|
|
93
|
+
.option('--json', 'emit machine-readable output', false)
|
|
94
|
+
.action(async (_options, command) => {
|
|
95
|
+
const result = await readDesignCapabilities(OPENPLANR_VERSION);
|
|
96
|
+
if (command.opts().json)
|
|
97
|
+
display.line(JSON.stringify(result));
|
|
98
|
+
else if (!result.ok) {
|
|
99
|
+
logger.warn(result.problem);
|
|
100
|
+
logger.dim(result.recovery);
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
display.keyValue('CLI', result.cli);
|
|
104
|
+
display.keyValue('Workflow package', result.pipeline);
|
|
105
|
+
display.keyValue('Design contract', `${result.contract} (serves ${result.supported.min} to ${result.supported.max})`);
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
for (const [name, description, options] of DOCUMENT_COMMANDS) {
|
|
109
|
+
const command = design.command(`${name} <file>`).description(description);
|
|
110
|
+
for (const option of options())
|
|
111
|
+
command.addOption(option);
|
|
112
|
+
command
|
|
113
|
+
.option('--json', 'emit machine-readable output', false)
|
|
114
|
+
.action((file, _options, self) => run(self, [name, resolve(file), ...forwarded(self, resolve)]));
|
|
115
|
+
}
|
|
116
|
+
const studio = design.command('studio').description('Report or stop the local design studio');
|
|
117
|
+
for (const action of ['status', 'stop']) {
|
|
118
|
+
studio
|
|
119
|
+
.command(`${action} <file>`)
|
|
120
|
+
.description(action === 'status'
|
|
121
|
+
? 'Report whether the design’s local studio is running'
|
|
122
|
+
: 'Stop the design’s local studio; feedback and arrangement are kept')
|
|
123
|
+
.option('--instance-id <id>', 'an exact studio service, from studio status')
|
|
124
|
+
.option('--json', 'emit machine-readable output', false)
|
|
125
|
+
.action((file, _options, self) => run(self, ['studio', resolve(file), '--action', action, ...forwarded(self, resolve)]));
|
|
126
|
+
}
|
|
127
|
+
design
|
|
128
|
+
.command('fonts')
|
|
129
|
+
.description('Download open-license fonts into a design')
|
|
130
|
+
.command('fetch')
|
|
131
|
+
.description('Download up to two open-license font families into the design sources')
|
|
132
|
+
.option('--family <name:weights>', 'a family and its weights, such as "Inter:400,700"; repeat for a second family', (value, previous) => [...previous, value], [])
|
|
133
|
+
.option('--dest <dir>', 'the design’s font directory, such as source/assets/fonts')
|
|
134
|
+
.option('--json', 'emit machine-readable output', false)
|
|
135
|
+
.action((_options, self) => run(self, ['fonts', 'fetch', ...forwarded(self, resolve)]));
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=design.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"design.js","sourceRoot":"","sources":["../../../src/cli/commands/design.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAgB,MAAM,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EACL,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEnE,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;AAEjE,MAAM,IAAI,GAAG,GAAG,EAAE,CAChB,IAAI,MAAM,CAAC,eAAe,EAAE,mCAAmC,CAAC,CAAC,OAAO,CAAC;I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ourceRoot":"","sources":["../../../../src/cli/commands/groups/operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/groups/operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUzC,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CASjE"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { registerArtifactCommand } from '../artifact.js';
|
|
2
2
|
import { registerCompanyCommand } from '../company.js';
|
|
3
3
|
import { registerDashboardCommand } from '../dashboard.js';
|
|
4
|
+
import { registerDesignCommand } from '../design.js';
|
|
4
5
|
import { registerDiagramCommand } from '../diagram/index.js';
|
|
5
6
|
import { registerLandCommand } from '../land.js';
|
|
6
7
|
import { registerLinearCommand } from '../linear.js';
|
|
@@ -9,6 +10,7 @@ export function registerOperationsCommands(program) {
|
|
|
9
10
|
registerArtifactCommand(program);
|
|
10
11
|
registerCompanyCommand(program);
|
|
11
12
|
registerDashboardCommand(program);
|
|
13
|
+
registerDesignCommand(program);
|
|
12
14
|
registerDiagramCommand(program);
|
|
13
15
|
registerLinearCommand(program);
|
|
14
16
|
registerOperateCommand(program);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/cli/commands/groups/operations.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,qB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,CAAC,OAAO,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"src": "../../../node_modules/@fontsource-variable/geist/files/geist-vietnamese-wght-normal.woff2"
|
|
45
45
|
},
|
|
46
46
|
"index.html": {
|
|
47
|
-
"file": "assets/index-
|
|
47
|
+
"file": "assets/index-B-l_941W.js",
|
|
48
48
|
"name": "index",
|
|
49
49
|
"src": "index.html",
|
|
50
50
|
"isEntry": true,
|
|
@@ -71,5 +71,5 @@ Error generating stack: `+e.message+`
|
|
|
71
71
|
`),i=r.find(e=>e.startsWith(`event:`))?.slice(6).trim(),a=r.filter(e=>e.startsWith(`data:`)).map(e=>e.slice(5).trimStart()).join(`
|
|
72
72
|
`);a&&e.reconciler.ingestSseFrame(a,i),n=s.indexOf(`
|
|
73
73
|
|
|
74
|
-
`)}if(t.done){if(s.trim())return Q(`$`,`Planning live response ended mid-frame`);break}}}finally{a.releaseLock()}})().catch(e=>{if(!t.signal.aborted)throw e instanceof I?e:new I(`$`,`Planning live response failed safely`)}).finally(()=>e.signal?.removeEventListener(`abort`,n));return Object.freeze({completion:a,close:()=>{t.abort(),e.reconciler.dispose(),e.signal?.removeEventListener(`abort`,n)}})}var DM=s({planningRuntime:()=>OM}),OM=Object.freeze({connectSse:EM,createSseReconciler:bM,encodeCheckpoint:TM,fetchGraph:CM,parseGraphEnvelope:hM}),kM=Object.freeze({create:z}),AM=Object.freeze({ValidationError:I,isValidatedState:V,parseSafeError:Le,parseState:it,statePolicy:ot}),jM=Object.freeze({parse:A}),MM=Object.freeze({connectSse:KC,createSseReconciler:GC}),NM=s({dashboardRuntime:()=>PM}),PM=Object.freeze({identity:kM,projection:AM,routing:jM,transport:MM}),{operateRuntime:FM}=Ij,{planningRuntime:IM}=DM,{dashboardRuntime:$}=NM,LM=new Set([`ready`,`read-only`,`stale`,`partial`,`blocked`,`offline`]),RM=$.projection.parseState({kind:`booting`,binding:null,data:null,reasonCodes:[],error:null,mutationEnabled:!1,policy:$.projection.statePolicy(`booting`)}),zM=$.routing.parse(`#/overview`);function BM(e){return`DASHBOARD_${e.toUpperCase().replace(`-`,`_`)}`}function VM(e){return $.projection.parseState({kind:`loading`,binding:e,data:null,reasonCodes:[],error:null,mutationEnabled:!1,policy:$.projection.statePolicy(`loading`)},{currentBinding:e})}function HM(e,t=null){return $.projection.parseState({kind:`unavailable`,binding:e,data:null,reasonCodes:[`DASHBOARD_UNAVAILABLE`],error:t,mutationEnabled:!1,policy:$.projection.statePolicy(`unavailable`)},{currentBinding:e})}function UM(e,t=!1){let n=(typeof e==`object`&&e&&!Array.isArray(e)?e:{}).code===`DASHBOARD_RESPONSE_INVALID`||e instanceof $.projection.ValidationError;return $.projection.parseSafeError({code:t||!n?`DASHBOARD_READ_FAILED`:`DASHBOARD_RESPONSE_INVALID`,retryable:!1,context:{operation:`dashboard.projection.read`}})}function WM(e,t){let n=t??UM(void 0);if(n.code!==`DASHBOARD_RESPONSE_INVALID`)return HM(e,n);let r=$.projection.parseSafeError({code:`DASHBOARD_RESPONSE_INVALID`,retryable:!1,context:{}});return $.projection.parseState({kind:`corrupt`,binding:null,data:null,reasonCodes:[`DASHBOARD_CORRUPT`],error:r,mutationEnabled:!1,policy:$.projection.statePolicy(`corrupt`)})}function GM(e,t,n,r,i=!1,a=null){if(!LM.has(e)&&(e!==`refreshing`||t.productArea!==`planning`))throw Error(`Unsupported owner presentation state.`);return $.projection.parseState({kind:e,binding:t,data:n,reasonCodes:e===`ready`?[]:[BM(e)],error:a,mutationEnabled:e===`ready`&&i,policy:$.projection.statePolicy(e)},{currentBinding:t,validateData:r})}function KM(e,t){return!$.projection.isValidatedState(e)||e.binding===null||e.data===null?e:$.projection.parseState({kind:`stale`,binding:e.binding,data:e.data,reasonCodes:[`DASHBOARD_STALE`],error:t,mutationEnabled:!1,policy:$.projection.statePolicy(`stale`)},{currentBinding:e.binding,validateData:e=>e!==null})}function qM(e,t){return $.projection.parseState({kind:e,binding:t,data:null,reasonCodes:[BM(e)],error:null,mutationEnabled:!1,policy:$.projection.statePolicy(e)},{currentBinding:t})}function JM(e,t,n=!1){let r=(0,v.useRef)(t);r.current=t;let i=(0,v.useRef)(e);i.current=e;let a=(0,v.useRef)(null),o=(0,v.useRef)(null),[s,c]=(0,v.useState)(0),[l,u]=(0,v.useState)(()=>Object.freeze({key:null,revision:0,phase:`idle`,data:null,error:null})),d=(0,v.useCallback)(()=>c(e=>e+1),[]),f=(0,v.useCallback)(()=>{if(a.current!==null)return a.current;let e=i.current;if(e===null)return Promise.reject(Error(`Owner read is unavailable.`));let t=new AbortController;o.current?.abort(),o.current=t,u(t=>Object.freeze({key:e,revision:t.revision,phase:`loading`,data:t.key===e?t.data:null,error:null}));let n=r.current(t.signal).then(n=>{if(t.signal.aborted||i.current!==e)throw new DOMException(`Cancelled`,`AbortError`);return u(t=>Object.freeze({key:e,revision:t.revision,phase:`ready`,data:n,error:null})),n}).catch(n=>{throw!t.signal.aborted&&i.current===e&&u(t=>Object.freeze({key:e,revision:t.revision,phase:`failed`,data:t.key===e?t.data:null,error:UM(n,t.key===e&&t.data!==null)})),n}).finally(()=>{a.current===n&&(a.current=null),o.current===t&&(o.current=null)});return a.current=n,n},[]);(0,v.useEffect)(()=>{if(o.current?.abort(),o.current=null,a.current=null,e===null){u(Object.freeze({key:null,revision:s,phase:`idle`,data:null,error:null}));return}let t=new AbortController;return u(t=>Object.freeze({key:e,revision:s,phase:`loading`,data:t.key===e?t.data:null,error:null})),r.current(t.signal).then(n=>{t.signal.aborted||u(Object.freeze({key:e,revision:s,phase:`ready`,data:n,error:null}))}).catch(n=>{t.signal.aborted||u(t=>Object.freeze({key:e,revision:s,phase:`failed`,data:t.key===e?t.data:null,error:UM(n,t.key===e&&t.data!==null)}))}),()=>t.abort()},[e,s]);let p=l.key===e&&l.revision===s,m=p?l.phase:e===null?`idle`:`loading`,h=p||n&&l.key===e?l.data:null,g=p?l.error:null;return(0,v.useMemo)(()=>Object.freeze({phase:m,data:h,error:g,refetch:d,reconcile:f}),[h,g,m,f,d])}function YM(e){return e===null?null:JSON.stringify(e)}function XM(e){return e.product===`planning`?e:zM}function ZM(e){return e.kind===`operate.evidence`||e.kind===`operate.evidence-item`?`evidence`:e.kind===`operate.outcomes`?`outcomes`:e.kind===`operate.outcome`?`outcome`:e.kind===`operate.history`?`history`:null}function QM(e){return e.kind===`operate.actions`||e.kind===`operate.action`||e.kind===`operate.action-planning`||e.kind===`operate.inbox`||e.kind===`operate.inbox-item`||e.kind===`operate.recovery`}function $M(e){return e.kind===`operate.action-planning`?{kind:`operate.action`,product:`operate`,subjectId:e.subjectId}:e}function eN(e){return Object.freeze({eventHead:e.payload.eventHead,viewHash:e.payload.viewHash})}function tN(e){let t=e.payload.status;if(!LM.has(t))throw new $.projection.ValidationError(`$.payload.status`,`contains an unsupported display status`);return t}function nN(e){return e.payload.status===`terminal`?`read-only`:tN(e)}function rN(e,t){if(e.data===null)return e.phase===`loading`||e.phase===`idle`?VM(t):WM(t,e.error);let n=$.identity.create({...t,eventHead:e.data.payload.sourceEventHead,viewHash:e.data.payload.sourceViewHash});return iN(e,n,e.data,FM.review.createValidator(n),nN(e.data),e.data.payload.mutationEnabled)}function iN(e,t,n,r,i,a=!1){let o=e.phase===`failed`?`stale`:e.phase===`loading`||e.phase===`idle`?`refreshing`:i;try{return GM(o,t,n,r,a,o===`stale`?e.error??UM(void 0,!0):null)}catch(e){return WM(t,UM(e))}}function aN(e,t){return e.data===null?e.phase===`loading`||e.phase===`idle`?VM(t):WM(t,e.error):iN(e,$.identity.create({...t,eventHead:e.data.cursor.eventHead,viewHash:e.data.cursor.viewHash}),e.data,e=>{try{return IM.parseGraphEnvelope(e,t),!0}catch{return!1}},`ready`)}function oN(e,t,n,r){if(e.data===null)return e.phase===`loading`||e.phase===`idle`?VM(t):WM(t,e.error);let i=$.identity.create({...t,...eN(e.data)}),a=n===`today`?FM.today.createValidator(i):FM.cycles.createListValidator(i);return e.phase===`ready`&&n===`today`&&e.data.payload.surface===`today`&&e.data.payload.status===`ready`&&e.data.payload.data.activeCycle===null?a(e.data)?r?r.phase===`loading`||r.phase===`idle`?iN(Object.freeze({...e,phase:`loading`,error:null}),i,e.data,a,`ready`):r.phase===`failed`?iN(Object.freeze({...e,phase:`failed`,error:r.error}),i,e.data,a,`ready`):r.data?.payload.surface===`cycles`?qM(r.data.payload.data.cycles.length===0?`first-use`:`empty`,i):WM(i,UM(new $.projection.ValidationError(`$.payload.surface`,`does not contain the required cycles display`))):VM(i):WM(i,UM(new $.projection.ValidationError(`$.data`,`failed its owner-boundary contract`))):iN(e,i,e.data,a,tN(e.data),e.data.payload.mutationEnabled)}function sN(e){if(e.subjectId===null)throw Error(`Action display identity requires a subject.`);return $.identity.create({...e,route:`#/operate/actions/${encodeURIComponent(e.subjectId)}`})}function cN(e,t,n){if(e.data===null)return e.phase===`loading`||e.phase===`idle`?VM(t):WM(t,e.error);let r=$.identity.create({...t,...eN(e.data)}),i;if(n.kind===`operate.actions`)i=FM.actions.createListValidator(r);else if(n.kind===`operate.action`||n.kind===`operate.action-planning`){let e=n.kind===`operate.action-planning`?sN(r):r;i=FM.actions.createDetailValidator(e)}else if(n.kind===`operate.inbox`||n.kind===`operate.inbox-item`)i=FM.actions.createInboxValidator(r);else if(n.kind===`operate.recovery`)i=FM.actions.createRecoveryValidator(r);else return HM(r);return iN(e,r,e.data,i,tN(e.data),n.kind!==`operate.action-planning`&&e.data.payload.mutationEnabled)}function lN(e,t){let n=e?.origin??null,r=JSON.stringify(t),[i,a]=(0,v.useState)(null),o=e?.queryRoots.planning??null,s=e?.queryRoots.operate??null,c=(0,v.useMemo)(()=>XM(t),[t]),l=(0,v.useMemo)(()=>o?FM.transport.identityFromRoot(o,zM):null,[o]),u=(0,v.useMemo)(()=>o?FM.transport.identityFromRoot(o,c):null,[o,c]),d=JM(l?JSON.stringify(l):null,e=>{if(!n||!l)throw Error(`Planning query root is unavailable.`);return IM.fetchGraph({origin:n,identity:l,signal:e})},!0),f=YM(s),p=JM(f,e=>{if(!n||!s)throw Error(`Operate query root is unavailable.`);return FM.transport.fetchRootDisplay({origin:n,root:s,surface:`today`,signal:e})}),m=JM(f,e=>{if(!n||!s)throw Error(`Operate query root is unavailable.`);return FM.transport.fetchRootDisplay({origin:n,root:s,surface:`cycles`,signal:e})}),h=p.data?.payload.surface===`today`?p.data:null,g=h?.payload.surface===`today`?h.payload.data.activeCycle?.cycleId??null:null,_=t.kind===`operate.cycle`?t.subjectId:t.kind===`operate.review`?t.cycleId:g,y=h?eN(h):null,b=(0,v.useMemo)(()=>s&&t.product===`operate`&&_&&y?FM.transport.identityFromRoot(s,t,{cycleId:_,eventHead:y.eventHead,viewHash:y.viewHash}):null,[y,s,t,_]),x=n&&s&&b?JSON.stringify({root:s,binding:b}):null,S=(0,v.useMemo)(()=>s&&t.kind===`operate.review`?FM.transport.identityFromRoot(s,t,{cycleId:t.cycleId}):null,[s,t]),C=JM(n&&S?JSON.stringify({root:s,route:S.route}):null,e=>{if(!n||!s||t.kind!==`operate.review`)throw Error(`Operate Review query custody is incomplete.`);return FM.review.fetch({origin:n,root:s,cycleId:t.cycleId,reviewId:t.subjectId,signal:e})}),w=(0,v.useMemo)(()=>$M(t),[t]),T=(0,v.useMemo)(()=>s&&QM(t)&&_&&y?FM.transport.identityFromRoot(s,w,{cycleId:_,eventHead:y.eventHead,viewHash:y.viewHash}):null,[w,y,s,t,_]),E=n&&s&&T?JSON.stringify({root:s,binding:T}):null,D=ZM(t),O=JM(D?x:null,e=>{if(!n||!s||!_||!D)throw Error(`Operate audit query custody is incomplete.`);return FM.transport.fetchAuditDisplay({origin:n,root:s,route:t,surface:D,cycleId:_,signal:e})}),k=JM(t.kind===`operate.cycle`?x:null,e=>{if(!n||!s||t.kind!==`operate.cycle`)throw Error(`Operate Cycle query custody is incomplete.`);return FM.transport.fetchCycleDisplay({origin:n,root:s,cycleId:t.subjectId,signal:e})}),A=JM(QM(t)?E:null,e=>{if(!n||!T)throw Error(`Operate route display custody is incomplete.`);if(t.kind===`operate.actions`)return FM.actions.fetchList({origin:n,identity:T,signal:e});if(t.kind===`operate.action`||t.kind===`operate.action-planning`)return FM.actions.fetchDetail({origin:n,identity:T,signal:e});if(t.kind===`operate.inbox`||t.kind===`operate.inbox-item`)return FM.actions.fetchInbox({origin:n,identity:T,signal:e});if(t.kind===`operate.recovery`)return FM.actions.fetchRecovery({origin:n,identity:T,signal:e});throw Error(`Operate route does not own a bound display read.`)}),j=(0,v.useMemo)(()=>u?aN(d,u):RM,[u,d]),M=(0,v.useMemo)(()=>{if(!s)return null;let e=$.routing.parse(`#/operate/today`);return FM.transport.identityFromRoot(s,e,{cycleId:g})},[g,s]),N=(0,v.useMemo)(()=>M?oN(p,M,`today`,m):RM,[m,M,p]),ee=(0,v.useMemo)(()=>{if(!N.binding||!_)return null;let e=FM.today.resolveModel({current:N},N.binding);return e?.kind===`surface`?FM.review.uniqueNavigationForCycle(e,_):null},[_,N]),P=(0,v.useMemo)(()=>s?FM.transport.identityFromRoot(s,$.routing.parse(`#/operate/cycles`)):null,[s]),F=(0,v.useMemo)(()=>P?oN(m,P,`cycles`):RM,[P,m]),te=(0,v.useMemo)(()=>{if(!s||m.data?.payload.surface!==`cycles`)return Object.freeze([]);let e=eN(m.data),t=$.routing.parse(`#/operate/cycles`);return Object.freeze(m.data.payload.data.cycles.map(n=>FM.transport.identityFromRoot(s,t,{cycleId:n.cycleId,eventHead:e.eventHead,viewHash:e.viewHash})))},[m,s]),ne=(0,v.useMemo)(()=>{if(t.product===`planning`)return Object.freeze({binding:j.binding,projection:j});if(t.product!==`operate`||!s)return Object.freeze({binding:null,projection:RM});if(t.kind===`operate.today`)return Object.freeze({binding:N.binding,projection:N});if(t.kind===`operate.cycles`)return Object.freeze({binding:F.binding,projection:F});if(t.kind===`operate.review`){if(!S)return Object.freeze({binding:null,projection:RM});let e=rN(C,S);return Object.freeze({binding:e.binding,projection:e})}if(!y||!_)return Object.freeze({binding:null,projection:RM});let e=b;if(!e)return Object.freeze({binding:null,projection:RM});if(t.kind===`operate.cycle`){if(k.data===null){let t=k.phase===`loading`||k.phase===`idle`?VM(e):WM(e,k.error);return Object.freeze({binding:t.binding,projection:t})}let t=$.identity.create({...e,...eN(k.data)});return Object.freeze({binding:t,projection:iN(k,t,k.data,FM.cycles.createDetailValidator(t),tN(k.data),k.data.payload.mutationEnabled)})}if(D){if(O.data===null){let t=O.phase===`loading`||O.phase===`idle`?VM(e):WM(e,O.error);return Object.freeze({binding:t.binding,projection:t})}let t=$.identity.create({...e,...eN(O.data)}),n=D===`evidence`?FM.audit.createEvidenceValidator(t):D===`outcomes`||D===`outcome`?FM.audit.createOutcomeValidator(t):FM.audit.createHistoryValidator(t);return Object.freeze({binding:t,projection:iN(O,t,O.data,n,tN(O.data),!1)})}return QM(t)?Object.freeze({binding:e,projection:cN(A,e,t)}):Object.freeze({binding:e,projection:VM(e)})},[O,D,A,b,k,y,F,s,j,C,S,t,_,N]);(0,v.useEffect)(()=>{a(e=>e!==null&&e.routeKey!==r?null:e)},[r]);let re=(0,v.useMemo)(()=>i!==null&&i.routeKey===r&&(!$.projection.isValidatedState(ne.projection)||ne.projection.data===null)?Object.freeze({binding:i.binding,projection:i.projection}):ne,[i,ne,r]);(0,v.useEffect)(()=>{if(!n||!d.data||d.phase!==`ready`||!l)return;let e=$.identity.create({...l,eventHead:d.data.cursor.eventHead,viewHash:d.data.cursor.viewHash}),t=!0,r=IM.createSseReconciler({identity:e,initial:d.data,isCurrent:()=>t,onSnapshot:()=>void 0,onPatch:()=>d.refetch(),onRefetch:()=>d.refetch(),onStale:()=>d.refetch()}),i=IM.connectSse({origin:n,identity:e,reconciler:r,lastEventId:IM.encodeCheckpoint(d.data.cursor)});return i.completion.catch(()=>void 0),()=>{t=!1,i.close()}},[n,l,d]),(0,v.useEffect)(()=>{if(!n||!s||!h||!M)return;let e=eN(h),t=$.identity.create({...M,...e}),r=!0,i=$.transport.createSseReconciler({identity:t,isCurrent:()=>r,onSnapshot:(t,n)=>{(n.eventHead.sequence!==e.eventHead?.sequence||n.eventHead.hash!==e.eventHead?.hash||n.viewHash!==e.viewHash)&&(p.refetch(),m.refetch())},onPatch:()=>{p.refetch(),m.refetch()},onRefetch:()=>{p.refetch(),m.refetch()},onStale:()=>{p.refetch(),m.refetch()}}),a=$.transport.connectSse({origin:n,identity:t,reconciler:i});return a.completion.catch(()=>void 0),()=>{r=!1,a.close()}},[m,n,s,h,M,p]);let ie=(0,v.useCallback)(async()=>{let e=re;e.binding!==null&&$.projection.isValidatedState(e.projection)&&e.projection.data!==null&&a(Object.freeze({routeKey:r,binding:e.binding,projection:e.projection}));try{let e;if(t.kind===`operate.review`&&S){let t=await C.reconcile();e=rN(Object.freeze({phase:`ready`,data:t,error:null,refetch:C.refetch,reconcile:C.reconcile}),S)}else if(QM(t)&&b){let n=await A.reconcile();e=cN(Object.freeze({phase:`ready`,data:n,error:null,refetch:A.refetch,reconcile:A.reconcile}),b,t)}else if(t.product===`planning`&&u){let t=await d.reconcile();e=aN(Object.freeze({phase:`ready`,data:t,error:null,refetch:d.refetch,reconcile:d.reconcile}),u)}else throw new $.projection.ValidationError(`$.route`,`does not own an exact reconciliation read`);if(!$.projection.isValidatedState(e)||e.data===null)throw new $.projection.ValidationError(`$.projection`,`did not return a verified projection`);return a(null),e}catch(t){let n=e.binding!==null&&$.projection.isValidatedState(e.projection)&&e.projection.data!==null,i=UM(t,n),o=n?KM(e.projection,i):e.binding===null?e.projection:WM(e.binding,i);return n&&e.binding!==null&&a(Object.freeze({routeKey:r,binding:e.binding,projection:o})),o}},[A,b,re,u,d,C,S,t,r]);return Object.freeze({binding:re.binding,projection:re.projection,planningProjection:j,operateCyclesProjection:F,operateSearchBindings:te,operateReviewNavigation:ee,refetchCurrent:ie})}function uN(e){return e===void 0?typeof window>`u`?``:window.location.hash:e}function dN(e,t){return e!==void 0||typeof window>`u`?()=>void 0:(window.addEventListener(`hashchange`,t),()=>window.removeEventListener(`hashchange`,t))}function fN({buildId:e,initialHash:t,identity:n,connection:r,bootstrap:i,bootPhase:a,bootDetail:o}){let s=(0,v.useSyncExternalStore)(e=>dN(t,e),()=>uN(t),()=>uN(t)),c=i===void 0&&r===void 0,[l,u]=(0,v.useState)(i??null),[d,f]=(0,v.useState)(a??(c?`checking`:`compatible`)),[p,m]=(0,v.useState)(o??null);(0,v.useEffect)(()=>{if(!c)return;let t=new AbortController;return f(`checking`),m(`Waiting for OpenPlanr to return a validated bootstrap envelope.`),rj(e,{signal:t.signal}).then(e=>{u(e.bootstrap),f(e.phase===`compatible`?`compatible`:e.phase),m(e.detail)}).catch(()=>void 0),()=>t.abort()},[e,c]);let h=(0,v.useMemo)(()=>r??Et(l,e,p),[l,p,e,r]),g=(0,v.useMemo)(()=>n??Dt(l),[l,n]),_=(0,v.useMemo)(()=>A(s),[s]),y=_.kind===`system.diagnostics`||d===`incompatible`||h.state===`incompatible`,b=lN(d===`compatible`&&h.state!==`incompatible`&&_.product!==null?l:null,_);return(0,F.jsxs)(mt,{buildId:e,initialHash:y?j(E):t,identity:g,connection:h,bootstrap:l,bootPhase:d,bootDetail:p,binding:b.binding,projection:b.projection,planningProjection:b.planningProjection,operateCyclesProjection:b.operateCyclesProjection,operateSearchBindings:b.operateSearchBindings,operateReviewNavigation:b.operateReviewNavigation,refetchCurrent:b.refetchCurrent,children:[(0,F.jsx)(_t,{}),(0,F.jsx)(WA,{})]})}var pN=document.querySelector(`#root`);if(!pN)throw Error(`OpenPlanr dashboard root element is missing.`);(0,y.createRoot)(pN).render((0,F.jsx)(v.StrictMode,{children:(0,F.jsx)(fN,{buildId:`dashboard-0.1.23-ea0e2e50f5be01cc`})}));
|
|
75
|
-
//# sourceMappingURL=index-
|
|
74
|
+
`)}if(t.done){if(s.trim())return Q(`$`,`Planning live response ended mid-frame`);break}}}finally{a.releaseLock()}})().catch(e=>{if(!t.signal.aborted)throw e instanceof I?e:new I(`$`,`Planning live response failed safely`)}).finally(()=>e.signal?.removeEventListener(`abort`,n));return Object.freeze({completion:a,close:()=>{t.abort(),e.reconciler.dispose(),e.signal?.removeEventListener(`abort`,n)}})}var DM=s({planningRuntime:()=>OM}),OM=Object.freeze({connectSse:EM,createSseReconciler:bM,encodeCheckpoint:TM,fetchGraph:CM,parseGraphEnvelope:hM}),kM=Object.freeze({create:z}),AM=Object.freeze({ValidationError:I,isValidatedState:V,parseSafeError:Le,parseState:it,statePolicy:ot}),jM=Object.freeze({parse:A}),MM=Object.freeze({connectSse:KC,createSseReconciler:GC}),NM=s({dashboardRuntime:()=>PM}),PM=Object.freeze({identity:kM,projection:AM,routing:jM,transport:MM}),{operateRuntime:FM}=Ij,{planningRuntime:IM}=DM,{dashboardRuntime:$}=NM,LM=new Set([`ready`,`read-only`,`stale`,`partial`,`blocked`,`offline`]),RM=$.projection.parseState({kind:`booting`,binding:null,data:null,reasonCodes:[],error:null,mutationEnabled:!1,policy:$.projection.statePolicy(`booting`)}),zM=$.routing.parse(`#/overview`);function BM(e){return`DASHBOARD_${e.toUpperCase().replace(`-`,`_`)}`}function VM(e){return $.projection.parseState({kind:`loading`,binding:e,data:null,reasonCodes:[],error:null,mutationEnabled:!1,policy:$.projection.statePolicy(`loading`)},{currentBinding:e})}function HM(e,t=null){return $.projection.parseState({kind:`unavailable`,binding:e,data:null,reasonCodes:[`DASHBOARD_UNAVAILABLE`],error:t,mutationEnabled:!1,policy:$.projection.statePolicy(`unavailable`)},{currentBinding:e})}function UM(e,t=!1){let n=(typeof e==`object`&&e&&!Array.isArray(e)?e:{}).code===`DASHBOARD_RESPONSE_INVALID`||e instanceof $.projection.ValidationError;return $.projection.parseSafeError({code:t||!n?`DASHBOARD_READ_FAILED`:`DASHBOARD_RESPONSE_INVALID`,retryable:!1,context:{operation:`dashboard.projection.read`}})}function WM(e,t){let n=t??UM(void 0);if(n.code!==`DASHBOARD_RESPONSE_INVALID`)return HM(e,n);let r=$.projection.parseSafeError({code:`DASHBOARD_RESPONSE_INVALID`,retryable:!1,context:{}});return $.projection.parseState({kind:`corrupt`,binding:null,data:null,reasonCodes:[`DASHBOARD_CORRUPT`],error:r,mutationEnabled:!1,policy:$.projection.statePolicy(`corrupt`)})}function GM(e,t,n,r,i=!1,a=null){if(!LM.has(e)&&(e!==`refreshing`||t.productArea!==`planning`))throw Error(`Unsupported owner presentation state.`);return $.projection.parseState({kind:e,binding:t,data:n,reasonCodes:e===`ready`?[]:[BM(e)],error:a,mutationEnabled:e===`ready`&&i,policy:$.projection.statePolicy(e)},{currentBinding:t,validateData:r})}function KM(e,t){return!$.projection.isValidatedState(e)||e.binding===null||e.data===null?e:$.projection.parseState({kind:`stale`,binding:e.binding,data:e.data,reasonCodes:[`DASHBOARD_STALE`],error:t,mutationEnabled:!1,policy:$.projection.statePolicy(`stale`)},{currentBinding:e.binding,validateData:e=>e!==null})}function qM(e,t){return $.projection.parseState({kind:e,binding:t,data:null,reasonCodes:[BM(e)],error:null,mutationEnabled:!1,policy:$.projection.statePolicy(e)},{currentBinding:t})}function JM(e,t,n=!1){let r=(0,v.useRef)(t);r.current=t;let i=(0,v.useRef)(e);i.current=e;let a=(0,v.useRef)(null),o=(0,v.useRef)(null),[s,c]=(0,v.useState)(0),[l,u]=(0,v.useState)(()=>Object.freeze({key:null,revision:0,phase:`idle`,data:null,error:null})),d=(0,v.useCallback)(()=>c(e=>e+1),[]),f=(0,v.useCallback)(()=>{if(a.current!==null)return a.current;let e=i.current;if(e===null)return Promise.reject(Error(`Owner read is unavailable.`));let t=new AbortController;o.current?.abort(),o.current=t,u(t=>Object.freeze({key:e,revision:t.revision,phase:`loading`,data:t.key===e?t.data:null,error:null}));let n=r.current(t.signal).then(n=>{if(t.signal.aborted||i.current!==e)throw new DOMException(`Cancelled`,`AbortError`);return u(t=>Object.freeze({key:e,revision:t.revision,phase:`ready`,data:n,error:null})),n}).catch(n=>{throw!t.signal.aborted&&i.current===e&&u(t=>Object.freeze({key:e,revision:t.revision,phase:`failed`,data:t.key===e?t.data:null,error:UM(n,t.key===e&&t.data!==null)})),n}).finally(()=>{a.current===n&&(a.current=null),o.current===t&&(o.current=null)});return a.current=n,n},[]);(0,v.useEffect)(()=>{if(o.current?.abort(),o.current=null,a.current=null,e===null){u(Object.freeze({key:null,revision:s,phase:`idle`,data:null,error:null}));return}let t=new AbortController;return u(t=>Object.freeze({key:e,revision:s,phase:`loading`,data:t.key===e?t.data:null,error:null})),r.current(t.signal).then(n=>{t.signal.aborted||u(Object.freeze({key:e,revision:s,phase:`ready`,data:n,error:null}))}).catch(n=>{t.signal.aborted||u(t=>Object.freeze({key:e,revision:s,phase:`failed`,data:t.key===e?t.data:null,error:UM(n,t.key===e&&t.data!==null)}))}),()=>t.abort()},[e,s]);let p=l.key===e&&l.revision===s,m=p?l.phase:e===null?`idle`:`loading`,h=p||n&&l.key===e?l.data:null,g=p?l.error:null;return(0,v.useMemo)(()=>Object.freeze({phase:m,data:h,error:g,refetch:d,reconcile:f}),[h,g,m,f,d])}function YM(e){return e===null?null:JSON.stringify(e)}function XM(e){return e.product===`planning`?e:zM}function ZM(e){return e.kind===`operate.evidence`||e.kind===`operate.evidence-item`?`evidence`:e.kind===`operate.outcomes`?`outcomes`:e.kind===`operate.outcome`?`outcome`:e.kind===`operate.history`?`history`:null}function QM(e){return e.kind===`operate.actions`||e.kind===`operate.action`||e.kind===`operate.action-planning`||e.kind===`operate.inbox`||e.kind===`operate.inbox-item`||e.kind===`operate.recovery`}function $M(e){return e.kind===`operate.action-planning`?{kind:`operate.action`,product:`operate`,subjectId:e.subjectId}:e}function eN(e){return Object.freeze({eventHead:e.payload.eventHead,viewHash:e.payload.viewHash})}function tN(e){let t=e.payload.status;if(!LM.has(t))throw new $.projection.ValidationError(`$.payload.status`,`contains an unsupported display status`);return t}function nN(e){return e.payload.status===`terminal`?`read-only`:tN(e)}function rN(e,t){if(e.data===null)return e.phase===`loading`||e.phase===`idle`?VM(t):WM(t,e.error);let n=$.identity.create({...t,eventHead:e.data.payload.sourceEventHead,viewHash:e.data.payload.sourceViewHash});return iN(e,n,e.data,FM.review.createValidator(n),nN(e.data),e.data.payload.mutationEnabled)}function iN(e,t,n,r,i,a=!1){let o=e.phase===`failed`?`stale`:e.phase===`loading`||e.phase===`idle`?`refreshing`:i;try{return GM(o,t,n,r,a,o===`stale`?e.error??UM(void 0,!0):null)}catch(e){return WM(t,UM(e))}}function aN(e,t){return e.data===null?e.phase===`loading`||e.phase===`idle`?VM(t):WM(t,e.error):iN(e,$.identity.create({...t,eventHead:e.data.cursor.eventHead,viewHash:e.data.cursor.viewHash}),e.data,e=>{try{return IM.parseGraphEnvelope(e,t),!0}catch{return!1}},`ready`)}function oN(e,t,n,r){if(e.data===null)return e.phase===`loading`||e.phase===`idle`?VM(t):WM(t,e.error);let i=$.identity.create({...t,...eN(e.data)}),a=n===`today`?FM.today.createValidator(i):FM.cycles.createListValidator(i);return e.phase===`ready`&&n===`today`&&e.data.payload.surface===`today`&&e.data.payload.status===`ready`&&e.data.payload.data.activeCycle===null?a(e.data)?r?r.phase===`loading`||r.phase===`idle`?iN(Object.freeze({...e,phase:`loading`,error:null}),i,e.data,a,`ready`):r.phase===`failed`?iN(Object.freeze({...e,phase:`failed`,error:r.error}),i,e.data,a,`ready`):r.data?.payload.surface===`cycles`?qM(r.data.payload.data.cycles.length===0?`first-use`:`empty`,i):WM(i,UM(new $.projection.ValidationError(`$.payload.surface`,`does not contain the required cycles display`))):VM(i):WM(i,UM(new $.projection.ValidationError(`$.data`,`failed its owner-boundary contract`))):iN(e,i,e.data,a,tN(e.data),e.data.payload.mutationEnabled)}function sN(e){if(e.subjectId===null)throw Error(`Action display identity requires a subject.`);return $.identity.create({...e,route:`#/operate/actions/${encodeURIComponent(e.subjectId)}`})}function cN(e,t,n){if(e.data===null)return e.phase===`loading`||e.phase===`idle`?VM(t):WM(t,e.error);let r=$.identity.create({...t,...eN(e.data)}),i;if(n.kind===`operate.actions`)i=FM.actions.createListValidator(r);else if(n.kind===`operate.action`||n.kind===`operate.action-planning`){let e=n.kind===`operate.action-planning`?sN(r):r;i=FM.actions.createDetailValidator(e)}else if(n.kind===`operate.inbox`||n.kind===`operate.inbox-item`)i=FM.actions.createInboxValidator(r);else if(n.kind===`operate.recovery`)i=FM.actions.createRecoveryValidator(r);else return HM(r);return iN(e,r,e.data,i,tN(e.data),n.kind!==`operate.action-planning`&&e.data.payload.mutationEnabled)}function lN(e,t){let n=e?.origin??null,r=JSON.stringify(t),[i,a]=(0,v.useState)(null),o=e?.queryRoots.planning??null,s=e?.queryRoots.operate??null,c=(0,v.useMemo)(()=>XM(t),[t]),l=(0,v.useMemo)(()=>o?FM.transport.identityFromRoot(o,zM):null,[o]),u=(0,v.useMemo)(()=>o?FM.transport.identityFromRoot(o,c):null,[o,c]),d=JM(l?JSON.stringify(l):null,e=>{if(!n||!l)throw Error(`Planning query root is unavailable.`);return IM.fetchGraph({origin:n,identity:l,signal:e})},!0),f=YM(s),p=JM(f,e=>{if(!n||!s)throw Error(`Operate query root is unavailable.`);return FM.transport.fetchRootDisplay({origin:n,root:s,surface:`today`,signal:e})}),m=JM(f,e=>{if(!n||!s)throw Error(`Operate query root is unavailable.`);return FM.transport.fetchRootDisplay({origin:n,root:s,surface:`cycles`,signal:e})}),h=p.data?.payload.surface===`today`?p.data:null,g=h?.payload.surface===`today`?h.payload.data.activeCycle?.cycleId??null:null,_=t.kind===`operate.cycle`?t.subjectId:t.kind===`operate.review`?t.cycleId:g,y=h?eN(h):null,b=(0,v.useMemo)(()=>s&&t.product===`operate`&&_&&y?FM.transport.identityFromRoot(s,t,{cycleId:_,eventHead:y.eventHead,viewHash:y.viewHash}):null,[y,s,t,_]),x=n&&s&&b?JSON.stringify({root:s,binding:b}):null,S=(0,v.useMemo)(()=>s&&t.kind===`operate.review`?FM.transport.identityFromRoot(s,t,{cycleId:t.cycleId}):null,[s,t]),C=JM(n&&S?JSON.stringify({root:s,route:S.route}):null,e=>{if(!n||!s||t.kind!==`operate.review`)throw Error(`Operate Review query custody is incomplete.`);return FM.review.fetch({origin:n,root:s,cycleId:t.cycleId,reviewId:t.subjectId,signal:e})}),w=(0,v.useMemo)(()=>$M(t),[t]),T=(0,v.useMemo)(()=>s&&QM(t)&&_&&y?FM.transport.identityFromRoot(s,w,{cycleId:_,eventHead:y.eventHead,viewHash:y.viewHash}):null,[w,y,s,t,_]),E=n&&s&&T?JSON.stringify({root:s,binding:T}):null,D=ZM(t),O=JM(D?x:null,e=>{if(!n||!s||!_||!D)throw Error(`Operate audit query custody is incomplete.`);return FM.transport.fetchAuditDisplay({origin:n,root:s,route:t,surface:D,cycleId:_,signal:e})}),k=JM(t.kind===`operate.cycle`?x:null,e=>{if(!n||!s||t.kind!==`operate.cycle`)throw Error(`Operate Cycle query custody is incomplete.`);return FM.transport.fetchCycleDisplay({origin:n,root:s,cycleId:t.subjectId,signal:e})}),A=JM(QM(t)?E:null,e=>{if(!n||!T)throw Error(`Operate route display custody is incomplete.`);if(t.kind===`operate.actions`)return FM.actions.fetchList({origin:n,identity:T,signal:e});if(t.kind===`operate.action`||t.kind===`operate.action-planning`)return FM.actions.fetchDetail({origin:n,identity:T,signal:e});if(t.kind===`operate.inbox`||t.kind===`operate.inbox-item`)return FM.actions.fetchInbox({origin:n,identity:T,signal:e});if(t.kind===`operate.recovery`)return FM.actions.fetchRecovery({origin:n,identity:T,signal:e});throw Error(`Operate route does not own a bound display read.`)}),j=(0,v.useMemo)(()=>u?aN(d,u):RM,[u,d]),M=(0,v.useMemo)(()=>{if(!s)return null;let e=$.routing.parse(`#/operate/today`);return FM.transport.identityFromRoot(s,e,{cycleId:g})},[g,s]),N=(0,v.useMemo)(()=>M?oN(p,M,`today`,m):RM,[m,M,p]),ee=(0,v.useMemo)(()=>{if(!N.binding||!_)return null;let e=FM.today.resolveModel({current:N},N.binding);return e?.kind===`surface`?FM.review.uniqueNavigationForCycle(e,_):null},[_,N]),P=(0,v.useMemo)(()=>s?FM.transport.identityFromRoot(s,$.routing.parse(`#/operate/cycles`)):null,[s]),F=(0,v.useMemo)(()=>P?oN(m,P,`cycles`):RM,[P,m]),te=(0,v.useMemo)(()=>{if(!s||m.data?.payload.surface!==`cycles`)return Object.freeze([]);let e=eN(m.data),t=$.routing.parse(`#/operate/cycles`);return Object.freeze(m.data.payload.data.cycles.map(n=>FM.transport.identityFromRoot(s,t,{cycleId:n.cycleId,eventHead:e.eventHead,viewHash:e.viewHash})))},[m,s]),ne=(0,v.useMemo)(()=>{if(t.product===`planning`)return Object.freeze({binding:j.binding,projection:j});if(t.product!==`operate`||!s)return Object.freeze({binding:null,projection:RM});if(t.kind===`operate.today`)return Object.freeze({binding:N.binding,projection:N});if(t.kind===`operate.cycles`)return Object.freeze({binding:F.binding,projection:F});if(t.kind===`operate.review`){if(!S)return Object.freeze({binding:null,projection:RM});let e=rN(C,S);return Object.freeze({binding:e.binding,projection:e})}if(!y||!_)return Object.freeze({binding:null,projection:RM});let e=b;if(!e)return Object.freeze({binding:null,projection:RM});if(t.kind===`operate.cycle`){if(k.data===null){let t=k.phase===`loading`||k.phase===`idle`?VM(e):WM(e,k.error);return Object.freeze({binding:t.binding,projection:t})}let t=$.identity.create({...e,...eN(k.data)});return Object.freeze({binding:t,projection:iN(k,t,k.data,FM.cycles.createDetailValidator(t),tN(k.data),k.data.payload.mutationEnabled)})}if(D){if(O.data===null){let t=O.phase===`loading`||O.phase===`idle`?VM(e):WM(e,O.error);return Object.freeze({binding:t.binding,projection:t})}let t=$.identity.create({...e,...eN(O.data)}),n=D===`evidence`?FM.audit.createEvidenceValidator(t):D===`outcomes`||D===`outcome`?FM.audit.createOutcomeValidator(t):FM.audit.createHistoryValidator(t);return Object.freeze({binding:t,projection:iN(O,t,O.data,n,tN(O.data),!1)})}return QM(t)?Object.freeze({binding:e,projection:cN(A,e,t)}):Object.freeze({binding:e,projection:VM(e)})},[O,D,A,b,k,y,F,s,j,C,S,t,_,N]);(0,v.useEffect)(()=>{a(e=>e!==null&&e.routeKey!==r?null:e)},[r]);let re=(0,v.useMemo)(()=>i!==null&&i.routeKey===r&&(!$.projection.isValidatedState(ne.projection)||ne.projection.data===null)?Object.freeze({binding:i.binding,projection:i.projection}):ne,[i,ne,r]);(0,v.useEffect)(()=>{if(!n||!d.data||d.phase!==`ready`||!l)return;let e=$.identity.create({...l,eventHead:d.data.cursor.eventHead,viewHash:d.data.cursor.viewHash}),t=!0,r=IM.createSseReconciler({identity:e,initial:d.data,isCurrent:()=>t,onSnapshot:()=>void 0,onPatch:()=>d.refetch(),onRefetch:()=>d.refetch(),onStale:()=>d.refetch()}),i=IM.connectSse({origin:n,identity:e,reconciler:r,lastEventId:IM.encodeCheckpoint(d.data.cursor)});return i.completion.catch(()=>void 0),()=>{t=!1,i.close()}},[n,l,d]),(0,v.useEffect)(()=>{if(!n||!s||!h||!M)return;let e=eN(h),t=$.identity.create({...M,...e}),r=!0,i=$.transport.createSseReconciler({identity:t,isCurrent:()=>r,onSnapshot:(t,n)=>{(n.eventHead.sequence!==e.eventHead?.sequence||n.eventHead.hash!==e.eventHead?.hash||n.viewHash!==e.viewHash)&&(p.refetch(),m.refetch())},onPatch:()=>{p.refetch(),m.refetch()},onRefetch:()=>{p.refetch(),m.refetch()},onStale:()=>{p.refetch(),m.refetch()}}),a=$.transport.connectSse({origin:n,identity:t,reconciler:i});return a.completion.catch(()=>void 0),()=>{r=!1,a.close()}},[m,n,s,h,M,p]);let ie=(0,v.useCallback)(async()=>{let e=re;e.binding!==null&&$.projection.isValidatedState(e.projection)&&e.projection.data!==null&&a(Object.freeze({routeKey:r,binding:e.binding,projection:e.projection}));try{let e;if(t.kind===`operate.review`&&S){let t=await C.reconcile();e=rN(Object.freeze({phase:`ready`,data:t,error:null,refetch:C.refetch,reconcile:C.reconcile}),S)}else if(QM(t)&&b){let n=await A.reconcile();e=cN(Object.freeze({phase:`ready`,data:n,error:null,refetch:A.refetch,reconcile:A.reconcile}),b,t)}else if(t.product===`planning`&&u){let t=await d.reconcile();e=aN(Object.freeze({phase:`ready`,data:t,error:null,refetch:d.refetch,reconcile:d.reconcile}),u)}else throw new $.projection.ValidationError(`$.route`,`does not own an exact reconciliation read`);if(!$.projection.isValidatedState(e)||e.data===null)throw new $.projection.ValidationError(`$.projection`,`did not return a verified projection`);return a(null),e}catch(t){let n=e.binding!==null&&$.projection.isValidatedState(e.projection)&&e.projection.data!==null,i=UM(t,n),o=n?KM(e.projection,i):e.binding===null?e.projection:WM(e.binding,i);return n&&e.binding!==null&&a(Object.freeze({routeKey:r,binding:e.binding,projection:o})),o}},[A,b,re,u,d,C,S,t,r]);return Object.freeze({binding:re.binding,projection:re.projection,planningProjection:j,operateCyclesProjection:F,operateSearchBindings:te,operateReviewNavigation:ee,refetchCurrent:ie})}function uN(e){return e===void 0?typeof window>`u`?``:window.location.hash:e}function dN(e,t){return e!==void 0||typeof window>`u`?()=>void 0:(window.addEventListener(`hashchange`,t),()=>window.removeEventListener(`hashchange`,t))}function fN({buildId:e,initialHash:t,identity:n,connection:r,bootstrap:i,bootPhase:a,bootDetail:o}){let s=(0,v.useSyncExternalStore)(e=>dN(t,e),()=>uN(t),()=>uN(t)),c=i===void 0&&r===void 0,[l,u]=(0,v.useState)(i??null),[d,f]=(0,v.useState)(a??(c?`checking`:`compatible`)),[p,m]=(0,v.useState)(o??null);(0,v.useEffect)(()=>{if(!c)return;let t=new AbortController;return f(`checking`),m(`Waiting for OpenPlanr to return a validated bootstrap envelope.`),rj(e,{signal:t.signal}).then(e=>{u(e.bootstrap),f(e.phase===`compatible`?`compatible`:e.phase),m(e.detail)}).catch(()=>void 0),()=>t.abort()},[e,c]);let h=(0,v.useMemo)(()=>r??Et(l,e,p),[l,p,e,r]),g=(0,v.useMemo)(()=>n??Dt(l),[l,n]),_=(0,v.useMemo)(()=>A(s),[s]),y=_.kind===`system.diagnostics`||d===`incompatible`||h.state===`incompatible`,b=lN(d===`compatible`&&h.state!==`incompatible`&&_.product!==null?l:null,_);return(0,F.jsxs)(mt,{buildId:e,initialHash:y?j(E):t,identity:g,connection:h,bootstrap:l,bootPhase:d,bootDetail:p,binding:b.binding,projection:b.projection,planningProjection:b.planningProjection,operateCyclesProjection:b.operateCyclesProjection,operateSearchBindings:b.operateSearchBindings,operateReviewNavigation:b.operateReviewNavigation,refetchCurrent:b.refetchCurrent,children:[(0,F.jsx)(_t,{}),(0,F.jsx)(WA,{})]})}var pN=document.querySelector(`#root`);if(!pN)throw Error(`OpenPlanr dashboard root element is missing.`);(0,y.createRoot)(pN).render((0,F.jsx)(v.StrictMode,{children:(0,F.jsx)(fN,{buildId:`dashboard-0.1.24-a45b8b75cef359dc`})}));
|
|
75
|
+
//# sourceMappingURL=index-B-l_941W.js.map
|