openplanr 3.1.1 → 3.3.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 +69 -0
- package/dist/cli/commands/groups/delivery.d.ts.map +1 -1
- package/dist/cli/commands/groups/delivery.js +2 -0
- package/dist/cli/commands/groups/delivery.js.map +1 -1
- package/dist/cli/commands/planning-artifacts.d.ts.map +1 -1
- package/dist/cli/commands/planning-artifacts.js +22 -12
- package/dist/cli/commands/planning-artifacts.js.map +1 -1
- package/dist/cli/commands/ship.d.ts +3 -0
- package/dist/cli/commands/ship.d.ts.map +1 -0
- package/dist/cli/commands/ship.js +65 -0
- package/dist/cli/commands/ship.js.map +1 -0
- package/dist/cli/commands/spec.d.ts +2 -1
- package/dist/cli/commands/spec.d.ts.map +1 -1
- package/dist/cli/commands/spec.js +45 -5
- package/dist/cli/commands/spec.js.map +1 -1
- package/dist/dashboard/.vite/manifest.json +1 -1
- package/dist/dashboard/assets/index-B_96uzCl.js +572 -0
- package/dist/dashboard/assets/index-B_96uzCl.js.map +1 -0
- package/dist/dashboard/dashboard-manifest.json +10 -10
- package/dist/dashboard/index.html +1 -1
- package/dist/models/schema.d.ts +39 -23
- package/dist/models/schema.d.ts.map +1 -1
- package/dist/models/schema.js +19 -12
- package/dist/models/schema.js.map +1 -1
- package/dist/models/types.d.ts +6 -0
- package/dist/models/types.d.ts.map +1 -1
- package/dist/services/claude-plugin-service.d.ts +5 -0
- package/dist/services/claude-plugin-service.d.ts.map +1 -1
- package/dist/services/claude-plugin-service.js +18 -2
- package/dist/services/claude-plugin-service.js.map +1 -1
- package/dist/services/codex-plugin-service.d.ts.map +1 -1
- package/dist/services/codex-plugin-service.js +11 -3
- package/dist/services/codex-plugin-service.js.map +1 -1
- package/dist/services/id-service.d.ts +1 -5
- package/dist/services/id-service.d.ts.map +1 -1
- package/dist/services/id-service.js +1 -34
- package/dist/services/id-service.js.map +1 -1
- package/dist/services/runtime-manager/codex-discovery.d.ts +1 -3
- package/dist/services/runtime-manager/codex-discovery.d.ts.map +1 -1
- package/dist/services/runtime-manager/codex-discovery.js +3 -16
- package/dist/services/runtime-manager/codex-discovery.js.map +1 -1
- package/dist/services/runtime-manager/doctor.d.ts +25 -0
- package/dist/services/runtime-manager/doctor.d.ts.map +1 -1
- package/dist/services/runtime-manager/doctor.js +480 -0
- package/dist/services/runtime-manager/doctor.js.map +1 -1
- package/dist/services/runtime-manager/errors.d.ts +12 -0
- package/dist/services/runtime-manager/errors.d.ts.map +1 -0
- package/dist/services/runtime-manager/errors.js +14 -0
- package/dist/services/runtime-manager/errors.js.map +1 -0
- package/dist/services/runtime-manager/global-state.d.ts +7 -0
- package/dist/services/runtime-manager/global-state.d.ts.map +1 -1
- package/dist/services/runtime-manager/global-state.js +116 -0
- package/dist/services/runtime-manager/global-state.js.map +1 -1
- package/dist/services/runtime-manager/host-version-probe.d.ts +8 -0
- package/dist/services/runtime-manager/host-version-probe.d.ts.map +1 -0
- package/dist/services/runtime-manager/host-version-probe.js +14 -0
- package/dist/services/runtime-manager/host-version-probe.js.map +1 -0
- package/dist/services/runtime-manager/install-plan.d.ts +25 -0
- package/dist/services/runtime-manager/install-plan.d.ts.map +1 -1
- package/dist/services/runtime-manager/install-plan.js +305 -0
- package/dist/services/runtime-manager/install-plan.js.map +1 -1
- package/dist/services/runtime-manager/inventory.d.ts +6 -0
- package/dist/services/runtime-manager/inventory.d.ts.map +1 -1
- package/dist/services/runtime-manager/inventory.js +16 -1
- package/dist/services/runtime-manager/inventory.js.map +1 -1
- package/dist/services/runtime-manager/legacy-adapters.d.ts +9 -0
- package/dist/services/runtime-manager/legacy-adapters.d.ts.map +1 -0
- package/dist/services/runtime-manager/legacy-adapters.js +187 -0
- package/dist/services/runtime-manager/legacy-adapters.js.map +1 -0
- package/dist/services/runtime-manager/paths.d.ts +18 -0
- package/dist/services/runtime-manager/paths.d.ts.map +1 -0
- package/dist/services/runtime-manager/paths.js +83 -0
- package/dist/services/runtime-manager/paths.js.map +1 -0
- package/dist/services/runtime-manager/runtime-package.d.ts +21 -0
- package/dist/services/runtime-manager/runtime-package.d.ts.map +1 -1
- package/dist/services/runtime-manager/runtime-package.js +77 -0
- package/dist/services/runtime-manager/runtime-package.js.map +1 -1
- package/dist/services/runtime-manager/storage.d.ts +47 -0
- package/dist/services/runtime-manager/storage.d.ts.map +1 -0
- package/dist/services/runtime-manager/storage.js +604 -0
- package/dist/services/runtime-manager/storage.js.map +1 -0
- package/dist/services/runtime-manager-service.d.ts +7 -17
- package/dist/services/runtime-manager-service.d.ts.map +1 -1
- package/dist/services/runtime-manager-service.js +32 -1695
- package/dist/services/runtime-manager-service.js.map +1 -1
- package/dist/services/ship-checks/changes.d.ts +24 -0
- package/dist/services/ship-checks/changes.d.ts.map +1 -0
- package/dist/services/ship-checks/changes.js +135 -0
- package/dist/services/ship-checks/changes.js.map +1 -0
- package/dist/services/ship-checks/contract.d.ts +93 -0
- package/dist/services/ship-checks/contract.d.ts.map +1 -0
- package/dist/services/ship-checks/contract.js +7 -0
- package/dist/services/ship-checks/contract.js.map +1 -0
- package/dist/services/ship-checks/coverage.d.ts +4 -0
- package/dist/services/ship-checks/coverage.d.ts.map +1 -0
- package/dist/services/ship-checks/coverage.js +113 -0
- package/dist/services/ship-checks/coverage.js.map +1 -0
- package/dist/services/ship-checks/discover.d.ts +10 -0
- package/dist/services/ship-checks/discover.d.ts.map +1 -0
- package/dist/services/ship-checks/discover.js +253 -0
- package/dist/services/ship-checks/discover.js.map +1 -0
- package/dist/services/ship-checks/glob.d.ts +5 -0
- package/dist/services/ship-checks/glob.d.ts.map +1 -0
- package/dist/services/ship-checks/glob.js +39 -0
- package/dist/services/ship-checks/glob.js.map +1 -0
- package/dist/services/ship-checks/hooks.d.ts +7 -0
- package/dist/services/ship-checks/hooks.d.ts.map +1 -0
- package/dist/services/ship-checks/hooks.js +65 -0
- package/dist/services/ship-checks/hooks.js.map +1 -0
- package/dist/services/ship-checks/packages.d.ts +29 -0
- package/dist/services/ship-checks/packages.d.ts.map +1 -0
- package/dist/services/ship-checks/packages.js +197 -0
- package/dist/services/ship-checks/packages.js.map +1 -0
- package/dist/services/ship-checks/related-tests.d.ts +13 -0
- package/dist/services/ship-checks/related-tests.d.ts.map +1 -0
- package/dist/services/ship-checks/related-tests.js +73 -0
- package/dist/services/ship-checks/related-tests.js.map +1 -0
- package/dist/services/ship-checks/scope.d.ts +8 -0
- package/dist/services/ship-checks/scope.d.ts.map +1 -0
- package/dist/services/ship-checks/scope.js +66 -0
- package/dist/services/ship-checks/scope.js.map +1 -0
- package/dist/services/ship-checks/task-requirements.d.ts +14 -0
- package/dist/services/ship-checks/task-requirements.d.ts.map +1 -0
- package/dist/services/ship-checks/task-requirements.js +145 -0
- package/dist/services/ship-checks/task-requirements.js.map +1 -0
- package/dist/services/ship-checks/workflows.d.ts +21 -0
- package/dist/services/ship-checks/workflows.d.ts.map +1 -0
- package/dist/services/ship-checks/workflows.js +208 -0
- package/dist/services/ship-checks/workflows.js.map +1 -0
- package/dist/services/spec-service.d.ts +18 -0
- package/dist/services/spec-service.d.ts.map +1 -1
- package/dist/services/spec-service.js +174 -9
- package/dist/services/spec-service.js.map +1 -1
- package/dist/services/template-service.d.ts +2 -0
- package/dist/services/template-service.d.ts.map +1 -1
- package/dist/services/template-service.js +4 -0
- package/dist/services/template-service.js.map +1 -1
- package/dist/templates/spec/spec-shaped.md.hbs +1 -1
- package/dist/templates/spec/spec.md.hbs +2 -2
- package/dist/utils/slugify.d.ts +1 -8
- package/dist/utils/slugify.d.ts.map +1 -1
- package/dist/utils/slugify.js +1 -25
- package/dist/utils/slugify.js.map +1 -1
- package/docs/CLI.md +96 -2
- package/lib/backlog-item.d.mts +49 -0
- package/lib/backlog-item.mjs +339 -0
- package/lib/host-packages/adapter-registry.json +5 -5
- package/lib/host-packages/capability-map.json +3 -3
- 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 +134 -94
- package/lib/host-packages/claude/openplanr/CONNECTORS.md +4 -6
- package/lib/host-packages/claude/openplanr/README.md +1 -1
- package/lib/host-packages/claude/openplanr/agents/planr-qa.md +5 -3
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-artifact-shell.mjs +1 -1
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-chunked-workspace-client.mjs +1 -1
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-document.mjs +471 -80
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-handoff.mjs +2 -2
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-resource-pack.mjs +1 -1
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-review.mjs +45 -4
- package/lib/host-packages/{cursor/openplanr/runtime/design/scripts/design-runtime-support-e34c388a8e59.mjs → claude/openplanr/runtime/design/scripts/design-runtime-support-25485dbf1cb2.mjs} +1 -1
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-share.mjs +8 -5
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-shared-artifact-support-dependencies-design-support-protocol-contracts-3d9b1a86.mjs +138 -12
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-shared-artifact-support-protocol-contracts-ea2cd15e.mjs +1 -1
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/{design-shared-protocol-contracts-31a760fc.mjs → design-shared-protocol-contracts-b5f28f94.mjs} +413 -45
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-upload-spool.mjs +1 -1
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design.mjs +482 -79
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/notices/THIRD_PARTY_NOTICES.txt +32 -32
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/02-artifact-review-ui.js +23 -23
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/03-protocol-contracts.js +322 -45
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/06-artifact-review-ui.js +12 -12
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/08-artifact-review-ui.js +47 -14
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources.json +11 -10
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/package.json +4 -3
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.css +16 -11
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/01-module-runtime.js +7 -11
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/02-react.js +165 -276
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/03-react-dom-client-fiber-foundations.js +494 -967
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/04-react-dom-client-reconciliation-hooks.js +346 -678
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/05-react-dom-client-render-phases.js +382 -810
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/06-react-dom-client-commit-effects.js +406 -730
- 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 +259 -522
- 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 +585 -937
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/09-react-dom-client-public-roots.js +119 -244
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/10-react.js +7 -17
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/11-artifact-review-ui.js +3 -4
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-protocol-contracts.js +285 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/13-design-review-experience.js +2773 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/14-studio-shell.js +134 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/15-canvas-engine.js +2207 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/16-design-review-experience.js +16 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/17-studio-shell.js +8 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/18-interface-primitives.js +3883 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/19-interface-primitives.js +966 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/{16-studio-shell.js → 20-studio-shell.js} +122 -227
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/21-design-studio.js +1597 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +101 -47
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +6 -2
- package/lib/host-packages/{openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0 → claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.22.0}/design-document.schema.json +207 -7
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.22.0/design-review-bundle.schema.json +822 -0
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/design-protocol-contracts.mjs +324 -45
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/design.mjs +73 -12
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +6 -2
- package/lib/host-packages/claude/openplanr/skills/connect/references/connectors.md +4 -6
- package/lib/host-packages/claude/openplanr/skills/design/SKILL.md +12 -0
- package/lib/host-packages/claude/openplanr/skills/design/references/craft.md +14 -3
- package/lib/host-packages/claude/openplanr/skills/design/references/design-system.md +48 -1
- package/lib/host-packages/claude/openplanr/skills/design/references/discovery.md +18 -4
- package/lib/host-packages/claude/openplanr/skills/design/references/generation.md +133 -2
- package/lib/host-packages/claude/openplanr/skills/design/references/hosted-canvas.md +62 -0
- package/lib/host-packages/claude/openplanr/skills/design/references/review.md +46 -1
- package/lib/host-packages/claude/openplanr/skills/design/references/utilities.md +17 -1
- package/lib/host-packages/claude/openplanr/skills/design/schemas/design-document.schema.json +207 -7
- package/lib/host-packages/claude/openplanr/skills/design-loop/references/craft.md +14 -3
- package/lib/host-packages/claude/openplanr/skills/design-loop/references/design-system.md +48 -1
- package/lib/host-packages/claude/openplanr/skills/design-loop/references/discovery.md +18 -4
- package/lib/host-packages/claude/openplanr/skills/design-loop/references/generation.md +133 -2
- package/lib/host-packages/claude/openplanr/skills/design-loop/references/review.md +46 -1
- package/lib/host-packages/claude/openplanr/skills/design-loop/references/utilities.md +17 -1
- package/lib/host-packages/claude/openplanr/skills/design-loop/schemas/design-document.schema.json +207 -7
- package/lib/host-packages/claude/openplanr/skills/design-review/references/craft.md +14 -3
- package/lib/host-packages/claude/openplanr/skills/design-review/references/design-system.md +48 -1
- package/lib/host-packages/claude/openplanr/skills/design-review/references/discovery.md +18 -4
- package/lib/host-packages/claude/openplanr/skills/design-review/references/generation.md +133 -2
- package/lib/host-packages/claude/openplanr/skills/design-review/references/review.md +46 -1
- package/lib/host-packages/claude/openplanr/skills/design-review/references/utilities.md +17 -1
- package/lib/host-packages/claude/openplanr/skills/design-review/schemas/design-document.schema.json +207 -7
- package/lib/host-packages/claude/openplanr/skills/investigate/SKILL.md +11 -2
- package/lib/host-packages/claude/openplanr/skills/investigate/references/findings.md +92 -0
- package/lib/host-packages/claude/openplanr/skills/investigate/scripts/backlog-item.mjs +339 -0
- package/lib/host-packages/claude/openplanr/skills/plan/SKILL.md +24 -11
- package/lib/host-packages/claude/openplanr/skills/plan/schemas/design-document.schema.json +207 -7
- package/lib/host-packages/claude/openplanr/skills/share/references/connectors.md +4 -6
- package/lib/host-packages/claude/openplanr/skills/ship/SKILL.md +46 -14
- package/lib/host-packages/claude/openplanr/skills/ship/references/findings.md +92 -0
- package/lib/host-packages/claude/openplanr/skills/ship/references/result-contract.md +3 -1
- package/lib/host-packages/claude/openplanr/skills/ship/scripts/backlog-item.mjs +339 -0
- package/lib/host-packages/claude/openplanr/skills/spec/SKILL.md +6 -0
- package/lib/host-packages/claude/openplanr/skills/spec/references/specification-contract.md +3 -1
- package/lib/host-packages/claude/openplanr/skills/sprint/references/connectors.md +4 -6
- package/lib/host-packages/claude/openplanr/skills/status/references/connectors.md +4 -6
- package/lib/host-packages/claude/openplanr/skills/sync/references/connectors.md +4 -6
- package/lib/host-packages/cursor/openplanr/.openplanr-content.json +132 -92
- package/lib/host-packages/cursor/openplanr/CONNECTORS.md +4 -6
- package/lib/host-packages/cursor/openplanr/manifest.json +1 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-connect/references/connectors.md +4 -6
- package/lib/host-packages/cursor/openplanr/rules/planr-design/references/craft.md +14 -3
- package/lib/host-packages/cursor/openplanr/rules/planr-design/references/design-system.md +48 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-design/references/discovery.md +18 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-design/references/generation.md +133 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-design/references/hosted-canvas.md +62 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-design/references/review.md +46 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-design/references/utilities.md +17 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-design/schemas/design-document.schema.json +207 -7
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/craft.md +14 -3
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/design-system.md +48 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/discovery.md +18 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/generation.md +133 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/review.md +46 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/utilities.md +17 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/schemas/design-document.schema.json +207 -7
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/craft.md +14 -3
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/design-system.md +48 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/discovery.md +18 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/generation.md +133 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/review.md +46 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/utilities.md +17 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review/schemas/design-document.schema.json +207 -7
- package/lib/host-packages/cursor/openplanr/rules/planr-design.mdc +12 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-investigate/references/findings.md +92 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-investigate/scripts/backlog-item.mjs +339 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-investigate.mdc +11 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-plan/schemas/design-document.schema.json +207 -7
- package/lib/host-packages/cursor/openplanr/rules/planr-plan.mdc +24 -11
- package/lib/host-packages/cursor/openplanr/rules/planr-share/references/connectors.md +4 -6
- package/lib/host-packages/cursor/openplanr/rules/planr-ship/references/findings.md +92 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-ship/references/result-contract.md +3 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-ship/scripts/backlog-item.mjs +339 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-ship.mdc +46 -14
- package/lib/host-packages/cursor/openplanr/rules/planr-spec/references/specification-contract.md +3 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-spec.mdc +6 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-sprint/references/connectors.md +4 -6
- package/lib/host-packages/cursor/openplanr/rules/planr-status/references/connectors.md +4 -6
- package/lib/host-packages/cursor/openplanr/rules/planr-sync/references/connectors.md +4 -6
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-artifact-shell.mjs +1 -1
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-chunked-workspace-client.mjs +1 -1
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-document.mjs +471 -80
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-handoff.mjs +2 -2
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-resource-pack.mjs +1 -1
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-review.mjs +45 -4
- package/lib/host-packages/{openai/openplanr/runtime/design/scripts/design-runtime-support-e34c388a8e59.mjs → cursor/openplanr/runtime/design/scripts/design-runtime-support-25485dbf1cb2.mjs} +1 -1
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-share.mjs +8 -5
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-shared-artifact-support-dependencies-design-support-protocol-contracts-3d9b1a86.mjs +138 -12
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-shared-artifact-support-protocol-contracts-ea2cd15e.mjs +1 -1
- package/lib/host-packages/{openai/openplanr/runtime/design/scripts/design-shared-protocol-contracts-31a760fc.mjs → cursor/openplanr/runtime/design/scripts/design-shared-protocol-contracts-b5f28f94.mjs} +413 -45
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-upload-spool.mjs +1 -1
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design.mjs +482 -79
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/notices/THIRD_PARTY_NOTICES.txt +32 -32
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/02-artifact-review-ui.js +23 -23
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/03-protocol-contracts.js +322 -45
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/06-artifact-review-ui.js +12 -12
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/08-artifact-review-ui.js +47 -14
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources.json +11 -10
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/package.json +4 -3
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.css +16 -11
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/01-module-runtime.js +7 -11
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/02-react.js +165 -276
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/03-react-dom-client-fiber-foundations.js +494 -967
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/04-react-dom-client-reconciliation-hooks.js +346 -678
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/05-react-dom-client-render-phases.js +382 -810
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/06-react-dom-client-commit-effects.js +406 -730
- 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 +259 -522
- 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 +585 -937
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/09-react-dom-client-public-roots.js +119 -244
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/10-react.js +7 -17
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/11-artifact-review-ui.js +3 -4
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-protocol-contracts.js +285 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/13-design-review-experience.js +2773 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/14-studio-shell.js +134 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/15-canvas-engine.js +2207 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/16-design-review-experience.js +16 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/17-studio-shell.js +8 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/18-interface-primitives.js +3883 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/19-interface-primitives.js +966 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/{16-studio-shell.js → 20-studio-shell.js} +122 -227
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/21-design-studio.js +1597 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +101 -47
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +6 -2
- package/lib/host-packages/{claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0 → cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.22.0}/design-document.schema.json +207 -7
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.22.0/design-review-bundle.schema.json +822 -0
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/design-protocol-contracts.mjs +324 -45
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/design.mjs +73 -12
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +6 -2
- 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 +139 -99
- package/lib/host-packages/openai/openplanr/CONNECTORS.md +4 -6
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-artifact-shell.mjs +1 -1
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-chunked-workspace-client.mjs +1 -1
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-document.mjs +471 -80
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-handoff.mjs +2 -2
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-resource-pack.mjs +1 -1
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-review.mjs +45 -4
- package/lib/host-packages/{claude/openplanr/runtime/design/scripts/design-runtime-support-e34c388a8e59.mjs → openai/openplanr/runtime/design/scripts/design-runtime-support-25485dbf1cb2.mjs} +1 -1
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-share.mjs +8 -5
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-shared-artifact-support-dependencies-design-support-protocol-contracts-3d9b1a86.mjs +138 -12
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-shared-artifact-support-protocol-contracts-ea2cd15e.mjs +1 -1
- package/lib/host-packages/{cursor/openplanr/runtime/design/scripts/design-shared-protocol-contracts-31a760fc.mjs → openai/openplanr/runtime/design/scripts/design-shared-protocol-contracts-b5f28f94.mjs} +413 -45
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-upload-spool.mjs +1 -1
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design.mjs +482 -79
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/notices/THIRD_PARTY_NOTICES.txt +32 -32
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/02-artifact-review-ui.js +23 -23
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/03-protocol-contracts.js +322 -45
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/06-artifact-review-ui.js +12 -12
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/08-artifact-review-ui.js +47 -14
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources.json +11 -10
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/package.json +4 -3
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.css +16 -11
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/01-module-runtime.js +7 -11
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/02-react.js +165 -276
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/03-react-dom-client-fiber-foundations.js +494 -967
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/04-react-dom-client-reconciliation-hooks.js +346 -678
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/05-react-dom-client-render-phases.js +382 -810
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/06-react-dom-client-commit-effects.js +406 -730
- 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 +259 -522
- 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 +585 -937
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/09-react-dom-client-public-roots.js +119 -244
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/10-react.js +7 -17
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/11-artifact-review-ui.js +3 -4
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-protocol-contracts.js +285 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/13-design-review-experience.js +2773 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/14-studio-shell.js +134 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/15-canvas-engine.js +2207 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/16-design-review-experience.js +16 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/17-studio-shell.js +8 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/18-interface-primitives.js +3883 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/19-interface-primitives.js +966 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/{16-studio-shell.js → 20-studio-shell.js} +122 -227
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/21-design-studio.js +1597 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +101 -47
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +6 -2
- package/lib/host-packages/{cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0 → openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.22.0}/design-document.schema.json +207 -7
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.22.0/design-review-bundle.schema.json +822 -0
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/design-protocol-contracts.mjs +324 -45
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/design.mjs +73 -12
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +6 -2
- package/lib/host-packages/openai/openplanr/skills/connect/references/connectors.md +4 -6
- package/lib/host-packages/openai/openplanr/skills/design/SKILL.md +12 -0
- package/lib/host-packages/openai/openplanr/skills/design/openplanr.skill.json +11 -0
- package/lib/host-packages/openai/openplanr/skills/design/references/craft.md +14 -3
- package/lib/host-packages/openai/openplanr/skills/design/references/design-system.md +48 -1
- package/lib/host-packages/openai/openplanr/skills/design/references/discovery.md +18 -4
- package/lib/host-packages/openai/openplanr/skills/design/references/generation.md +133 -2
- package/lib/host-packages/openai/openplanr/skills/design/references/hosted-canvas.md +62 -0
- package/lib/host-packages/openai/openplanr/skills/design/references/review.md +46 -1
- package/lib/host-packages/openai/openplanr/skills/design/references/utilities.md +17 -1
- package/lib/host-packages/openai/openplanr/skills/design/schemas/design-document.schema.json +207 -7
- package/lib/host-packages/openai/openplanr/skills/design-loop/references/craft.md +14 -3
- package/lib/host-packages/openai/openplanr/skills/design-loop/references/design-system.md +48 -1
- package/lib/host-packages/openai/openplanr/skills/design-loop/references/discovery.md +18 -4
- package/lib/host-packages/openai/openplanr/skills/design-loop/references/generation.md +133 -2
- package/lib/host-packages/openai/openplanr/skills/design-loop/references/review.md +46 -1
- package/lib/host-packages/openai/openplanr/skills/design-loop/references/utilities.md +17 -1
- package/lib/host-packages/openai/openplanr/skills/design-loop/schemas/design-document.schema.json +207 -7
- package/lib/host-packages/openai/openplanr/skills/design-review/references/craft.md +14 -3
- package/lib/host-packages/openai/openplanr/skills/design-review/references/design-system.md +48 -1
- package/lib/host-packages/openai/openplanr/skills/design-review/references/discovery.md +18 -4
- package/lib/host-packages/openai/openplanr/skills/design-review/references/generation.md +133 -2
- package/lib/host-packages/openai/openplanr/skills/design-review/references/review.md +46 -1
- package/lib/host-packages/openai/openplanr/skills/design-review/references/utilities.md +17 -1
- package/lib/host-packages/openai/openplanr/skills/design-review/schemas/design-document.schema.json +207 -7
- package/lib/host-packages/openai/openplanr/skills/investigate/SKILL.md +11 -2
- package/lib/host-packages/openai/openplanr/skills/investigate/agents/openai.yaml +1 -1
- package/lib/host-packages/openai/openplanr/skills/investigate/openplanr.skill.json +23 -1
- package/lib/host-packages/openai/openplanr/skills/investigate/references/findings.md +92 -0
- package/lib/host-packages/openai/openplanr/skills/investigate/scripts/backlog-item.mjs +339 -0
- package/lib/host-packages/openai/openplanr/skills/plan/SKILL.md +24 -11
- package/lib/host-packages/openai/openplanr/skills/plan/openplanr.skill.json +1 -1
- package/lib/host-packages/openai/openplanr/skills/plan/schemas/design-document.schema.json +207 -7
- package/lib/host-packages/openai/openplanr/skills/share/references/connectors.md +4 -6
- package/lib/host-packages/openai/openplanr/skills/ship/SKILL.md +46 -14
- package/lib/host-packages/openai/openplanr/skills/ship/agents/openai.yaml +1 -1
- package/lib/host-packages/openai/openplanr/skills/ship/openplanr.skill.json +23 -1
- package/lib/host-packages/openai/openplanr/skills/ship/references/findings.md +92 -0
- package/lib/host-packages/openai/openplanr/skills/ship/references/result-contract.md +3 -1
- package/lib/host-packages/openai/openplanr/skills/ship/scripts/backlog-item.mjs +339 -0
- package/lib/host-packages/openai/openplanr/skills/spec/SKILL.md +6 -0
- package/lib/host-packages/openai/openplanr/skills/spec/openplanr.skill.json +1 -1
- package/lib/host-packages/openai/openplanr/skills/spec/references/specification-contract.md +3 -1
- package/lib/host-packages/openai/openplanr/skills/sprint/references/connectors.md +4 -6
- package/lib/host-packages/openai/openplanr/skills/status/references/connectors.md +4 -6
- package/lib/host-packages/openai/openplanr/skills/sync/references/connectors.md +4 -6
- package/lib/json-schema.mjs +4 -0
- package/package.json +13 -13
- package/dist/dashboard/assets/index-G7ygVDGg.js +0 -572
- package/dist/dashboard/assets/index-G7ygVDGg.js.map +0 -1
- package/dist/templates/backlog/backlog-item.md.hbs +0 -40
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-design-review-experience.js +0 -3589
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/13-studio-shell.js +0 -184
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/14-interface-primitives.js +0 -5229
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/15-interface-primitives.js +0 -1733
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/17-design-studio.js +0 -1844
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-design-review-experience.js +0 -3589
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/13-studio-shell.js +0 -184
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/14-interface-primitives.js +0 -5229
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/15-interface-primitives.js +0 -1733
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/17-design-studio.js +0 -1844
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-design-review-experience.js +0 -3589
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/13-studio-shell.js +0 -184
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/14-interface-primitives.js +0 -5229
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/15-interface-primitives.js +0 -1733
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/17-design-studio.js +0 -1844
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
} from "./design-shared-artifact-support-protocol-contracts-ea2cd15e.mjs";
|
|
26
26
|
import {
|
|
27
27
|
validateJson
|
|
28
|
-
} from "./design-shared-protocol-contracts-
|
|
28
|
+
} from "./design-shared-protocol-contracts-b5f28f94.mjs";
|
|
29
29
|
import {
|
|
30
30
|
assertPlainData,
|
|
31
31
|
canonicalizeJson,
|
|
@@ -654,7 +654,7 @@ function compileDesignHandoffReadiness(input) {
|
|
|
654
654
|
if (input === null || input === void 0) return designHandoffReadinessAbsence();
|
|
655
655
|
const source = plainClone(input);
|
|
656
656
|
const document = source.document;
|
|
657
|
-
if (!document || document.kind !== "openplanr-design-document" ||
|
|
657
|
+
if (!document || document.kind !== "openplanr-design-document" || !["1.0.0", "1.1.0"].includes(document.schemaVersion) || typeof document.id !== "string" || !document.id)
|
|
658
658
|
throw new TypeError("Readiness requires one supported design document.");
|
|
659
659
|
const revision = source.sourceRevision === null || source.sourceRevision === void 0 ? null : normalizeDigest(source.sourceRevision, "design revision");
|
|
660
660
|
const direction = selectedDirection(document, source.studioState);
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
LARGE_OBJECT_LIMITS,
|
|
8
8
|
RESOURCE_HTML_SEGMENT_ENCODING,
|
|
9
9
|
assertLargeObjectContract
|
|
10
|
-
} from "./design-shared-protocol-contracts-
|
|
10
|
+
} from "./design-shared-protocol-contracts-b5f28f94.mjs";
|
|
11
11
|
import {
|
|
12
12
|
canonicalizeJson
|
|
13
13
|
} from "./design-shared-protocol-contracts-75a938cc.mjs";
|
|
@@ -19,6 +19,8 @@ import {
|
|
|
19
19
|
readRuntimeAsset,
|
|
20
20
|
renderArtifactParentRuntime,
|
|
21
21
|
renderDesignStudio,
|
|
22
|
+
saveDesignLayout,
|
|
23
|
+
saveDesignViewContext,
|
|
22
24
|
standaloneDesignHtml,
|
|
23
25
|
timingSafeTokenEqual
|
|
24
26
|
} from "./design-document.mjs";
|
|
@@ -282,7 +284,7 @@ function reviewExportTools() {
|
|
|
282
284
|
frame: {
|
|
283
285
|
id: refs.frame,
|
|
284
286
|
label: field(frame?.label),
|
|
285
|
-
...dimensions(frame) ?? { width: null, height: null }
|
|
287
|
+
...frame?.height === "auto" && Number.isInteger(frame.width) && frame.width > 0 && frame.width <= 16384 ? { width: frame.width, height: "auto" } : dimensions(frame) ?? { width: null, height: null }
|
|
286
288
|
},
|
|
287
289
|
threads: []
|
|
288
290
|
});
|
|
@@ -327,7 +329,7 @@ function reviewExportTools() {
|
|
|
327
329
|
overallNotes
|
|
328
330
|
};
|
|
329
331
|
}
|
|
330
|
-
const inline = (value) => String(value ?? "Unavailable").replaceAll("\\", "\\\\").replace(/[\r\n]/gu, " ").replace(/[
|
|
332
|
+
const inline = (value) => String(value ?? "Unavailable").replaceAll("\\", "\\\\").replace(/[\r\n]/gu, " ").replace(/[[\]<>`*#|]/gu, (char) => "\\" + char);
|
|
331
333
|
const quoted = (value) => {
|
|
332
334
|
const runs = value.match(/`+/gu) ?? [];
|
|
333
335
|
const fence = "`".repeat(Math.max(3, ...runs.map((run) => run.length + 1)));
|
|
@@ -2470,6 +2472,23 @@ function studioRuntimeIdentity(current) {
|
|
|
2470
2472
|
)
|
|
2471
2473
|
};
|
|
2472
2474
|
}
|
|
2475
|
+
function studioContentIdentity(current) {
|
|
2476
|
+
const document = { ...current.document };
|
|
2477
|
+
delete document.layout;
|
|
2478
|
+
return hash(
|
|
2479
|
+
JSON.stringify({
|
|
2480
|
+
document,
|
|
2481
|
+
layoutGuidance: {
|
|
2482
|
+
titles: Object.entries(current.document.layout?.boards ?? {}).filter(([, board]) => board.title !== void 0).map(([key, board]) => [key, board.title]).sort(([left], [right]) => left.localeCompare(right)),
|
|
2483
|
+
sections: current.document.layout?.sections ?? []
|
|
2484
|
+
},
|
|
2485
|
+
artifactDigest: digestArtifactEnvelope(current.envelope),
|
|
2486
|
+
fingerprints: current.fingerprints,
|
|
2487
|
+
contextDigest: current.contextDigest,
|
|
2488
|
+
specification: readFileSync4(join5(current.directory, "design-spec.md"), "utf8")
|
|
2489
|
+
})
|
|
2490
|
+
);
|
|
2491
|
+
}
|
|
2473
2492
|
function exportDesignReview(file, { scope = "all", env = process.env } = {}) {
|
|
2474
2493
|
if (!["all", "current"].includes(scope))
|
|
2475
2494
|
throw new Error("Review export scope must be current or all.");
|
|
@@ -2894,7 +2913,13 @@ async function startDesignReviewUnlocked(file, {
|
|
|
2894
2913
|
}).state;
|
|
2895
2914
|
const stalePins = readDesignFeedback(file, env).pins.filter((pin) => pin.stale);
|
|
2896
2915
|
return renderDesignStudio(
|
|
2897
|
-
{
|
|
2916
|
+
{
|
|
2917
|
+
...current,
|
|
2918
|
+
envelope: model.envelope,
|
|
2919
|
+
state,
|
|
2920
|
+
stalePins,
|
|
2921
|
+
contentIdentity: studioContentIdentity(current)
|
|
2922
|
+
},
|
|
2898
2923
|
{ stageRuntimeUrl: `${base}runtime.js` }
|
|
2899
2924
|
).replace(
|
|
2900
2925
|
"</head>",
|
|
@@ -2908,6 +2933,8 @@ async function startDesignReviewUnlocked(file, {
|
|
|
2908
2933
|
launchContext: base.startsWith("/studio/") ? "local Studio" : "private review"
|
|
2909
2934
|
},
|
|
2910
2935
|
stateUrl: `${base}api/design-state`,
|
|
2936
|
+
viewContextUrl: `${base}api/design-view-context`,
|
|
2937
|
+
layoutUrl: `${base}api/design-layout`,
|
|
2911
2938
|
statusUrl: `${base}api/design-status`,
|
|
2912
2939
|
readyUrl: `${base}api/design-ready`,
|
|
2913
2940
|
shareUrl: `${base}api/design-share`,
|
|
@@ -3169,7 +3196,9 @@ ${renderArtifactParentRuntime({ ...options, adapterRuntimeUrl: `${base}api/desig
|
|
|
3169
3196
|
revision: current.revision,
|
|
3170
3197
|
status: ready?.revision === current.revision ? ready.status : "loading",
|
|
3171
3198
|
verification: current.verification.status,
|
|
3172
|
-
runtimeIdentity: studioRuntimeIdentity(current)
|
|
3199
|
+
runtimeIdentity: studioRuntimeIdentity(current),
|
|
3200
|
+
contentIdentity: studioContentIdentity(current),
|
|
3201
|
+
layout: current.document.layout
|
|
3173
3202
|
});
|
|
3174
3203
|
} else if (route === "design-state" && req.method === "GET") {
|
|
3175
3204
|
respond(res, 200, {
|
|
@@ -3181,6 +3210,18 @@ ${renderArtifactParentRuntime({ ...options, adapterRuntimeUrl: `${base}api/desig
|
|
|
3181
3210
|
});
|
|
3182
3211
|
} else if (route === "design-state" && req.method === "PUT") {
|
|
3183
3212
|
respond(res, 200, await saveDesignState(file, await readBody(req)));
|
|
3213
|
+
} else if (route === "design-view-context" && req.method === "PUT") {
|
|
3214
|
+
if (req.headers["x-openplanr-design"] !== "1" || !String(req.headers["content-type"] ?? "").startsWith("application/json") || req.headers.origin && req.headers.origin !== `http://127.0.0.1:${server.port}`)
|
|
3215
|
+
throw Object.assign(new Error("View context requires a same-origin studio request."), {
|
|
3216
|
+
statusCode: 403
|
|
3217
|
+
});
|
|
3218
|
+
respond(res, 200, saveDesignViewContext(file, await readBody(req), clock));
|
|
3219
|
+
} else if (route === "design-layout" && req.method === "PUT") {
|
|
3220
|
+
if (req.headers["x-openplanr-design"] !== "1" || !String(req.headers["content-type"] ?? "").startsWith("application/json") || req.headers.origin && req.headers.origin !== `http://127.0.0.1:${server.port}`)
|
|
3221
|
+
throw Object.assign(new Error("Layout saves require a same-origin studio request."), {
|
|
3222
|
+
statusCode: 403
|
|
3223
|
+
});
|
|
3224
|
+
respond(res, 200, await saveDesignLayout(file, await readBody(req)));
|
|
3184
3225
|
} else if (route === "design-ready" && req.method === "POST") {
|
|
3185
3226
|
const value = await readBody(req);
|
|
3186
3227
|
const loadedArtifacts = new Set(Array.isArray(value?.artifacts) ? value.artifacts : []);
|
|
@@ -12,7 +12,7 @@ import "./design-compression.mjs";
|
|
|
12
12
|
import "./design-owner-custody.mjs";
|
|
13
13
|
import "./design-runtime-home.mjs";
|
|
14
14
|
import "./design-loopback-server.mjs";
|
|
15
|
-
import "./design-shared-protocol-contracts-
|
|
15
|
+
import "./design-shared-protocol-contracts-b5f28f94.mjs";
|
|
16
16
|
import "./design-shared-protocol-contracts-75a938cc.mjs";
|
|
17
17
|
export {
|
|
18
18
|
copyUploadSpool,
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
DESIGN_WORKSPACE_SCHEMA,
|
|
51
51
|
DESIGN_WORKSPACE_VERSION,
|
|
52
52
|
assertWorkspaceContract
|
|
53
|
-
} from "./design-shared-protocol-contracts-
|
|
53
|
+
} from "./design-shared-protocol-contracts-b5f28f94.mjs";
|
|
54
54
|
import {
|
|
55
55
|
canonicalizeJson,
|
|
56
56
|
deepFreeze,
|
|
@@ -97,13 +97,13 @@ ${current.document.id}`);
|
|
|
97
97
|
const legacyPath = !options.custodyRoot && !configuredPlanrHome(env) ? join(realpathSync(env.HOME || homedir()), ".openplanr", "design-shares", `${key}.json`) : null;
|
|
98
98
|
return { root, path, current, legacyPath };
|
|
99
99
|
}
|
|
100
|
-
function presentationFingerprint(current) {
|
|
100
|
+
function presentationFingerprint(current, { legacy = false } = {}) {
|
|
101
101
|
const state = readJson(join(current.root, ".design/studio-state.json"), { state: {} }).state;
|
|
102
102
|
return hash(
|
|
103
103
|
JSON.stringify({
|
|
104
104
|
revision: current.revision,
|
|
105
105
|
selectedVariant: state.selectedVariant ?? current.document.selectedVariant,
|
|
106
|
-
positions: state.positions ?? {},
|
|
106
|
+
...legacy ? { positions: state.positions ?? {} } : {},
|
|
107
107
|
verification: current.verification.status
|
|
108
108
|
})
|
|
109
109
|
);
|
|
@@ -119,7 +119,10 @@ var safeStatus = (record, current) => ({
|
|
|
119
119
|
url: workspaceReviewUrl(record.custody),
|
|
120
120
|
revision: record.custody.currentRevision ?? record.publishedRevision ?? null,
|
|
121
121
|
publishedRevision: record.publishedRevision ?? null,
|
|
122
|
-
hasUpdate: record.publishedRevision !== current.revision ||
|
|
122
|
+
hasUpdate: record.publishedRevision !== current.revision || ![
|
|
123
|
+
presentationFingerprint(current),
|
|
124
|
+
presentationFingerprint(current, { legacy: true })
|
|
125
|
+
].includes(record.publishedPresentation),
|
|
123
126
|
epoch: record.custody.epoch,
|
|
124
127
|
commentsPaused: Boolean(record.custody.commentsPaused ?? record.commentsPaused),
|
|
125
128
|
revoked: Boolean(record.revoked),
|
|
@@ -1804,7 +1807,7 @@ async function importDesignShareRecovery(file, { input, ...options } = {}) {
|
|
|
1804
1807
|
const pending = custody.pendingCreate ?? custody.pendingMutation.body;
|
|
1805
1808
|
const destination = join3(root, "uploads", custody.id, pending.operationId);
|
|
1806
1809
|
if (existsSync4(destination)) {
|
|
1807
|
-
const { spoolChunkReader: spoolChunkReader2 } = await import("./design-runtime-support-
|
|
1810
|
+
const { spoolChunkReader: spoolChunkReader2 } = await import("./design-runtime-support-25485dbf1cb2.mjs");
|
|
1808
1811
|
const reader = spoolChunkReader2(destination, pending);
|
|
1809
1812
|
for (const part of pending.manifest.chunks) await reader(part.index);
|
|
1810
1813
|
} else await copyUploadSpool(custody, destination);
|
|
@@ -14,9 +14,12 @@ import {
|
|
|
14
14
|
MAX_ARTIFACT_HTML_BYTES
|
|
15
15
|
} from "./design-shared-artifact-support-protocol-contracts-ea2cd15e.mjs";
|
|
16
16
|
import {
|
|
17
|
+
DESIGN_DOCUMENT_SCHEMA,
|
|
18
|
+
DESIGN_DOCUMENT_V120_SCHEMA,
|
|
17
19
|
DESIGN_REVIEW_BUNDLE_SCHEMA,
|
|
20
|
+
validateDesignProps,
|
|
18
21
|
validateJson
|
|
19
|
-
} from "./design-shared-protocol-contracts-
|
|
22
|
+
} from "./design-shared-protocol-contracts-b5f28f94.mjs";
|
|
20
23
|
import {
|
|
21
24
|
canonicalizeJson,
|
|
22
25
|
sha256Hex
|
|
@@ -25,6 +28,7 @@ import {
|
|
|
25
28
|
// packages/design/lib/design/document-state.mjs
|
|
26
29
|
import { createHash, randomUUID } from "node:crypto";
|
|
27
30
|
import {
|
|
31
|
+
chmodSync,
|
|
28
32
|
closeSync,
|
|
29
33
|
lstatSync,
|
|
30
34
|
mkdirSync,
|
|
@@ -47,14 +51,15 @@ function readJson(path, fallback = void 0) {
|
|
|
47
51
|
throw error;
|
|
48
52
|
}
|
|
49
53
|
}
|
|
50
|
-
function atomicJson(path, value) {
|
|
51
|
-
atomicBytes(path, json(value));
|
|
54
|
+
function atomicJson(path, value, { mode } = {}) {
|
|
55
|
+
atomicBytes(path, json(value), mode);
|
|
52
56
|
}
|
|
53
|
-
function atomicBytes(path, bytes) {
|
|
57
|
+
function atomicBytes(path, bytes, mode) {
|
|
54
58
|
mkdirSync(dirname(path), { recursive: true });
|
|
55
59
|
const temporary = `${path}.${randomUUID()}.tmp`;
|
|
56
60
|
try {
|
|
57
61
|
writeFileSync(temporary, bytes, { mode: 384, flag: "wx" });
|
|
62
|
+
if (mode !== void 0) chmodSync(temporary, mode);
|
|
58
63
|
renameSync(temporary, path);
|
|
59
64
|
} finally {
|
|
60
65
|
rmSync(temporary, { force: true });
|
|
@@ -320,6 +325,7 @@ var MIME = {
|
|
|
320
325
|
};
|
|
321
326
|
var children = (node) => [...node.childNodes ?? [], ...node.content?.childNodes ?? []];
|
|
322
327
|
var attr = (node, name) => node.attrs?.find((item2) => item2.name === name);
|
|
328
|
+
var isPropToken = (value) => typeof value === "string" && value.length <= 128 && /^[a-z][a-z0-9-]*(?![\s\S])/u.test(value);
|
|
323
329
|
var text = (node) => children(node).map((item2) => item2.value ?? "").join("");
|
|
324
330
|
function setText(node, value) {
|
|
325
331
|
node.childNodes = [{ nodeName: "#text", value, parentNode: node }];
|
|
@@ -329,6 +335,23 @@ function element(name, value) {
|
|
|
329
335
|
setText(node, value);
|
|
330
336
|
return node;
|
|
331
337
|
}
|
|
338
|
+
function parseBodySource(html) {
|
|
339
|
+
const roots = [];
|
|
340
|
+
const parser = new Parser({ sourceCodeLocationInfo: true });
|
|
341
|
+
const onStartTag = parser.onStartTag.bind(parser);
|
|
342
|
+
parser.onStartTag = (token) => {
|
|
343
|
+
if (token.tagName === "body") roots.push(token);
|
|
344
|
+
onStartTag(token);
|
|
345
|
+
};
|
|
346
|
+
parser.tokenizer.write(html, true);
|
|
347
|
+
const body = parser.document.childNodes.find((node) => node.tagName === "html")?.childNodes.find((node) => node.tagName === "body");
|
|
348
|
+
const root = roots.length === 1 && body?.sourceCodeLocation?.startTag?.startOffset === roots[0].location?.startOffset ? roots[0] : null;
|
|
349
|
+
return { document: parser.document, roots, root };
|
|
350
|
+
}
|
|
351
|
+
function inspectLocalDocumentBody(html) {
|
|
352
|
+
const { root } = parseBodySource(html);
|
|
353
|
+
return root ? { attrs: root.attrs, location: root.location } : null;
|
|
354
|
+
}
|
|
332
355
|
function resolveLocalDocumentFile(root, path, from = root) {
|
|
333
356
|
if (typeof path !== "string" || !path || /^(?:[a-z][a-z\d+.-]*:|\/|\\)/iu.test(path))
|
|
334
357
|
throw new Error(`Expected a local relative asset: ${path}`);
|
|
@@ -350,7 +373,8 @@ function bundleLocalDocument({
|
|
|
350
373
|
screenId,
|
|
351
374
|
maxBytes = MAX_ARTIFACT_HTML_BYTES,
|
|
352
375
|
readSource,
|
|
353
|
-
passive = false
|
|
376
|
+
passive = false,
|
|
377
|
+
screenProps
|
|
354
378
|
}) {
|
|
355
379
|
const root = realpathSync2(inputRoot);
|
|
356
380
|
const files = /* @__PURE__ */ new Map();
|
|
@@ -480,7 +504,16 @@ function bundleLocalDocument({
|
|
|
480
504
|
return value.replace(/<\/script/giu, "<\\/script");
|
|
481
505
|
}
|
|
482
506
|
const input = read(source.html);
|
|
483
|
-
const
|
|
507
|
+
const propEntries = Object.entries(screenProps ?? {});
|
|
508
|
+
let document;
|
|
509
|
+
if (propEntries.length) {
|
|
510
|
+
const parsed = parseBodySource(input.value.toString("utf8"));
|
|
511
|
+
if (!parsed.root)
|
|
512
|
+
throw new Error(
|
|
513
|
+
`Screen ${screenId} source ${source.html} requires a single authored <body> root for props; found ${parsed.roots.length}.`
|
|
514
|
+
);
|
|
515
|
+
document = parsed.document;
|
|
516
|
+
} else document = parse(input.value.toString("utf8"));
|
|
484
517
|
let head, body;
|
|
485
518
|
const deferredScripts = [];
|
|
486
519
|
const queue = [...children(document)];
|
|
@@ -572,6 +605,22 @@ function bundleLocalDocument({
|
|
|
572
605
|
body.childNodes.push(node);
|
|
573
606
|
}
|
|
574
607
|
body.attrs.push({ name: "data-planr-screen", value: screenId });
|
|
608
|
+
if (propEntries.length) {
|
|
609
|
+
const classes = (attr(body, "class")?.value ?? "").split(/\s+/u).filter(Boolean).filter((item2) => !propEntries.some(([name]) => item2.startsWith(`prop-${name}-`)));
|
|
610
|
+
for (const [name, value] of propEntries) {
|
|
611
|
+
if (!isPropToken(name) || !(typeof value === "boolean" || isPropToken(value)))
|
|
612
|
+
throw new TypeError(
|
|
613
|
+
`Screen ${screenId} source ${source.html} has invalid prop ${name}: ${JSON.stringify(value)}.`
|
|
614
|
+
);
|
|
615
|
+
const attribute = `data-prop-${name}`;
|
|
616
|
+
body.attrs = body.attrs.filter((item2) => item2.name !== attribute);
|
|
617
|
+
body.attrs.push({ name: attribute, value: String(value) });
|
|
618
|
+
const prefix = `prop-${name}-`;
|
|
619
|
+
classes.push(`${prefix}${value}`);
|
|
620
|
+
}
|
|
621
|
+
body.attrs = body.attrs.filter((item2) => item2.name !== "class");
|
|
622
|
+
body.attrs.push({ name: "class", value: classes.join(" ") });
|
|
623
|
+
}
|
|
575
624
|
const html = serialize(document);
|
|
576
625
|
if (Buffer.byteLength(html) > maxBytes)
|
|
577
626
|
throw new Error("Bundled design exceeds the output budget.");
|
|
@@ -683,6 +732,61 @@ Object.assign(bundleV12.properties, {
|
|
|
683
732
|
fingerprints: list(DESIGN_FINGERPRINT_SCHEMA, 4096)
|
|
684
733
|
});
|
|
685
734
|
var DESIGN_REVIEW_BUNDLE_V12_SCHEMA = bundleV12;
|
|
735
|
+
var bundleCurrent = (
|
|
736
|
+
/** @type {MutableSchema} */
|
|
737
|
+
structuredClone(bundleV12)
|
|
738
|
+
);
|
|
739
|
+
bundleCurrent.$id = "https://openplanr.dev/schemas/v1.20.0/design-review-bundle.schema.json";
|
|
740
|
+
bundleCurrent["x-openplanr-contract"] = { id: "design-review-bundle", version: "1.20.0" };
|
|
741
|
+
bundleCurrent.properties.schemaVersion = { enum: ["1.1.0", "1.2.0"] };
|
|
742
|
+
bundleCurrent.properties.envelope = bundleV11.properties.envelope;
|
|
743
|
+
bundleCurrent.allOf = [
|
|
744
|
+
{
|
|
745
|
+
if: { properties: { schemaVersion: { const: "1.2.0" } } },
|
|
746
|
+
then: { properties: { envelope: bundleV12.properties.envelope } }
|
|
747
|
+
}
|
|
748
|
+
];
|
|
749
|
+
var currentDesign2 = (
|
|
750
|
+
/** @type {MutableSchema} */
|
|
751
|
+
bundleCurrent.properties.design
|
|
752
|
+
);
|
|
753
|
+
for (const key of ["frames", "layout"])
|
|
754
|
+
currentDesign2.properties[key] = /** @type {Record<string, unknown>} */
|
|
755
|
+
DESIGN_DOCUMENT_V120_SCHEMA.properties[key];
|
|
756
|
+
bundleCurrent.$defs = structuredClone(DESIGN_DOCUMENT_V120_SCHEMA.$defs);
|
|
757
|
+
var currentEntries = (
|
|
758
|
+
/** @type {{ items: { properties: Record<string, unknown> } }} */
|
|
759
|
+
bundleCurrent.properties.entries
|
|
760
|
+
);
|
|
761
|
+
currentEntries.items.properties.height = { const: "auto" };
|
|
762
|
+
var bundleProps = (
|
|
763
|
+
/** @type {MutableSchema} */
|
|
764
|
+
structuredClone(bundleCurrent)
|
|
765
|
+
);
|
|
766
|
+
bundleProps.$id = "https://openplanr.dev/schemas/v1.22.0/design-review-bundle.schema.json";
|
|
767
|
+
bundleProps["x-openplanr-contract"] = { id: "design-review-bundle", version: "1.22.0" };
|
|
768
|
+
var propsDesign = (
|
|
769
|
+
/** @type {MutableSchema} */
|
|
770
|
+
bundleProps.properties.design
|
|
771
|
+
);
|
|
772
|
+
var authoredProperties = (
|
|
773
|
+
/** @type {Record<string, unknown>} */
|
|
774
|
+
DESIGN_DOCUMENT_SCHEMA.properties
|
|
775
|
+
);
|
|
776
|
+
propsDesign.properties.schemaVersion = authoredProperties.schemaVersion;
|
|
777
|
+
for (const key of ["screens", "variants"]) {
|
|
778
|
+
const projected = (
|
|
779
|
+
/** @type {{ items: { properties: Record<string, unknown> } }} */
|
|
780
|
+
propsDesign.properties[key]
|
|
781
|
+
);
|
|
782
|
+
const authored = (
|
|
783
|
+
/** @type {{ items: { properties: Record<string, unknown> } }} */
|
|
784
|
+
authoredProperties[key]
|
|
785
|
+
);
|
|
786
|
+
projected.items.properties.props = authored.items.properties.props;
|
|
787
|
+
}
|
|
788
|
+
propsDesign.allOf = structuredClone(DESIGN_DOCUMENT_SCHEMA.allOf);
|
|
789
|
+
var DESIGN_REVIEW_BUNDLE_CURRENT_SCHEMA = bundleProps;
|
|
686
790
|
var item = closed(
|
|
687
791
|
{
|
|
688
792
|
pinId: id,
|
|
@@ -799,10 +903,19 @@ function assertDesignReviewMetadata(value) {
|
|
|
799
903
|
);
|
|
800
904
|
}
|
|
801
905
|
function assertDesignReviewBundle(value) {
|
|
906
|
+
if (value?.design?.schemaVersion !== "1.1.0" && ["screens", "variants"].some(
|
|
907
|
+
(field) => Array.isArray(value?.design?.[field]) && value.design[field].some((item2) => item2 && Object.hasOwn(item2, "props"))
|
|
908
|
+
))
|
|
909
|
+
throw new TypeError('Invalid design props: props require design.schemaVersion "1.1.0"');
|
|
802
910
|
assertReviewExperience(
|
|
803
911
|
value,
|
|
804
|
-
value?.schemaVersion
|
|
912
|
+
value?.design?.schemaVersion !== void 0 || ["screens", "variants"].some(
|
|
913
|
+
(field) => Array.isArray(value?.design?.[field]) && value.design[field].some((item2) => item2 && Object.hasOwn(item2, "props"))
|
|
914
|
+
) || value?.design?.layout !== void 0 || Array.isArray(value?.design?.frames) && value.design.frames.some(({ height }) => height === "auto") ? DESIGN_REVIEW_BUNDLE_CURRENT_SCHEMA : value?.schemaVersion === "1.2.0" ? DESIGN_REVIEW_BUNDLE_V12_SCHEMA : value?.schemaVersion === "1.1.0" ? DESIGN_REVIEW_BUNDLE_V11_SCHEMA : DESIGN_REVIEW_BUNDLE_SCHEMA
|
|
805
915
|
);
|
|
916
|
+
const propErrors = validateDesignProps(value.design);
|
|
917
|
+
if (propErrors.length) throw new TypeError(`Invalid design props:
|
|
918
|
+
${propErrors.join("\n")}`);
|
|
806
919
|
if (["1.1.0", "1.2.0"].includes(value.schemaVersion)) {
|
|
807
920
|
if (value.reviewContext.designId !== value.design.id || value.contextDigest !== sha256Hex(canonicalizeJson(value.reviewContext)))
|
|
808
921
|
throw new TypeError("Review context identity or digest does not match its published design.");
|
|
@@ -871,6 +984,7 @@ function reviewFingerprints({ document, context, screen, variant, frame, sourceD
|
|
|
871
984
|
const components = context.implementation.components.filter(
|
|
872
985
|
(component) => !component.screenIds?.length || component.screenIds.includes(screen.id)
|
|
873
986
|
);
|
|
987
|
+
const values = Object.hasOwn(variant.props ?? {}, screen.id) ? variant.props[screen.id] : {};
|
|
874
988
|
return {
|
|
875
989
|
screenId: screen.id,
|
|
876
990
|
variantId: variant.id,
|
|
@@ -878,7 +992,15 @@ function reviewFingerprints({ document, context, screen, variant, frame, sourceD
|
|
|
878
992
|
contentDigest: reviewDigest({
|
|
879
993
|
files: Object.entries(sourceDigests).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0),
|
|
880
994
|
width: frame.width,
|
|
881
|
-
height: frame.height
|
|
995
|
+
height: frame.height,
|
|
996
|
+
...screen.props === void 0 ? {} : {
|
|
997
|
+
props: Object.fromEntries(
|
|
998
|
+
Object.entries(screen.props).map(([name, declaration]) => [
|
|
999
|
+
name,
|
|
1000
|
+
Object.hasOwn(values, name) ? values[name] : declaration.default
|
|
1001
|
+
])
|
|
1002
|
+
)
|
|
1003
|
+
}
|
|
882
1004
|
}),
|
|
883
1005
|
guidanceDigest: reviewDigest({
|
|
884
1006
|
title: screen.title,
|
|
@@ -903,6 +1025,7 @@ function bundleDesignRevision(current, state = {}) {
|
|
|
903
1025
|
kind: "openplanr-design-review-bundle",
|
|
904
1026
|
schemaVersion: current.envelope.schemaVersion === "1.1.0" ? "1.2.0" : "1.1.0",
|
|
905
1027
|
design: {
|
|
1028
|
+
...document.screens.some((screen) => screen.props !== void 0) || document.variants.some((variant) => variant.props !== void 0) ? { schemaVersion: document.schemaVersion } : {},
|
|
906
1029
|
...pick(document, [
|
|
907
1030
|
"id",
|
|
908
1031
|
"title",
|
|
@@ -910,19 +1033,20 @@ function bundleDesignRevision(current, state = {}) {
|
|
|
910
1033
|
"selectedVariant",
|
|
911
1034
|
"screenOrder",
|
|
912
1035
|
"frames",
|
|
913
|
-
"flows"
|
|
1036
|
+
"flows",
|
|
1037
|
+
"layout"
|
|
914
1038
|
]),
|
|
915
1039
|
screens: document.screens.map(
|
|
916
|
-
(screen) => pick(screen, ["id", "title", "description", "anchors"])
|
|
1040
|
+
(screen) => pick(screen, ["id", "title", "description", "anchors", "props"])
|
|
917
1041
|
),
|
|
918
1042
|
selectedVariant: document.variants.some(
|
|
919
1043
|
(variant) => variant.id === state.selectedVariant && variant.status === "ready"
|
|
920
1044
|
) ? state.selectedVariant : document.selectedVariant,
|
|
921
|
-
variants: document.variants.filter((variant) => variant.status === "ready").map((variant) => pick(variant, ["id", "label", "status"]))
|
|
1045
|
+
variants: document.variants.filter((variant) => variant.status === "ready").map((variant) => pick(variant, ["id", "label", "status", "props"]))
|
|
922
1046
|
},
|
|
923
1047
|
envelope: structuredClone(current.envelope),
|
|
924
1048
|
entries: structuredClone(current.entries),
|
|
925
|
-
state:
|
|
1049
|
+
state: {},
|
|
926
1050
|
revision: current.revision,
|
|
927
1051
|
verification: pick(current.verification ?? {}, ["status"]),
|
|
928
1052
|
reviewContext: context,
|
|
@@ -963,6 +1087,7 @@ export {
|
|
|
963
1087
|
serialize,
|
|
964
1088
|
parse,
|
|
965
1089
|
parseFragment,
|
|
1090
|
+
inspectLocalDocumentBody,
|
|
966
1091
|
resolveLocalDocumentFile,
|
|
967
1092
|
bundleLocalDocument,
|
|
968
1093
|
DESIGN_HANDOFF_CONTENT_SCHEMA,
|
|
@@ -981,6 +1106,7 @@ export {
|
|
|
981
1106
|
json,
|
|
982
1107
|
readJson,
|
|
983
1108
|
atomicJson,
|
|
1109
|
+
atomicBytes,
|
|
984
1110
|
recoverDesignPublication,
|
|
985
1111
|
designSpecPath,
|
|
986
1112
|
currentDesign
|