openplanr 3.3.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 +80 -0
- package/dist/cli/commands/artifact-design-share.d.ts +9 -0
- package/dist/cli/commands/artifact-design-share.d.ts.map +1 -0
- package/dist/cli/commands/artifact-design-share.js +200 -0
- package/dist/cli/commands/artifact-design-share.js.map +1 -0
- package/dist/cli/commands/artifact.d.ts.map +1 -1
- package/dist/cli/commands/artifact.js +5 -18
- package/dist/cli/commands/artifact.js.map +1 -1
- 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/cli/commands/ship.d.ts.map +1 -1
- package/dist/cli/commands/ship.js +2 -0
- package/dist/cli/commands/ship.js.map +1 -1
- package/dist/dashboard/.vite/manifest.json +2 -2
- package/dist/dashboard/assets/index-B-l_941W.js +75 -0
- package/dist/dashboard/assets/index-B-l_941W.js.map +1 -0
- package/dist/dashboard/assets/index-Cv4Vwhuw.css +2 -0
- package/dist/dashboard/dashboard-manifest.json +14 -14
- package/dist/dashboard/index.html +2 -2
- package/dist/services/design-artifact-service.d.ts +42 -1
- package/dist/services/design-artifact-service.d.ts.map +1 -1
- package/dist/services/design-artifact-service.js +198 -19
- 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/dist/services/ship-checks/contract.d.ts +3 -1
- package/dist/services/ship-checks/contract.d.ts.map +1 -1
- package/dist/services/ship-checks/contract.js +1 -1
- package/dist/services/ship-checks/contract.js.map +1 -1
- package/dist/services/ship-checks/discover.d.ts.map +1 -1
- package/dist/services/ship-checks/discover.js +2 -1
- package/dist/services/ship-checks/discover.js.map +1 -1
- package/dist/services/ship-checks/package-contents.d.ts +4 -0
- package/dist/services/ship-checks/package-contents.d.ts.map +1 -0
- package/dist/services/ship-checks/package-contents.js +91 -0
- package/dist/services/ship-checks/package-contents.js.map +1 -0
- package/dist/services/ship-checks/packages.d.ts +2 -0
- package/dist/services/ship-checks/packages.d.ts.map +1 -1
- package/dist/services/ship-checks/packages.js +4 -0
- package/dist/services/ship-checks/packages.js.map +1 -1
- package/dist/services/ship-checks/scope.js +2 -1
- package/dist/services/ship-checks/scope.js.map +1 -1
- package/dist/utils/splice-managed-block.js +1 -1
- package/dist/utils/splice-managed-block.js.map +1 -1
- package/docs/CLI.md +67 -1
- 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 +3 -3
- package/lib/host-packages/claude/openplanr/.claude-plugin/plugin.json +6 -6
- package/lib/host-packages/claude/openplanr/.openplanr-content.json +57 -429
- package/lib/host-packages/claude/openplanr/README.md +16 -16
- package/lib/host-packages/claude/openplanr/references/agents/shared/modes/shared/task-context-resolution.md +4 -4
- package/lib/host-packages/claude/openplanr/skills/artifact/references/design-sharing.md +2 -2
- package/lib/host-packages/claude/openplanr/skills/delegate/SKILL.md +2 -1
- package/lib/host-packages/claude/openplanr/skills/delegate/references/integration-review.md +26 -20
- package/lib/host-packages/claude/openplanr/skills/delegate/references/operator-guide.md +25 -1
- package/lib/host-packages/claude/openplanr/skills/delegate/references/run-handoff.md +2 -2
- package/lib/host-packages/claude/openplanr/skills/delegate/references/worktree-custody.md +17 -9
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/adapters/claude.mjs +15 -3
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/adapters/codex.mjs +38 -2
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/adapters/native.mjs +5 -0
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/custody.mjs +217 -10
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/handoff.mjs +1080 -0
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/integrate.mjs +96 -201
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/integration-files.mjs +3 -382
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/presentation.mjs +29 -12
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/run-contract.mjs +11 -0
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/run-execution.mjs +1 -1
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/run-lifecycle.mjs +14 -10
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/run-preparation.mjs +4 -0
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/run-record.mjs +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 -32
- 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 -32
- 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 -32
- package/lib/host-packages/claude/openplanr/skills/investigate/SKILL.md +1 -0
- package/lib/host-packages/claude/openplanr/skills/investigate/references/fail-first.md +40 -0
- package/lib/host-packages/claude/openplanr/skills/plan/SKILL.md +7 -3
- package/lib/host-packages/claude/openplanr/skills/ship/SKILL.md +22 -10
- package/lib/host-packages/claude/openplanr/skills/ship/references/fail-first.md +40 -0
- package/lib/host-packages/claude/openplanr/skills/ship/references/result-contract.md +7 -3
- package/lib/host-packages/cursor/openplanr/.openplanr-content.json +55 -427
- 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-delegate/references/integration-review.md +26 -20
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/references/operator-guide.md +25 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/references/run-handoff.md +2 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/references/worktree-custody.md +17 -9
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/adapters/claude.mjs +15 -3
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/adapters/codex.mjs +38 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/adapters/native.mjs +5 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/custody.mjs +217 -10
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/handoff.mjs +1080 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/integrate.mjs +96 -201
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/integration-files.mjs +3 -382
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/presentation.mjs +29 -12
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/run-contract.mjs +11 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/run-execution.mjs +1 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/run-lifecycle.mjs +14 -10
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/run-preparation.mjs +4 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/run-record.mjs +2 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate.mdc +2 -1
- 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 -32
- 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 -32
- 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 -32
- 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-investigate/references/fail-first.md +40 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-investigate.mdc +1 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-plan.mdc +7 -3
- package/lib/host-packages/cursor/openplanr/rules/planr-ship/references/fail-first.md +40 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-ship/references/result-contract.md +7 -3
- package/lib/host-packages/cursor/openplanr/rules/planr-ship.mdc +22 -10
- package/lib/host-packages/openai/.claude-plugin/marketplace.json +3 -3
- package/lib/host-packages/openai/openplanr/.codex-plugin/plugin.json +2 -2
- package/lib/host-packages/openai/openplanr/.openplanr-content.json +62 -434
- package/lib/host-packages/openai/openplanr/skills/artifact/references/design-sharing.md +2 -2
- package/lib/host-packages/openai/openplanr/skills/delegate/SKILL.md +2 -1
- package/lib/host-packages/openai/openplanr/skills/delegate/openplanr.skill.json +1 -1
- package/lib/host-packages/openai/openplanr/skills/delegate/references/integration-review.md +26 -20
- package/lib/host-packages/openai/openplanr/skills/delegate/references/operator-guide.md +25 -1
- package/lib/host-packages/openai/openplanr/skills/delegate/references/run-handoff.md +2 -2
- package/lib/host-packages/openai/openplanr/skills/delegate/references/worktree-custody.md +17 -9
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/adapters/claude.mjs +15 -3
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/adapters/codex.mjs +38 -2
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/adapters/native.mjs +5 -0
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/custody.mjs +217 -10
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/handoff.mjs +1080 -0
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/integrate.mjs +96 -201
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/integration-files.mjs +3 -382
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/presentation.mjs +29 -12
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/run-contract.mjs +11 -0
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/run-execution.mjs +1 -1
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/run-lifecycle.mjs +14 -10
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/run-preparation.mjs +4 -0
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/run-record.mjs +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 -32
- 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 -32
- 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 -32
- package/lib/host-packages/openai/openplanr/skills/investigate/SKILL.md +1 -0
- package/lib/host-packages/openai/openplanr/skills/investigate/openplanr.skill.json +12 -1
- package/lib/host-packages/openai/openplanr/skills/investigate/references/fail-first.md +40 -0
- 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/lib/host-packages/openai/openplanr/skills/ship/SKILL.md +22 -10
- package/lib/host-packages/openai/openplanr/skills/ship/openplanr.skill.json +12 -1
- package/lib/host-packages/openai/openplanr/skills/ship/references/fail-first.md +40 -0
- package/lib/host-packages/openai/openplanr/skills/ship/references/result-contract.md +7 -3
- package/package.json +8 -8
- package/dist/dashboard/assets/index-BU5fzjyz.css +0 -1
- package/dist/dashboard/assets/index-B_96uzCl.js +0 -572
- package/dist/dashboard/assets/index-B_96uzCl.js.map +0 -1
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-artifact-shell.mjs +0 -1774
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-chunked-workspace-client.mjs +0 -555
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-compression.mjs +0 -4180
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-document.mjs +0 -2937
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-encrypted-workspace-client.mjs +0 -647
- 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 -1576
- 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-owner-custody.mjs +0 -129
- 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-resource-pack.mjs +0 -698
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-review.mjs +0 -3385
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-runtime-home.mjs +0 -39
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-runtime-support-25485dbf1cb2.mjs +0 -24
- 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.mjs +0 -1993
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-shared-artifact-support-dependencies-design-support-protocol-contracts-3d9b1a86.mjs +0 -1113
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-shared-artifact-support-protocol-contracts-ea2cd15e.mjs +0 -505
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-shared-protocol-contracts-75a938cc.mjs +0 -222
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-shared-protocol-contracts-b5f28f94.mjs +0 -5907
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-upload-spool.mjs +0 -198
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design.mjs +0 -1430
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/notices/THIRD_PARTY_NOTICES.txt +0 -2050
- 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 -809
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/03-protocol-contracts.js +0 -5693
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/04-compression.js +0 -4175
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/05-artifact-sharing.js +0 -65
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/06-artifact-review-ui.js +0 -1755
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/07-artifact-sharing.js +0 -62
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/08-artifact-review-ui.js +0 -2633
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources.json +0 -124
- 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 -133
- 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 -159
- 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-paste.schema.json +0 -49
- 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/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-workspace.schema.json +0 -108
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-create.schema.json +0 -170
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-event.schema.json +0 -97
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-revision.schema.json +0 -56
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/design-protocol-contracts.mjs +0 -5468
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/design.mjs +0 -2844
- 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 -159
- 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/delegate/scripts/integration-transaction.mjs +0 -958
- 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-delegate/scripts/integration-transaction.mjs +0 -958
- 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 -1774
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-chunked-workspace-client.mjs +0 -555
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-compression.mjs +0 -4180
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-document.mjs +0 -2937
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-encrypted-workspace-client.mjs +0 -647
- 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 -1576
- 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-owner-custody.mjs +0 -129
- 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-resource-pack.mjs +0 -698
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-review.mjs +0 -3385
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-runtime-home.mjs +0 -39
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-runtime-support-25485dbf1cb2.mjs +0 -24
- 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.mjs +0 -1993
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-shared-artifact-support-dependencies-design-support-protocol-contracts-3d9b1a86.mjs +0 -1113
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-shared-artifact-support-protocol-contracts-ea2cd15e.mjs +0 -505
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-shared-protocol-contracts-75a938cc.mjs +0 -222
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-shared-protocol-contracts-b5f28f94.mjs +0 -5907
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-upload-spool.mjs +0 -198
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design.mjs +0 -1430
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/notices/THIRD_PARTY_NOTICES.txt +0 -2050
- 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 -809
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/03-protocol-contracts.js +0 -5693
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/04-compression.js +0 -4175
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/05-artifact-sharing.js +0 -65
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/06-artifact-review-ui.js +0 -1755
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/07-artifact-sharing.js +0 -62
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/08-artifact-review-ui.js +0 -2633
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources.json +0 -124
- 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 -133
- 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 -159
- 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-paste.schema.json +0 -49
- 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/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-workspace.schema.json +0 -108
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-create.schema.json +0 -170
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-event.schema.json +0 -97
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-revision.schema.json +0 -56
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/design-protocol-contracts.mjs +0 -5468
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/design.mjs +0 -2844
- 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 -159
- 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 -1774
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-chunked-workspace-client.mjs +0 -555
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-compression.mjs +0 -4180
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-document.mjs +0 -2937
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-encrypted-workspace-client.mjs +0 -647
- 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 -1576
- 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-owner-custody.mjs +0 -129
- 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-resource-pack.mjs +0 -698
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-review.mjs +0 -3385
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-runtime-home.mjs +0 -39
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-runtime-support-25485dbf1cb2.mjs +0 -24
- 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.mjs +0 -1993
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-shared-artifact-support-dependencies-design-support-protocol-contracts-3d9b1a86.mjs +0 -1113
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-shared-artifact-support-protocol-contracts-ea2cd15e.mjs +0 -505
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-shared-protocol-contracts-75a938cc.mjs +0 -222
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-shared-protocol-contracts-b5f28f94.mjs +0 -5907
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-upload-spool.mjs +0 -198
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design.mjs +0 -1430
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/notices/THIRD_PARTY_NOTICES.txt +0 -2050
- 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 -809
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/03-protocol-contracts.js +0 -5693
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/04-compression.js +0 -4175
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/05-artifact-sharing.js +0 -65
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/06-artifact-review-ui.js +0 -1755
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/07-artifact-sharing.js +0 -62
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/08-artifact-review-ui.js +0 -2633
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources.json +0 -124
- 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 -133
- 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 -159
- 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-paste.schema.json +0 -49
- 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/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-workspace.schema.json +0 -108
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-create.schema.json +0 -170
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-event.schema.json +0 -97
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-revision.schema.json +0 -56
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/design-protocol-contracts.mjs +0 -5468
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/design.mjs +0 -2844
- 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 -159
- 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/delegate/scripts/integration-transaction.mjs +0 -958
- 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
|
@@ -1,966 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
// ../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs
|
|
4
|
-
var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1), __defProp23 = Object.defineProperty, __name22 = (target, value) => __defProp23(target, "name", { value, configurable: !0 }), ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus", EVENT_OPTIONS2 = { bubbles: !1, cancelable: !0 }, GROUP_NAME = "RovingFocusGroup", [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME), [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(
|
|
5
|
-
GROUP_NAME,
|
|
6
|
-
[createCollectionScope]
|
|
7
|
-
), Orientation = {
|
|
8
|
-
Vertical: "vertical",
|
|
9
|
-
Horizontal: "horizontal"
|
|
10
|
-
}, Direction2 = {
|
|
11
|
-
LTR: "ltr",
|
|
12
|
-
RTL: "rtl"
|
|
13
|
-
}, [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME), RovingFocusGroup = /* @__PURE__ */ React33.forwardRef(
|
|
14
|
-
// blank line to reduce diff noise
|
|
15
|
-
/* @__PURE__ */ __name22(function(props, forwardedRef) {
|
|
16
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });
|
|
17
|
-
}, "RovingFocusGroup")
|
|
18
|
-
), RovingFocusGroupImpl = /* @__PURE__ */ React33.forwardRef(/* @__PURE__ */ __name22(function(props, forwardedRef) {
|
|
19
|
-
let {
|
|
20
|
-
__scopeRovingFocusGroup,
|
|
21
|
-
orientation,
|
|
22
|
-
loop = !1,
|
|
23
|
-
dir,
|
|
24
|
-
currentTabStopId: currentTabStopIdProp,
|
|
25
|
-
defaultCurrentTabStopId,
|
|
26
|
-
onCurrentTabStopIdChange,
|
|
27
|
-
onEntryFocus,
|
|
28
|
-
preventScrollOnEntryFocus = !1,
|
|
29
|
-
...groupProps
|
|
30
|
-
} = props, ref = React33.useRef(null), composedRefs = useComposedRefs(forwardedRef, ref), direction = useDirection(dir), [currentTabStopId, setCurrentTabStopId] = useControllableState({
|
|
31
|
-
prop: currentTabStopIdProp,
|
|
32
|
-
defaultProp: defaultCurrentTabStopId ?? null,
|
|
33
|
-
onChange: onCurrentTabStopIdChange,
|
|
34
|
-
caller: GROUP_NAME
|
|
35
|
-
}), [isTabbingBackOut, setIsTabbingBackOut] = React33.useState(!1), handleEntryFocus = useCallbackRef(onEntryFocus), getItems = useCollection(__scopeRovingFocusGroup), isClickFocusRef = React33.useRef(!1), [focusableItemsCount, setFocusableItemsCount] = React33.useState(0);
|
|
36
|
-
return React33.useEffect(() => {
|
|
37
|
-
let node = ref.current;
|
|
38
|
-
if (node)
|
|
39
|
-
return node.addEventListener(ENTRY_FOCUS, handleEntryFocus), () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);
|
|
40
|
-
}, [handleEntryFocus]), /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
41
|
-
RovingFocusProvider,
|
|
42
|
-
{
|
|
43
|
-
scope: __scopeRovingFocusGroup,
|
|
44
|
-
orientation,
|
|
45
|
-
dir: direction,
|
|
46
|
-
loop,
|
|
47
|
-
currentTabStopId,
|
|
48
|
-
onItemFocus: React33.useCallback(
|
|
49
|
-
(tabStopId) => setCurrentTabStopId(tabStopId),
|
|
50
|
-
[setCurrentTabStopId]
|
|
51
|
-
),
|
|
52
|
-
onItemShiftTab: React33.useCallback(() => setIsTabbingBackOut(!0), []),
|
|
53
|
-
onFocusableItemAdd: React33.useCallback(
|
|
54
|
-
() => setFocusableItemsCount((prevCount) => prevCount + 1),
|
|
55
|
-
[]
|
|
56
|
-
),
|
|
57
|
-
onFocusableItemRemove: React33.useCallback(
|
|
58
|
-
() => setFocusableItemsCount((prevCount) => prevCount - 1),
|
|
59
|
-
[]
|
|
60
|
-
),
|
|
61
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
62
|
-
Primitive.div,
|
|
63
|
-
{
|
|
64
|
-
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
65
|
-
"data-orientation": orientation,
|
|
66
|
-
...groupProps,
|
|
67
|
-
ref: composedRefs,
|
|
68
|
-
style: { outline: "none", ...props.style },
|
|
69
|
-
onMouseDown: composeEventHandlers(props.onMouseDown, () => {
|
|
70
|
-
isClickFocusRef.current = !0;
|
|
71
|
-
}),
|
|
72
|
-
onFocus: composeEventHandlers(props.onFocus, (event) => {
|
|
73
|
-
let isKeyboardFocus = !isClickFocusRef.current;
|
|
74
|
-
if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
|
|
75
|
-
let entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS2);
|
|
76
|
-
if (event.currentTarget.dispatchEvent(entryFocusEvent), !entryFocusEvent.defaultPrevented) {
|
|
77
|
-
let items = getItems().filter((item) => item.focusable), activeItem = items.find((item) => item.active), currentItem = items.find((item) => item.id === currentTabStopId), candidateNodes = [activeItem, currentItem, ...items].filter(
|
|
78
|
-
Boolean
|
|
79
|
-
).map((item) => item.ref.current);
|
|
80
|
-
focusFirst2(candidateNodes, preventScrollOnEntryFocus);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
isClickFocusRef.current = !1;
|
|
84
|
-
}),
|
|
85
|
-
onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(!1))
|
|
86
|
-
}
|
|
87
|
-
)
|
|
88
|
-
}
|
|
89
|
-
);
|
|
90
|
-
}, "RovingFocusGroupImpl")), ITEM_NAME = "RovingFocusGroupItem", RovingFocusGroupItem = /* @__PURE__ */ React33.forwardRef(
|
|
91
|
-
// blank line to reduce diff noise
|
|
92
|
-
/* @__PURE__ */ __name22(function(props, forwardedRef) {
|
|
93
|
-
let {
|
|
94
|
-
__scopeRovingFocusGroup,
|
|
95
|
-
focusable = !0,
|
|
96
|
-
active = !1,
|
|
97
|
-
tabStopId,
|
|
98
|
-
children,
|
|
99
|
-
...itemProps
|
|
100
|
-
} = props, autoId = useId(), id = tabStopId || autoId, context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup), isCurrentTabStop = context.currentTabStopId === id, getItems = useCollection(__scopeRovingFocusGroup), { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context, isHydrated = useIsHydrated2();
|
|
101
|
-
return useLayoutEffect2(() => {
|
|
102
|
-
if (!(!isHydrated || !focusable))
|
|
103
|
-
return onFocusableItemAdd(), () => onFocusableItemRemove();
|
|
104
|
-
}, [isHydrated, focusable, onFocusableItemAdd, onFocusableItemRemove]), React33.useEffect(() => {
|
|
105
|
-
if (!(isHydrated || !focusable))
|
|
106
|
-
return onFocusableItemAdd(), () => onFocusableItemRemove();
|
|
107
|
-
}, [isHydrated, focusable, onFocusableItemAdd, onFocusableItemRemove]), /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
108
|
-
Collection.ItemSlot,
|
|
109
|
-
{
|
|
110
|
-
scope: __scopeRovingFocusGroup,
|
|
111
|
-
id,
|
|
112
|
-
focusable,
|
|
113
|
-
active,
|
|
114
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
115
|
-
Primitive.span,
|
|
116
|
-
{
|
|
117
|
-
tabIndex: isCurrentTabStop ? 0 : -1,
|
|
118
|
-
"data-orientation": context.orientation,
|
|
119
|
-
...itemProps,
|
|
120
|
-
ref: forwardedRef,
|
|
121
|
-
onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {
|
|
122
|
-
focusable ? context.onItemFocus(id) : event.preventDefault();
|
|
123
|
-
}),
|
|
124
|
-
onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),
|
|
125
|
-
onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
|
|
126
|
-
if (event.key === "Tab" && event.shiftKey) {
|
|
127
|
-
context.onItemShiftTab();
|
|
128
|
-
return;
|
|
129
|
-
}
|
|
130
|
-
if (event.target !== event.currentTarget) return;
|
|
131
|
-
let focusIntent = getFocusIntent(event, context.orientation, context.dir);
|
|
132
|
-
if (focusIntent !== void 0) {
|
|
133
|
-
if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;
|
|
134
|
-
event.preventDefault();
|
|
135
|
-
let candidateNodes = getItems().filter((item) => item.focusable).map((item) => item.ref.current);
|
|
136
|
-
if (focusIntent === "last") candidateNodes.reverse();
|
|
137
|
-
else if (focusIntent === "prev" || focusIntent === "next") {
|
|
138
|
-
focusIntent === "prev" && candidateNodes.reverse();
|
|
139
|
-
let currentIndex = candidateNodes.indexOf(event.currentTarget);
|
|
140
|
-
candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);
|
|
141
|
-
}
|
|
142
|
-
setTimeout(() => focusFirst2(candidateNodes));
|
|
143
|
-
}
|
|
144
|
-
}),
|
|
145
|
-
children: typeof children == "function" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children
|
|
146
|
-
}
|
|
147
|
-
)
|
|
148
|
-
}
|
|
149
|
-
);
|
|
150
|
-
}, "RovingFocusGroupItem")
|
|
151
|
-
), MAP_KEY_TO_FOCUS_INTENT = {
|
|
152
|
-
ArrowLeft: "prev",
|
|
153
|
-
ArrowUp: "prev",
|
|
154
|
-
ArrowRight: "next",
|
|
155
|
-
ArrowDown: "next",
|
|
156
|
-
PageUp: "first",
|
|
157
|
-
Home: "first",
|
|
158
|
-
PageDown: "last",
|
|
159
|
-
End: "last"
|
|
160
|
-
};
|
|
161
|
-
function getDirectionAwareKey(key, dir) {
|
|
162
|
-
return dir !== Direction2.RTL ? key : key === "ArrowLeft" ? "ArrowRight" : key === "ArrowRight" ? "ArrowLeft" : key;
|
|
163
|
-
}
|
|
164
|
-
__name22(getDirectionAwareKey, "getDirectionAwareKey");
|
|
165
|
-
function getFocusIntent(event, orientation, dir) {
|
|
166
|
-
let key = getDirectionAwareKey(event.key, dir);
|
|
167
|
-
if (!(orientation === Orientation.Vertical && ["ArrowLeft", "ArrowRight"].includes(key)) && !(orientation === Orientation.Horizontal && ["ArrowUp", "ArrowDown"].includes(key)))
|
|
168
|
-
return MAP_KEY_TO_FOCUS_INTENT[key];
|
|
169
|
-
}
|
|
170
|
-
__name22(getFocusIntent, "getFocusIntent");
|
|
171
|
-
function focusFirst2(candidates, preventScroll = !1) {
|
|
172
|
-
let PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
173
|
-
for (let candidate of candidates)
|
|
174
|
-
if (candidate === PREVIOUSLY_FOCUSED_ELEMENT || (candidate.focus({ preventScroll }), document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT)) return;
|
|
175
|
-
}
|
|
176
|
-
__name22(focusFirst2, "focusFirst");
|
|
177
|
-
function wrapArray(array, startIndex) {
|
|
178
|
-
return array.map((_, index2) => array[(startIndex + index2) % array.length]);
|
|
179
|
-
}
|
|
180
|
-
__name22(wrapArray, "wrapArray");
|
|
181
|
-
|
|
182
|
-
// ../../node_modules/@radix-ui/react-menu/dist/index.mjs
|
|
183
|
-
var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1), __defProp24 = Object.defineProperty, __name23 = (target, value) => __defProp24(target, "name", { value, configurable: !0 }), Direction3 = {
|
|
184
|
-
LTR: "ltr",
|
|
185
|
-
RTL: "rtl"
|
|
186
|
-
}, SELECTION_KEYS = ["Enter", " "], FIRST_KEYS = ["ArrowDown", "PageUp", "Home"], LAST_KEYS = ["ArrowUp", "PageDown", "End"], FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS], SUB_OPEN_KEYS = {
|
|
187
|
-
ltr: [...SELECTION_KEYS, "ArrowRight"],
|
|
188
|
-
rtl: [...SELECTION_KEYS, "ArrowLeft"]
|
|
189
|
-
}, SUB_CLOSE_KEYS = {
|
|
190
|
-
ltr: ["ArrowLeft"],
|
|
191
|
-
rtl: ["ArrowRight"]
|
|
192
|
-
}, MENU_NAME = "Menu", [Collection2, useCollection2, createCollectionScope2] = createCollection(MENU_NAME), [createMenuContext, createMenuScope] = createContextScope(MENU_NAME, [
|
|
193
|
-
createCollectionScope2,
|
|
194
|
-
createPopperScope,
|
|
195
|
-
createRovingFocusGroupScope
|
|
196
|
-
]), usePopperScope = createPopperScope(), useRovingFocusGroupScope = createRovingFocusGroupScope(), [MenuProvider, useMenuContext] = createMenuContext(MENU_NAME), [MenuRootProvider, useMenuRootContext] = createMenuContext(MENU_NAME), Menu = /* @__PURE__ */ __name23((props) => {
|
|
197
|
-
let { __scopeMenu, open = !1, children, dir, onOpenChange, modal = !0 } = props, popperScope = usePopperScope(__scopeMenu), [content, setContent] = React34.useState(null), isUsingKeyboardRef = React34.useRef(!1), handleOpenChange = useCallbackRef(onOpenChange), direction = useDirection(dir);
|
|
198
|
-
return React34.useEffect(() => {
|
|
199
|
-
let handleKeyDown = /* @__PURE__ */ __name23(() => {
|
|
200
|
-
isUsingKeyboardRef.current = !0, document.addEventListener("pointerdown", handlePointer, { capture: !0, once: !0 }), document.addEventListener("pointermove", handlePointer, { capture: !0, once: !0 });
|
|
201
|
-
}, "handleKeyDown"), handlePointer = /* @__PURE__ */ __name23(() => isUsingKeyboardRef.current = !1, "handlePointer");
|
|
202
|
-
return document.addEventListener("keydown", handleKeyDown, { capture: !0 }), () => {
|
|
203
|
-
document.removeEventListener("keydown", handleKeyDown, { capture: !0 }), document.removeEventListener("pointerdown", handlePointer, { capture: !0 }), document.removeEventListener("pointermove", handlePointer, { capture: !0 });
|
|
204
|
-
};
|
|
205
|
-
}, []), React34.useEffect(() => {
|
|
206
|
-
if (!open)
|
|
207
|
-
return;
|
|
208
|
-
let handleBlur = /* @__PURE__ */ __name23(() => handleOpenChange(!1), "handleBlur");
|
|
209
|
-
return window.addEventListener("blur", handleBlur), () => window.removeEventListener("blur", handleBlur);
|
|
210
|
-
}, [open, handleOpenChange]), /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Popper, { ...popperScope, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
211
|
-
MenuProvider,
|
|
212
|
-
{
|
|
213
|
-
scope: __scopeMenu,
|
|
214
|
-
open,
|
|
215
|
-
onOpenChange: handleOpenChange,
|
|
216
|
-
content,
|
|
217
|
-
onContentChange: setContent,
|
|
218
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
219
|
-
MenuRootProvider,
|
|
220
|
-
{
|
|
221
|
-
scope: __scopeMenu,
|
|
222
|
-
onClose: React34.useCallback(() => handleOpenChange(!1), [handleOpenChange]),
|
|
223
|
-
isUsingKeyboardRef,
|
|
224
|
-
dir: direction,
|
|
225
|
-
modal,
|
|
226
|
-
children
|
|
227
|
-
}
|
|
228
|
-
)
|
|
229
|
-
}
|
|
230
|
-
) });
|
|
231
|
-
}, "Menu"), MenuAnchor = /* @__PURE__ */ React34.forwardRef(
|
|
232
|
-
/* @__PURE__ */ __name23(function(props, forwardedRef) {
|
|
233
|
-
let { __scopeMenu, ...anchorProps } = props, popperScope = usePopperScope(__scopeMenu);
|
|
234
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(PopperAnchor, { ...popperScope, ...anchorProps, ref: forwardedRef });
|
|
235
|
-
}, "MenuAnchor")
|
|
236
|
-
), PORTAL_NAME2 = "MenuPortal", [PortalProvider2, usePortalContext2] = createMenuContext(PORTAL_NAME2, {
|
|
237
|
-
forceMount: void 0
|
|
238
|
-
}), MenuPortal = /* @__PURE__ */ __name23((props) => {
|
|
239
|
-
let { __scopeMenu, forceMount, children, container } = props, context = useMenuContext(PORTAL_NAME2, __scopeMenu);
|
|
240
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(PortalProvider2, { scope: __scopeMenu, forceMount, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Portal, { asChild: !0, container, children }) }) });
|
|
241
|
-
}, "MenuPortal"), CONTENT_NAME3 = "MenuContent", [MenuContentProvider, useMenuContentContext] = createMenuContext(CONTENT_NAME3), MenuContent = /* @__PURE__ */ React34.forwardRef(
|
|
242
|
-
/* @__PURE__ */ __name23(function(props, forwardedRef) {
|
|
243
|
-
let portalContext = usePortalContext2(CONTENT_NAME3, props.__scopeMenu), { forceMount = portalContext.forceMount, ...contentProps } = props, context = useMenuContext(CONTENT_NAME3, props.__scopeMenu), rootContext = useMenuRootContext(CONTENT_NAME3, props.__scopeMenu);
|
|
244
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Collection2.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Collection2.Slot, { scope: props.__scopeMenu, children: rootContext.modal ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MenuRootContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MenuRootContentNonModal, { ...contentProps, ref: forwardedRef }) }) }) });
|
|
245
|
-
}, "MenuContent")
|
|
246
|
-
), MenuRootContentModal = /* @__PURE__ */ React34.forwardRef(
|
|
247
|
-
// blank line to reduce diff noise
|
|
248
|
-
/* @__PURE__ */ __name23(function(props, forwardedRef) {
|
|
249
|
-
let context = useMenuContext(CONTENT_NAME3, props.__scopeMenu), ref = React34.useRef(null), composedRefs = useComposedRefs(forwardedRef, ref);
|
|
250
|
-
return React34.useEffect(() => {
|
|
251
|
-
let content = ref.current;
|
|
252
|
-
if (content) return hideOthers(content);
|
|
253
|
-
}, []), /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
254
|
-
MenuContentImpl,
|
|
255
|
-
{
|
|
256
|
-
...props,
|
|
257
|
-
ref: composedRefs,
|
|
258
|
-
trapFocus: context.open,
|
|
259
|
-
disableOutsidePointerEvents: context.open,
|
|
260
|
-
disableOutsideScroll: !0,
|
|
261
|
-
onFocusOutside: composeEventHandlers(
|
|
262
|
-
props.onFocusOutside,
|
|
263
|
-
(event) => event.preventDefault(),
|
|
264
|
-
{ checkForDefaultPrevented: !1 }
|
|
265
|
-
),
|
|
266
|
-
onDismiss: () => context.onOpenChange(!1)
|
|
267
|
-
}
|
|
268
|
-
);
|
|
269
|
-
}, "MenuRootContentModal")
|
|
270
|
-
), MenuRootContentNonModal = /* @__PURE__ */ React34.forwardRef(/* @__PURE__ */ __name23(function(props, forwardedRef) {
|
|
271
|
-
let context = useMenuContext(CONTENT_NAME3, props.__scopeMenu);
|
|
272
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
273
|
-
MenuContentImpl,
|
|
274
|
-
{
|
|
275
|
-
...props,
|
|
276
|
-
ref: forwardedRef,
|
|
277
|
-
trapFocus: !1,
|
|
278
|
-
disableOutsidePointerEvents: !1,
|
|
279
|
-
disableOutsideScroll: !1,
|
|
280
|
-
onDismiss: () => context.onOpenChange(!1)
|
|
281
|
-
}
|
|
282
|
-
);
|
|
283
|
-
}, "MenuRootContentNonModal")), Slot2 = createSlot("MenuContent.ScrollLock"), MenuContentImpl = /* @__PURE__ */ React34.forwardRef(
|
|
284
|
-
// blank line to reduce diff noise
|
|
285
|
-
/* @__PURE__ */ __name23(function(props, forwardedRef) {
|
|
286
|
-
let {
|
|
287
|
-
__scopeMenu,
|
|
288
|
-
loop = !1,
|
|
289
|
-
trapFocus,
|
|
290
|
-
onOpenAutoFocus,
|
|
291
|
-
onCloseAutoFocus,
|
|
292
|
-
disableOutsidePointerEvents,
|
|
293
|
-
onEntryFocus,
|
|
294
|
-
onEscapeKeyDown,
|
|
295
|
-
onPointerDownOutside,
|
|
296
|
-
onFocusOutside,
|
|
297
|
-
onInteractOutside,
|
|
298
|
-
onDismiss,
|
|
299
|
-
disableOutsideScroll,
|
|
300
|
-
...contentProps
|
|
301
|
-
} = props, context = useMenuContext(CONTENT_NAME3, __scopeMenu), rootContext = useMenuRootContext(CONTENT_NAME3, __scopeMenu), popperScope = usePopperScope(__scopeMenu), rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu), getItems = useCollection2(__scopeMenu), [currentItemId, setCurrentItemId] = React34.useState(null), contentRef = React34.useRef(null), [branchNode, setBranchNode] = React34.useState(null);
|
|
302
|
-
useFocusScopeBranch(branchNode);
|
|
303
|
-
let { nodes: branchNodes, registry: branchRegistry } = useFocusScopeBranchRegistry(), isModal = !!(trapFocus || disableOutsideScroll), composedRefs = useComposedRefs(
|
|
304
|
-
forwardedRef,
|
|
305
|
-
contentRef,
|
|
306
|
-
context.onContentChange,
|
|
307
|
-
setBranchNode
|
|
308
|
-
), timerRef = React34.useRef(0), searchRef = React34.useRef(""), pointerGraceTimerRef = React34.useRef(0), pointerGraceIntentRef = React34.useRef(null), pointerDirRef = React34.useRef("right"), lastPointerXRef = React34.useRef(0), shards = React34.useMemo(
|
|
309
|
-
() => disableOutsideScroll ? [contentRef, ...branchNodes.map((node) => ({ current: node }))] : [],
|
|
310
|
-
[contentRef, branchNodes, disableOutsideScroll]
|
|
311
|
-
), ScrollLockWrapper = disableOutsideScroll ? Combination_default : React34.Fragment, scrollLockWrapperProps = disableOutsideScroll ? {
|
|
312
|
-
as: Slot2,
|
|
313
|
-
allowPinchZoom: !0,
|
|
314
|
-
shards
|
|
315
|
-
} : void 0, handleTypeaheadSearch = /* @__PURE__ */ __name23((key) => {
|
|
316
|
-
let search = searchRef.current + key, items = getItems().filter((item) => !item.disabled), currentItem = document.activeElement, currentMatch = items.find((item) => item.ref.current === currentItem)?.textValue, values = items.map((item) => item.textValue), nextMatch = getNextMatch(values, search, currentMatch), newItem = items.find((item) => item.textValue === nextMatch)?.ref.current;
|
|
317
|
-
function updateSearch(value) {
|
|
318
|
-
searchRef.current = value, window.clearTimeout(timerRef.current), value !== "" && (timerRef.current = window.setTimeout(() => updateSearch(""), 1e3));
|
|
319
|
-
}
|
|
320
|
-
__name23(updateSearch, "updateSearch"), updateSearch(search), newItem && setTimeout(() => newItem.focus());
|
|
321
|
-
}, "handleTypeaheadSearch");
|
|
322
|
-
React34.useEffect(() => () => window.clearTimeout(timerRef.current), []), useFocusGuards();
|
|
323
|
-
let isPointerMovingToSubmenu = React34.useCallback((event) => pointerDirRef.current === pointerGraceIntentRef.current?.side && isPointerInGraceArea(event, pointerGraceIntentRef.current?.area), []);
|
|
324
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
325
|
-
MenuContentProvider,
|
|
326
|
-
{
|
|
327
|
-
scope: __scopeMenu,
|
|
328
|
-
searchRef,
|
|
329
|
-
onItemEnter: React34.useCallback(
|
|
330
|
-
(event) => {
|
|
331
|
-
isPointerMovingToSubmenu(event) && event.preventDefault();
|
|
332
|
-
},
|
|
333
|
-
[isPointerMovingToSubmenu]
|
|
334
|
-
),
|
|
335
|
-
onItemLeave: React34.useCallback(
|
|
336
|
-
(event) => {
|
|
337
|
-
isPointerMovingToSubmenu(event) || (contentRef.current?.focus(), setCurrentItemId(null));
|
|
338
|
-
},
|
|
339
|
-
[isPointerMovingToSubmenu]
|
|
340
|
-
),
|
|
341
|
-
onTriggerLeave: React34.useCallback(
|
|
342
|
-
(event) => {
|
|
343
|
-
isPointerMovingToSubmenu(event) && event.preventDefault();
|
|
344
|
-
},
|
|
345
|
-
[isPointerMovingToSubmenu]
|
|
346
|
-
),
|
|
347
|
-
pointerGraceTimerRef,
|
|
348
|
-
onPointerGraceIntentChange: React34.useCallback((intent) => {
|
|
349
|
-
pointerGraceIntentRef.current = intent;
|
|
350
|
-
}, []),
|
|
351
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FocusScopeBranchProvider, { registry: isModal ? branchRegistry : null, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ScrollLockWrapper, { ...scrollLockWrapperProps, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
352
|
-
FocusScope,
|
|
353
|
-
{
|
|
354
|
-
asChild: !0,
|
|
355
|
-
trapped: trapFocus,
|
|
356
|
-
branches: branchNodes,
|
|
357
|
-
onMountAutoFocus: composeEventHandlers(onOpenAutoFocus, (event) => {
|
|
358
|
-
event.preventDefault(), contentRef.current?.focus({ preventScroll: !0 });
|
|
359
|
-
}),
|
|
360
|
-
onUnmountAutoFocus: onCloseAutoFocus,
|
|
361
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
362
|
-
DismissableLayer,
|
|
363
|
-
{
|
|
364
|
-
asChild: !0,
|
|
365
|
-
disableOutsidePointerEvents,
|
|
366
|
-
onEscapeKeyDown,
|
|
367
|
-
onPointerDownOutside,
|
|
368
|
-
onFocusOutside,
|
|
369
|
-
onInteractOutside,
|
|
370
|
-
onDismiss,
|
|
371
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
372
|
-
RovingFocusGroup,
|
|
373
|
-
{
|
|
374
|
-
asChild: !0,
|
|
375
|
-
...rovingFocusGroupScope,
|
|
376
|
-
dir: rootContext.dir,
|
|
377
|
-
orientation: "vertical",
|
|
378
|
-
loop,
|
|
379
|
-
currentTabStopId: currentItemId,
|
|
380
|
-
onCurrentTabStopIdChange: setCurrentItemId,
|
|
381
|
-
onEntryFocus: composeEventHandlers(onEntryFocus, (event) => {
|
|
382
|
-
rootContext.isUsingKeyboardRef.current || event.preventDefault();
|
|
383
|
-
}),
|
|
384
|
-
preventScrollOnEntryFocus: !0,
|
|
385
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
386
|
-
PopperContent,
|
|
387
|
-
{
|
|
388
|
-
role: "menu",
|
|
389
|
-
"aria-orientation": "vertical",
|
|
390
|
-
"data-state": getOpenState(context.open),
|
|
391
|
-
"data-radix-menu-content": "",
|
|
392
|
-
dir: rootContext.dir,
|
|
393
|
-
...popperScope,
|
|
394
|
-
...contentProps,
|
|
395
|
-
ref: composedRefs,
|
|
396
|
-
style: { outline: "none", ...contentProps.style },
|
|
397
|
-
onKeyDown: composeEventHandlers(contentProps.onKeyDown, (event) => {
|
|
398
|
-
let isKeyDownInside = event.target.closest("[data-radix-menu-content]") === event.currentTarget, isModifierKey = event.ctrlKey || event.altKey || event.metaKey, isCharacterKey = event.key.length === 1;
|
|
399
|
-
isKeyDownInside && (event.key === "Tab" && event.preventDefault(), !isModifierKey && isCharacterKey && handleTypeaheadSearch(event.key));
|
|
400
|
-
let content = contentRef.current;
|
|
401
|
-
if (event.target !== content || !FIRST_LAST_KEYS.includes(event.key)) return;
|
|
402
|
-
event.preventDefault();
|
|
403
|
-
let candidateNodes = getItems().filter((item) => !item.disabled).map((item) => item.ref.current);
|
|
404
|
-
LAST_KEYS.includes(event.key) && candidateNodes.reverse(), focusFirst3(candidateNodes);
|
|
405
|
-
}),
|
|
406
|
-
onBlur: composeEventHandlers(props.onBlur, (event) => {
|
|
407
|
-
event.currentTarget.contains(event.target) || (window.clearTimeout(timerRef.current), searchRef.current = "");
|
|
408
|
-
}),
|
|
409
|
-
onPointerMove: composeEventHandlers(
|
|
410
|
-
props.onPointerMove,
|
|
411
|
-
whenMouse((event) => {
|
|
412
|
-
let target = event.target, pointerXHasChanged = lastPointerXRef.current !== event.clientX;
|
|
413
|
-
if (event.currentTarget.contains(target) && pointerXHasChanged) {
|
|
414
|
-
let newDir = event.clientX > lastPointerXRef.current ? "right" : "left";
|
|
415
|
-
pointerDirRef.current = newDir, lastPointerXRef.current = event.clientX;
|
|
416
|
-
}
|
|
417
|
-
})
|
|
418
|
-
)
|
|
419
|
-
}
|
|
420
|
-
)
|
|
421
|
-
}
|
|
422
|
-
)
|
|
423
|
-
}
|
|
424
|
-
)
|
|
425
|
-
}
|
|
426
|
-
) }) })
|
|
427
|
-
}
|
|
428
|
-
);
|
|
429
|
-
}, "MenuContentImpl")
|
|
430
|
-
), MenuGroup = /* @__PURE__ */ React34.forwardRef(
|
|
431
|
-
/* @__PURE__ */ __name23(function(props, forwardedRef) {
|
|
432
|
-
let { __scopeMenu, ...groupProps } = props;
|
|
433
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Primitive.div, { role: "group", ...groupProps, ref: forwardedRef });
|
|
434
|
-
}, "MenuGroup")
|
|
435
|
-
), MenuLabel = /* @__PURE__ */ React34.forwardRef(
|
|
436
|
-
/* @__PURE__ */ __name23(function(props, forwardedRef) {
|
|
437
|
-
let { __scopeMenu, ...labelProps } = props;
|
|
438
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Primitive.div, { ...labelProps, ref: forwardedRef });
|
|
439
|
-
}, "MenuLabel")
|
|
440
|
-
), ITEM_NAME2 = "MenuItem", ITEM_SELECT = "menu.itemSelect", MenuItem = /* @__PURE__ */ React34.forwardRef(
|
|
441
|
-
// blank line to reduce diff noise
|
|
442
|
-
/* @__PURE__ */ __name23(function(props, forwardedRef) {
|
|
443
|
-
let { disabled = !1, onSelect, ...itemProps } = props, ref = React34.useRef(null), rootContext = useMenuRootContext(ITEM_NAME2, props.__scopeMenu), contentContext = useMenuContentContext(ITEM_NAME2, props.__scopeMenu), composedRefs = useComposedRefs(forwardedRef, ref), isPointerDownRef = React34.useRef(!1), handleSelect = /* @__PURE__ */ __name23(() => {
|
|
444
|
-
let menuItem = ref.current;
|
|
445
|
-
if (!disabled && menuItem) {
|
|
446
|
-
let itemSelectEvent = new CustomEvent(ITEM_SELECT, { bubbles: !0, cancelable: !0 });
|
|
447
|
-
menuItem.addEventListener(ITEM_SELECT, (event) => onSelect?.(event), { once: !0 }), dispatchDiscreteCustomEvent(menuItem, itemSelectEvent), itemSelectEvent.defaultPrevented ? isPointerDownRef.current = !1 : rootContext.onClose();
|
|
448
|
-
}
|
|
449
|
-
}, "handleSelect");
|
|
450
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
451
|
-
MenuItemImpl,
|
|
452
|
-
{
|
|
453
|
-
...itemProps,
|
|
454
|
-
ref: composedRefs,
|
|
455
|
-
disabled,
|
|
456
|
-
onClick: composeEventHandlers(props.onClick, handleSelect),
|
|
457
|
-
onPointerDown: (event) => {
|
|
458
|
-
props.onPointerDown?.(event), isPointerDownRef.current = !0;
|
|
459
|
-
},
|
|
460
|
-
onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {
|
|
461
|
-
isPointerDownRef.current || event.currentTarget?.click();
|
|
462
|
-
}),
|
|
463
|
-
onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
|
|
464
|
-
disabled || event.target !== event.currentTarget || contentContext.searchRef.current !== "" && event.key === " " || SELECTION_KEYS.includes(event.key) && (event.currentTarget.click(), event.preventDefault());
|
|
465
|
-
})
|
|
466
|
-
}
|
|
467
|
-
);
|
|
468
|
-
}, "MenuItem")
|
|
469
|
-
), MenuItemImpl = /* @__PURE__ */ React34.forwardRef(
|
|
470
|
-
/* @__PURE__ */ __name23(function(props, forwardedRef) {
|
|
471
|
-
let { __scopeMenu, disabled = !1, textValue, ...itemProps } = props, contentContext = useMenuContentContext(ITEM_NAME2, __scopeMenu), rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu), ref = React34.useRef(null), composedRefs = useComposedRefs(forwardedRef, ref), [isFocused, setIsFocused] = React34.useState(!1), [textContent, setTextContent] = React34.useState("");
|
|
472
|
-
return React34.useEffect(() => {
|
|
473
|
-
let menuItem = ref.current;
|
|
474
|
-
menuItem && setTextContent((menuItem.textContent ?? "").trim());
|
|
475
|
-
}, [itemProps.children]), /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
476
|
-
Collection2.ItemSlot,
|
|
477
|
-
{
|
|
478
|
-
scope: __scopeMenu,
|
|
479
|
-
disabled,
|
|
480
|
-
textValue: textValue ?? textContent,
|
|
481
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(RovingFocusGroupItem, { asChild: !0, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
482
|
-
Primitive.div,
|
|
483
|
-
{
|
|
484
|
-
role: "menuitem",
|
|
485
|
-
"data-highlighted": isFocused ? "" : void 0,
|
|
486
|
-
"aria-disabled": disabled || void 0,
|
|
487
|
-
"data-disabled": disabled ? "" : void 0,
|
|
488
|
-
...itemProps,
|
|
489
|
-
ref: composedRefs,
|
|
490
|
-
onPointerMove: composeEventHandlers(
|
|
491
|
-
props.onPointerMove,
|
|
492
|
-
whenMouse((event) => {
|
|
493
|
-
disabled ? contentContext.onItemLeave(event) : (contentContext.onItemEnter(event), event.defaultPrevented || event.currentTarget.focus({ preventScroll: !0 }));
|
|
494
|
-
})
|
|
495
|
-
),
|
|
496
|
-
onPointerLeave: composeEventHandlers(
|
|
497
|
-
props.onPointerLeave,
|
|
498
|
-
whenMouse((event) => contentContext.onItemLeave(event))
|
|
499
|
-
),
|
|
500
|
-
onFocus: composeEventHandlers(props.onFocus, () => setIsFocused(!0)),
|
|
501
|
-
onBlur: composeEventHandlers(props.onBlur, () => setIsFocused(!1))
|
|
502
|
-
}
|
|
503
|
-
) })
|
|
504
|
-
}
|
|
505
|
-
);
|
|
506
|
-
}, "MenuItemImpl")
|
|
507
|
-
), MenuCheckboxItem = /* @__PURE__ */ React34.forwardRef(
|
|
508
|
-
// blank line to reduce diff noise
|
|
509
|
-
/* @__PURE__ */ __name23(function(props, forwardedRef) {
|
|
510
|
-
let { checked = !1, onCheckedChange, ...checkboxItemProps } = props;
|
|
511
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
512
|
-
MenuItem,
|
|
513
|
-
{
|
|
514
|
-
role: "menuitemcheckbox",
|
|
515
|
-
"aria-checked": isIndeterminate(checked) ? "mixed" : checked,
|
|
516
|
-
...checkboxItemProps,
|
|
517
|
-
ref: forwardedRef,
|
|
518
|
-
"data-state": getCheckedState(checked),
|
|
519
|
-
onSelect: composeEventHandlers(
|
|
520
|
-
checkboxItemProps.onSelect,
|
|
521
|
-
() => onCheckedChange?.(isIndeterminate(checked) ? !0 : !checked),
|
|
522
|
-
{ checkForDefaultPrevented: !1 }
|
|
523
|
-
)
|
|
524
|
-
}
|
|
525
|
-
) });
|
|
526
|
-
}, "MenuCheckboxItem")
|
|
527
|
-
), RADIO_GROUP_NAME = "MenuRadioGroup", [RadioGroupProvider, useRadioGroupContext] = createMenuContext(
|
|
528
|
-
RADIO_GROUP_NAME,
|
|
529
|
-
{ value: void 0, onValueChange: /* @__PURE__ */ __name23(() => {
|
|
530
|
-
}, "onValueChange") }
|
|
531
|
-
), MenuRadioGroup = /* @__PURE__ */ React34.forwardRef(
|
|
532
|
-
/* @__PURE__ */ __name23(function(props, forwardedRef) {
|
|
533
|
-
let { value, onValueChange, ...groupProps } = props, handleValueChange = useCallbackRef(onValueChange);
|
|
534
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(RadioGroupProvider, { scope: props.__scopeMenu, value, onValueChange: handleValueChange, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MenuGroup, { ...groupProps, ref: forwardedRef }) });
|
|
535
|
-
}, "MenuRadioGroup")
|
|
536
|
-
), RADIO_ITEM_NAME = "MenuRadioItem", MenuRadioItem = /* @__PURE__ */ React34.forwardRef(
|
|
537
|
-
/* @__PURE__ */ __name23(function(props, forwardedRef) {
|
|
538
|
-
let { value, ...radioItemProps } = props, context = useRadioGroupContext(RADIO_ITEM_NAME, props.__scopeMenu), checked = value === context.value;
|
|
539
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
540
|
-
MenuItem,
|
|
541
|
-
{
|
|
542
|
-
role: "menuitemradio",
|
|
543
|
-
"aria-checked": checked,
|
|
544
|
-
...radioItemProps,
|
|
545
|
-
ref: forwardedRef,
|
|
546
|
-
"data-state": getCheckedState(checked),
|
|
547
|
-
onSelect: composeEventHandlers(
|
|
548
|
-
radioItemProps.onSelect,
|
|
549
|
-
() => context.onValueChange?.(value),
|
|
550
|
-
{ checkForDefaultPrevented: !1 }
|
|
551
|
-
)
|
|
552
|
-
}
|
|
553
|
-
) });
|
|
554
|
-
}, "MenuRadioItem")
|
|
555
|
-
), ITEM_INDICATOR_NAME = "MenuItemIndicator", [ItemIndicatorProvider, useItemIndicatorContext] = createMenuContext(
|
|
556
|
-
ITEM_INDICATOR_NAME,
|
|
557
|
-
{ checked: !1 }
|
|
558
|
-
), MenuItemIndicator = /* @__PURE__ */ React34.forwardRef(
|
|
559
|
-
// blank line to reduce diff noise
|
|
560
|
-
/* @__PURE__ */ __name23(function(props, forwardedRef) {
|
|
561
|
-
let { __scopeMenu, forceMount, ...itemIndicatorProps } = props, indicatorContext = useItemIndicatorContext(ITEM_INDICATOR_NAME, __scopeMenu);
|
|
562
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
563
|
-
Presence,
|
|
564
|
-
{
|
|
565
|
-
present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === !0,
|
|
566
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
567
|
-
Primitive.span,
|
|
568
|
-
{
|
|
569
|
-
...itemIndicatorProps,
|
|
570
|
-
ref: forwardedRef,
|
|
571
|
-
"data-state": getCheckedState(indicatorContext.checked)
|
|
572
|
-
}
|
|
573
|
-
)
|
|
574
|
-
}
|
|
575
|
-
);
|
|
576
|
-
}, "MenuItemIndicator")
|
|
577
|
-
), MenuSeparator = /* @__PURE__ */ React34.forwardRef(
|
|
578
|
-
/* @__PURE__ */ __name23(function(props, forwardedRef) {
|
|
579
|
-
let { __scopeMenu, ...separatorProps } = props;
|
|
580
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
581
|
-
Primitive.div,
|
|
582
|
-
{
|
|
583
|
-
role: "separator",
|
|
584
|
-
"aria-orientation": "horizontal",
|
|
585
|
-
...separatorProps,
|
|
586
|
-
ref: forwardedRef
|
|
587
|
-
}
|
|
588
|
-
);
|
|
589
|
-
}, "MenuSeparator")
|
|
590
|
-
), MenuArrow = /* @__PURE__ */ React34.forwardRef(
|
|
591
|
-
/* @__PURE__ */ __name23(function(props, forwardedRef) {
|
|
592
|
-
let { __scopeMenu, ...arrowProps } = props, popperScope = usePopperScope(__scopeMenu);
|
|
593
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(PopperArrow, { ...popperScope, ...arrowProps, ref: forwardedRef });
|
|
594
|
-
}, "MenuArrow")
|
|
595
|
-
), SUB_NAME = "MenuSub", [MenuSubProvider, useMenuSubContext] = createMenuContext(SUB_NAME), MenuSub = /* @__PURE__ */ __name23((props) => {
|
|
596
|
-
let { __scopeMenu, children, open = !1, onOpenChange } = props, parentMenuContext = useMenuContext(SUB_NAME, __scopeMenu), popperScope = usePopperScope(__scopeMenu), [trigger, setTrigger] = React34.useState(null), [content, setContent] = React34.useState(null), handleOpenChange = useCallbackRef(onOpenChange);
|
|
597
|
-
return React34.useEffect(() => (parentMenuContext.open === !1 && handleOpenChange(!1), () => handleOpenChange(!1)), [parentMenuContext.open, handleOpenChange]), /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Popper, { ...popperScope, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
598
|
-
MenuProvider,
|
|
599
|
-
{
|
|
600
|
-
scope: __scopeMenu,
|
|
601
|
-
open,
|
|
602
|
-
onOpenChange: handleOpenChange,
|
|
603
|
-
content,
|
|
604
|
-
onContentChange: setContent,
|
|
605
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
606
|
-
MenuSubProvider,
|
|
607
|
-
{
|
|
608
|
-
scope: __scopeMenu,
|
|
609
|
-
contentId: useId(),
|
|
610
|
-
triggerId: useId(),
|
|
611
|
-
trigger,
|
|
612
|
-
onTriggerChange: setTrigger,
|
|
613
|
-
children
|
|
614
|
-
}
|
|
615
|
-
)
|
|
616
|
-
}
|
|
617
|
-
) });
|
|
618
|
-
}, "MenuSub"), SUB_TRIGGER_NAME = "MenuSubTrigger", MenuSubTrigger = /* @__PURE__ */ React34.forwardRef(
|
|
619
|
-
/* @__PURE__ */ __name23(function(props, forwardedRef) {
|
|
620
|
-
let context = useMenuContext(SUB_TRIGGER_NAME, props.__scopeMenu), rootContext = useMenuRootContext(SUB_TRIGGER_NAME, props.__scopeMenu), subContext = useMenuSubContext(SUB_TRIGGER_NAME, props.__scopeMenu), contentContext = useMenuContentContext(SUB_TRIGGER_NAME, props.__scopeMenu), openTimerRef = React34.useRef(null), { pointerGraceTimerRef, onPointerGraceIntentChange } = contentContext, scope = { __scopeMenu: props.__scopeMenu }, clearOpenTimer = React34.useCallback(() => {
|
|
621
|
-
openTimerRef.current && window.clearTimeout(openTimerRef.current), openTimerRef.current = null;
|
|
622
|
-
}, []);
|
|
623
|
-
React34.useEffect(() => clearOpenTimer, [clearOpenTimer]), React34.useEffect(() => {
|
|
624
|
-
let pointerGraceTimer = pointerGraceTimerRef.current;
|
|
625
|
-
return () => {
|
|
626
|
-
window.clearTimeout(pointerGraceTimer), onPointerGraceIntentChange(null);
|
|
627
|
-
};
|
|
628
|
-
}, [pointerGraceTimerRef, onPointerGraceIntentChange]);
|
|
629
|
-
let composedRefs = useComposedRefs(forwardedRef, subContext.onTriggerChange);
|
|
630
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MenuAnchor, { asChild: !0, ...scope, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
631
|
-
MenuItemImpl,
|
|
632
|
-
{
|
|
633
|
-
id: subContext.triggerId,
|
|
634
|
-
"aria-haspopup": "menu",
|
|
635
|
-
"aria-expanded": context.open,
|
|
636
|
-
"aria-controls": context.open ? subContext.contentId : void 0,
|
|
637
|
-
"data-state": getOpenState(context.open),
|
|
638
|
-
...props,
|
|
639
|
-
ref: composedRefs,
|
|
640
|
-
onClick: (event) => {
|
|
641
|
-
props.onClick?.(event), !(props.disabled || event.defaultPrevented) && (event.currentTarget.focus(), context.open || context.onOpenChange(!0));
|
|
642
|
-
},
|
|
643
|
-
onPointerMove: composeEventHandlers(
|
|
644
|
-
props.onPointerMove,
|
|
645
|
-
whenMouse((event) => {
|
|
646
|
-
contentContext.onItemEnter(event), !event.defaultPrevented && !props.disabled && !context.open && !openTimerRef.current && (contentContext.onPointerGraceIntentChange(null), openTimerRef.current = window.setTimeout(() => {
|
|
647
|
-
context.onOpenChange(!0), clearOpenTimer();
|
|
648
|
-
}, 100));
|
|
649
|
-
})
|
|
650
|
-
),
|
|
651
|
-
onPointerLeave: composeEventHandlers(
|
|
652
|
-
props.onPointerLeave,
|
|
653
|
-
whenMouse((event) => {
|
|
654
|
-
clearOpenTimer();
|
|
655
|
-
let contentRect = context.content?.getBoundingClientRect();
|
|
656
|
-
if (contentRect) {
|
|
657
|
-
let side = context.content?.dataset.side, rightSide = side === "right", bleed = rightSide ? -5 : 5, contentNearEdge = contentRect[rightSide ? "left" : "right"], contentFarEdge = contentRect[rightSide ? "right" : "left"];
|
|
658
|
-
contentContext.onPointerGraceIntentChange({
|
|
659
|
-
area: [
|
|
660
|
-
// Apply a bleed on clientX to ensure that our exit point is
|
|
661
|
-
// consistently within polygon bounds
|
|
662
|
-
{ x: event.clientX + bleed, y: event.clientY },
|
|
663
|
-
{ x: contentNearEdge, y: contentRect.top },
|
|
664
|
-
{ x: contentFarEdge, y: contentRect.top },
|
|
665
|
-
{ x: contentFarEdge, y: contentRect.bottom },
|
|
666
|
-
{ x: contentNearEdge, y: contentRect.bottom }
|
|
667
|
-
],
|
|
668
|
-
side
|
|
669
|
-
}), window.clearTimeout(pointerGraceTimerRef.current), pointerGraceTimerRef.current = window.setTimeout(
|
|
670
|
-
() => contentContext.onPointerGraceIntentChange(null),
|
|
671
|
-
300
|
|
672
|
-
);
|
|
673
|
-
} else {
|
|
674
|
-
if (contentContext.onTriggerLeave(event), event.defaultPrevented) return;
|
|
675
|
-
contentContext.onPointerGraceIntentChange(null);
|
|
676
|
-
}
|
|
677
|
-
})
|
|
678
|
-
),
|
|
679
|
-
onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
|
|
680
|
-
props.disabled || event.target !== event.currentTarget || contentContext.searchRef.current !== "" && event.key === " " || SUB_OPEN_KEYS[rootContext.dir].includes(event.key) && (context.onOpenChange(!0), context.content?.focus(), event.preventDefault());
|
|
681
|
-
})
|
|
682
|
-
}
|
|
683
|
-
) });
|
|
684
|
-
}, "MenuSubTrigger")
|
|
685
|
-
), SUB_CONTENT_NAME = "MenuSubContent", MenuSubContent = /* @__PURE__ */ React34.forwardRef(
|
|
686
|
-
/* @__PURE__ */ __name23(function(props, forwardedRef) {
|
|
687
|
-
let portalContext = usePortalContext2(CONTENT_NAME3, props.__scopeMenu), { forceMount = portalContext.forceMount, align = "start", ...subContentProps } = props, context = useMenuContext(CONTENT_NAME3, props.__scopeMenu), rootContext = useMenuRootContext(CONTENT_NAME3, props.__scopeMenu), subContext = useMenuSubContext(SUB_CONTENT_NAME, props.__scopeMenu), ref = React34.useRef(null), composedRefs = useComposedRefs(forwardedRef, ref);
|
|
688
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Collection2.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Collection2.Slot, { scope: props.__scopeMenu, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
689
|
-
MenuContentImpl,
|
|
690
|
-
{
|
|
691
|
-
id: subContext.contentId,
|
|
692
|
-
"aria-labelledby": subContext.triggerId,
|
|
693
|
-
...subContentProps,
|
|
694
|
-
ref: composedRefs,
|
|
695
|
-
align,
|
|
696
|
-
side: rootContext.dir === Direction3.RTL ? "left" : "right",
|
|
697
|
-
disableOutsidePointerEvents: !1,
|
|
698
|
-
disableOutsideScroll: !1,
|
|
699
|
-
trapFocus: !1,
|
|
700
|
-
onOpenAutoFocus: (event) => {
|
|
701
|
-
rootContext.isUsingKeyboardRef.current && ref.current?.focus(), event.preventDefault();
|
|
702
|
-
},
|
|
703
|
-
onCloseAutoFocus: (event) => event.preventDefault(),
|
|
704
|
-
onFocusOutside: composeEventHandlers(props.onFocusOutside, (event) => {
|
|
705
|
-
event.target !== subContext.trigger && context.onOpenChange(!1);
|
|
706
|
-
}),
|
|
707
|
-
onEscapeKeyDown: composeEventHandlers(props.onEscapeKeyDown, (event) => {
|
|
708
|
-
rootContext.onClose(), event.preventDefault();
|
|
709
|
-
}),
|
|
710
|
-
onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
|
|
711
|
-
let isKeyDownInside = event.currentTarget.contains(event.target), isCloseKey = SUB_CLOSE_KEYS[rootContext.dir].includes(event.key);
|
|
712
|
-
isKeyDownInside && isCloseKey && (context.onOpenChange(!1), subContext.trigger?.focus(), event.preventDefault());
|
|
713
|
-
})
|
|
714
|
-
}
|
|
715
|
-
) }) }) });
|
|
716
|
-
}, "MenuSubContent")
|
|
717
|
-
);
|
|
718
|
-
function getOpenState(open) {
|
|
719
|
-
return open ? "open" : "closed";
|
|
720
|
-
}
|
|
721
|
-
__name23(getOpenState, "getOpenState");
|
|
722
|
-
function isIndeterminate(checked) {
|
|
723
|
-
return checked === "indeterminate";
|
|
724
|
-
}
|
|
725
|
-
__name23(isIndeterminate, "isIndeterminate");
|
|
726
|
-
function getCheckedState(checked) {
|
|
727
|
-
return isIndeterminate(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
|
|
728
|
-
}
|
|
729
|
-
__name23(getCheckedState, "getCheckedState");
|
|
730
|
-
function focusFirst3(candidates) {
|
|
731
|
-
let PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
732
|
-
for (let candidate of candidates)
|
|
733
|
-
if (candidate === PREVIOUSLY_FOCUSED_ELEMENT || (candidate.focus(), document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT)) return;
|
|
734
|
-
}
|
|
735
|
-
__name23(focusFirst3, "focusFirst");
|
|
736
|
-
function wrapArray2(array, startIndex) {
|
|
737
|
-
return array.map((_, index2) => array[(startIndex + index2) % array.length]);
|
|
738
|
-
}
|
|
739
|
-
__name23(wrapArray2, "wrapArray");
|
|
740
|
-
function getNextMatch(values, search, currentMatch) {
|
|
741
|
-
let normalizedSearch = search.length > 1 && Array.from(search).every((char) => char === search[0]) ? search[0] : search, currentMatchIndex = currentMatch ? values.indexOf(currentMatch) : -1, wrappedValues = wrapArray2(values, Math.max(currentMatchIndex, 0));
|
|
742
|
-
normalizedSearch.length === 1 && (wrappedValues = wrappedValues.filter((v) => v !== currentMatch));
|
|
743
|
-
let nextMatch = wrappedValues.find(
|
|
744
|
-
(value) => value.toLowerCase().startsWith(normalizedSearch.toLowerCase())
|
|
745
|
-
);
|
|
746
|
-
return nextMatch !== currentMatch ? nextMatch : void 0;
|
|
747
|
-
}
|
|
748
|
-
__name23(getNextMatch, "getNextMatch");
|
|
749
|
-
function isPointInPolygon(point2, polygon) {
|
|
750
|
-
let { x, y } = point2, inside = !1;
|
|
751
|
-
for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
|
|
752
|
-
let ii = polygon[i], jj = polygon[j], xi = ii.x, yi = ii.y, xj = jj.x, yj = jj.y;
|
|
753
|
-
yi > y != yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi && (inside = !inside);
|
|
754
|
-
}
|
|
755
|
-
return inside;
|
|
756
|
-
}
|
|
757
|
-
__name23(isPointInPolygon, "isPointInPolygon");
|
|
758
|
-
function isPointerInGraceArea(event, area) {
|
|
759
|
-
if (!area) return !1;
|
|
760
|
-
let cursorPos = { x: event.clientX, y: event.clientY };
|
|
761
|
-
return isPointInPolygon(cursorPos, area);
|
|
762
|
-
}
|
|
763
|
-
__name23(isPointerInGraceArea, "isPointerInGraceArea");
|
|
764
|
-
function whenMouse(handler) {
|
|
765
|
-
return (event) => event.pointerType === "mouse" ? handler(event) : void 0;
|
|
766
|
-
}
|
|
767
|
-
__name23(whenMouse, "whenMouse");
|
|
768
|
-
|
|
769
|
-
// ../../node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs
|
|
770
|
-
var dist_exports5 = {};
|
|
771
|
-
__export(dist_exports5, {
|
|
772
|
-
Arrow: () => DropdownMenuArrow,
|
|
773
|
-
CheckboxItem: () => DropdownMenuCheckboxItem,
|
|
774
|
-
Content: () => DropdownMenuContent,
|
|
775
|
-
DropdownMenu: () => DropdownMenu,
|
|
776
|
-
DropdownMenuArrow: () => DropdownMenuArrow,
|
|
777
|
-
DropdownMenuCheckboxItem: () => DropdownMenuCheckboxItem,
|
|
778
|
-
DropdownMenuContent: () => DropdownMenuContent,
|
|
779
|
-
DropdownMenuGroup: () => DropdownMenuGroup,
|
|
780
|
-
DropdownMenuItem: () => DropdownMenuItem,
|
|
781
|
-
DropdownMenuItemIndicator: () => DropdownMenuItemIndicator,
|
|
782
|
-
DropdownMenuLabel: () => DropdownMenuLabel,
|
|
783
|
-
DropdownMenuPortal: () => DropdownMenuPortal,
|
|
784
|
-
DropdownMenuRadioGroup: () => DropdownMenuRadioGroup,
|
|
785
|
-
DropdownMenuRadioItem: () => DropdownMenuRadioItem,
|
|
786
|
-
DropdownMenuSeparator: () => DropdownMenuSeparator,
|
|
787
|
-
DropdownMenuSub: () => DropdownMenuSub,
|
|
788
|
-
DropdownMenuSubContent: () => DropdownMenuSubContent,
|
|
789
|
-
DropdownMenuSubTrigger: () => DropdownMenuSubTrigger,
|
|
790
|
-
DropdownMenuTrigger: () => DropdownMenuTrigger,
|
|
791
|
-
Group: () => DropdownMenuGroup,
|
|
792
|
-
Item: () => DropdownMenuItem,
|
|
793
|
-
ItemIndicator: () => DropdownMenuItemIndicator,
|
|
794
|
-
Label: () => DropdownMenuLabel,
|
|
795
|
-
Portal: () => DropdownMenuPortal,
|
|
796
|
-
RadioGroup: () => DropdownMenuRadioGroup,
|
|
797
|
-
RadioItem: () => DropdownMenuRadioItem,
|
|
798
|
-
Root: () => DropdownMenu,
|
|
799
|
-
Separator: () => DropdownMenuSeparator,
|
|
800
|
-
Sub: () => DropdownMenuSub,
|
|
801
|
-
SubContent: () => DropdownMenuSubContent,
|
|
802
|
-
SubTrigger: () => DropdownMenuSubTrigger,
|
|
803
|
-
Trigger: () => DropdownMenuTrigger,
|
|
804
|
-
createDropdownMenuScope: () => createDropdownMenuScope
|
|
805
|
-
});
|
|
806
|
-
var React35 = __toESM(require_react(), 1);
|
|
807
|
-
var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1), __defProp25 = Object.defineProperty, __name24 = (target, value) => __defProp25(target, "name", { value, configurable: !0 }), DROPDOWN_MENU_NAME = "DropdownMenu", [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(
|
|
808
|
-
DROPDOWN_MENU_NAME,
|
|
809
|
-
[createMenuScope]
|
|
810
|
-
), useMenuScope = createMenuScope(), [DropdownMenuProvider, useDropdownMenuContext] = createDropdownMenuContext(DROPDOWN_MENU_NAME), DropdownMenu = /* @__PURE__ */ __name24((props) => {
|
|
811
|
-
let {
|
|
812
|
-
__scopeDropdownMenu,
|
|
813
|
-
children,
|
|
814
|
-
dir,
|
|
815
|
-
open: openProp,
|
|
816
|
-
defaultOpen,
|
|
817
|
-
onOpenChange,
|
|
818
|
-
modal = !0
|
|
819
|
-
} = props, menuScope = useMenuScope(__scopeDropdownMenu), triggerRef = React35.useRef(null), [open, setOpen] = useControllableState({
|
|
820
|
-
prop: openProp,
|
|
821
|
-
defaultProp: defaultOpen ?? !1,
|
|
822
|
-
onChange: onOpenChange,
|
|
823
|
-
caller: DROPDOWN_MENU_NAME
|
|
824
|
-
});
|
|
825
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
826
|
-
DropdownMenuProvider,
|
|
827
|
-
{
|
|
828
|
-
scope: __scopeDropdownMenu,
|
|
829
|
-
triggerId: useId(),
|
|
830
|
-
triggerRef,
|
|
831
|
-
contentId: useId(),
|
|
832
|
-
open,
|
|
833
|
-
onOpenChange: setOpen,
|
|
834
|
-
onOpenToggle: React35.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
835
|
-
modal,
|
|
836
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Menu, { ...menuScope, open, onOpenChange: setOpen, dir, modal, children })
|
|
837
|
-
}
|
|
838
|
-
);
|
|
839
|
-
}, "DropdownMenu"), TRIGGER_NAME2 = "DropdownMenuTrigger", DropdownMenuTrigger = /* @__PURE__ */ React35.forwardRef(
|
|
840
|
-
// blank line to reduce diff noise
|
|
841
|
-
/* @__PURE__ */ __name24(function(props, forwardedRef) {
|
|
842
|
-
let { __scopeDropdownMenu, disabled = !1, ...triggerProps } = props, context = useDropdownMenuContext(TRIGGER_NAME2, __scopeDropdownMenu), menuScope = useMenuScope(__scopeDropdownMenu), composedRefs = useComposedRefs(forwardedRef, context.triggerRef);
|
|
843
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MenuAnchor, { asChild: !0, ...menuScope, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
844
|
-
Primitive.button,
|
|
845
|
-
{
|
|
846
|
-
type: "button",
|
|
847
|
-
id: context.triggerId,
|
|
848
|
-
"aria-haspopup": "menu",
|
|
849
|
-
"aria-expanded": context.open,
|
|
850
|
-
"aria-controls": context.open ? context.contentId : void 0,
|
|
851
|
-
"data-state": context.open ? "open" : "closed",
|
|
852
|
-
"data-disabled": disabled ? "" : void 0,
|
|
853
|
-
disabled,
|
|
854
|
-
...triggerProps,
|
|
855
|
-
ref: composedRefs,
|
|
856
|
-
onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {
|
|
857
|
-
!disabled && event.button === 0 && event.ctrlKey === !1 && (context.onOpenToggle(), context.open || event.preventDefault());
|
|
858
|
-
}),
|
|
859
|
-
onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
|
|
860
|
-
disabled || (["Enter", " "].includes(event.key) && context.onOpenToggle(), event.key === "ArrowDown" && context.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(event.key) && event.preventDefault());
|
|
861
|
-
})
|
|
862
|
-
}
|
|
863
|
-
) });
|
|
864
|
-
}, "DropdownMenuTrigger")
|
|
865
|
-
), DropdownMenuPortal = /* @__PURE__ */ __name24((props) => {
|
|
866
|
-
let { __scopeDropdownMenu, ...portalProps } = props, menuScope = useMenuScope(__scopeDropdownMenu);
|
|
867
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MenuPortal, { ...menuScope, ...portalProps });
|
|
868
|
-
}, "DropdownMenuPortal"), CONTENT_NAME4 = "DropdownMenuContent", DropdownMenuContent = /* @__PURE__ */ React35.forwardRef(
|
|
869
|
-
// blank line to reduce diff noise
|
|
870
|
-
/* @__PURE__ */ __name24(function(props, forwardedRef) {
|
|
871
|
-
let { __scopeDropdownMenu, ...contentProps } = props, context = useDropdownMenuContext(CONTENT_NAME4, __scopeDropdownMenu), menuScope = useMenuScope(__scopeDropdownMenu), hasInteractedOutsideRef = React35.useRef(!1);
|
|
872
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
873
|
-
MenuContent,
|
|
874
|
-
{
|
|
875
|
-
id: context.contentId,
|
|
876
|
-
"aria-labelledby": context.triggerId,
|
|
877
|
-
...menuScope,
|
|
878
|
-
...contentProps,
|
|
879
|
-
ref: forwardedRef,
|
|
880
|
-
onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
|
|
881
|
-
hasInteractedOutsideRef.current || context.triggerRef.current?.focus(), hasInteractedOutsideRef.current = !1, event.preventDefault();
|
|
882
|
-
}),
|
|
883
|
-
onInteractOutside: composeEventHandlers(props.onInteractOutside, (event) => {
|
|
884
|
-
let originalEvent = event.detail.originalEvent, ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === !0, isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
885
|
-
(!context.modal || isRightClick) && (hasInteractedOutsideRef.current = !0);
|
|
886
|
-
}),
|
|
887
|
-
style: {
|
|
888
|
-
...props.style,
|
|
889
|
-
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
890
|
-
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
891
|
-
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
892
|
-
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
893
|
-
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
894
|
-
}
|
|
895
|
-
}
|
|
896
|
-
);
|
|
897
|
-
}, "DropdownMenuContent")
|
|
898
|
-
), DropdownMenuGroup = /* @__PURE__ */ React35.forwardRef(
|
|
899
|
-
// blank line to reduce diff noise
|
|
900
|
-
/* @__PURE__ */ __name24(function(props, forwardedRef) {
|
|
901
|
-
let { __scopeDropdownMenu, ...groupProps } = props, menuScope = useMenuScope(__scopeDropdownMenu);
|
|
902
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MenuGroup, { ...menuScope, ...groupProps, ref: forwardedRef });
|
|
903
|
-
}, "DropdownMenuGroup")
|
|
904
|
-
), DropdownMenuLabel = /* @__PURE__ */ React35.forwardRef(
|
|
905
|
-
// blank line to reduce diff noise
|
|
906
|
-
/* @__PURE__ */ __name24(function(props, forwardedRef) {
|
|
907
|
-
let { __scopeDropdownMenu, ...labelProps } = props, menuScope = useMenuScope(__scopeDropdownMenu);
|
|
908
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MenuLabel, { ...menuScope, ...labelProps, ref: forwardedRef });
|
|
909
|
-
}, "DropdownMenuLabel")
|
|
910
|
-
), DropdownMenuItem = /* @__PURE__ */ React35.forwardRef(
|
|
911
|
-
// blank line to reduce diff noise
|
|
912
|
-
/* @__PURE__ */ __name24(function(props, forwardedRef) {
|
|
913
|
-
let { __scopeDropdownMenu, ...itemProps } = props, menuScope = useMenuScope(__scopeDropdownMenu);
|
|
914
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MenuItem, { ...menuScope, ...itemProps, ref: forwardedRef });
|
|
915
|
-
}, "DropdownMenuItem")
|
|
916
|
-
), DropdownMenuCheckboxItem = /* @__PURE__ */ React35.forwardRef(/* @__PURE__ */ __name24(function(props, forwardedRef) {
|
|
917
|
-
let { __scopeDropdownMenu, ...checkboxItemProps } = props, menuScope = useMenuScope(__scopeDropdownMenu);
|
|
918
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MenuCheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef });
|
|
919
|
-
}, "DropdownMenuCheckboxItem")), DropdownMenuRadioGroup = /* @__PURE__ */ React35.forwardRef(/* @__PURE__ */ __name24(function(props, forwardedRef) {
|
|
920
|
-
let { __scopeDropdownMenu, ...radioGroupProps } = props, menuScope = useMenuScope(__scopeDropdownMenu);
|
|
921
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MenuRadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef });
|
|
922
|
-
}, "DropdownMenuRadioGroup")), DropdownMenuRadioItem = /* @__PURE__ */ React35.forwardRef(/* @__PURE__ */ __name24(function(props, forwardedRef) {
|
|
923
|
-
let { __scopeDropdownMenu, ...radioItemProps } = props, menuScope = useMenuScope(__scopeDropdownMenu);
|
|
924
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MenuRadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef });
|
|
925
|
-
}, "DropdownMenuRadioItem")), DropdownMenuItemIndicator = /* @__PURE__ */ React35.forwardRef(/* @__PURE__ */ __name24(function(props, forwardedRef) {
|
|
926
|
-
let { __scopeDropdownMenu, ...itemIndicatorProps } = props, menuScope = useMenuScope(__scopeDropdownMenu);
|
|
927
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MenuItemIndicator, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef });
|
|
928
|
-
}, "DropdownMenuItemIndicator")), DropdownMenuSeparator = /* @__PURE__ */ React35.forwardRef(/* @__PURE__ */ __name24(function(props, forwardedRef) {
|
|
929
|
-
let { __scopeDropdownMenu, ...separatorProps } = props, menuScope = useMenuScope(__scopeDropdownMenu);
|
|
930
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MenuSeparator, { ...menuScope, ...separatorProps, ref: forwardedRef });
|
|
931
|
-
}, "DropdownMenuSeparator")), DropdownMenuArrow = /* @__PURE__ */ React35.forwardRef(
|
|
932
|
-
// blank line to reduce diff noise
|
|
933
|
-
/* @__PURE__ */ __name24(function(props, forwardedRef) {
|
|
934
|
-
let { __scopeDropdownMenu, ...arrowProps } = props, menuScope = useMenuScope(__scopeDropdownMenu);
|
|
935
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MenuArrow, { ...menuScope, ...arrowProps, ref: forwardedRef });
|
|
936
|
-
}, "DropdownMenuArrow")
|
|
937
|
-
), DropdownMenuSub = /* @__PURE__ */ __name24((props) => {
|
|
938
|
-
let { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props, menuScope = useMenuScope(__scopeDropdownMenu), [open, setOpen] = useControllableState({
|
|
939
|
-
prop: openProp,
|
|
940
|
-
defaultProp: defaultOpen ?? !1,
|
|
941
|
-
onChange: onOpenChange,
|
|
942
|
-
caller: "DropdownMenuSub"
|
|
943
|
-
});
|
|
944
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MenuSub, { ...menuScope, open, onOpenChange: setOpen, children });
|
|
945
|
-
}, "DropdownMenuSub"), DropdownMenuSubTrigger = /* @__PURE__ */ React35.forwardRef(/* @__PURE__ */ __name24(function(props, forwardedRef) {
|
|
946
|
-
let { __scopeDropdownMenu, ...subTriggerProps } = props, menuScope = useMenuScope(__scopeDropdownMenu);
|
|
947
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MenuSubTrigger, { ...menuScope, ...subTriggerProps, ref: forwardedRef });
|
|
948
|
-
}, "DropdownMenuSubTrigger")), DropdownMenuSubContent = /* @__PURE__ */ React35.forwardRef(/* @__PURE__ */ __name24(function(props, forwardedRef) {
|
|
949
|
-
let { __scopeDropdownMenu, ...subContentProps } = props, menuScope = useMenuScope(__scopeDropdownMenu);
|
|
950
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
951
|
-
MenuSubContent,
|
|
952
|
-
{
|
|
953
|
-
...menuScope,
|
|
954
|
-
...subContentProps,
|
|
955
|
-
ref: forwardedRef,
|
|
956
|
-
style: {
|
|
957
|
-
...props.style,
|
|
958
|
-
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
959
|
-
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
960
|
-
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
961
|
-
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
962
|
-
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
963
|
-
}
|
|
964
|
-
}
|
|
965
|
-
);
|
|
966
|
-
}, "DropdownMenuSubContent"));
|