@inneranimalmedia/agentsam-sdk 2.6.12 → 2.6.17
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/AGENTSAM.md +32 -0
- package/DEVELOPMENT.md +69 -74
- package/LICENSE +97 -8
- package/LICENSING.md +30 -0
- package/README.md +44 -7
- package/apps/README.md +1 -1
- package/apps/cad-creator/LICENSE +97 -8
- package/apps/cad-creator/README.md +12 -0
- package/apps/cad-creator/shared/cad/package.json +1 -1
- package/apps/cad-creator/shared/cad/src/domain/project-contract.js +2 -75
- package/apps/cad-creator/shared/cad/src/domain/project-tools.js +2 -24
- package/apps/cad-creator/shared/cad/src/index.ts +2 -0
- package/apps/cad-creator/shared/cad/src/native-plan.ts +16 -0
- package/apps/cad-creator/shared/cad/src/types.ts +52 -3
- package/contracts/source-types.v2.json +9381 -0
- package/contracts/source-types.v2.schema.json +571 -0
- package/docs/2026-11-12-chat-work-whitelabel-scaffold.md +42 -0
- package/docs/AUTORAG.md +2 -0
- package/docs/CAPABILITIES.md +28 -0
- package/docs/DATABASE_EDITOR_REMASTER_ACCEPTANCE_20261103.md +41 -0
- package/docs/DOCKERIZE.md +2 -2
- package/docs/PRODUCT_LIFECYCLE.md +2 -2
- package/docs/REPO_FILE_MAP.txt +1 -1
- package/docs/THEME_REFINERY.md +4 -117
- package/docs/acceptance/AGENTSAM_DOCS_CMS_2026-11-10.md +62 -0
- package/docs/acceptance/AGENTSAM_SDK_LOCAL_LAUNCH_2026-11-06.md +42 -0
- package/docs/acceptance/AGENTSAM_SDK_PUBLIC_CMS_2026-11-10.md +35 -0
- package/docs/acceptance/AGENTSAM_WIDGET_UTILITIES_2026-11-06.md +34 -0
- package/docs/acceptance/CREATIVE_DEPARTMENT_BATCH1_2026-11-01.md +47 -0
- package/docs/acceptance/FINANCE_SETTINGS_CMS_WIP_2026-11-07.md +42 -0
- package/docs/adr/ADR-0003-copro-clean-room-product-architecture.md +6 -0
- package/docs/adr/ADR-0009-widget-platform-authority.md +130 -0
- package/docs/adr/ADR-0010-widget-contributions-registry-persistence.md +265 -0
- package/docs/adr/README.md +5 -0
- package/docs/agent-briefs/2026-10-28-agent1-ui-product-foundation.md +132 -0
- package/docs/agent-briefs/2026-10-28-agent2-cms-audit.md +144 -0
- package/docs/agent-briefs/2026-10-28-sites-next-wave-acceptance.md +67 -0
- package/docs/architecture/AGENTSAM-CANONICAL-DISCOVERY-FIRST-SLICE.md +70 -0
- package/docs/architecture/AGENTSAM-PRODUCT-CATALOG-RELEASES-20261028.md +80 -0
- package/docs/architecture/AGENTSAM-REGISTRY-CLI-AGENT-PARITY.md +133 -0
- package/docs/architecture/AGENTSAM_ACCOUNT_FIRST_METRICS_V2_2026-10-28.md +38 -0
- package/docs/architecture/AGENTSAM_APPLICATION_CONTRACT.md +43 -0
- package/docs/architecture/AGENTSAM_WORK_IDE_LANES_2026-10-28.md +51 -0
- package/docs/architecture/CAD_OPERATOR_CAPABILITIES.md +64 -0
- package/docs/architecture/CAD_ROBOTICS_RELEASE_LEDGER_20261016.md +43 -0
- package/docs/architecture/CAD_RUN_MODES.md +34 -0
- package/docs/architecture/CLI-BOOT-REMOTE-DB-READINESS-20261015.md +65 -0
- package/docs/architecture/DESIGN_WORKSPACE_BOUNDARY.md +69 -0
- package/docs/architecture/EXISTING-MCP-D1-AGENT-BRIDGE.md +47 -0
- package/docs/architecture/PLAN-PORTABILITY-SAM-FIRST-SPRINT-20261015.md +36 -0
- package/docs/architecture/PLATFORM_R2_SOURCE_OF_TRUTH.md +134 -0
- package/docs/architecture/PLUGIN-PRODUCTIZATION-SPINE.md +101 -0
- package/docs/architecture/PROJECTS_DREAMHOUSE_METRICS_SPRINT_2026-10-28.md +34 -0
- package/docs/architecture/SAMOS_PRODUCT_MODEL.md +49 -0
- package/docs/architecture/SAM_KERNEL.md +48 -2
- package/docs/architecture/SAM_RESOURCE_CRUD_STANDARD.md +96 -0
- package/docs/architecture/SAM_SYSTEMATIC_AUTONOMOUS_MACHINERY.md +79 -0
- package/docs/architecture/SCHEMA_AUTHORITIES.md +87 -0
- package/docs/architecture/USER_GLOBAL_AGENT_INSTRUCTIONS.md +55 -0
- package/docs/architecture/brand-presentation-context-discovery-2026-11-01.md +41 -0
- package/docs/architecture/studio-templates-audit-2026-11-01.md +59 -0
- package/docs/audits/2026-10-28-cms-platform-seam-baseline.md +86 -0
- package/docs/audits/2026-10-28-cms-v1-v2-side-by-side.md +53 -0
- package/docs/authoring/agentsam-sdk-docs-portal.json +175 -0
- package/docs/autorag-workflow.md +13 -0
- package/docs/brand/AGENT_SAM_ICON_GRAMMAR.md +4 -0
- package/docs/brand/ICONOGRAPHY-WIP-HANDOFF-20261022.md +36 -0
- package/docs/brand/ICONOGRAPHY_INTEGRATION_AUDIT_2026-10-28.md +39 -0
- package/docs/contracts/capability-install-planner.md +66 -38
- package/docs/contracts/environment-vocabulary.md +5 -5
- package/docs/engineering/CMS_DATA_AUTHORITY_2026-11-03.md +45 -0
- package/docs/engineering/LOCAL_STUDIO_CMS_INSTALL_2026-11-02.md +23 -0
- package/docs/engineering/SUPERBASH_LOCAL_RUNTIME.md +100 -0
- package/docs/evidence/COPRO_CREATIVE_V1_20261030.md +22 -0
- package/docs/evidence/media-library-20261031/README.md +39 -0
- package/docs/generated/SDK_CAPABILITY_INVENTORY.md +312 -0
- package/docs/handoffs/AGENT_HANDOFF_SUPERBASH_AND_MODEL_PERFORMANCE_2026-10-14.md +134 -0
- package/docs/handoffs/COPRO_CREATIVE_V1_AGENT2.md +69 -0
- package/docs/intake/product-capabilities.proposed.ts +232 -0
- package/docs/knowledge-supabase-node-api.md +51 -0
- package/docs/media/local-intake-r2-backup.md +47 -0
- package/docs/operations/CLOUDFLARE-QUEUE-OBSERVABILITY.md +64 -0
- package/docs/operations/WIP_RECONCILIATION_2026-11-02.md +89 -0
- package/docs/plans/AGENTSAM_MEDIA_LIBRARY_AGENT1_MAP_20261031.md +62 -0
- package/docs/plans/AGENTSAM_SDK_RELEASE_PROGRAM.md +145 -0
- package/docs/plans/LOCAL_STUDIO_DESKTOP_RELEASE_2026-09-29.md +5 -3
- package/docs/plans/MEDIA_TRUTH_SOURCE_RECOVERY_20261008.md +31 -0
- package/docs/plans/OFFLINE_CLI_KNOWLEDGE_AGENT_HANDOFF.md +104 -0
- package/docs/plans/OFFLINE_CLI_KNOWLEDGE_RUNBOOK.md +81 -0
- package/docs/plans/SAM_EXPERIENCE_AGENT_DISPATCH_2026-10-15.md +107 -0
- package/docs/plans/SAM_MACHINERY_TO_EXPERIENCE_2026-10-15.md +172 -0
- package/docs/plans/TOMORROW-EXTENSIVE-TODO-2026-09-26.md +1 -1
- package/docs/plans/UI_POLISH_DESKTOP_2026-10-16.md +102 -0
- package/docs/plans/WORK-UX-REMASTER-2026-10-15.md +48 -0
- package/docs/plans/WORK-WORKSPACE-PLAN-2026-10-14.md +212 -0
- package/docs/plugins.md +54 -0
- package/docs/primetech/CREATIVE_ENGINEERING.md +125 -0
- package/docs/product/AGENTSAM-UI-QUALITY-GATE.md +148 -0
- package/docs/product/AGENTSAM_PRODUCT_EXPERIENCE_STANDARD.md +2 -0
- package/docs/product/MEDIA-PRODUCTION-FAMILY.md +47 -0
- package/docs/product/OFFER-PORTFOLIO.md +14 -0
- package/docs/product/PACKAGE-TAXONOMY.md +20 -12
- package/docs/product/PLUGIN-GALLERY-DISCOVERY-AND-INSTALL.md +97 -0
- package/docs/product/README.md +2 -0
- package/docs/product/WIDGET-GALLERY-PHASE-ONE.md +43 -0
- package/docs/reference/AGENTSAM-CLI-WORKFLOWS.md +73 -0
- package/docs/reference/AGENTSAM-ERROR-REASONS.md +267 -0
- package/docs/reference/AGENTSAM-REGISTRY.generated.md +289 -0
- package/docs/reference/INNERANIMALMEDIA_EXPERIENCE_ACCEPTANCE_2026-10-15.md +99 -0
- package/docs/release/NPM-TRUSTED-PUBLISHING.md +13 -0
- package/docs/releases/INDEPENDENT_PACKAGE_PUBLISHING.md +30 -0
- package/docs/releases/cad-v2-sdk-2.6.13.md +25 -0
- package/docs/roadmaps/2026-10-28-product-platform-stabilization.md +149 -0
- package/docs/roadmaps/ROAD_TO_REAL_DISTRIBUTION.md +97 -0
- package/docs/robotics-chess-handoff.md +15 -0
- package/docs/sprints/2026-11-14-companion-media-product-preview.md +42 -0
- package/docs/standards/DELIVERY_CLOSURE.md +41 -0
- package/docs/standards/SAM_MACHINE_BUILD_AND_GAPS.md +91 -0
- package/docs/studio/oauth-ddl-media-completion-2026-11-01.md +22 -0
- package/docs/studio/pwa-build-meta-agentsam-note.md +9 -0
- package/docs/workflows/ISSUE_TO_SAMOS.md +59 -0
- package/examples/widget-consumer/package.json +12 -0
- package/examples/widget-consumer/src/smoke.mjs +18 -0
- package/migrations/d1/0021_agentsam_product_releases.sql +94 -0
- package/migrations/d1/0022_agentsam_plugin_registry.sql +182 -0
- package/migrations/d1/0023_agentsam_plugin_install_health.sql +33 -0
- package/migrations/d1/0024_user_oauth_tokens_account_spine.sql +61 -0
- package/migrations/d1/0025_meta_model_api_service.sql +7 -0
- package/migrations/d1/0026_identity_github_signin_product.sql +34 -0
- package/migrations/d1/0027_unified_digital_products_collections.sql +72 -0
- package/migrations/d1/README_PORTABLE_CONTROL_PLANE.md +2 -0
- package/migrations/runtime/0010_agentsam_notifications.sql +86 -0
- package/migrations/runtime/0011_agentsam_product_releases.sql +94 -0
- package/native/agentsam-machine/cli/Cargo.toml +1 -1
- package/native/agentsam-machine/cli/LICENSE +110 -0
- package/native/agentsam-machine/core/Cargo.toml +1 -1
- package/native/agentsam-machine/core/LICENSE +110 -0
- package/native/agentsam-machine/core/src/lib.rs +3 -3
- package/package.json +123 -73
- package/packages/agentsam-3d-viewer/LICENSE +110 -0
- package/packages/agentsam-3d-viewer/README.md +58 -0
- package/packages/agentsam-3d-viewer/agentsam.package.json +63 -0
- package/packages/agentsam-3d-viewer/package.json +41 -0
- package/packages/agentsam-3d-viewer/src/format.d.ts +3 -0
- package/packages/agentsam-3d-viewer/src/format.js +24 -0
- package/packages/agentsam-3d-viewer/src/index.d.ts +104 -0
- package/packages/agentsam-3d-viewer/src/index.js +303 -0
- package/packages/agentsam-3d-viewer/src/occt.d.ts +12 -0
- package/packages/agentsam-3d-viewer/src/occt.js +54 -0
- package/packages/agentsam-3d-viewer/test/format.test.mjs +24 -0
- package/packages/agentsam-3d-viewer/test/occt.test.mjs +37 -0
- package/packages/agentsam-3d-viewer/test/viewport.test.mjs +128 -0
- package/packages/agentsam-architectural-intelligence/README.md +8 -0
- package/packages/agentsam-architectural-intelligence/data/materials.json +9 -0
- package/packages/agentsam-architectural-intelligence/data/sources.json +15 -0
- package/packages/agentsam-architectural-intelligence/mcp/server.mjs +80 -0
- package/packages/agentsam-architectural-intelligence/package.json +23 -0
- package/packages/agentsam-architectural-intelligence/test/reference.test.mjs +30 -0
- package/packages/agentsam-architectural-intelligence/test/sam-integration.test.mjs +20 -0
- package/packages/agentsam-brand/LICENSE +110 -0
- package/packages/agentsam-brand/README.md +6 -0
- package/packages/agentsam-brand/package.json +7 -4
- package/packages/agentsam-brand/src/cli/controller.js +28 -1
- package/packages/agentsam-brand/src/core/iconography/build.js +617 -0
- package/packages/agentsam-brand/src/core/iconography/render_clay.py +409 -0
- package/packages/agentsam-brand/src/core/preview.js +4 -0
- package/packages/agentsam-brand/src/core/processors/sharp.js +5 -3
- package/packages/agentsam-brand/src/index.js +2 -0
- package/packages/agentsam-cms/LICENSE +110 -0
- package/packages/agentsam-cms/README.md +71 -0
- package/packages/agentsam-cms/agentsam.package.json +61 -0
- package/packages/agentsam-cms/package.json +47 -0
- package/packages/agentsam-cms/src/account-context.js +135 -0
- package/packages/agentsam-cms/src/aliases.js +74 -0
- package/packages/agentsam-cms/src/application.js +252 -0
- package/packages/agentsam-cms/src/chat-storage.js +300 -0
- package/packages/agentsam-cms/src/contracts.js +147 -0
- package/packages/agentsam-cms/src/index.d.ts +135 -0
- package/packages/agentsam-cms/src/index.js +4 -0
- package/packages/agentsam-cms/src/machine.js +223 -0
- package/packages/agentsam-cms/src/node.d.ts +3 -0
- package/packages/agentsam-cms/src/node.js +8 -0
- package/packages/agentsam-cms/src/site-nav-defaults.js +16 -0
- package/packages/agentsam-cms/src/site-settings-contract.js +37 -0
- package/packages/agentsam-cms/test/application.test.mjs +134 -0
- package/packages/agentsam-cms/test/chat-storage.test.mjs +212 -0
- package/packages/agentsam-cms/test/standalone.test.mjs +89 -0
- package/packages/agentsam-cms/test/support/memory-repository.mjs +78 -0
- package/packages/agentsam-communications/README.md +52 -0
- package/packages/agentsam-communications/package.json +30 -0
- package/packages/agentsam-communications/src/adapters.js +78 -0
- package/packages/agentsam-communications/src/index.js +3 -0
- package/packages/agentsam-communications/src/outbox.js +56 -0
- package/packages/agentsam-communications/src/service.js +126 -0
- package/packages/agentsam-communications/test/communications.test.mjs +188 -0
- package/packages/agentsam-contracts/README.md +23 -0
- package/packages/agentsam-contracts/agentsam.package.json +43 -0
- package/packages/agentsam-contracts/dist/authority.d.ts +2 -1
- package/packages/agentsam-contracts/dist/authority.js +12 -0
- package/packages/agentsam-contracts/dist/design-workspace-bridge.d.ts +20 -0
- package/packages/agentsam-contracts/dist/design-workspace-registry.d.ts +12 -0
- package/packages/agentsam-contracts/dist/design-workspace-registry.js +133 -0
- package/packages/agentsam-contracts/dist/design-workspace.d.ts +115 -0
- package/packages/agentsam-contracts/dist/design-workspace.js +64 -0
- package/packages/agentsam-contracts/dist/errors.d.ts +1 -1
- package/packages/agentsam-contracts/dist/index.d.ts +7 -0
- package/packages/agentsam-contracts/dist/index.js +580 -0
- package/packages/agentsam-contracts/dist/operations.d.ts +138 -0
- package/packages/agentsam-contracts/dist/operations.js +117 -0
- package/packages/agentsam-contracts/dist/resource-scope.d.ts +24 -0
- package/packages/agentsam-contracts/dist/resource-scope.js +25 -0
- package/packages/agentsam-contracts/dist/source-types.d.ts +92 -0
- package/packages/agentsam-contracts/dist/source-types.js +13 -0
- package/packages/agentsam-contracts/dist/spawn-policy.d.ts +32 -0
- package/packages/agentsam-contracts/dist/spawn-policy.js +27 -0
- package/packages/agentsam-contracts/dist/tools.d.ts +12 -5
- package/packages/agentsam-contracts/dist/tools.js +164 -0
- package/packages/agentsam-contracts/dist/widgets.d.ts +7 -0
- package/packages/agentsam-contracts/package.json +34 -4
- package/packages/agentsam-contracts/schemas/agent-tool-definition.v1.schema.json +78 -0
- package/packages/agentsam-contracts/schemas/sam-operation.v1.schema.json +159 -0
- package/packages/agentsam-contracts/schemas/sam-result.v1.schema.json +76 -0
- package/packages/agentsam-contracts/schemas/source-types.v2.json +9381 -0
- package/packages/agentsam-contracts/schemas/source-types.v2.schema.json +571 -0
- package/packages/agentsam-contracts/scripts/build.mjs +21 -5
- package/packages/agentsam-contracts/src/authority.ts +9 -7
- package/packages/agentsam-contracts/src/design-workspace-bridge.ts +99 -0
- package/packages/agentsam-contracts/src/design-workspace-registry.ts +130 -0
- package/packages/agentsam-contracts/src/design-workspace.ts +256 -0
- package/packages/agentsam-contracts/src/errors.ts +1 -1
- package/packages/agentsam-contracts/src/index.ts +7 -0
- package/packages/agentsam-contracts/src/operations.ts +229 -0
- package/packages/agentsam-contracts/src/resource-scope.ts +39 -0
- package/packages/agentsam-contracts/src/source-types.ts +92 -0
- package/packages/agentsam-contracts/src/spawn-policy.ts +43 -0
- package/packages/agentsam-contracts/src/tools.ts +145 -25
- package/packages/agentsam-contracts/src/widgets.ts +7 -0
- package/packages/agentsam-contracts/test/contracts.test.mjs +112 -2
- package/packages/agentsam-contracts/test/design-workspace.test.mjs +238 -0
- package/packages/agentsam-contracts/test/resource-scope.test.mjs +22 -0
- package/packages/agentsam-contracts/test/source-types.test.mjs +31 -0
- package/packages/agentsam-contracts/test/spawn-policy.test.mjs +20 -0
- package/packages/agentsam-desktop-shell/LICENSE +110 -0
- package/packages/agentsam-desktop-shell/README.md +73 -0
- package/packages/agentsam-desktop-shell/scripts/app-discovery.mjs +43 -0
- package/packages/agentsam-errors/README.md +14 -0
- package/packages/agentsam-errors/agentsam.package.json +43 -0
- package/packages/agentsam-errors/package.json +2 -2
- package/packages/agentsam-errors/protocol/agentsam.error.v2.schema.json +1 -1
- package/packages/agentsam-errors/protocol/error-catalog.json +12 -0
- package/packages/agentsam-errors/src/cli.js +56 -0
- package/packages/agentsam-errors/src/index.js +2 -0
- package/packages/agentsam-errors/src/vocabulary.js +2 -0
- package/packages/agentsam-errors/test/approval-contract.test.mjs +12 -0
- package/packages/agentsam-errors/types/index.d.ts +5 -1
- package/packages/agentsam-goap/LICENSE +110 -0
- package/packages/agentsam-goap/agentsam.package.json +42 -0
- package/packages/agentsam-goap/package.json +4 -4
- package/packages/agentsam-hooks/agentsam.package.json +45 -0
- package/packages/agentsam-hooks/bindings/go/errors_generated.go +1 -0
- package/packages/agentsam-hooks/bindings/rust/src/errors_generated.rs +1 -0
- package/packages/agentsam-hooks/package.json +2 -2
- package/packages/agentsam-hooks/schema/manifest.json +1 -1
- package/packages/agentsam-hooks/src/errors-generated.js +10 -0
- package/packages/agentsam-ide/LICENSE +110 -0
- package/packages/agentsam-ide/README.md +147 -0
- package/packages/agentsam-ide/src/lsp/host.d.mts +13 -0
- package/packages/agentsam-ide/src/lsp/host.mjs +133 -0
- package/packages/agentsam-knowledge/LICENSE +110 -0
- package/packages/agentsam-knowledge/agentsam.package.json +42 -0
- package/packages/agentsam-knowledge/package.json +3 -3
- package/packages/agentsam-knowledge/src/autorag/index.js +25 -4
- package/packages/agentsam-knowledge/src/backends/index.js +21 -1
- package/packages/agentsam-knowledge/src/backends/supabase-node-api.js +91 -0
- package/packages/agentsam-knowledge/test/autorag.test.mjs +13 -0
- package/packages/agentsam-knowledge/test/supabase-node-api.test.mjs +59 -0
- package/packages/agentsam-merch/LICENSE +110 -0
- package/packages/agentsam-merch/README.md +59 -39
- package/packages/agentsam-merch/agentsam.package.json +43 -0
- package/packages/agentsam-merch/package.json +18 -3
- package/packages/agentsam-merch/profiles/completeful/dtg-back-large.json +1 -1
- package/packages/agentsam-merch/profiles/completeful/laser-engraving.json +1 -1
- package/packages/agentsam-merch/profiles/generic/embroidery-digitization.json +1 -1
- package/packages/agentsam-merch/schemas/collection-candidate.schema.json +1 -1
- package/packages/agentsam-merch/schemas/manufacturing-profile.schema.json +1 -1
- package/packages/agentsam-merch/src/adapters-printify.js +66 -0
- package/packages/agentsam-merch/src/collection-planning.d.ts +46 -0
- package/packages/agentsam-merch/src/collection-planning.js +135 -0
- package/packages/agentsam-merch/src/collection-showcase.css +34 -0
- package/packages/agentsam-merch/src/collection-showcase.d.ts +2 -0
- package/packages/agentsam-merch/src/collection-showcase.js +62 -0
- package/packages/agentsam-merch/src/compatibility.js +18 -1
- package/packages/agentsam-merch/src/geometry.js +82 -0
- package/packages/agentsam-merch/src/index.d.ts +33 -0
- package/packages/agentsam-merch/src/index.js +2 -0
- package/packages/agentsam-merch/src/merch-hero.css +32 -0
- package/packages/agentsam-merch/src/merch-hero.d.ts +5 -0
- package/packages/agentsam-merch/src/merch-hero.js +123 -0
- package/packages/agentsam-merch/src/node/index.js +1 -0
- package/packages/agentsam-merch/src/node/vector.js +83 -0
- package/packages/agentsam-merch/test/collection-planning.test.mjs +17 -0
- package/packages/agentsam-merch/test/collection-showcase.test.mjs +12 -0
- package/packages/agentsam-merch/test/geometry.test.mjs +32 -0
- package/packages/agentsam-merch/test/printify-adapter.test.mjs +42 -0
- package/packages/agentsam-merch/test/svg-normalization.test.mjs +33 -0
- package/packages/agentsam-nav/LICENSE +110 -0
- package/packages/agentsam-nav/README.md +21 -1
- package/packages/agentsam-nav/dist/AdminAppsDialog.d.ts +15 -0
- package/packages/agentsam-nav/dist/Nav.d.ts +3 -1
- package/packages/agentsam-nav/dist/NavProvider.d.ts +8 -1
- package/packages/agentsam-nav/dist/NavTrigger.d.ts +1 -1
- package/packages/agentsam-nav/dist/Surfaces.d.ts +16 -1
- package/packages/agentsam-nav/dist/browser.d.ts +18 -0
- package/packages/agentsam-nav/dist/browser.global.js +63 -26
- package/packages/agentsam-nav/dist/browser.js +7589 -6094
- package/packages/agentsam-nav/dist/contracts.d.ts +71 -2
- package/packages/agentsam-nav/dist/index.d.ts +4 -0
- package/packages/agentsam-nav/dist/index.js +1356 -192
- package/packages/agentsam-nav/dist/legacy.css +7 -4
- package/packages/agentsam-nav/dist/shell.css +380 -11
- package/packages/agentsam-nav/dist/state.d.ts +25 -0
- package/packages/agentsam-nav/dist/theme.css +380 -11
- package/packages/agentsam-nav/dist/useAdminApps.d.ts +55 -0
- package/packages/agentsam-nav/dist/utils.d.ts +4 -0
- package/packages/agentsam-nav/package.json +7 -3
- package/packages/agentsam-occt/.native-build/CMakeCache.txt +433 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/4.4.4/CMakeCXXCompiler.cmake +103 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/4.4.4/CMakeDetermineCompilerABI_CXX.bin +0 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/4.4.4/CMakeSystem.cmake +15 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/4.4.4/CompilerIdCXX/CMakeCXXCompilerId.cpp +954 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/4.4.4/CompilerIdCXX/a.out +0 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/4.4.4/CompilerIdCXX/apple-sdk.cpp +1 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/CMakeConfigureLog.yaml +2968 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/CMakeDirectoryInformation.cmake +16 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/InstallScripts.json +7 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/Makefile.cmake +53 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/Makefile2 +157 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/TargetDirectories.txt +4 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-occt.dir/DependInfo.cmake +24 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-occt.dir/build.make +146 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-occt.dir/cmake_clean.cmake +13 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-occt.dir/compiler_depend.internal +3152 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-occt.dir/compiler_depend.make +6886 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-occt.dir/compiler_depend.ts +2 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-occt.dir/depend.make +2 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-occt.dir/engine.cpp.o +0 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-occt.dir/engine.cpp.o.d +1868 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-occt.dir/flags.make +12 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-occt.dir/link.txt +1 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-occt.dir/main.cpp.o +0 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-occt.dir/main.cpp.o.d +1279 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-occt.dir/progress.make +4 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-sketch-solver.dir/DependInfo.cmake +23 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-sketch-solver.dir/build.make +114 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-sketch-solver.dir/cmake_clean.cmake +11 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-sketch-solver.dir/cmake_clean_target.cmake +3 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-sketch-solver.dir/compiler_depend.internal +1256 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-sketch-solver.dir/compiler_depend.make +3757 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-sketch-solver.dir/compiler_depend.ts +2 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-sketch-solver.dir/depend.make +2 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-sketch-solver.dir/flags.make +12 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-sketch-solver.dir/link.txt +2 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-sketch-solver.dir/progress.make +3 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-sketch-solver.dir/sketch_solver.cpp.o +0 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/agentsam-sketch-solver.dir/sketch_solver.cpp.o.d +1252 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/cmake.check_cache +1 -0
- package/packages/agentsam-occt/.native-build/CMakeFiles/progress.marks +1 -0
- package/packages/agentsam-occt/.native-build/Makefile +249 -0
- package/packages/agentsam-occt/.native-build/agentsam-occt +0 -0
- package/packages/agentsam-occt/.native-build/cmake_install.cmake +61 -0
- package/packages/agentsam-occt/.native-build/libagentsam-sketch-solver.a +0 -0
- package/packages/agentsam-occt/LICENSE +110 -0
- package/packages/agentsam-occt/README.md +100 -0
- package/packages/agentsam-occt/agentsam.package.json +60 -0
- package/packages/agentsam-occt/dist/browser.d.ts +32 -0
- package/packages/agentsam-occt/dist/browser.js +71 -0
- package/packages/agentsam-occt/dist/browser.js.map +1 -0
- package/packages/agentsam-occt/dist/index.d.ts +8 -0
- package/packages/agentsam-occt/dist/index.js +25 -0
- package/packages/agentsam-occt/dist/index.js.map +1 -0
- package/packages/agentsam-occt/dist/native-provider.d.mts +107 -0
- package/packages/agentsam-occt/dist/native-provider.mjs +177 -0
- package/packages/agentsam-occt/dist/native-provider.mjs.map +1 -0
- package/packages/agentsam-occt/dist/native-session.d.mts +8 -0
- package/packages/agentsam-occt/dist/native-session.mjs +64 -0
- package/packages/agentsam-occt/dist/native-session.mjs.map +1 -0
- package/packages/agentsam-occt/native/CMakeLists.txt +47 -0
- package/packages/agentsam-occt/native/engine.cpp +864 -0
- package/packages/agentsam-occt/native/engine.hpp +2 -0
- package/packages/agentsam-occt/native/main.cpp +123 -0
- package/packages/agentsam-occt/native/sketch_solver.cpp +198 -0
- package/packages/agentsam-occt/native/sketch_solver.hpp +5 -0
- package/packages/agentsam-occt/package.json +46 -0
- package/packages/agentsam-occt/src/browser.ts +92 -0
- package/packages/agentsam-occt/src/index.js +24 -0
- package/packages/agentsam-occt/src/native-provider.mjs +156 -0
- package/packages/agentsam-occt/src/native-session.d.mts +5 -0
- package/packages/agentsam-occt/src/native-session.mjs +35 -0
- package/packages/agentsam-occt/test/browser-provider.test.mjs +90 -0
- package/packages/agentsam-occt/test/contracts.test.mjs +32 -0
- package/packages/agentsam-occt/test/native-engine.test.mjs +49 -0
- package/packages/agentsam-occt/tsconfig.json +18 -0
- package/packages/agentsam-queue-control/LICENSE +110 -0
- package/packages/agentsam-queue-control/agentsam.package.json +42 -0
- package/packages/agentsam-queue-control/package.json +3 -3
- package/packages/agentsam-queue-control/schemas/job-envelope.schema.json +1 -1
- package/packages/agentsam-queue-control/src/adapters/cloudflare.js +39 -3
- package/packages/agentsam-queue-control/test/cloudflare-observability.test.mjs +54 -0
- package/packages/agentsam-rapid-rust/Cargo.toml +6 -1
- package/packages/agentsam-rapid-rust/LICENSE +110 -0
- package/packages/agentsam-rapid-rust/agentsam.package.json +42 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/0b22ca9c5f8cddc15e6816df4a2467a28d41aa174361cdfed9019ee4e04dfbb8.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/0c5064875a5d7645013880f04d71f56c0dfa1bc87ac9fd59adc3e9a93a2745da.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/11ebd15702c169ee0666656be851cc549f70f84498dbca3c5b72d2ceaa91c851.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/1d7f2c8ad9588cd2077a1d07fce156e0bd47be686d8c9f26885bab14874c4ab5.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/1f21ba21e7b631b0d4893cbdd7a6bb7345d34e8b1a0ee9cf644cc30aeb3c8b8d.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/23f4d4b90def0782de32e7a57558cba24525f12ba3c009728ea4881259a74099.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/26b60985b6ef62e4f20e06c37e47c6996c1a2f457335fa9eb4a68d1288e18490.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/2b27d15a1b8c3637a56f631d583cc9ba584bed2b7018dd962a9340d5e1c50a1d.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/3110a5568a544c4c38de6585dcdabc21fa5f54a5772ecf4e1f4076ee0d49e933.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/357ce3db8299e01866bf4fc3d8ee1c784ef53c7455cf86bb17c52f3dad20d050.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/4516c6e03636538cacc7a6e4063d98a7ed2f0090c3a02c5ee817f1c512b1070e.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/649e02dbaec2edabbd40372e0c5f72f114164fe7704e7825220b1955f6a7c74e.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/81c266d4c150a4f6c5a73c9c4fef6541577fd0acd8c1f911f02781deb5f0be0f.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/86b4b8de30eed9902750b3de9fb54276d229244671a8b6035345bbe705463d82.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/8a877fdc5dbc6a66c344b4ebc4d9b746d47f95153e98872210becd85ca941ddd.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/96a11200f7b42ddd1281e4f749e88dcb8455ab0e3883f943934e0a9a7935147a.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/9e2df2335cfc73ec021bdd6b2d34af798f6ed9c52e3061ce16b6ceabae4e275f.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/a405fe3addeaab2908ed58836997be3b679d990ec9102d06bece3569e4bd4a81.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/a63915da0a45f86a5938ba9a2b2e87d469e7d07f7ea9cc531136fdc9e055557e.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/a8452c2dcaa959ced25e3597931b311999c0aa5b257ca8610fe415e8cfa598cc.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/b35fc2ae65ea07fbbfdd242a3d76489947462399e7a2db91f8545ca50d97d86f.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/b966932defe9c7b5ec9599c9276d333bd09ad1605adae80300d825d2161ad20c.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/ca9060e5ccb91f3a2663f57afd47a25099b6b3313c2a7436c4634993ff6e9afc.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/d0eba82a259be203c68c3ebf6d5b8a376f31a3b84fad418fdb9b5e2715c59869.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/d8838513009c65079aba67314ab130920484c674c5f0b8a356c8777eb6174eb2.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/dda01925b7f0a213215b983979ce23625dd0f6cfdb49c483ec1ff73e64def56f.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/e4956d8f97608f8324607b22cc93635d8183b23021d79cb4c21668c8b8a6ce87.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/e80c1e517e7173dcbde78869d2bf67a24a11b0bb9df5a87fb12934e39497abc8.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/eeeaa9394ac979eb4ffa557e97d67ed96dbd61437e09058f7c776bdc0483f050.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/f9264d8d7d1ccfb415362a28b4a1b4fa0dfbdf828ff970d1aaecfb0ebe208978.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/f957a80b89d32af4f33f9f840b4795af1b5145fc44780ad88a6a3b1b3a7ea3bc.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2b0d196f16961f88/asset-manifest.json +418 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2b0d196f16961f88/findings.json +308 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2b0d196f16961f88/frontend-manifest.json +70 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2b0d196f16961f88/graph.json +322 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2b0d196f16961f88/inventory.json +932 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2b0d196f16961f88/summary.json +21 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2d70e3d4fe8290fb/asset-manifest.json +418 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2d70e3d4fe8290fb/findings.json +308 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2d70e3d4fe8290fb/frontend-manifest.json +70 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2d70e3d4fe8290fb/graph.json +322 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2d70e3d4fe8290fb/inventory.json +932 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2d70e3d4fe8290fb/summary.json +21 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_63fab76b2f18c2f0/asset-manifest.json +418 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_63fab76b2f18c2f0/findings.json +308 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_63fab76b2f18c2f0/frontend-manifest.json +70 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_63fab76b2f18c2f0/graph.json +322 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_63fab76b2f18c2f0/inventory.json +932 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_63fab76b2f18c2f0/summary.json +21 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_72fe856b80b0c46f/asset-manifest.json +418 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_72fe856b80b0c46f/findings.json +300 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_72fe856b80b0c46f/frontend-manifest.json +70 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_72fe856b80b0c46f/graph.json +322 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_72fe856b80b0c46f/inventory.json +932 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_72fe856b80b0c46f/summary.json +21 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_a5834156504f3050/asset-manifest.json +418 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_a5834156504f3050/findings.json +308 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_a5834156504f3050/frontend-manifest.json +70 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_a5834156504f3050/graph.json +322 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_a5834156504f3050/inventory.json +932 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_a5834156504f3050/summary.json +21 -0
- package/packages/agentsam-repository/LICENSE +110 -0
- package/packages/agentsam-repository/README.md +25 -0
- package/packages/agentsam-repository/agentsam.package.json +42 -0
- package/packages/agentsam-repository/package.json +8 -5
- package/packages/agentsam-repository/src/crawl.js +220 -0
- package/packages/agentsam-repository/src/index.js +3 -0
- package/packages/agentsam-repository/src/merkle/semantic.js +20 -0
- package/packages/agentsam-repository/src/refinery.js +96 -0
- package/packages/agentsam-repository/test/crawl-refinery.test.mjs +113 -0
- package/packages/agentsam-site-scrape/README.md +357 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/__init__.py +4 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/__main__.py +349 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/classify.py +80 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/config.py +83 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/contract.py +108 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/crawl.py +395 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/evidence.py +226 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/htmlparse.py +109 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/imageops.py +121 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/jsonrun.py +127 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/net.py +121 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/pageextract.py +202 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/r2_upload.py +140 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/ssrf.py +57 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/storage.py +57 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/wrangler_bucket.py +98 -0
- package/packages/agentsam-site-scrape/pyproject.toml +21 -0
- package/packages/agentsam-site-scrape/runtime/client.mjs +32 -0
- package/packages/agentsam-site-scrape/runtime/core.mjs +211 -0
- package/packages/agentsam-site-scrape/runtime/index.mjs +31 -0
- package/packages/agentsam-site-scrape/runtime/knowledge.mjs +38 -0
- package/packages/agentsam-site-scrape/runtime/node-runner.mjs +231 -0
- package/packages/agentsam-site-scrape/runtime/node-storage.mjs +146 -0
- package/packages/agentsam-site-scrape/runtime/project-site.mjs +74 -0
- package/packages/agentsam-site-scrape/runtime/secure-fetch.mjs +88 -0
- package/packages/agentsam-site-scrape/runtime/test/knowledge-handoff.test.mjs +51 -0
- package/packages/agentsam-site-scrape/runtime/test/project-index-command.test.mjs +109 -0
- package/packages/agentsam-site-scrape/runtime/test/runtime.test.mjs +145 -0
- package/packages/agentsam-site-scrape/tests/__init__.py +0 -0
- package/packages/agentsam-site-scrape/tests/test_contract.py +83 -0
- package/packages/agentsam-site-scrape/tests/test_core.py +119 -0
- package/packages/agentsam-site-scrape/tests/test_evidence.py +88 -0
- package/packages/agentsam-site-scrape/tests/test_evidence_pipeline.py +112 -0
- package/packages/agentsam-site-scrape/tests/test_jsonrun.py +63 -0
- package/packages/agentsam-site-scrape/tests/test_redirects.py +68 -0
- package/packages/agentsam-site-scrape/tests/test_storage.py +34 -0
- package/packages/agentsam-site-scrape/worker/index.mjs +259 -0
- package/packages/agentsam-site-scrape/worker/project-config.mjs +57 -0
- package/packages/agentsam-site-scrape/worker/test/worker.test.mjs +191 -0
- package/packages/agentsam-vault/LICENSE +110 -0
- package/packages/agentsam-vault/package.json +3 -3
- package/packages/agentsam-workbench/LICENSE +110 -0
- package/packages/agentsam-workbench/README.md +18 -0
- package/packages/agentsam-workbench/package.json +29 -5
- package/packages/agentsam-workbench/src/agent/AgentRuntimeField.tsx +12 -7
- package/packages/agentsam-workbench/src/agent/Composer.tsx +10 -3
- package/packages/agentsam-workbench/src/agent/MiniAgentSam.tsx +129 -16
- package/packages/agentsam-workbench/src/agent/SelectionToolbar.tsx +161 -0
- package/packages/agentsam-workbench/src/agent/capability-catalog.ts +103 -0
- package/packages/agentsam-workbench/src/agent/index.ts +4 -0
- package/packages/agentsam-workbench/src/agent/mini-agentsam.css +18 -6
- package/packages/agentsam-workbench/src/agent/selection-toolbar.css +84 -0
- package/packages/agentsam-workbench/src/design/DesignWorkspaceFrame.tsx +209 -0
- package/packages/agentsam-workbench/src/design/canvas-handoff.ts +44 -0
- package/packages/agentsam-workbench/src/design/design-workspace.css +267 -0
- package/packages/agentsam-workbench/src/design/index.ts +7 -0
- package/packages/agentsam-workbench/src/index.ts +1 -0
- package/packages/agentsam-workbench/src/knowledge/AutoRagWorkflowDialog.tsx +166 -0
- package/packages/agentsam-workbench/src/knowledge/README.md +14 -0
- package/packages/agentsam-workbench/src/knowledge/autorag-workflow.css +6 -0
- package/packages/agentsam-workbench/src/knowledge/index.ts +2 -0
- package/packages/agentsam-workbench/src/resources/ResourceCard.tsx +90 -0
- package/packages/agentsam-workbench/src/resources/index.ts +6 -0
- package/packages/agentsam-workbench/src/resources/resource-card.css +174 -0
- package/packages/agentsam-workbench/src/widgets/BuiltinWidget.tsx +6 -0
- package/packages/agentsam-workbench/src/widgets/CalculatorWidget.tsx +81 -0
- package/packages/agentsam-workbench/src/widgets/ClockWidget.tsx +66 -0
- package/packages/agentsam-workbench/src/widgets/QueueDepthWidget.tsx +122 -0
- package/packages/agentsam-workbench/src/widgets/calculator.ts +57 -0
- package/packages/agentsam-workbench/src/widgets/clock.ts +54 -0
- package/packages/agentsam-workbench/src/widgets/index.ts +5 -0
- package/packages/agentsam-workbench/src/widgets/registry.ts +269 -1
- package/packages/agentsam-workbench/src/widgets/widgets.css +31 -0
- package/packages/catalog/README.md +69 -0
- package/packages/catalog/assist/questions.json +205 -0
- package/packages/catalog/assist/rules.json +149 -0
- package/packages/catalog/doctor/toolchains.json +12 -0
- package/packages/catalog/evidence/agentsam-abs.json +76 -0
- package/packages/catalog/evidence/agentsam-analytics.json +59 -0
- package/packages/catalog/evidence/agentsam-assets-core.json +38 -0
- package/packages/catalog/evidence/agentsam-brand.json +73 -0
- package/packages/catalog/evidence/agentsam-browser-surface.json +42 -0
- package/packages/catalog/evidence/agentsam-campaign.json +48 -0
- package/packages/catalog/evidence/agentsam-cloudflare-images.json +38 -0
- package/packages/catalog/evidence/agentsam-content-studio.json +42 -0
- package/packages/catalog/evidence/agentsam-content.json +70 -0
- package/packages/catalog/evidence/agentsam-contracts.json +92 -0
- package/packages/catalog/evidence/agentsam-database-editor.json +82 -0
- package/packages/catalog/evidence/agentsam-desktop-shell.json +56 -0
- package/packages/catalog/evidence/agentsam-docs-theme.json +35 -0
- package/packages/catalog/evidence/agentsam-errors.json +42 -0
- package/packages/catalog/evidence/agentsam-goap.json +52 -0
- package/packages/catalog/evidence/agentsam-hooks.json +100 -0
- package/packages/catalog/evidence/agentsam-ide.json +64 -0
- package/packages/catalog/evidence/agentsam-identity.json +91 -0
- package/packages/catalog/evidence/agentsam-key-manager.json +46 -0
- package/packages/catalog/evidence/agentsam-knowledge.json +42 -0
- package/packages/catalog/evidence/agentsam-loading-scene.json +54 -0
- package/packages/catalog/evidence/agentsam-merch.json +68 -0
- package/packages/catalog/evidence/agentsam-nav.json +63 -0
- package/packages/catalog/evidence/agentsam-queue-control.json +60 -0
- package/packages/catalog/evidence/agentsam-rapid-rust.json +46 -0
- package/packages/catalog/evidence/agentsam-repository.json +56 -0
- package/packages/catalog/evidence/agentsam-scoring.json +39 -0
- package/packages/catalog/evidence/agentsam-sections.json +52 -0
- package/packages/catalog/evidence/agentsam-settings.json +58 -0
- package/packages/catalog/evidence/agentsam-shell-kit.json +56 -0
- package/packages/catalog/evidence/agentsam-vault.json +61 -0
- package/packages/catalog/evidence/agentsam-work-graph.json +51 -0
- package/packages/catalog/evidence/agentsam-work.json +64 -0
- package/packages/catalog/evidence/agentsam-workbench.json +96 -0
- package/packages/catalog/evidence/analytics-ui.json +43 -0
- package/packages/catalog/evidence/copro-editor.json +42 -0
- package/packages/catalog/evidence/copro-media.json +42 -0
- package/packages/catalog/evidence/copro-project.json +42 -0
- package/packages/catalog/evidence/copro-proof.json +48 -0
- package/packages/catalog/evidence/copro-provider-contracts.json +40 -0
- package/packages/catalog/evidence/copro-render.json +40 -0
- package/packages/catalog/evidence/copro-storage.json +44 -0
- package/packages/catalog/evidence/copro-templates.json +42 -0
- package/packages/catalog/evidence/copro-timeline.json +44 -0
- package/packages/catalog/evidence/copro-ui.json +52 -0
- package/packages/catalog/evidence/theme-contract.json +34 -0
- package/packages/catalog/evidence/theme-scenes.json +59 -0
- package/packages/catalog/generated/packages.json +2496 -0
- package/packages/catalog/src/theme-products.mjs +64 -0
- package/packages/catalog/topics/runtime.json +33 -0
- package/packages/connectors/cfoa/LICENSE +110 -0
- package/packages/connectors/cfoa/OAUTH_STORAGE_AUDIT.md +5 -0
- package/packages/connectors/cfoa/agentsam.package.json +46 -0
- package/packages/connectors/cfoa/package.json +2 -2
- package/packages/connectors/cfoa/src/api-client.js +54 -8
- package/packages/connectors/cfoa/src/capabilities.js +63 -3
- package/packages/connectors/cfoa/src/credential.js +381 -48
- package/packages/connectors/cfoa/src/families/analytics-sql.js +44 -0
- package/packages/connectors/cfoa/src/families/basin.js +30 -0
- package/packages/connectors/cfoa/src/families/media.js +622 -0
- package/packages/connectors/cfoa/src/index.js +39 -2
- package/packages/connectors/cfoa/src/oauth-persist.js +231 -95
- package/packages/connectors/cfoa/src/routes.js +281 -36
- package/packages/connectors/cfoa/src/scope-catalog.js +14 -1
- package/packages/connectors/cfoa/test/analytics-sql.test.mjs +27 -0
- package/packages/connectors/cfoa/test/basin.test.mjs +30 -0
- package/packages/connectors/cfoa/tests/api-client-fetch.test.mjs +71 -0
- package/packages/connectors/cfoa/tests/capabilities.test.mjs +28 -3
- package/packages/connectors/cfoa/tests/connector.test.mjs +5 -5
- package/packages/connectors/cfoa/tests/cross-host-recovery.test.mjs +125 -0
- package/packages/connectors/cfoa/tests/media-discovery.test.mjs +260 -0
- package/packages/connectors/cfoa/tests/oauth-persist.test.mjs +114 -14
- package/packages/identity/.agentsam/features/oauth-login-portal/agentsam.feature.json +1 -1
- package/packages/identity/LICENSE +110 -0
- package/packages/identity/README.md +25 -0
- package/packages/identity/agentsam.package.json +42 -0
- package/packages/identity/migrations/apply-portable.js +1 -0
- package/packages/identity/migrations/sqlite/006_identity_account_security.sql +31 -0
- package/packages/identity/package.json +4 -2
- package/packages/identity/schema/agentsam.identity/manifest.json +31 -9
- package/packages/identity/src/adapters/account-security-store.js +236 -0
- package/packages/identity/src/adapters/iam-compat/index.js +13 -0
- package/packages/identity/src/adapters/portable-store.js +15 -0
- package/packages/identity/src/contracts/sign-in-options.js +10 -0
- package/packages/identity/src/core/account-security.js +149 -0
- package/packages/identity/src/frontend/auth-portal/pages/login.html +14 -2
- package/packages/identity/src/frontend/auth-portal/pages/signup.html +10 -4
- package/packages/identity/src/frontend/merchant-onboarding/store-start.css +9 -0
- package/packages/identity/src/frontend/merchant-onboarding/store-start.html +73 -0
- package/packages/identity/src/frontend/merchant-onboarding/store-start.js +166 -0
- package/packages/identity/src/migrations/0004_account_security.sql +24 -0
- package/packages/identity/src/oauth/iam-platform.js +4 -2
- package/packages/identity/src/recovery/password-reset.js +8 -8
- package/packages/identity/src/server/merchant-onboarding.js +103 -0
- package/packages/identity/src/server/worker-router.js +255 -6
- package/packages/identity/tests/account-security.test.mjs +341 -0
- package/packages/identity/tests/chatgpt-provider.test.mjs +4 -2
- package/packages/identity/tests/lane1-packed-consumer.test.mjs +28 -3
- package/packages/identity/tests/merchant-onboarding-portability.test.mjs +77 -0
- package/packages/identity/tests/password-enrollment.test.mjs +82 -0
- package/packages/identity/tests/password-reset.test.mjs +43 -0
- package/packages/identity/tests/portable-identity-architecture.test.mjs +3 -3
- package/packages/identity/tests/preview-auth-portal.test.mjs +2 -0
- package/packages/identity/tests/stock-product-provenance.test.mjs +22 -0
- package/packages/primetech-procedures/README.md +61 -0
- package/packages/primetech-procedures/agentsam.package.json +63 -0
- package/packages/primetech-procedures/package.json +22 -0
- package/packages/primetech-procedures/procedures/cad.motor-bearing-end-plate/README.md +21 -0
- package/packages/primetech-procedures/procedures/cad.motor-bearing-end-plate/__pycache__/test_generate_toolpaths.cpython-314.pyc +0 -0
- package/packages/primetech-procedures/procedures/cad.motor-bearing-end-plate/build_freecad.py +514 -0
- package/packages/primetech-procedures/procedures/cad.motor-bearing-end-plate/finalize_bundle.py +26 -0
- package/packages/primetech-procedures/procedures/cad.motor-bearing-end-plate/generate_assets.py +284 -0
- package/packages/primetech-procedures/procedures/cad.motor-bearing-end-plate/generate_toolpaths.py +715 -0
- package/packages/primetech-procedures/procedures/cad.motor-bearing-end-plate/package_artifacts.py +154 -0
- package/packages/primetech-procedures/procedures/cad.motor-bearing-end-plate/parameters.json +51 -0
- package/packages/primetech-procedures/procedures/cad.motor-bearing-end-plate/procedure.json +101 -0
- package/packages/primetech-procedures/procedures/cad.motor-bearing-end-plate/render_preview.py +98 -0
- package/packages/primetech-procedures/procedures/cad.motor-bearing-end-plate/run.py +214 -0
- package/packages/primetech-procedures/procedures/cad.motor-bearing-end-plate/test_generate_toolpaths.py +50 -0
- package/packages/primetech-procedures/procedures/repo.asset.inventory/__pycache__/run.cpython-312.pyc +0 -0
- package/packages/primetech-procedures/procedures/repo.asset.inventory/procedure.json +65 -0
- package/packages/primetech-procedures/procedures/repo.asset.inventory/run.py +116 -0
- package/packages/primetech-procedures/procedures/repo.asset.inventory/run.sh +11 -0
- package/packages/primetech-procedures/profiles/PRIMETECH_PROCEDURE_ENGINEER.md +25 -0
- package/packages/primetech-procedures/src/index.js +547 -0
- package/packages/primetech-procedures/test/__pycache__/test_inventory.cpython-312.pyc +0 -0
- package/packages/primetech-procedures/test/procedure.test.mjs +207 -0
- package/packages/primetech-procedures/test/test_inventory.py +57 -0
- package/packages/providers/completeful/LICENSE +110 -0
- package/packages/providers/completeful/README.md +67 -27
- package/packages/providers/completeful/dist/client.d.ts +118 -0
- package/packages/providers/completeful/dist/client.js +221 -0
- package/packages/providers/completeful/dist/generated/operations.generated.d.ts +760 -0
- package/packages/providers/completeful/dist/generated/operations.generated.js +931 -0
- package/packages/providers/completeful/dist/generated/types.generated.d.ts +1173 -0
- package/packages/providers/completeful/dist/generated/types.generated.js +1 -0
- package/packages/providers/completeful/openapi/openapi.json +5320 -0
- package/packages/providers/completeful/package.json +34 -8
- package/packages/providers/completeful/scripts/generate.mjs +156 -0
- package/packages/providers/completeful/src/client.js +12 -162
- package/packages/providers/completeful/src/core/client.ts +248 -0
- package/packages/providers/completeful/src/core/generated/operations.generated.ts +931 -0
- package/packages/providers/completeful/src/core/generated/types.generated.ts +94 -0
- package/packages/providers/completeful/src/index.d.ts +24 -0
- package/packages/providers/completeful/src/index.js +3 -0
- package/packages/providers/completeful/test/openapi.test.mjs +70 -0
- package/packages/providers/completeful/test/types/consumer.ts +30 -0
- package/packages/providers/completeful/test/types/tsconfig.json +12 -0
- package/packages/providers/completeful/tsconfig.json +15 -0
- package/packages/theme-scenes/LICENSE +110 -0
- package/packages/theme-scenes/README.md +57 -2
- package/packages/theme-scenes/agentsam.package.json +65 -0
- package/packages/theme-scenes/package.json +11 -12
- package/packages/theme-scenes/src/cms/adapter.js +232 -0
- package/packages/theme-scenes/src/cms/browser.js +5 -0
- package/packages/theme-scenes/src/cms/index.js +22 -0
- package/packages/theme-scenes/src/cms/runtime.js +524 -0
- package/packages/theme-scenes/src/contracts/index.js +40 -0
- package/packages/theme-scenes/src/index.js +1 -0
- package/packages/theme-scenes/src/runtime/compile.js +24 -0
- package/packages/theme-scenes/src/scenes/index.js +3 -1
- package/packages/theme-scenes/src/visuals/index.js +7 -0
- package/packages/theme-scenes/test/cms.test.mjs +118 -0
- package/packages/theme-scenes/test/theme-scenes.test.mjs +52 -0
- package/packages/work-graph/LICENSE +110 -0
- package/packages/work-graph/agentsam.package.json +42 -0
- package/packages/work-graph/package.json +2 -2
- package/protocol/README.md +2 -2
- package/protocol/apps/agentsam.app.v1.schema.json +28 -2
- package/protocol/apps/agentsam.host-install.v1.schema.json +1 -1
- package/protocol/assets/asset-record.v1.schema.json +1 -1
- package/protocol/brand/brandpack.v1.schema.json +1 -1
- package/protocol/cad/README.md +85 -0
- package/protocol/cad/blender-recipe.schema.json +1 -1
- package/protocol/cad/cad.project.v2.schema.json +554 -0
- package/protocol/cad/v2/core/artifact-receipt.schema.json +126 -0
- package/protocol/cad/v2/core/coordinate-system.schema.json +364 -0
- package/protocol/cad/v2/core/geometry-constraint.schema.json +136 -0
- package/protocol/cad/v2/core/geometry-entity.schema.json +73 -0
- package/protocol/cad/v2/core/geometry-feature.schema.json +115 -0
- package/protocol/cad/v2/core/geometry-relationship.schema.json +67 -0
- package/protocol/cad/v2/core/project-revision.schema.json +111 -0
- package/protocol/cad/v2/core/topology-reference.schema.json +80 -0
- package/protocol/cad/v2/intent/design-decision.schema.json +126 -0
- package/protocol/cad/v2/intent/design-option.schema.json +88 -0
- package/protocol/cad/v2/interchange/ifc-mapping.schema.json +145 -0
- package/protocol/cad/v2/interchange/native-document.schema.json +130 -0
- package/protocol/cad/v2/interchange/reference-model.schema.json +141 -0
- package/protocol/cad/v2/modules/architecture.v1.schema.json +278 -0
- package/protocol/cad/v2/modules/landscape.v1.schema.json +157 -0
- package/protocol/cad/v2/modules/mechanical.v1.schema.json +325 -0
- package/protocol/cad/v2/modules/parametric.v1.schema.json +89 -0
- package/protocol/cad/v2/modules/product-design.v1.schema.json +178 -0
- package/protocol/cad/v2/modules/robotics.v1.schema.json +246 -0
- package/protocol/cad/v2/presentation/camera-path.schema.json +143 -0
- package/protocol/cad/v2/presentation/drawing.schema.json +162 -0
- package/protocol/cad/v2/presentation/production.schema.json +166 -0
- package/protocol/cad/v2/presentation/scene.schema.json +198 -0
- package/protocol/cad/v2/presentation/sheet.schema.json +254 -0
- package/protocol/cad/v2/presentation/view.schema.json +190 -0
- package/protocol/cad/v2/presentation/walkthrough.schema.json +199 -0
- package/protocol/cad/v2/schema-pack.manifest.json +189 -0
- package/protocol/cad/v2/validation/deliverable-manifest.schema.json +199 -0
- package/protocol/cad/v2/validation/result.schema.json +141 -0
- package/protocol/canvas/knowledge-core.mjs +35 -0
- package/protocol/capabilities/capability-manifest.schema.json +1 -1
- package/protocol/capabilities/cloudflare-cpu-audit-input.schema.json +1 -1
- package/protocol/capabilities/cloudflare-cpu-profile-input.schema.json +1 -1
- package/protocol/capabilities/cloudflare-wrangler-native-input.schema.json +1 -1
- package/protocol/capabilities/evidence-manifest.schema.json +404 -0
- package/protocol/capabilities/knowledge-search-input.schema.json +1 -1
- package/protocol/capabilities/manifest.json +135 -9
- package/protocol/capabilities/repository-audit-input.schema.json +1 -1
- package/protocol/capabilities/repository-audit.schema.json +1 -1
- package/protocol/capabilities/repository-crawl-input.schema.json +18 -0
- package/protocol/capabilities/repository-crawl-result.schema.json +80 -0
- package/protocol/capabilities/repository-mine-input.schema.json +28 -0
- package/protocol/capabilities/repository-mine-result.schema.json +52 -0
- package/protocol/capabilities/repository-snapshot-input.schema.json +1 -1
- package/protocol/capabilities/repository-snapshot.schema.json +1 -1
- package/protocol/capabilities/site-index.schema.json +15 -0
- package/protocol/capabilities/site-scrape-evidence-manifest.schema.json +114 -0
- package/protocol/capabilities/site-scrape-input.schema.json +90 -0
- package/protocol/capabilities/site-scrape-project-authority.schema.json +15 -0
- package/protocol/capabilities/site-scrape-result.schema.json +198 -0
- package/protocol/capabilities/site-scrape-worker-job.schema.json +18 -0
- package/protocol/capabilities/terminal-exec-input.schema.json +1 -1
- package/protocol/context/context-budget.schema.json +1 -1
- package/protocol/context/context-item.schema.json +1 -1
- package/protocol/context/resolved-context-pack.schema.json +3 -3
- package/protocol/context/result-policy.schema.json +1 -1
- package/protocol/contracts/source-types.v2.json +9381 -0
- package/protocol/contracts/source-types.v2.schema.json +571 -0
- package/protocol/credentials/issue.v1.schema.json +2 -2
- package/protocol/database/agentsam.schema-pack.v1.schema.json +1 -1
- package/protocol/database/connection.v1.schema.json +1 -1
- package/protocol/embeddings/embedding-profile.v1.schema.json +1 -1
- package/protocol/errors/agentsam.error.v2.schema.json +1 -1
- package/protocol/errors/error-catalog.json +12 -0
- package/protocol/errors/error-envelope.schema.json +1 -1
- package/protocol/errors/recovery.v1.schema.json +1 -1
- package/protocol/features/agentsam.feature.v1.schema.json +1 -1
- package/protocol/governance/distribution-roadmap.v1.json +335 -0
- package/protocol/governance/github-labels.v1.json +232 -0
- package/protocol/hooks/README.md +2 -0
- package/protocol/hooks/agentsam.hook.output.v1.schema.json +1 -1
- package/protocol/hooks/agentsam.hook.receipt.v1.schema.json +1 -1
- package/protocol/hooks/agentsam.hook.v1.schema.json +1 -1
- package/protocol/hooks/agentsam.hooks.config.v1.schema.json +1 -1
- package/protocol/knowledge/chunk.schema.json +1 -1
- package/protocol/knowledge/context-pack.schema.json +3 -3
- package/protocol/knowledge/document.schema.json +1 -1
- package/protocol/knowledge/index-config.schema.json +1 -1
- package/protocol/knowledge/ingest-receipt.schema.json +1 -1
- package/protocol/knowledge/repository.schema.json +1 -1
- package/protocol/knowledge/retrieval-hit.schema.json +1 -1
- package/protocol/knowledge/retrieval-query.schema.json +2 -2
- package/protocol/knowledge/source.schema.json +1 -1
- package/protocol/local-engine/benchmark.v1.schema.json +1 -1
- package/protocol/local-engine/engine.v1.schema.json +1 -1
- package/protocol/models/discovery.mjs +409 -0
- package/protocol/models/model-inventory-v2.schema.json +1 -1
- package/protocol/models/provider-model-snapshot.v1.schema.json +1 -1
- package/protocol/models/workers-ai-curated.mjs +14 -0
- package/protocol/notifications/README.md +45 -0
- package/protocol/packages/agentsam.package-schema-registry.v1.schema.json +108 -0
- package/protocol/plugins/agentsam.plugin-evidence-bundle.v1.schema.json +55 -0
- package/protocol/plugins/agentsam.plugin-product.v1.schema.json +227 -0
- package/protocol/plugins/agentsam.plugin-quality-evidence.v1.schema.json +47 -0
- package/protocol/plugins/agentsam.plugin-quality-receipt.v1.schema.json +160 -0
- package/protocol/presets/catalog.json +4 -4
- package/protocol/product-releases/README.md +132 -0
- package/protocol/receipts/agentsam.receipt.v1.json +2 -2
- package/protocol/recon/finding-report.schema.json +1 -1
- package/protocol/recon/task-packet.schema.json +1 -1
- package/protocol/repository/repository-contract.schema.json +1 -1
- package/protocol/repository/repository-dependency.schema.json +1 -1
- package/protocol/repository/repository-identity.schema.json +1 -1
- package/protocol/runtime/agentsam.runtime.v1.schema.json +1 -1
- package/protocol/runtime/primetech-procedure.v1.schema.json +125 -0
- package/protocol/runtime/terminal-exec.conformance.v1.json +88 -0
- package/protocol/runtime/workspace-fs.conformance.v1.json +96 -0
- package/protocol/runtime/workspace-fs.v1.schema.json +2 -1
- package/protocol/sam/activity.v1.schema.json +1 -1
- package/protocol/sam/answer.v1.schema.json +1 -1
- package/protocol/sam/calibration.v1.schema.json +1 -1
- package/protocol/sam/decision-receipt.v1.schema.json +1 -1
- package/protocol/sam/evaluation.v1.schema.json +1 -1
- package/protocol/sam/operation.schema.json +103 -10
- package/protocol/sam/outcome.v1.schema.json +1 -1
- package/protocol/sam/question.v1.schema.json +1 -1
- package/protocol/sam/result.schema.json +33 -10
- package/protocol/sam/state.v1.schema.json +1 -1
- package/protocol/scoring/scorecard.v1.schema.json +1 -1
- package/protocol/skills/agentsam.interaction.v1.schema.json +1 -1
- package/protocol/skills/agentsam.skill.v1.schema.json +1 -1
- package/protocol/theme-refinery/product-metadata.schema.json +1 -1
- package/protocol/theme-refinery/reconciliation-receipt.schema.json +1 -1
- package/protocol/tools/agent-tool-definition.v1.schema.json +78 -0
- package/protocol/ui/agentsam.ui-quality.v1.schema.json +31 -0
- package/protocol/ui/icon.v1.schema.json +1 -1
- package/python/README.md +97 -21
- package/python/agentsam_sdk/__init__.py +9 -2
- package/python/agentsam_sdk/assets/__init__.py +4 -0
- package/python/agentsam_sdk/assets/geaux_boot.json +25 -0
- package/python/agentsam_sdk/assets/procedures.py +40 -0
- package/python/agentsam_sdk/cad/__init__.py +5 -0
- package/python/agentsam_sdk/cad/native.py +189 -0
- package/python/agentsam_sdk/cad/occt.py +96 -0
- package/python/agentsam_sdk/cli.py +57 -12
- package/python/agentsam_sdk/client.py +402 -0
- package/python/agentsam_sdk/data/d1_adapter.py +71 -2
- package/python/agentsam_sdk/diagnostics.py +44 -0
- package/python/agentsam_sdk/errors/vocabulary.py +10 -0
- package/python/agentsam_sdk/procedures/__init__.py +4 -0
- package/python/agentsam_sdk/procedures/client.py +75 -0
- package/python/agentsam_sdk/py.typed +0 -0
- package/python/agentsam_sdk/runtime/native.py +918 -0
- package/python/agentsam_sdk/terminal_art.py +85 -0
- package/python/agentsam_sdk/terminal_ui.py +187 -0
- package/python/agentsam_sdk/tui/README.md +3 -3
- package/python/agentsam_sdk/tui/__init__.py +1 -1
- package/python/agentsam_sdk/tui/bootstrap.py +2 -2
- package/python/agentsam_sdk/tui/demo.py +2 -2
- package/python/docs/gaps.md +12 -3
- package/python/docs/release.md +55 -0
- package/python/pyproject.toml +33 -6
- package/python/scripts/check-dist.py +65 -0
- package/python/tests/test_asset_procedure_api.py +66 -0
- package/python/tests/test_cad_native.py +73 -0
- package/python/tests/test_cad_occt.py +52 -0
- package/python/tests/test_cli_distribution.py +82 -0
- package/python/tests/test_d1_write_adapter.py +66 -0
- package/python/tests/test_native_runtime.py +298 -0
- package/python/tests/test_packaging.py +43 -0
- package/python/tests/test_procedure_client.py +80 -0
- package/python/tests/test_public_client.py +85 -0
- package/python/tests/test_terminal_art.py +36 -0
- package/services/cad/blender/adapter.py +0 -0
- package/services/cad/occt/CMakeLists.txt +9 -0
- package/services/cad/occt/README.md +14 -0
- package/services/cad/server.py +327 -26
- package/skills/README.md +18 -4
- package/skills/agentsam-arch-accessibility/SKILL.md +19 -0
- package/skills/agentsam-arch-accessibility/agentsam.skill.json +20 -0
- package/skills/agentsam-arch-assemblies/SKILL.md +20 -0
- package/skills/agentsam-arch-assemblies/agentsam.skill.json +20 -0
- package/skills/agentsam-arch-bim/SKILL.md +20 -0
- package/skills/agentsam-arch-bim/agentsam.skill.json +20 -0
- package/skills/agentsam-arch-cad/SKILL.md +19 -0
- package/skills/agentsam-arch-cad/agentsam.skill.json +20 -0
- package/skills/agentsam-arch-codes/SKILL.md +19 -0
- package/skills/agentsam-arch-codes/agentsam.skill.json +20 -0
- package/skills/agentsam-arch-coordination/SKILL.md +19 -0
- package/skills/agentsam-arch-coordination/agentsam.skill.json +20 -0
- package/skills/agentsam-arch-documents/SKILL.md +19 -0
- package/skills/agentsam-arch-documents/agentsam.skill.json +20 -0
- package/skills/agentsam-arch-geometry/SKILL.md +19 -0
- package/skills/agentsam-arch-geometry/agentsam.skill.json +20 -0
- package/skills/agentsam-arch-materials/SKILL.md +19 -0
- package/skills/agentsam-arch-materials/agentsam.skill.json +20 -0
- package/skills/agentsam-arch-orchestrate/SKILL.md +21 -0
- package/skills/agentsam-arch-orchestrate/agentsam.skill.json +20 -0
- package/skills/agentsam-arch-specifications/SKILL.md +19 -0
- package/skills/agentsam-arch-specifications/agentsam.skill.json +20 -0
- package/skills/agentsam-arch-verify/SKILL.md +20 -0
- package/skills/agentsam-arch-verify/agentsam.skill.json +20 -0
- package/skills/agentsam-cad/SKILL.md +59 -0
- package/skills/agentsam-canvas-creation/SKILL.md +79 -0
- package/skills/agentsam-canvas-creation/references/creation-journey.md +55 -0
- package/skills/agentsam-canvas-creation/references/fullstack-creation-checklist.md +28 -0
- package/skills/agentsam-canvas-creation/references/quality-and-consistency.md +39 -0
- package/skills/agentsam-cms-ready-creation/SKILL.md +68 -0
- package/skills/agentsam-cms-ready-creation/references/cms-handoff-map.md +50 -0
- package/skills/agentsam-cms-ready-creation/references/web-fullstack-readiness.md +38 -0
- package/skills/agentsam-plan-and-goap/SKILL.md +90 -0
- package/skills/agentsam-repo-recon/SKILL.md +63 -0
- package/skills/agentsam-sam-operations/SKILL.md +71 -0
- package/skills/agentsam-sdk-orientation/SKILL.md +78 -0
- package/skills/catalog.json +416 -0
- package/src/AgentSam.js +2 -0
- package/src/agent/capability-adapter.js +210 -9
- package/src/agent/index.js +1 -0
- package/src/agent/intent.js +12 -0
- package/src/agent/project-discovery.js +47 -0
- package/src/agent/project-resources.js +157 -0
- package/src/agent/responses-runner.js +64 -12
- package/src/capabilities/cloudflare-d1-provision.js +48 -0
- package/src/capabilities/index.js +2 -0
- package/src/capabilities/knowledge-operations.js +87 -0
- package/src/capabilities/local-sqlite-resources.js +124 -0
- package/src/capabilities/machine-inspect.js +28 -0
- package/src/capabilities/mcp-d1-bridge.js +98 -0
- package/src/capabilities/plan-operation-ids.js +6 -0
- package/src/capabilities/plan-operations.js +85 -0
- package/src/capabilities/repository-awareness.js +52 -0
- package/src/capabilities/terminal-exec.js +16 -4
- package/src/capabilities/test-run.js +10 -0
- package/src/capabilities/workspace-files.js +181 -0
- package/src/cli/command-catalog.js +40 -4
- package/src/cli/desktop-launch.js +107 -0
- package/src/cli.js +116 -126
- package/src/commands/app.js +45 -46
- package/src/commands/autorag-node-api.js +96 -0
- package/src/commands/autorag.js +178 -17
- package/src/commands/catalog-doctor.js +52 -0
- package/src/commands/catalog.js +151 -0
- package/src/commands/cheat-sheet.js +92 -63
- package/src/commands/cloudflare.js +64 -2
- package/src/commands/codebaseindex.js +2 -2
- package/src/commands/db.js +17 -0
- package/src/commands/dockerize.js +11 -2
- package/src/commands/goals.js +59 -0
- package/src/commands/goap-world.js +4 -0
- package/src/commands/goap.js +48 -1
- package/src/commands/interactive.js +21 -1
- package/src/commands/knowledge.js +8 -3
- package/src/commands/machine-binary.js +3 -2
- package/src/commands/machine.js +66 -15
- package/src/commands/mcp.js +175 -21
- package/src/commands/memory.js +102 -0
- package/src/commands/package.js +1 -1
- package/src/commands/plan-ledger.js +60 -22
- package/src/commands/plan.js +3 -3
- package/src/commands/plugins.js +81 -9
- package/src/commands/product.js +21 -0
- package/src/commands/rust.js +4 -1
- package/src/commands/sam-evidence.js +87 -0
- package/src/commands/sam-media.js +78 -0
- package/src/commands/sam.js +132 -0
- package/src/commands/shell.js +114 -8
- package/src/commands/site-scrape.js +9 -0
- package/src/commands/skill.js +1 -1
- package/src/commands/start-local.js +29 -1
- package/src/context/resolve.js +5 -1
- package/src/index.js +13 -0
- package/src/indexing/ingest/style-evidence.js +10 -6
- package/src/knowledge/d1-schema.js +65 -0
- package/src/knowledge/engine.js +55 -15
- package/src/knowledge/source.js +8 -0
- package/src/knowledge/store-discovery.js +9 -3
- package/src/knowledge/stores/sqlite.js +8 -0
- package/src/knowledge/wrangler-binding-discovery.js +43 -0
- package/src/lib/agent-instructions.js +29 -5
- package/src/lib/auth.js +46 -7
- package/src/lib/cad/delivery-profiles.d.ts +7 -0
- package/src/lib/cad/delivery-profiles.js +122 -0
- package/src/lib/cad/discovery.js +6 -1
- package/src/lib/cad/docker-executor.js +1 -1
- package/src/lib/cad/editable-project-contract.js +81 -0
- package/src/lib/cad/index.js +6 -0
- package/src/lib/cad/occt-native-provider.mjs +3 -0
- package/src/lib/cad/openscad.js +13 -1
- package/src/lib/cad/production-operations.d.ts +8 -0
- package/src/lib/cad/production-operations.js +74 -0
- package/src/lib/cad/project-cli.d.ts +1 -1
- package/src/lib/cad/project-contract.js +1 -1
- package/src/lib/cad/project-runtime.d.ts +1 -1
- package/src/lib/cad/project-runtime.js +64 -3
- package/src/lib/cad/project-tools.js +24 -0
- package/src/lib/cad/project-v2.d.ts +76 -0
- package/src/lib/cad/project-v2.js +325 -0
- package/src/lib/cad-docker.js +96 -16
- package/src/lib/deploy/local-studio.js +9 -1
- package/src/lib/dockerize.js +5 -5
- package/src/lib/execution-approvals.js +29 -3
- package/src/lib/scaffold/wizards/cms.js +0 -79
- package/src/lib/terminal-scopes.js +5 -2
- package/src/local-fs/capability.js +5 -0
- package/src/local-lsp/host.js +2 -0
- package/src/local-pty/server.js +21 -0
- package/src/mcp/authority.js +26 -2
- package/src/mcp/browsermcp.js +28 -0
- package/src/mcp/client-adapters.js +22 -5
- package/src/mcp/client.js +35 -7
- package/src/mcp/oauth-connection.js +109 -0
- package/src/models/discovery.js +1 -373
- package/src/models/inventory-core.d.ts +21 -0
- package/src/models/inventory-core.js +46 -11
- package/src/plugins/browsermcp.js +47 -0
- package/src/plugins/contracts.js +8 -0
- package/src/plugins/creative.js +38 -0
- package/src/plugins/index.js +16 -0
- package/src/plugins/productization.js +348 -0
- package/src/plugins/registry.js +90 -75
- package/src/plugins/runtime.js +12 -3
- package/src/providers/factory.js +13 -0
- package/src/providers/gemini-generate-content.js +18 -0
- package/src/registry/generated/inventory.json +4152 -0
- package/src/registry/index.js +96 -0
- package/src/registry/turn-one.js +45 -0
- package/src/sam/adapters/local-media-store.js +71 -0
- package/src/sam/adapters/local-script-runtime.js +122 -0
- package/src/sam/adapters/local-script-store.js +103 -0
- package/src/sam/adapters/object-media-store.js +89 -0
- package/src/sam/adapters/workspace-media.js +78 -0
- package/src/sam/artifacts/render.js +94 -0
- package/src/sam/bridge/stdio.mjs +59 -0
- package/src/sam/client.js +269 -22
- package/src/sam/define.js +11 -2
- package/src/sam/index.js +31 -1
- package/src/sam/local-execution.js +8 -0
- package/src/sam/media/environment.js +96 -0
- package/src/sam/model-adapter.js +45 -0
- package/src/sam/operation-packs/generated-v2/background.js +54 -0
- package/src/sam/operation-packs/generated-v2/catalog.js +1746 -0
- package/src/sam/operation-packs/generated-v2/generated-execution-policies.json +401 -0
- package/src/sam/operation-packs/generated-v2/generated-tool-descriptors.json +1352 -0
- package/src/sam/operation-packs/generated-v2/glb.js +41 -0
- package/src/sam/operation-packs/generated-v2/inneranimalmedia-provider.js +24 -0
- package/src/sam/operation-packs/generated-v2/operation-pack.js +126 -0
- package/src/sam/operation-packs/generated-v2/raster.js +140 -0
- package/src/sam/operation-packs/generated-v2/scripts.js +63 -0
- package/src/sam/operation-packs/generated-v2/sdk-adapter.js +9 -0
- package/src/sam/operation-packs/generated-v2/test/alias-runtime.test.mjs +51 -0
- package/src/sam/operation-packs/generated-v2/test/background.test.mjs +19 -0
- package/src/sam/operation-packs/generated-v2/test/glb.test.mjs +19 -0
- package/src/sam/operation-packs/generated-v2/test/raster.test.mjs +38 -0
- package/src/sam/operation-packs/generated-v2/test/real-asset-bindings.test.mjs +74 -0
- package/src/sam/operation-packs/generated-v2/test/registration.test.mjs +65 -0
- package/src/sam/operation-packs/generated-v2/test/scripts.test.mjs +32 -0
- package/src/sam/operation-packs/generated-v2/test/superbash-client-integration.test.mjs +215 -0
- package/src/sam/operation-packs/generated-v2/tool-types.d.ts +53 -0
- package/src/sam/operations/architectural-knowledge.js +30 -0
- package/src/sam/operations/artifact-render.js +13 -0
- package/src/sam/operations/brand-scan.js +1 -1
- package/src/sam/operations/codebaseindex-ingest.js +1 -1
- package/src/sam/operations/decision-evaluate.js +1 -1
- package/src/sam/operations/package-audit.js +1 -1
- package/src/sam/operations/planning-astar.js +1 -1
- package/src/sam/operations/planning-goap.js +1 -1
- package/src/sam/operations/repository-inspect.js +13 -3
- package/src/sam/operations/robotics.js +45 -0
- package/src/sam/os.js +117 -0
- package/src/sam/packs/authoring/README.md +13 -0
- package/src/sam/packs/authoring/index.js +108 -0
- package/src/sam/packs/cad/http-ports.js +114 -0
- package/src/sam/packs/cad/index.js +158 -0
- package/src/sam/packs/cad/model-tools.js +22 -0
- package/src/sam/packs/cad/modes.js +87 -0
- package/src/sam/packs/cms/aliases.js +1 -0
- package/src/sam/packs/cms/contracts.js +1 -0
- package/src/sam/packs/cms/machine.js +6 -0
- package/src/sam/packs/cms/node.js +1 -0
- package/src/sam/packs/core.js +29 -0
- package/src/sam/packs/evidence/README.md +65 -0
- package/src/sam/packs/evidence/compare.js +98 -0
- package/src/sam/packs/evidence/contract.js +56 -0
- package/src/sam/packs/evidence/derive.js +59 -0
- package/src/sam/packs/evidence/driver-blender.js +96 -0
- package/src/sam/packs/evidence/driver-playwright.js +91 -0
- package/src/sam/packs/evidence/exporter-copro.js +70 -0
- package/src/sam/packs/evidence/facts.js +37 -0
- package/src/sam/packs/evidence/host-local.js +74 -0
- package/src/sam/packs/evidence/index.js +494 -0
- package/src/sam/packs/evidence/media.js +44 -0
- package/src/sam/packs/evidence/naming.js +67 -0
- package/src/sam/packs/evidence/normalize.js +117 -0
- package/src/sam/packs/evidence/review-page.js +102 -0
- package/src/sam/packs/evidence/screenplay.js +34 -0
- package/src/sam/packs/evidence/seal.js +55 -0
- package/src/sam/packs/evidence/serve.js +74 -0
- package/src/sam/packs/evidence/store-hosted.js +89 -0
- package/src/sam/packs/evidence/store.js +93 -0
- package/src/sam/packs/evidence/viewports.js +23 -0
- package/src/sam/robotics/chess-adapter.js +20 -0
- package/src/sam/robotics/franka.js +44 -0
- package/src/sam/robotics/index.js +4 -0
- package/src/sam/robotics/receipt.js +21 -0
- package/src/sam/robotics/world.js +57 -0
- package/src/sam/seed.js +10 -40
- package/src/sam/shell-host.js +120 -0
- package/src/sam/types.js +17 -98
- package/src/sam/validation.js +40 -0
- package/src/security/inventory.js +11 -9
- package/src/security/local-vault.js +6 -1
- package/src/skills/canvas-knowledge-core.js +1 -0
- package/src/skills/canvas-knowledge.js +8 -0
- package/src/skills/index.js +2 -0
- package/src/tools/registry.js +9 -11
- package/src/ui/art/geaux_boot.json +25 -0
- package/src/ui/boot.js +21 -20
- package/src/ui/cli/help.js +6 -0
- package/src/ui/companion-art.js +40 -0
- package/templates/clay/clay-blueprint-template.html +481 -0
- package/templates/clay/clay-case-study-blueprint.html +269 -0
- package/templates/clay/conversion-showcase-section.html +534 -0
- package/templates/clay/enhancing-conversion-section.html +141 -0
- package/templates/clay/nuant-wireframe.html +117 -0
- package/apps/client-cms-editor/AGENTS.md +0 -17
- package/apps/client-cms-editor/IMPORT_PROVENANCE.json +0 -8
- package/apps/client-cms-editor/README.md +0 -103
- package/apps/client-cms-editor/agentsam.app.json +0 -74
- package/apps/client-cms-editor/backend/README.md +0 -5
- package/apps/client-cms-editor/backend/package.json +0 -37
- package/apps/client-cms-editor/backend/src/api/client.ts +0 -233
- package/apps/client-cms-editor/backend/src/index.ts +0 -6
- package/apps/client-cms-editor/backend/src/model.ts +0 -11
- package/apps/client-cms-editor/backend/src/preview/bridge.ts +0 -79
- package/apps/client-cms-editor/backend/src/preview/urls.ts +0 -55
- package/apps/client-cms-editor/backend/src/routing/cms-route.js +0 -293
- package/apps/client-cms-editor/backend/src/routing/index.js +0 -10
- package/apps/client-cms-editor/backend/src/storefront.ts +0 -52
- package/apps/client-cms-editor/backend/tsconfig.json +0 -20
- package/apps/client-cms-editor/backend/worker/index.js +0 -34
- package/apps/client-cms-editor/backend/wrangler.jsonc +0 -11
- package/apps/client-cms-editor/bin/agentsam-cms.js +0 -262
- package/apps/client-cms-editor/bin/agentsam-cms.mjs +0 -3
- package/apps/client-cms-editor/frontend/index.html +0 -12
- package/apps/client-cms-editor/frontend/package.json +0 -40
- package/apps/client-cms-editor/frontend/src/AgentSamDrawer.tsx +0 -156
- package/apps/client-cms-editor/frontend/src/CmsAgentSurface.tsx +0 -36
- package/apps/client-cms-editor/frontend/src/adapters/heuristic.ts +0 -29
- package/apps/client-cms-editor/frontend/src/adapters/http-authoring.test.ts +0 -161
- package/apps/client-cms-editor/frontend/src/adapters/http.ts +0 -859
- package/apps/client-cms-editor/frontend/src/adapters/memory.ts +0 -510
- package/apps/client-cms-editor/frontend/src/editor/CmsEditor.tsx +0 -244
- package/apps/client-cms-editor/frontend/src/editor/CmsEditorProvider.tsx +0 -20
- package/apps/client-cms-editor/frontend/src/editor/canvas/PreviewCanvas.tsx +0 -53
- package/apps/client-cms-editor/frontend/src/editor/composition-groups.test.ts +0 -40
- package/apps/client-cms-editor/frontend/src/editor/legacy/CmsEditorPrototype.tsx +0 -1374
- package/apps/client-cms-editor/frontend/src/editor/useCmsEditorController.ts +0 -218
- package/apps/client-cms-editor/frontend/src/env.d.ts +0 -14
- package/apps/client-cms-editor/frontend/src/index.ts +0 -22
- package/apps/client-cms-editor/frontend/src/lib/agent-host.ts +0 -24
- package/apps/client-cms-editor/frontend/src/lib/content-safety.ts +0 -63
- package/apps/client-cms-editor/frontend/src/main.tsx +0 -91
- package/apps/client-cms-editor/frontend/src/mount.tsx +0 -113
- package/apps/client-cms-editor/frontend/src/styles/agentsam-drawer.css +0 -215
- package/apps/client-cms-editor/frontend/src/styles/cmsShell.css +0 -1739
- package/apps/client-cms-editor/frontend/src/styles/studio.css +0 -159
- package/apps/client-cms-editor/frontend/src/surfaces/CmsDashboard.tsx +0 -313
- package/apps/client-cms-editor/frontend/src/surfaces/CmsGuidedChatHero.tsx +0 -121
- package/apps/client-cms-editor/frontend/src/surfaces/CmsHubPage.tsx +0 -132
- package/apps/client-cms-editor/frontend/src/surfaces/CmsSiteSwitcher.tsx +0 -176
- package/apps/client-cms-editor/frontend/src/surfaces/index.ts +0 -5
- package/apps/client-cms-editor/frontend/src/surfaces/types.ts +0 -48
- package/apps/client-cms-editor/frontend/tsconfig.json +0 -55
- package/apps/client-cms-editor/frontend/vite.config.ts +0 -25
- package/apps/client-cms-editor/package-lock.json +0 -4671
- package/apps/client-cms-editor/package.json +0 -135
- package/apps/client-cms-editor/reference/DONOR_README.md +0 -52
- package/apps/client-cms-editor/reference/DONOR_package-lock.json +0 -1253
- package/apps/client-cms-editor/reference/DONOR_tsconfig.json +0 -15
- package/apps/client-cms-editor/reference/harvest/HARVEST_RECEIPT.json +0 -201
- package/apps/client-cms-editor/reference/harvest/PROVENANCE_HISTORY.txt +0 -10
- package/apps/client-cms-editor/reference/harvest/README.md +0 -8
- package/apps/client-cms-editor/reference/harvest/plans/ARCHIVE-INTAKE.md +0 -135
- package/apps/client-cms-editor/reference/harvest/plans/CHATGPT-IDENTITY-HARVEST.md +0 -83
- package/apps/client-cms-editor/reference/harvest/plans/CMS-EDITOR-HARVEST.md +0 -166
- package/apps/client-cms-editor/reference/harvest/plans/HARVEST-INDEX.md +0 -196
- package/apps/client-cms-editor/reference/harvest/plans/INNERANIMALS-CONTENT-001.md +0 -137
- package/apps/client-cms-editor/reference/harvest/plans/NO-IMPLICIT-SIDE-EFFECTS.md +0 -87
- package/apps/client-cms-editor/reference/harvest/plans/STOREFRONT-SURFACE-MAP.md +0 -140
- package/apps/client-cms-editor/reference/harvest/plans/THEME-INNERANIMALS-HARVEST.md +0 -137
- package/apps/client-cms-editor/reference/harvest/plans/TOOLING-LAB.md +0 -63
- package/apps/client-cms-editor/reference/harvest/plans/harvest-manifest.json +0 -97
- package/apps/client-cms-editor/reference/harvest/plans/local-cms-harvest-schema.sql +0 -328
- package/apps/client-cms-editor/shared/cms/package.json +0 -29
- package/apps/client-cms-editor/shared/cms/src/adapter.ts +0 -204
- package/apps/client-cms-editor/shared/cms/src/agent-context.ts +0 -37
- package/apps/client-cms-editor/shared/cms/src/cloudflare-bindings.ts +0 -51
- package/apps/client-cms-editor/shared/cms/src/editor-types.ts +0 -131
- package/apps/client-cms-editor/shared/cms/src/host.ts +0 -82
- package/apps/client-cms-editor/shared/cms/src/index.ts +0 -9
- package/apps/client-cms-editor/shared/cms/src/map.ts +0 -115
- package/apps/client-cms-editor/shared/cms/src/publication.ts +0 -24
- package/apps/client-cms-editor/shared/cms/src/routes.ts +0 -11
- package/apps/client-cms-editor/shared/cms/src/starter-pack.ts +0 -158
- package/apps/client-cms-editor/shared/cms/tsconfig.json +0 -12
- package/docs/client-cms-editor.md +0 -15
- package/packages/heuristic-theme/README.md +0 -11
- package/packages/heuristic-theme/package.json +0 -30
- package/packages/heuristic-theme/src/index.js +0 -2
- package/packages/heuristic-theme/src/registry.js +0 -36
- package/packages/heuristic-theme/src/theme.js +0 -41
- package/packages/heuristic-theme/test/theme.test.mjs +0 -26
- package/packages/theme-cypress/README.md +0 -11
- package/packages/theme-cypress/package.json +0 -44
- package/packages/theme-cypress/prebuild.json +0 -23
- package/packages/theme-cypress/site/assets/generated/favicon.svg +0 -7
- package/packages/theme-cypress/site/assets/generated/media-044ba16613.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-0a1ea6f6d9.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-0c06778307.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-1539ed373a.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-2df479fd2d.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-2e8bd0d9bc.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-41d4e2643c.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-46205bfde8.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-50c5f3e279.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-5f1467778c.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-6703642b22.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-87a490bc8e.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-997c10ef39.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-a423735c21.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-c9cea5245b.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-cab3c84c60.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-ce06595d59.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-d268905e7e.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-f6711b5053.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-manifest.json +0 -226
- package/packages/theme-cypress/site/assets/generated/social-card.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/theme-mark-192.png +0 -0
- package/packages/theme-cypress/site/assets/generated/theme-mark-512.png +0 -0
- package/packages/theme-cypress/site/assets/generated/theme-mark.svg +0 -7
- package/packages/theme-cypress/site/beliefs.html +0 -175
- package/packages/theme-cypress/site/community.html +0 -175
- package/packages/theme-cypress/site/connect.html +0 -319
- package/packages/theme-cypress/site/donate.html +0 -106
- package/packages/theme-cypress/site/groups.html +0 -1352
- package/packages/theme-cypress/site/help.html +0 -1
- package/packages/theme-cypress/site/icons/clock.svg +0 -4
- package/packages/theme-cypress/site/icons/email.svg +0 -4
- package/packages/theme-cypress/site/icons/giving.svg +0 -4
- package/packages/theme-cypress/site/icons/home.svg +0 -4
- package/packages/theme-cypress/site/icons/location.svg +0 -4
- package/packages/theme-cypress/site/icons/media.svg +0 -4
- package/packages/theme-cypress/site/icons/ministries.svg +0 -6
- package/packages/theme-cypress/site/icons/prayer.svg +0 -5
- package/packages/theme-cypress/site/icons/visit.svg +0 -6
- package/packages/theme-cypress/site/index.html +0 -1013
- package/packages/theme-cypress/site/mensgroup.html +0 -477
- package/packages/theme-cypress/site/mission.html +0 -512
- package/packages/theme-cypress/site/unified-footer.css +0 -172
- package/packages/theme-cypress/site/unified-footer.js +0 -175
- package/packages/theme-cypress/site/unified-header.css +0 -226
- package/packages/theme-cypress/site/unified-header.js +0 -111
- package/packages/theme-cypress/site/womansgroup.html +0 -452
- package/packages/theme-cypress/src/index.js +0 -76
- package/packages/theme-cypress/src/node.js +0 -69
- package/packages/theme-cypress/test/theme.test.mjs +0 -47
- package/packages/theme-ember/README.md +0 -11
- package/packages/theme-ember/package.json +0 -44
- package/packages/theme-ember/prebuild.json +0 -23
- package/packages/theme-ember/site/about.html +0 -1840
- package/packages/theme-ember/site/assets/generated/favicon.svg +0 -7
- package/packages/theme-ember/site/assets/generated/media-1e0b1e6ee6.webp +0 -0
- package/packages/theme-ember/site/assets/generated/media-2371dcb426.webp +0 -0
- package/packages/theme-ember/site/assets/generated/media-2db4f5ff9e.webp +0 -0
- package/packages/theme-ember/site/assets/generated/media-4ed07a756e.webp +0 -0
- package/packages/theme-ember/site/assets/generated/media-58182cf167.webp +0 -0
- package/packages/theme-ember/site/assets/generated/media-5b8b8472ae.webp +0 -0
- package/packages/theme-ember/site/assets/generated/media-71f4bd16a1.webp +0 -0
- package/packages/theme-ember/site/assets/generated/media-7c1c8120bc.webp +0 -0
- package/packages/theme-ember/site/assets/generated/media-832b176433.webp +0 -0
- package/packages/theme-ember/site/assets/generated/media-931439701c.webp +0 -0
- package/packages/theme-ember/site/assets/generated/media-c2860d40d1.webp +0 -0
- package/packages/theme-ember/site/assets/generated/media-c56974d198.webp +0 -0
- package/packages/theme-ember/site/assets/generated/media-cb83a44ff4.webp +0 -0
- package/packages/theme-ember/site/assets/generated/media-df02ccdfcf.webp +0 -0
- package/packages/theme-ember/site/assets/generated/media-fab72cd344.webp +0 -0
- package/packages/theme-ember/site/assets/generated/media-manifest.json +0 -190
- package/packages/theme-ember/site/assets/generated/social-card.webp +0 -0
- package/packages/theme-ember/site/assets/generated/theme-mark-192.png +0 -0
- package/packages/theme-ember/site/assets/generated/theme-mark-512.png +0 -0
- package/packages/theme-ember/site/assets/generated/theme-mark.svg +0 -7
- package/packages/theme-ember/site/community.html +0 -1664
- package/packages/theme-ember/site/index.html +0 -2044
- package/packages/theme-ember/site/shop.html +0 -2104
- package/packages/theme-ember/src/index.js +0 -76
- package/packages/theme-ember/src/node.js +0 -69
- package/packages/theme-ember/test/theme.test.mjs +0 -47
- package/packages/theme-forge/README.md +0 -11
- package/packages/theme-forge/package.json +0 -44
- package/packages/theme-forge/prebuild.json +0 -23
- package/packages/theme-forge/site/apple-touch-icon.png +0 -0
- package/packages/theme-forge/site/assets/generated/favicon.svg +0 -7
- package/packages/theme-forge/site/assets/generated/media-manifest.json +0 -17
- package/packages/theme-forge/site/assets/generated/social-card.webp +0 -0
- package/packages/theme-forge/site/assets/generated/theme-mark-192.png +0 -0
- package/packages/theme-forge/site/assets/generated/theme-mark-512.png +0 -0
- package/packages/theme-forge/site/assets/generated/theme-mark.svg +0 -7
- package/packages/theme-forge/site/assets/index-DBOqQVsA.css +0 -1
- package/packages/theme-forge/site/assets/index-pXC0o9jp.js +0 -241
- package/packages/theme-forge/site/assets/workbox-window.prod.es5-Bd17z0YL.js +0 -2
- package/packages/theme-forge/site/index.html +0 -5
- package/packages/theme-forge/site/manifest.webmanifest +0 -1
- package/packages/theme-forge/site/pwa-192x192.png +0 -0
- package/packages/theme-forge/site/pwa-512x512.png +0 -0
- package/packages/theme-forge/site/sw.js +0 -107
- package/packages/theme-forge/site/workbox-7e5eb42b.js +0 -3395
- package/packages/theme-forge/src/index.js +0 -76
- package/packages/theme-forge/src/node.js +0 -69
- package/packages/theme-forge/test/theme.test.mjs +0 -47
- package/packages/theme-grove/README.md +0 -11
- package/packages/theme-grove/package.json +0 -44
- package/packages/theme-grove/prebuild.json +0 -23
- package/packages/theme-grove/site/assets/generated/favicon.svg +0 -7
- package/packages/theme-grove/site/assets/generated/media-098b13d75a.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-0c064db1aa.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-0fbfef655e.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-14759c7460.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-19b23d2a8f.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-2012f04243.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-23b8c5e2bb.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-2bffb1a6ef.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-2e1523a5b0.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-31107c21f2.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-31373ec865.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-45e8e27542.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-4aa9846fe7.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-5476b24219.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-7a227d3e4b.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-b183eed550.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-b2c650f9ab.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-b5d7471694.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-c86498fdb4.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-ce2cfff9a1.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-cf41a5f324.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-ec6c01bf8d.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-manifest.json +0 -267
- package/packages/theme-grove/site/assets/generated/social-card.webp +0 -0
- package/packages/theme-grove/site/assets/generated/theme-mark-192.png +0 -0
- package/packages/theme-grove/site/assets/generated/theme-mark-512.png +0 -0
- package/packages/theme-grove/site/assets/generated/theme-mark.svg +0 -7
- package/packages/theme-grove/site/index.html +0 -1429
- package/packages/theme-grove/site/pages/contact.html +0 -664
- package/packages/theme-grove/site/pages/gallery.html +0 -216
- package/packages/theme-grove/site/pages/privacy.html +0 -180
- package/packages/theme-grove/site/pages/process.html +0 -592
- package/packages/theme-grove/site/pages/services.html +0 -567
- package/packages/theme-grove/site/pages/terms.html +0 -189
- package/packages/theme-grove/site/shared/footer.css +0 -140
- package/packages/theme-grove/site/shared/footer.html +0 -41
- package/packages/theme-grove/src/index.js +0 -76
- package/packages/theme-grove/src/node.js +0 -69
- package/packages/theme-grove/test/theme.test.mjs +0 -47
- package/packages/theme-harbor/README.md +0 -11
- package/packages/theme-harbor/package.json +0 -44
- package/packages/theme-harbor/prebuild.json +0 -23
- package/packages/theme-harbor/site/assets/generated/favicon.svg +0 -7
- package/packages/theme-harbor/site/assets/generated/media-manifest.json +0 -17
- package/packages/theme-harbor/site/assets/generated/social-card.webp +0 -0
- package/packages/theme-harbor/site/assets/generated/theme-mark-192.png +0 -0
- package/packages/theme-harbor/site/assets/generated/theme-mark-512.png +0 -0
- package/packages/theme-harbor/site/assets/generated/theme-mark.svg +0 -7
- package/packages/theme-harbor/site/assets/index-D58RKkr-.js +0 -239
- package/packages/theme-harbor/site/assets/index-Dd3YN9Mf.css +0 -1
- package/packages/theme-harbor/site/index.html +0 -15
- package/packages/theme-harbor/src/index.js +0 -76
- package/packages/theme-harbor/src/node.js +0 -69
- package/packages/theme-harbor/test/theme.test.mjs +0 -47
- package/packages/theme-resolve/README.md +0 -11
- package/packages/theme-resolve/package.json +0 -44
- package/packages/theme-resolve/prebuild.json +0 -23
- package/packages/theme-resolve/site/assets/generated/favicon.svg +0 -7
- package/packages/theme-resolve/site/assets/generated/media-216610d365.webp +0 -0
- package/packages/theme-resolve/site/assets/generated/media-2a9e0f623f.webp +0 -0
- package/packages/theme-resolve/site/assets/generated/media-a70660bfa9.webp +0 -0
- package/packages/theme-resolve/site/assets/generated/media-bc1322e813.webp +0 -0
- package/packages/theme-resolve/site/assets/generated/media-ced60fcecc.webp +0 -0
- package/packages/theme-resolve/site/assets/generated/media-manifest.json +0 -72
- package/packages/theme-resolve/site/assets/generated/social-card.webp +0 -0
- package/packages/theme-resolve/site/assets/generated/theme-mark-192.png +0 -0
- package/packages/theme-resolve/site/assets/generated/theme-mark-512.png +0 -0
- package/packages/theme-resolve/site/assets/generated/theme-mark.svg +0 -7
- package/packages/theme-resolve/site/assets/index-BSaLpPG1.css +0 -2
- package/packages/theme-resolve/site/assets/index-D8au46Z5.js +0 -17
- package/packages/theme-resolve/site/index.html +0 -22
- package/packages/theme-resolve/src/index.js +0 -69
- package/packages/theme-resolve/src/node.js +0 -69
- package/packages/theme-resolve/test/theme.test.mjs +0 -47
- package/packages/theme-scenes/src/registry.js +0 -170
- package/packages/theme-summit/README.md +0 -11
- package/packages/theme-summit/package.json +0 -44
- package/packages/theme-summit/prebuild.json +0 -23
- package/packages/theme-summit/site/adventures.html +0 -450
- package/packages/theme-summit/site/assets/generated/favicon.svg +0 -7
- package/packages/theme-summit/site/assets/generated/media-1e958ea679.webp +0 -0
- package/packages/theme-summit/site/assets/generated/media-9d4521abba.webp +0 -0
- package/packages/theme-summit/site/assets/generated/media-manifest.json +0 -39
- package/packages/theme-summit/site/assets/generated/social-card.webp +0 -0
- package/packages/theme-summit/site/assets/generated/theme-mark-192.png +0 -0
- package/packages/theme-summit/site/assets/generated/theme-mark-512.png +0 -0
- package/packages/theme-summit/site/assets/generated/theme-mark.svg +0 -7
- package/packages/theme-summit/site/business-card.html +0 -315
- package/packages/theme-summit/site/chatbot.js +0 -312
- package/packages/theme-summit/site/gallery.html +0 -524
- package/packages/theme-summit/site/i18n.js +0 -947
- package/packages/theme-summit/site/icons.svg +0 -87
- package/packages/theme-summit/site/index.html +0 -2415
- package/packages/theme-summit/site/pages/about.html +0 -100
- package/packages/theme-summit/site/pages/contact.html +0 -117
- package/packages/theme-summit/site/pages/dashboard.html +0 -111
- package/packages/theme-summit/site/pages/index.html +0 -129
- package/packages/theme-summit/site/pages/services.html +0 -125
- package/packages/theme-summit/site/shared/footer.html +0 -41
- package/packages/theme-summit/site/shared/layout.js +0 -315
- package/packages/theme-summit/site/shared/nav.html +0 -19
- package/packages/theme-summit/site/shared/styles.css +0 -696
- package/packages/theme-summit/site/theme-styles.css +0 -131
- package/packages/theme-summit/site/themes.js +0 -442
- package/packages/theme-summit/src/index.js +0 -76
- package/packages/theme-summit/src/node.js +0 -69
- package/packages/theme-summit/test/theme.test.mjs +0 -47
- package/packages/theme-violet/README.md +0 -11
- package/packages/theme-violet/package.json +0 -44
- package/packages/theme-violet/prebuild.json +0 -23
- package/packages/theme-violet/site/assets/generated/favicon.svg +0 -7
- package/packages/theme-violet/site/assets/generated/media-07b46d6457.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-09d38ddffc.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-254b0e2ad3.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-3a1b5c0a8d.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-3a78eb7d9d.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-49076977d8.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-6342d50dbd.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-646c65381e.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-7a5fb7c91a.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-9bbd133220.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-9e73307c2a.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-af382146a0.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-b2ae348b43.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-b8f43a3887.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-c96a3e1979.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-cd07daa54a.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-e03ab6b5fe.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-eae4917d25.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-f227ec5690.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-fb57ffd474.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-manifest.json +0 -245
- package/packages/theme-violet/site/assets/generated/social-card.webp +0 -0
- package/packages/theme-violet/site/assets/generated/theme-mark-192.png +0 -0
- package/packages/theme-violet/site/assets/generated/theme-mark-512.png +0 -0
- package/packages/theme-violet/site/assets/generated/theme-mark.svg +0 -7
- package/packages/theme-violet/site/global/cpas-contact.css +0 -405
- package/packages/theme-violet/site/global/cpas-donate-v2.css +0 -931
- package/packages/theme-violet/site/global/cpas-drawer-override.css +0 -1
- package/packages/theme-violet/site/global/cpas-footer.html +0 -38
- package/packages/theme-violet/site/global/cpas-header.html +0 -30
- package/packages/theme-violet/site/global/cpas-hero-watercolor.css +0 -275
- package/packages/theme-violet/site/global/cpas-modals.js +0 -802
- package/packages/theme-violet/site/global/cpas-public-surface.css +0 -982
- package/packages/theme-violet/site/global/cpas-shell.css +0 -3980
- package/packages/theme-violet/site/global/cpas-shell.js +0 -107
- package/packages/theme-violet/site/global/cpas-shelter-hub.css +0 -326
- package/packages/theme-violet/site/index.html +0 -141
- package/packages/theme-violet/site/pages/about/campaigns.html +0 -28
- package/packages/theme-violet/site/pages/about/cta.html +0 -25
- package/packages/theme-violet/site/pages/about/hero.html +0 -46
- package/packages/theme-violet/site/pages/about/paths.html +0 -24
- package/packages/theme-violet/site/pages/about/why_we_exist.html +0 -28
- package/packages/theme-violet/site/pages/home/campaigns.html +0 -67
- package/packages/theme-violet/site/pages/home/hero.html +0 -42
- package/packages/theme-violet/site/pages/home/how-it-helps.html +0 -32
- package/packages/theme-violet/site/pages/home/impact-stats.html +0 -31
- package/packages/theme-violet/site/pages/home/mission.html +0 -36
- package/packages/theme-violet/site/pages/home/newsletter.html +0 -29
- package/packages/theme-violet/site/pages/home/transport-win.html +0 -22
- package/packages/theme-violet/site/pages/index.html +0 -141
- package/packages/theme-violet/src/index.js +0 -76
- package/packages/theme-violet/src/node.js +0 -69
- package/packages/theme-violet/test/theme.test.mjs +0 -47
- /package/{apps/client-cms-editor → python}/LICENSE +0 -0
|
@@ -8,49 +8,169 @@ import { cloneElement, createContext as createContext2, useContext as useContext
|
|
|
8
8
|
function cx(...values) {
|
|
9
9
|
return values.filter(Boolean).join(" ");
|
|
10
10
|
}
|
|
11
|
+
function resolveNavDestinations(items, pathname) {
|
|
12
|
+
if (!pathname) return items;
|
|
13
|
+
const current = new URL(pathname, "https://navigation.invalid");
|
|
14
|
+
const path = current.pathname.replace(/\/+$/, "") || "/";
|
|
15
|
+
let match;
|
|
16
|
+
let matchPathLength = -1;
|
|
17
|
+
let matchQueryCount = -1;
|
|
18
|
+
const visit = (entries) => {
|
|
19
|
+
for (const item of entries) {
|
|
20
|
+
if (item.href?.startsWith("/") && !item.href.startsWith("//")) {
|
|
21
|
+
const destination = new URL(item.href, current.origin);
|
|
22
|
+
const href = destination.pathname.replace(/\/+$/, "") || "/";
|
|
23
|
+
const pathMatches = path === href || !item.exact && href !== "/" && path.startsWith(href + "/");
|
|
24
|
+
const parameters = [...destination.searchParams];
|
|
25
|
+
const queryMatches = parameters.every(([key, value]) => current.searchParams.getAll(key).filter((candidate) => candidate === value).length >= parameters.filter(([candidateKey, candidateValue]) => candidateKey === key && candidateValue === value).length);
|
|
26
|
+
if (pathMatches && queryMatches && (href.length > matchPathLength || href.length === matchPathLength && parameters.length > matchQueryCount)) {
|
|
27
|
+
match = item;
|
|
28
|
+
matchPathLength = href.length;
|
|
29
|
+
matchQueryCount = parameters.length;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (item.children) visit(item.children);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
visit(items);
|
|
36
|
+
const apply = (entries) => entries.map((item) => ({ ...item, active: item.id === match?.id, ...item.children ? { children: apply(item.children) } : {} }));
|
|
37
|
+
return apply(items);
|
|
38
|
+
}
|
|
39
|
+
function navDestinationActive(item) {
|
|
40
|
+
return !!item.active || !!item.children?.some(navDestinationActive);
|
|
41
|
+
}
|
|
42
|
+
function navBreadcrumbs(items) {
|
|
43
|
+
for (const item of items) {
|
|
44
|
+
const child = item.children ? navBreadcrumbs(item.children) : [];
|
|
45
|
+
if (child.length || item.active) return [{ id: item.id, label: item.label, href: item.href }, ...child];
|
|
46
|
+
}
|
|
47
|
+
return [];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// src/NavProvider.tsx
|
|
51
|
+
import { createContext, useCallback, useContext, useEffect, useMemo, useState, useSyncExternalStore } from "react";
|
|
52
|
+
|
|
53
|
+
// src/state.ts
|
|
54
|
+
function stabilizeNavStateStore(host) {
|
|
55
|
+
const keys = ["desktopOpen", "mobileOpen", "isMobile", "isPeeking", "width", "menu"];
|
|
56
|
+
let snapshot = Object.freeze({ ...host.getSnapshot() });
|
|
57
|
+
const getSnapshot = () => {
|
|
58
|
+
const next = host.getSnapshot();
|
|
59
|
+
if (keys.some((key) => next[key] !== snapshot[key])) {
|
|
60
|
+
snapshot = Object.freeze({ ...next });
|
|
61
|
+
}
|
|
62
|
+
return snapshot;
|
|
63
|
+
};
|
|
64
|
+
return {
|
|
65
|
+
getSnapshot,
|
|
66
|
+
subscribe(listener) {
|
|
67
|
+
return host.subscribe(() => {
|
|
68
|
+
const before = snapshot;
|
|
69
|
+
if (getSnapshot() !== before) listener();
|
|
70
|
+
});
|
|
71
|
+
},
|
|
72
|
+
setState(update) {
|
|
73
|
+
host.setState(update);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
function createNavState(initial = {}) {
|
|
78
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
79
|
+
const normalize = (value) => Object.freeze({
|
|
80
|
+
desktopOpen: Boolean(value.desktopOpen),
|
|
81
|
+
mobileOpen: Boolean(value.mobileOpen),
|
|
82
|
+
isMobile: Boolean(value.isMobile),
|
|
83
|
+
isPeeking: Boolean(value.isPeeking),
|
|
84
|
+
width: Number.isFinite(value.width) ? Math.max(208, Math.min(400, Math.round(value.width))) : 264,
|
|
85
|
+
menu: typeof value.menu === "string" ? value.menu : null
|
|
86
|
+
});
|
|
87
|
+
let snapshot = normalize({ desktopOpen: true, mobileOpen: false, isMobile: false, isPeeking: false, width: 264, menu: null, ...initial });
|
|
88
|
+
return {
|
|
89
|
+
getSnapshot: () => snapshot,
|
|
90
|
+
subscribe(listener) {
|
|
91
|
+
listeners.add(listener);
|
|
92
|
+
return () => {
|
|
93
|
+
listeners.delete(listener);
|
|
94
|
+
};
|
|
95
|
+
},
|
|
96
|
+
setState(update) {
|
|
97
|
+
const next = normalize({ ...snapshot, ...typeof update === "function" ? update(snapshot) : update });
|
|
98
|
+
if (Object.keys(next).every((key) => next[key] === snapshot[key])) return;
|
|
99
|
+
snapshot = next;
|
|
100
|
+
for (const listener of [...listeners]) listener();
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
}
|
|
11
104
|
|
|
12
105
|
// src/NavProvider.tsx
|
|
13
|
-
import { createContext, useCallback, useContext, useEffect, useMemo, useState } from "react";
|
|
14
106
|
import { jsx } from "react/jsx-runtime";
|
|
15
107
|
var NavContext = createContext(null);
|
|
16
108
|
function NavProvider({
|
|
17
109
|
children,
|
|
18
|
-
value:
|
|
110
|
+
value: input = {},
|
|
19
111
|
tokens = {},
|
|
20
112
|
theme = "dark",
|
|
21
113
|
accentColor = "#8B5CF6",
|
|
22
114
|
defaultOpen = true,
|
|
23
115
|
mobileBreakpoint = 768,
|
|
24
116
|
peekable = false,
|
|
25
|
-
resizable = false
|
|
117
|
+
resizable = false,
|
|
118
|
+
storageKey,
|
|
119
|
+
stateStore: suppliedStore
|
|
26
120
|
}) {
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const [
|
|
32
|
-
|
|
121
|
+
const data = useMemo(() => {
|
|
122
|
+
const destinations = resolveNavDestinations(input.destinations ?? [], input.pathname);
|
|
123
|
+
return { ...input, destinations, breadcrumbs: input.breadcrumbs ?? navBreadcrumbs(destinations) };
|
|
124
|
+
}, [input]);
|
|
125
|
+
const [ownedStore] = useState(() => createNavState({
|
|
126
|
+
desktopOpen: defaultOpen && (typeof window === "undefined" || window.innerWidth >= 1024)
|
|
127
|
+
}));
|
|
128
|
+
const stateStore = useMemo(() => suppliedStore ? stabilizeNavStateStore(suppliedStore) : ownedStore, [suppliedStore, ownedStore]);
|
|
129
|
+
const { menu, desktopOpen, mobileOpen, isMobile, isPeeking, width } = useSyncExternalStore(stateStore.subscribe, stateStore.getSnapshot, stateStore.getSnapshot);
|
|
130
|
+
const setMenu = useCallback((menu2) => stateStore.setState({ menu: menu2 }), [stateStore]);
|
|
131
|
+
const setPeeking = useCallback((isPeeking2) => stateStore.setState({ isPeeking: isPeeking2 }), [stateStore]);
|
|
132
|
+
const [loadedKey, setLoadedKey] = useState();
|
|
133
|
+
useEffect(() => {
|
|
134
|
+
if (!storageKey) {
|
|
135
|
+
setLoadedKey(void 0);
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
const initial = { desktopOpen: defaultOpen && window.innerWidth >= 1024, width: 264 };
|
|
139
|
+
try {
|
|
140
|
+
const saved = JSON.parse(window.localStorage.getItem(storageKey) ?? "null");
|
|
141
|
+
if (typeof saved?.open === "boolean") initial.desktopOpen = saved.open;
|
|
142
|
+
if (Number.isFinite(saved?.width)) initial.width = saved.width;
|
|
143
|
+
} catch {
|
|
144
|
+
}
|
|
145
|
+
stateStore.setState(initial);
|
|
146
|
+
setLoadedKey(storageKey);
|
|
147
|
+
}, [storageKey, defaultOpen, stateStore]);
|
|
148
|
+
useEffect(() => {
|
|
149
|
+
if (!storageKey || loadedKey !== storageKey) return;
|
|
150
|
+
try {
|
|
151
|
+
window.localStorage.setItem(storageKey, JSON.stringify({ open: desktopOpen, width }));
|
|
152
|
+
} catch {
|
|
153
|
+
}
|
|
154
|
+
}, [storageKey, loadedKey, desktopOpen, width]);
|
|
33
155
|
useEffect(() => {
|
|
34
156
|
const query = window.matchMedia(`(max-width: ${mobileBreakpoint - 1}px)`);
|
|
35
157
|
const update = () => {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
else setPeeking(false);
|
|
158
|
+
if (stateStore.getSnapshot().isMobile === query.matches) return;
|
|
159
|
+
stateStore.setState(query.matches ? { isMobile: true, mobileOpen: false, isPeeking: false } : { isMobile: false, isPeeking: false });
|
|
39
160
|
};
|
|
40
161
|
update();
|
|
41
162
|
query.addEventListener("change", update);
|
|
42
163
|
return () => query.removeEventListener("change", update);
|
|
43
|
-
}, [mobileBreakpoint]);
|
|
164
|
+
}, [mobileBreakpoint, stateStore]);
|
|
44
165
|
const open = isMobile ? mobileOpen : desktopOpen;
|
|
45
166
|
const setOpen = useCallback((next) => {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}, [isMobile]);
|
|
167
|
+
stateStore.setState((state) => state.isMobile ? { mobileOpen: next } : { desktopOpen: next });
|
|
168
|
+
}, [stateStore]);
|
|
49
169
|
const close = useCallback(() => setOpen(false), [setOpen]);
|
|
50
|
-
const toggle = useCallback(() =>
|
|
170
|
+
const toggle = useCallback(() => stateStore.setState((state) => state.isMobile ? { mobileOpen: !state.mobileOpen } : { desktopOpen: !state.desktopOpen }), [stateStore]);
|
|
51
171
|
const setWidth = useCallback((next) => {
|
|
52
|
-
|
|
53
|
-
}, []);
|
|
172
|
+
if (Number.isFinite(next)) stateStore.setState({ width: next });
|
|
173
|
+
}, [stateStore]);
|
|
54
174
|
useEffect(() => {
|
|
55
175
|
if (!isMobile || !open) return void 0;
|
|
56
176
|
const onKeyDown = (event) => {
|
|
@@ -76,13 +196,15 @@ function NavProvider({
|
|
|
76
196
|
resizable,
|
|
77
197
|
width,
|
|
78
198
|
mobileBreakpoint,
|
|
199
|
+
storageKey,
|
|
200
|
+
stateStore,
|
|
79
201
|
setOpen,
|
|
80
202
|
toggle,
|
|
81
203
|
close,
|
|
82
204
|
setPeeking,
|
|
83
205
|
setWidth,
|
|
84
206
|
scrollToItem
|
|
85
|
-
}), [data, tokens, theme, accentColor, menu, close, isMobile, isPeeking, mobileBreakpoint, open, peekable, resizable, scrollToItem, setOpen, setWidth, toggle, width]);
|
|
207
|
+
}), [data, tokens, theme, accentColor, menu, close, isMobile, isPeeking, mobileBreakpoint, open, peekable, resizable, scrollToItem, setMenu, setOpen, setPeeking, setWidth, stateStore, storageKey, toggle, width]);
|
|
86
208
|
return /* @__PURE__ */ jsx(NavContext.Provider, { value, children });
|
|
87
209
|
}
|
|
88
210
|
function useNav() {
|
|
@@ -197,14 +319,21 @@ function NavMenuChevron({ className }) {
|
|
|
197
319
|
}
|
|
198
320
|
|
|
199
321
|
// src/NavTrigger.tsx
|
|
200
|
-
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
201
|
-
function NavTrigger({ className, "aria-label": ariaLabel = "Toggle navigation", ...props }) {
|
|
322
|
+
import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
323
|
+
function NavTrigger({ className, onClick, "aria-label": ariaLabel = "Toggle navigation", ...props }) {
|
|
202
324
|
const { open, toggle } = useNav();
|
|
203
|
-
return /* @__PURE__ */
|
|
325
|
+
return /* @__PURE__ */ jsxs3("button", { type: "button", "aria-label": ariaLabel, "aria-expanded": open, className: cx("agentsam-nav__trigger", className), ...props, onClick: (event) => {
|
|
326
|
+
toggle();
|
|
327
|
+
onClick?.(event);
|
|
328
|
+
}, children: [
|
|
329
|
+
/* @__PURE__ */ jsx8("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx8("path", { d: "M4 7h16M4 12h16M4 17h16", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round" }) }),
|
|
330
|
+
/* @__PURE__ */ jsx8("span", { className: "agentsam-nav__trigger-help", "aria-hidden": "true", children: "Navigation" })
|
|
331
|
+
] });
|
|
204
332
|
}
|
|
205
333
|
|
|
206
334
|
// src/Surfaces.tsx
|
|
207
|
-
import { Fragment as Fragment7, useId as useId3, useState as useState20 } from "react";
|
|
335
|
+
import { Fragment as Fragment7, useEffect as useEffect20, useId as useId3, useRef as useRef18, useState as useState20 } from "react";
|
|
336
|
+
import { createPortal as createPortal2 } from "react-dom";
|
|
208
337
|
|
|
209
338
|
// ../../apps/local-studio/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs
|
|
210
339
|
import * as React34 from "react";
|
|
@@ -4948,11 +5077,11 @@ var SideCar = function(_a) {
|
|
|
4948
5077
|
if (!sideCar) {
|
|
4949
5078
|
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
4950
5079
|
}
|
|
4951
|
-
var
|
|
4952
|
-
if (!
|
|
5080
|
+
var Target2 = sideCar.read();
|
|
5081
|
+
if (!Target2) {
|
|
4953
5082
|
throw new Error("Sidecar medium not found");
|
|
4954
5083
|
}
|
|
4955
|
-
return React27.createElement(
|
|
5084
|
+
return React27.createElement(Target2, __assign({}, rest));
|
|
4956
5085
|
};
|
|
4957
5086
|
SideCar.isSideCarExport = true;
|
|
4958
5087
|
function exportSidecar(medium, exported) {
|
|
@@ -6739,28 +6868,148 @@ var createLucideIcon = (iconName, iconNode) => {
|
|
|
6739
6868
|
return Component;
|
|
6740
6869
|
};
|
|
6741
6870
|
|
|
6871
|
+
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/archive.js
|
|
6872
|
+
var __iconNode = [
|
|
6873
|
+
["rect", { width: "20", height: "5", x: "2", y: "3", rx: "1", key: "1wp1u1" }],
|
|
6874
|
+
["path", { d: "M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8", key: "1s80jp" }],
|
|
6875
|
+
["path", { d: "M10 12h4", key: "a56b0p" }]
|
|
6876
|
+
];
|
|
6877
|
+
var Archive = createLucideIcon("archive", __iconNode);
|
|
6878
|
+
|
|
6879
|
+
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/box.js
|
|
6880
|
+
var __iconNode2 = [
|
|
6881
|
+
[
|
|
6882
|
+
"path",
|
|
6883
|
+
{
|
|
6884
|
+
d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",
|
|
6885
|
+
key: "hh9hay"
|
|
6886
|
+
}
|
|
6887
|
+
],
|
|
6888
|
+
["path", { d: "m3.3 7 8.7 5 8.7-5", key: "g66t2b" }],
|
|
6889
|
+
["path", { d: "M12 22V12", key: "d0xqtd" }]
|
|
6890
|
+
];
|
|
6891
|
+
var Box = createLucideIcon("box", __iconNode2);
|
|
6892
|
+
|
|
6893
|
+
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/check.js
|
|
6894
|
+
var __iconNode3 = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
6895
|
+
var Check = createLucideIcon("check", __iconNode3);
|
|
6896
|
+
|
|
6742
6897
|
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/chevron-down.js
|
|
6743
|
-
var
|
|
6744
|
-
var ChevronDown = createLucideIcon("chevron-down",
|
|
6898
|
+
var __iconNode4 = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
6899
|
+
var ChevronDown = createLucideIcon("chevron-down", __iconNode4);
|
|
6900
|
+
|
|
6901
|
+
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/chevron-right.js
|
|
6902
|
+
var __iconNode5 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
6903
|
+
var ChevronRight = createLucideIcon("chevron-right", __iconNode5);
|
|
6904
|
+
|
|
6905
|
+
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/clapperboard.js
|
|
6906
|
+
var __iconNode6 = [
|
|
6907
|
+
[
|
|
6908
|
+
"path",
|
|
6909
|
+
{ d: "M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3Z", key: "1tn4o7" }
|
|
6910
|
+
],
|
|
6911
|
+
["path", { d: "m6.2 5.3 3.1 3.9", key: "iuk76l" }],
|
|
6912
|
+
["path", { d: "m12.4 3.4 3.1 4", key: "6hsd6n" }],
|
|
6913
|
+
["path", { d: "M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z", key: "ltgou9" }]
|
|
6914
|
+
];
|
|
6915
|
+
var Clapperboard = createLucideIcon("clapperboard", __iconNode6);
|
|
6916
|
+
|
|
6917
|
+
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/clipboard-list.js
|
|
6918
|
+
var __iconNode7 = [
|
|
6919
|
+
["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
|
|
6920
|
+
[
|
|
6921
|
+
"path",
|
|
6922
|
+
{
|
|
6923
|
+
d: "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",
|
|
6924
|
+
key: "116196"
|
|
6925
|
+
}
|
|
6926
|
+
],
|
|
6927
|
+
["path", { d: "M12 11h4", key: "1jrz19" }],
|
|
6928
|
+
["path", { d: "M12 16h4", key: "n85exb" }],
|
|
6929
|
+
["path", { d: "M8 11h.01", key: "1dfujw" }],
|
|
6930
|
+
["path", { d: "M8 16h.01", key: "18s6g9" }]
|
|
6931
|
+
];
|
|
6932
|
+
var ClipboardList = createLucideIcon("clipboard-list", __iconNode7);
|
|
6933
|
+
|
|
6934
|
+
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/database.js
|
|
6935
|
+
var __iconNode8 = [
|
|
6936
|
+
["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
|
|
6937
|
+
["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
|
|
6938
|
+
["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
|
|
6939
|
+
];
|
|
6940
|
+
var Database = createLucideIcon("database", __iconNode8);
|
|
6745
6941
|
|
|
6746
6942
|
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/ellipsis.js
|
|
6747
|
-
var
|
|
6943
|
+
var __iconNode9 = [
|
|
6748
6944
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
6749
6945
|
["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
|
|
6750
6946
|
["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
|
|
6751
6947
|
];
|
|
6752
|
-
var Ellipsis = createLucideIcon("ellipsis",
|
|
6948
|
+
var Ellipsis = createLucideIcon("ellipsis", __iconNode9);
|
|
6949
|
+
|
|
6950
|
+
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/file-code-2.js
|
|
6951
|
+
var __iconNode10 = [
|
|
6952
|
+
["path", { d: "M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4", key: "1pf5j1" }],
|
|
6953
|
+
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
|
|
6954
|
+
["path", { d: "m5 12-3 3 3 3", key: "oke12k" }],
|
|
6955
|
+
["path", { d: "m9 18 3-3-3-3", key: "112psh" }]
|
|
6956
|
+
];
|
|
6957
|
+
var FileCode2 = createLucideIcon("file-code-2", __iconNode10);
|
|
6958
|
+
|
|
6959
|
+
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/file-image.js
|
|
6960
|
+
var __iconNode11 = [
|
|
6961
|
+
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
|
|
6962
|
+
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
|
|
6963
|
+
["circle", { cx: "10", cy: "12", r: "2", key: "737tya" }],
|
|
6964
|
+
["path", { d: "m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22", key: "wt3hpn" }]
|
|
6965
|
+
];
|
|
6966
|
+
var FileImage = createLucideIcon("file-image", __iconNode11);
|
|
6967
|
+
|
|
6968
|
+
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/file-text.js
|
|
6969
|
+
var __iconNode12 = [
|
|
6970
|
+
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
|
|
6971
|
+
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
|
|
6972
|
+
["path", { d: "M10 9H8", key: "b1mrlr" }],
|
|
6973
|
+
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
6974
|
+
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
6975
|
+
];
|
|
6976
|
+
var FileText = createLucideIcon("file-text", __iconNode12);
|
|
6753
6977
|
|
|
6754
6978
|
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/files.js
|
|
6755
|
-
var
|
|
6979
|
+
var __iconNode13 = [
|
|
6756
6980
|
["path", { d: "M20 7h-3a2 2 0 0 1-2-2V2", key: "x099mo" }],
|
|
6757
6981
|
["path", { d: "M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z", key: "18t6ie" }],
|
|
6758
6982
|
["path", { d: "M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8", key: "1nja0z" }]
|
|
6759
6983
|
];
|
|
6760
|
-
var Files = createLucideIcon("files",
|
|
6984
|
+
var Files = createLucideIcon("files", __iconNode13);
|
|
6985
|
+
|
|
6986
|
+
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/film.js
|
|
6987
|
+
var __iconNode14 = [
|
|
6988
|
+
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
6989
|
+
["path", { d: "M7 3v18", key: "bbkbws" }],
|
|
6990
|
+
["path", { d: "M3 7.5h4", key: "zfgn84" }],
|
|
6991
|
+
["path", { d: "M3 12h18", key: "1i2n21" }],
|
|
6992
|
+
["path", { d: "M3 16.5h4", key: "1230mu" }],
|
|
6993
|
+
["path", { d: "M17 3v18", key: "in4fa5" }],
|
|
6994
|
+
["path", { d: "M17 7.5h4", key: "myr1c1" }],
|
|
6995
|
+
["path", { d: "M17 16.5h4", key: "go4c1d" }]
|
|
6996
|
+
];
|
|
6997
|
+
var Film = createLucideIcon("film", __iconNode14);
|
|
6998
|
+
|
|
6999
|
+
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/folder-open.js
|
|
7000
|
+
var __iconNode15 = [
|
|
7001
|
+
[
|
|
7002
|
+
"path",
|
|
7003
|
+
{
|
|
7004
|
+
d: "m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",
|
|
7005
|
+
key: "usdka0"
|
|
7006
|
+
}
|
|
7007
|
+
]
|
|
7008
|
+
];
|
|
7009
|
+
var FolderOpen = createLucideIcon("folder-open", __iconNode15);
|
|
6761
7010
|
|
|
6762
7011
|
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/folder.js
|
|
6763
|
-
var
|
|
7012
|
+
var __iconNode16 = [
|
|
6764
7013
|
[
|
|
6765
7014
|
"path",
|
|
6766
7015
|
{
|
|
@@ -6769,30 +7018,92 @@ var __iconNode4 = [
|
|
|
6769
7018
|
}
|
|
6770
7019
|
]
|
|
6771
7020
|
];
|
|
6772
|
-
var Folder = createLucideIcon("folder",
|
|
7021
|
+
var Folder = createLucideIcon("folder", __iconNode16);
|
|
7022
|
+
|
|
7023
|
+
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/layers.js
|
|
7024
|
+
var __iconNode17 = [
|
|
7025
|
+
[
|
|
7026
|
+
"path",
|
|
7027
|
+
{
|
|
7028
|
+
d: "M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",
|
|
7029
|
+
key: "zw3jo"
|
|
7030
|
+
}
|
|
7031
|
+
],
|
|
7032
|
+
[
|
|
7033
|
+
"path",
|
|
7034
|
+
{
|
|
7035
|
+
d: "M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",
|
|
7036
|
+
key: "1wduqc"
|
|
7037
|
+
}
|
|
7038
|
+
],
|
|
7039
|
+
[
|
|
7040
|
+
"path",
|
|
7041
|
+
{
|
|
7042
|
+
d: "M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",
|
|
7043
|
+
key: "kqbvx6"
|
|
7044
|
+
}
|
|
7045
|
+
]
|
|
7046
|
+
];
|
|
7047
|
+
var Layers = createLucideIcon("layers", __iconNode17);
|
|
6773
7048
|
|
|
6774
|
-
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/
|
|
6775
|
-
var
|
|
6776
|
-
["
|
|
7049
|
+
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/layout-panel-top.js
|
|
7050
|
+
var __iconNode18 = [
|
|
7051
|
+
["rect", { width: "18", height: "7", x: "3", y: "3", rx: "1", key: "f1a2em" }],
|
|
7052
|
+
["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1", key: "1bb6yr" }],
|
|
7053
|
+
["rect", { width: "7", height: "7", x: "14", y: "14", rx: "1", key: "nxv5o0" }]
|
|
6777
7054
|
];
|
|
6778
|
-
var
|
|
7055
|
+
var LayoutPanelTop = createLucideIcon("layout-panel-top", __iconNode18);
|
|
7056
|
+
|
|
7057
|
+
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/loader-circle.js
|
|
7058
|
+
var __iconNode19 = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
|
|
7059
|
+
var LoaderCircle = createLucideIcon("loader-circle", __iconNode19);
|
|
7060
|
+
|
|
7061
|
+
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/palette.js
|
|
7062
|
+
var __iconNode20 = [
|
|
7063
|
+
[
|
|
7064
|
+
"path",
|
|
7065
|
+
{
|
|
7066
|
+
d: "M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",
|
|
7067
|
+
key: "e79jfc"
|
|
7068
|
+
}
|
|
7069
|
+
],
|
|
7070
|
+
["circle", { cx: "13.5", cy: "6.5", r: ".5", fill: "currentColor", key: "1okk4w" }],
|
|
7071
|
+
["circle", { cx: "17.5", cy: "10.5", r: ".5", fill: "currentColor", key: "f64h9f" }],
|
|
7072
|
+
["circle", { cx: "6.5", cy: "12.5", r: ".5", fill: "currentColor", key: "qy21gx" }],
|
|
7073
|
+
["circle", { cx: "8.5", cy: "7.5", r: ".5", fill: "currentColor", key: "fotxhn" }]
|
|
7074
|
+
];
|
|
7075
|
+
var Palette = createLucideIcon("palette", __iconNode20);
|
|
6779
7076
|
|
|
6780
7077
|
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/panel-left.js
|
|
6781
|
-
var
|
|
7078
|
+
var __iconNode21 = [
|
|
6782
7079
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
6783
7080
|
["path", { d: "M9 3v18", key: "fh3hqa" }]
|
|
6784
7081
|
];
|
|
6785
|
-
var PanelLeft = createLucideIcon("panel-left",
|
|
7082
|
+
var PanelLeft = createLucideIcon("panel-left", __iconNode21);
|
|
6786
7083
|
|
|
6787
|
-
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/
|
|
6788
|
-
var
|
|
6789
|
-
[
|
|
6790
|
-
|
|
7084
|
+
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/pen-tool.js
|
|
7085
|
+
var __iconNode22 = [
|
|
7086
|
+
[
|
|
7087
|
+
"path",
|
|
7088
|
+
{
|
|
7089
|
+
d: "M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z",
|
|
7090
|
+
key: "nt11vn"
|
|
7091
|
+
}
|
|
7092
|
+
],
|
|
7093
|
+
[
|
|
7094
|
+
"path",
|
|
7095
|
+
{
|
|
7096
|
+
d: "m18 13-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18",
|
|
7097
|
+
key: "15qc1e"
|
|
7098
|
+
}
|
|
7099
|
+
],
|
|
7100
|
+
["path", { d: "m2.3 2.3 7.286 7.286", key: "1wuzzi" }],
|
|
7101
|
+
["circle", { cx: "11", cy: "11", r: "2", key: "xmgehs" }]
|
|
6791
7102
|
];
|
|
6792
|
-
var
|
|
7103
|
+
var PenTool = createLucideIcon("pen-tool", __iconNode22);
|
|
6793
7104
|
|
|
6794
7105
|
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/pencil.js
|
|
6795
|
-
var
|
|
7106
|
+
var __iconNode23 = [
|
|
6796
7107
|
[
|
|
6797
7108
|
"path",
|
|
6798
7109
|
{
|
|
@@ -6802,10 +7113,10 @@ var __iconNode8 = [
|
|
|
6802
7113
|
],
|
|
6803
7114
|
["path", { d: "m15 5 4 4", key: "1mk7zo" }]
|
|
6804
7115
|
];
|
|
6805
|
-
var Pencil = createLucideIcon("pencil",
|
|
7116
|
+
var Pencil = createLucideIcon("pencil", __iconNode23);
|
|
6806
7117
|
|
|
6807
7118
|
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/pin.js
|
|
6808
|
-
var
|
|
7119
|
+
var __iconNode24 = [
|
|
6809
7120
|
["path", { d: "M12 17v5", key: "bb1du9" }],
|
|
6810
7121
|
[
|
|
6811
7122
|
"path",
|
|
@@ -6815,72 +7126,120 @@ var __iconNode9 = [
|
|
|
6815
7126
|
}
|
|
6816
7127
|
]
|
|
6817
7128
|
];
|
|
6818
|
-
var Pin = createLucideIcon("pin",
|
|
7129
|
+
var Pin = createLucideIcon("pin", __iconNode24);
|
|
6819
7130
|
|
|
6820
7131
|
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/plus.js
|
|
6821
|
-
var
|
|
7132
|
+
var __iconNode25 = [
|
|
6822
7133
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
6823
7134
|
["path", { d: "M12 5v14", key: "s699le" }]
|
|
6824
7135
|
];
|
|
6825
|
-
var Plus = createLucideIcon("plus",
|
|
7136
|
+
var Plus = createLucideIcon("plus", __iconNode25);
|
|
6826
7137
|
|
|
6827
7138
|
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/search.js
|
|
6828
|
-
var
|
|
7139
|
+
var __iconNode26 = [
|
|
6829
7140
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
6830
7141
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
6831
7142
|
];
|
|
6832
|
-
var Search = createLucideIcon("search",
|
|
7143
|
+
var Search = createLucideIcon("search", __iconNode26);
|
|
6833
7144
|
|
|
6834
|
-
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/
|
|
6835
|
-
var
|
|
6836
|
-
["path", { d: "
|
|
6837
|
-
["
|
|
6838
|
-
["
|
|
7145
|
+
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/shopping-bag.js
|
|
7146
|
+
var __iconNode27 = [
|
|
7147
|
+
["path", { d: "M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z", key: "hou9p0" }],
|
|
7148
|
+
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
7149
|
+
["path", { d: "M16 10a4 4 0 0 1-8 0", key: "1ltviw" }]
|
|
6839
7150
|
];
|
|
6840
|
-
var
|
|
7151
|
+
var ShoppingBag = createLucideIcon("shopping-bag", __iconNode27);
|
|
7152
|
+
|
|
7153
|
+
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/target.js
|
|
7154
|
+
var __iconNode28 = [
|
|
7155
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
7156
|
+
["circle", { cx: "12", cy: "12", r: "6", key: "1vlfrh" }],
|
|
7157
|
+
["circle", { cx: "12", cy: "12", r: "2", key: "1c9p78" }]
|
|
7158
|
+
];
|
|
7159
|
+
var Target = createLucideIcon("target", __iconNode28);
|
|
6841
7160
|
|
|
6842
7161
|
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/trash-2.js
|
|
6843
|
-
var
|
|
7162
|
+
var __iconNode29 = [
|
|
6844
7163
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
6845
7164
|
["path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", key: "4alrt4" }],
|
|
6846
7165
|
["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }],
|
|
6847
7166
|
["line", { x1: "10", x2: "10", y1: "11", y2: "17", key: "1uufr5" }],
|
|
6848
7167
|
["line", { x1: "14", x2: "14", y1: "11", y2: "17", key: "xtxkd" }]
|
|
6849
7168
|
];
|
|
6850
|
-
var Trash2 = createLucideIcon("trash-2",
|
|
7169
|
+
var Trash2 = createLucideIcon("trash-2", __iconNode29);
|
|
7170
|
+
|
|
7171
|
+
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/trending-up.js
|
|
7172
|
+
var __iconNode30 = [
|
|
7173
|
+
["polyline", { points: "22 7 13.5 15.5 8.5 10.5 2 17", key: "126l90" }],
|
|
7174
|
+
["polyline", { points: "16 7 22 7 22 13", key: "kwv8wd" }]
|
|
7175
|
+
];
|
|
7176
|
+
var TrendingUp = createLucideIcon("trending-up", __iconNode30);
|
|
6851
7177
|
|
|
6852
7178
|
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/user.js
|
|
6853
|
-
var
|
|
7179
|
+
var __iconNode31 = [
|
|
6854
7180
|
["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
|
|
6855
7181
|
["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
|
|
6856
7182
|
];
|
|
6857
|
-
var User = createLucideIcon("user",
|
|
7183
|
+
var User = createLucideIcon("user", __iconNode31);
|
|
7184
|
+
|
|
7185
|
+
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/users.js
|
|
7186
|
+
var __iconNode32 = [
|
|
7187
|
+
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
|
|
7188
|
+
["path", { d: "M16 3.128a4 4 0 0 1 0 7.744", key: "16gr8j" }],
|
|
7189
|
+
["path", { d: "M22 21v-2a4 4 0 0 0-3-3.87", key: "kshegd" }],
|
|
7190
|
+
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }]
|
|
7191
|
+
];
|
|
7192
|
+
var Users = createLucideIcon("users", __iconNode32);
|
|
7193
|
+
|
|
7194
|
+
// ../../apps/local-studio/node_modules/lucide-react/dist/esm/icons/x.js
|
|
7195
|
+
var __iconNode33 = [
|
|
7196
|
+
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
7197
|
+
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
7198
|
+
];
|
|
7199
|
+
var X = createLucideIcon("x", __iconNode33);
|
|
6858
7200
|
|
|
6859
7201
|
// src/Surfaces.tsx
|
|
6860
|
-
import { Fragment as Fragment8, jsx as jsx21, jsxs as
|
|
7202
|
+
import { Fragment as Fragment8, jsx as jsx21, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
6861
7203
|
function useNavStyle() {
|
|
6862
|
-
const { accentColor, tokens } = useNav();
|
|
6863
|
-
return { ...Object.fromEntries(Object.entries(tokens).map(([key, value]) => [`--nav-${key}`, value])), "--nav-accent": accentColor };
|
|
7204
|
+
const { accentColor, tokens, width, resizable } = useNav();
|
|
7205
|
+
return { ...resizable ? { "--nav-width": width + "px" } : {}, ...Object.fromEntries(Object.entries(tokens).map(([key, value]) => [`--nav-${key}`, value])), "--nav-accent": accentColor };
|
|
7206
|
+
}
|
|
7207
|
+
function NavLaunchDock({ items }) {
|
|
7208
|
+
return /* @__PURE__ */ jsx21("nav", { className: "as-nav-launch-dock", "aria-label": "Quick navigation", children: items.map((item) => /* @__PURE__ */ jsxs4(
|
|
7209
|
+
"button",
|
|
7210
|
+
{
|
|
7211
|
+
type: "button",
|
|
7212
|
+
"aria-label": item.label,
|
|
7213
|
+
title: item.label,
|
|
7214
|
+
"aria-pressed": Boolean(item.active),
|
|
7215
|
+
disabled: item.disabled,
|
|
7216
|
+
onClick: item.onSelect,
|
|
7217
|
+
children: [
|
|
7218
|
+
/* @__PURE__ */ jsx21("span", { className: "as-nav-launch-dock-icon", "aria-hidden": "true", children: item.icon }),
|
|
7219
|
+
/* @__PURE__ */ jsx21("span", { className: "as-nav-launch-dock-label", children: item.label })
|
|
7220
|
+
]
|
|
7221
|
+
},
|
|
7222
|
+
item.id
|
|
7223
|
+
)) });
|
|
6864
7224
|
}
|
|
6865
7225
|
function NavScope({ className, style, ...props }) {
|
|
6866
7226
|
const { theme } = useNav();
|
|
6867
7227
|
return /* @__PURE__ */ jsx21("div", { ...props, "data-nav-theme": theme, className: cx("as-nav-scope", className), style: { ...useNavStyle(), ...style } });
|
|
6868
7228
|
}
|
|
6869
7229
|
function MenuActions({ actions }) {
|
|
6870
|
-
|
|
6871
|
-
const style = useNavStyle();
|
|
6872
|
-
return /* @__PURE__ */ jsx21(Fragment8, { children: actions.map((action) => /* @__PURE__ */ jsxs3(Fragment7, { children: [
|
|
7230
|
+
return /* @__PURE__ */ jsx21(Fragment8, { children: actions.map((action) => /* @__PURE__ */ jsxs4(Fragment7, { children: [
|
|
6873
7231
|
action.separatorBefore ? /* @__PURE__ */ jsx21(Separator2, { className: "as-nav-menu-separator" }) : null,
|
|
6874
|
-
action.children?.length ? /* @__PURE__ */
|
|
6875
|
-
/* @__PURE__ */
|
|
6876
|
-
action.icon,
|
|
7232
|
+
action.children?.length ? /* @__PURE__ */ jsxs4(Sub2, { children: [
|
|
7233
|
+
/* @__PURE__ */ jsxs4(SubTrigger2, { className: "as-nav-menu-row", disabled: action.disabled || action.loading, "aria-busy": action.loading || void 0, children: [
|
|
7234
|
+
/* @__PURE__ */ jsx21("span", { className: "as-nav-icon", children: action.icon }),
|
|
6877
7235
|
/* @__PURE__ */ jsx21("span", { children: action.label }),
|
|
6878
|
-
/* @__PURE__ */ jsx21(
|
|
7236
|
+
action.loading ? /* @__PURE__ */ jsx21(LoaderCircle, { className: "as-nav-menu-spinner", "aria-hidden": "true" }) : /* @__PURE__ */ jsx21(ChevronRight, { "aria-hidden": "true" })
|
|
6879
7237
|
] }),
|
|
6880
|
-
/* @__PURE__ */ jsx21(Portal22, { children: /* @__PURE__ */ jsx21(SubContent2, {
|
|
6881
|
-
] }) : /* @__PURE__ */
|
|
6882
|
-
|
|
6883
|
-
/* @__PURE__ */ jsx21("span", { children: action.label })
|
|
7238
|
+
/* @__PURE__ */ jsx21(Portal22, { children: /* @__PURE__ */ jsx21(SubContent2, { asChild: true, sideOffset: 6, collisionPadding: 12, children: /* @__PURE__ */ jsx21(NavScope, { className: "as-nav-popover", children: /* @__PURE__ */ jsx21(MenuActions, { actions: action.children }) }) }) })
|
|
7239
|
+
] }) : /* @__PURE__ */ jsxs4(Item22, { className: "as-nav-menu-row", disabled: action.disabled || action.loading || !action.onSelect, "aria-busy": action.loading || void 0, "data-destructive": action.destructive || void 0, onSelect: action.onSelect, children: [
|
|
7240
|
+
/* @__PURE__ */ jsx21("span", { className: "as-nav-icon", children: action.icon }),
|
|
7241
|
+
/* @__PURE__ */ jsx21("span", { children: action.label }),
|
|
7242
|
+
action.loading ? /* @__PURE__ */ jsx21(LoaderCircle, { className: "as-nav-menu-spinner", "aria-hidden": "true" }) : action.shortcut ? /* @__PURE__ */ jsx21("kbd", { className: "as-nav-shortcut", children: action.shortcut }) : null
|
|
6884
7243
|
] })
|
|
6885
7244
|
] }, action.id)) });
|
|
6886
7245
|
}
|
|
@@ -6889,38 +7248,83 @@ function NavOverflowMenu({ label = "More options", actions = [], children, id: s
|
|
|
6889
7248
|
const generatedId = useId3();
|
|
6890
7249
|
const id = suppliedId ?? generatedId;
|
|
6891
7250
|
const style = useNavStyle();
|
|
6892
|
-
return /* @__PURE__ */
|
|
7251
|
+
return /* @__PURE__ */ jsxs4(Root22, { open: menu === id, onOpenChange: (open) => setMenu(open ? id : null), children: [
|
|
6893
7252
|
/* @__PURE__ */ jsx21(Trigger, { asChild: true, children: /* @__PURE__ */ jsx21("button", { type: "button", className: "as-nav-button", "aria-label": label, title: label, children: children ?? /* @__PURE__ */ jsx21(Ellipsis, {}) }) }),
|
|
6894
|
-
/* @__PURE__ */ jsx21(Portal22, { children: /* @__PURE__ */
|
|
7253
|
+
/* @__PURE__ */ jsx21(Portal22, { children: /* @__PURE__ */ jsxs4(Content22, { "data-nav-theme": theme, style, className: "as-nav-scope as-nav-popover", align, sideOffset: 8, collisionPadding: 12, children: [
|
|
6895
7254
|
/* @__PURE__ */ jsx21(Label2, { className: "as-nav-menu-heading", children: label }),
|
|
6896
7255
|
actions.length ? /* @__PURE__ */ jsx21(MenuActions, { actions }) : /* @__PURE__ */ jsx21("div", { className: "as-nav-empty", children: "No actions available" })
|
|
6897
7256
|
] }) })
|
|
6898
7257
|
] });
|
|
6899
7258
|
}
|
|
6900
7259
|
function NavTopbarLogo({ variant = "mark", onClick, toggle = false }) {
|
|
6901
|
-
const { data, toggle:
|
|
6902
|
-
const
|
|
6903
|
-
|
|
6904
|
-
|
|
6905
|
-
|
|
6906
|
-
|
|
7260
|
+
const { data, open, toggle: toggleNavigation } = useNav();
|
|
7261
|
+
const [logoFailed, setLogoFailed] = useState20(false);
|
|
7262
|
+
const label = toggle ? open ? "Close sidebar" : "Open sidebar" : data.brand?.name ?? "Home";
|
|
7263
|
+
if (toggle) return /* @__PURE__ */ jsxs4(
|
|
7264
|
+
"button",
|
|
7265
|
+
{
|
|
7266
|
+
type: "button",
|
|
7267
|
+
className: "as-nav-work-brand-toggle",
|
|
7268
|
+
"aria-label": label,
|
|
7269
|
+
title: label + " (\u2318\u21E7S)",
|
|
7270
|
+
"aria-keyshortcuts": "Meta+Shift+S",
|
|
7271
|
+
"aria-expanded": open,
|
|
7272
|
+
onClick: toggleNavigation,
|
|
7273
|
+
children: [
|
|
7274
|
+
/* @__PURE__ */ jsx21("span", { className: "as-nav-work-brand-toggle__mark as-nav-brand-mark", "aria-hidden": "true", children: data.brand?.icon ? data.brand.icon : data.brand?.logo && !logoFailed ? /* @__PURE__ */ jsxs4(Fragment8, { children: [
|
|
7275
|
+
/* @__PURE__ */ jsx21("img", { className: "as-nav-logo-dark", src: data.brand.logo, alt: "", onError: () => setLogoFailed(true) }),
|
|
7276
|
+
/* @__PURE__ */ jsx21(
|
|
7277
|
+
"img",
|
|
7278
|
+
{
|
|
7279
|
+
className: "as-nav-logo-light",
|
|
7280
|
+
"data-fallback": !data.brand.lightLogo || void 0,
|
|
7281
|
+
src: data.brand.lightLogo ?? data.brand.logo,
|
|
7282
|
+
alt: "",
|
|
7283
|
+
onError: () => setLogoFailed(true)
|
|
7284
|
+
}
|
|
7285
|
+
)
|
|
7286
|
+
] }) : /* @__PURE__ */ jsx21(PanelLeft, {}) }),
|
|
7287
|
+
/* @__PURE__ */ jsx21("span", { className: "as-nav-work-brand-toggle__control", "aria-hidden": "true", children: /* @__PURE__ */ jsx21(PanelLeft, { size: 20 }) })
|
|
7288
|
+
]
|
|
7289
|
+
}
|
|
7290
|
+
);
|
|
7291
|
+
return /* @__PURE__ */ jsxs4("button", { type: "button", className: "as-nav-button as-nav-brand", "aria-label": label, title: label, onClick: onClick ?? (() => data.brand?.home && data.onNavigate?.(data.brand.home)), children: [
|
|
7292
|
+
/* @__PURE__ */ jsx21("span", { className: "as-nav-brand-mark", children: data.brand?.logo && !logoFailed ? /* @__PURE__ */ jsxs4(Fragment8, { children: [
|
|
7293
|
+
/* @__PURE__ */ jsx21("img", { className: "as-nav-logo-dark", src: data.brand.logo, alt: "", onError: () => setLogoFailed(true) }),
|
|
7294
|
+
/* @__PURE__ */ jsx21("img", { className: "as-nav-logo-light", "data-fallback": !data.brand.lightLogo || void 0, src: data.brand.lightLogo ?? data.brand.logo, alt: "", onError: () => setLogoFailed(true) })
|
|
6907
7295
|
] }) : /* @__PURE__ */ jsx21(PanelLeft, {}) }),
|
|
6908
7296
|
variant === "expanded" ? /* @__PURE__ */ jsx21("span", { children: data.brand?.name }) : null
|
|
6909
7297
|
] });
|
|
6910
7298
|
}
|
|
7299
|
+
function NavBreadcrumbs() {
|
|
7300
|
+
const { data, isMobile, close } = useNav();
|
|
7301
|
+
const breadcrumbs = data.breadcrumbs ?? [];
|
|
7302
|
+
return /* @__PURE__ */ jsx21("nav", { className: "as-nav-breadcrumbs", "aria-label": "Breadcrumb", children: /* @__PURE__ */ jsx21("ol", { children: breadcrumbs.map((item, index2) => /* @__PURE__ */ jsxs4("li", { children: [
|
|
7303
|
+
index2 > 0 ? /* @__PURE__ */ jsx21("span", { "aria-hidden": "true", className: "as-nav-separator", children: "/" }) : null,
|
|
7304
|
+
index2 === breadcrumbs.length - 1 ? /* @__PURE__ */ jsx21("span", { "aria-current": "page", title: item.label, children: item.label }) : item.href ? /* @__PURE__ */ jsx21("a", { href: item.href, onClick: (event) => {
|
|
7305
|
+
if (data.onNavigate) {
|
|
7306
|
+
event.preventDefault();
|
|
7307
|
+
data.onNavigate(item.href);
|
|
7308
|
+
}
|
|
7309
|
+
if (isMobile) close();
|
|
7310
|
+
}, children: item.label }) : /* @__PURE__ */ jsx21("span", { children: item.label })
|
|
7311
|
+
] }, item.id)) }) });
|
|
7312
|
+
}
|
|
6911
7313
|
function NavProjectContext() {
|
|
6912
7314
|
const { data } = useNav();
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
7315
|
+
const conversation = data.conversation;
|
|
7316
|
+
if (!data.project && !conversation && data.breadcrumbs?.length) return /* @__PURE__ */ jsx21(NavBreadcrumbs, {});
|
|
7317
|
+
return /* @__PURE__ */ jsxs4("div", { className: "as-nav-context", children: [
|
|
7318
|
+
data.project ? /* @__PURE__ */ jsxs4(Fragment8, { children: [
|
|
7319
|
+
/* @__PURE__ */ jsxs4(NavOverflowMenu, { label: data.project.name, actions: data.projectActions, children: [
|
|
6916
7320
|
/* @__PURE__ */ jsx21(Folder, {}),
|
|
6917
7321
|
/* @__PURE__ */ jsx21("span", { className: "as-nav-project-name", children: data.project.name }),
|
|
6918
7322
|
/* @__PURE__ */ jsx21(ChevronDown, {})
|
|
6919
7323
|
] }),
|
|
6920
7324
|
/* @__PURE__ */ jsx21("span", { className: "as-nav-separator", children: "/" })
|
|
6921
7325
|
] }) : null,
|
|
6922
|
-
/* @__PURE__ */ jsx21("span", { className: "as-nav-title", title:
|
|
6923
|
-
data.mode ? /* @__PURE__ */
|
|
7326
|
+
/* @__PURE__ */ jsx21("span", { className: "as-nav-title", title: conversation?.title, children: conversation?.title ?? data.brand?.name }),
|
|
7327
|
+
data.mode ? /* @__PURE__ */ jsxs4("span", { className: "as-nav-mode-label", children: [
|
|
6924
7328
|
"\xB7 ",
|
|
6925
7329
|
data.mode === "work" ? "Work" : "Chat"
|
|
6926
7330
|
] }) : null
|
|
@@ -6935,18 +7339,182 @@ function NavFilesResources() {
|
|
|
6935
7339
|
}
|
|
6936
7340
|
function NavPinnedSummary() {
|
|
6937
7341
|
const { data } = useNav();
|
|
6938
|
-
|
|
6939
|
-
|
|
7342
|
+
const [open, setOpen] = useState20(false);
|
|
7343
|
+
const [expandedGroups, setExpandedGroups] = useState20({});
|
|
7344
|
+
const [activeAdd, setActiveAdd] = useState20(null);
|
|
7345
|
+
useEffect20(() => {
|
|
7346
|
+
setOpen(false);
|
|
7347
|
+
setExpandedGroups({});
|
|
7348
|
+
setActiveAdd(null);
|
|
7349
|
+
}, [data.conversation?.id]);
|
|
7350
|
+
const subagents = data.pinnedSummary?.subagents ?? [];
|
|
7351
|
+
const outputs = data.pinnedSummary?.outputs ?? [];
|
|
7352
|
+
const sources = data.pinnedSummary?.sources ?? [];
|
|
7353
|
+
const item = (value, index2, group) => {
|
|
7354
|
+
const entry = typeof value === "string" ? { id: group + index2, label: value, kind: group, onSelect: void 0 } : value;
|
|
7355
|
+
const Icon2 = group === "sources" ? FileText : FileCode2;
|
|
7356
|
+
const contents = /* @__PURE__ */ jsxs4(Fragment8, { children: [
|
|
7357
|
+
/* @__PURE__ */ jsx21(Icon2, { size: 16, "aria-hidden": "true" }),
|
|
7358
|
+
/* @__PURE__ */ jsx21("span", { className: "as-nav-activity-item__title", children: entry.label }),
|
|
7359
|
+
entry.kind ? /* @__PURE__ */ jsx21("small", { children: entry.kind }) : null
|
|
7360
|
+
] });
|
|
7361
|
+
return entry.onSelect ? /* @__PURE__ */ jsx21(Item22, { asChild: true, children: /* @__PURE__ */ jsx21("button", { type: "button", className: "as-nav-activity-item", onClick: entry.onSelect, title: entry.label, children: contents }) }, entry.id) : /* @__PURE__ */ jsx21("div", { className: "as-nav-activity-item", title: entry.label, children: contents }, entry.id);
|
|
7362
|
+
};
|
|
7363
|
+
const addControl = (title, group, actions, add) => {
|
|
7364
|
+
if (actions?.length) return /* @__PURE__ */ jsx21(
|
|
7365
|
+
Item22,
|
|
7366
|
+
{
|
|
7367
|
+
className: "as-nav-activity-add",
|
|
7368
|
+
"aria-label": "Add " + title.toLowerCase(),
|
|
7369
|
+
title: "Add " + title.toLowerCase(),
|
|
7370
|
+
"aria-expanded": activeAdd === group,
|
|
7371
|
+
onSelect: (event) => {
|
|
7372
|
+
event.preventDefault();
|
|
7373
|
+
setActiveAdd((current) => current === group ? null : group);
|
|
7374
|
+
},
|
|
7375
|
+
children: /* @__PURE__ */ jsx21(Plus, { size: 16, "aria-hidden": "true" })
|
|
7376
|
+
}
|
|
7377
|
+
);
|
|
7378
|
+
return add ? /* @__PURE__ */ jsx21(
|
|
7379
|
+
Item22,
|
|
7380
|
+
{
|
|
7381
|
+
className: "as-nav-activity-add",
|
|
7382
|
+
"aria-label": "Add " + title.toLowerCase(),
|
|
7383
|
+
title: "Add " + title.toLowerCase(),
|
|
7384
|
+
onSelect: add,
|
|
7385
|
+
children: /* @__PURE__ */ jsx21(Plus, { size: 16, "aria-hidden": "true" })
|
|
7386
|
+
}
|
|
7387
|
+
) : null;
|
|
7388
|
+
};
|
|
7389
|
+
const more = (group, count3) => !expandedGroups[group] && count3 > 5 ? /* @__PURE__ */ jsx21(Item22, { asChild: true, children: /* @__PURE__ */ jsxs4("button", { type: "button", className: "as-nav-activity-more", onClick: (event) => {
|
|
7390
|
+
event.preventDefault();
|
|
7391
|
+
setExpandedGroups((prev) => ({ ...prev, [group]: true }));
|
|
7392
|
+
}, children: [
|
|
7393
|
+
"Show ",
|
|
7394
|
+
count3 - 5,
|
|
7395
|
+
" more"
|
|
7396
|
+
] }) }) : null;
|
|
7397
|
+
const section = (title, entries, group, actions, add) => /* @__PURE__ */ jsxs4("section", { className: "as-nav-activity-section", "aria-label": title, children: [
|
|
7398
|
+
/* @__PURE__ */ jsxs4("div", { className: "as-nav-activity-section-head", children: [
|
|
7399
|
+
/* @__PURE__ */ jsx21("span", { children: title }),
|
|
7400
|
+
addControl(title, group, actions, add)
|
|
7401
|
+
] }),
|
|
7402
|
+
activeAdd === group && actions?.length ? /* @__PURE__ */ jsx21("div", { className: "as-nav-activity-add-actions", role: "group", "aria-label": title + " actions", children: /* @__PURE__ */ jsx21(MenuActions, { actions }) }) : null,
|
|
7403
|
+
entries.length ? (expandedGroups[group] ? entries : entries.slice(0, 5)).map((entry, index2) => item(entry, index2, group)) : /* @__PURE__ */ jsxs4("p", { className: "as-nav-activity-empty", children: [
|
|
7404
|
+
"No ",
|
|
7405
|
+
title.toLowerCase(),
|
|
7406
|
+
" yet"
|
|
7407
|
+
] }),
|
|
7408
|
+
more(group, entries.length)
|
|
7409
|
+
] });
|
|
7410
|
+
if (!data.conversation || !outputs.length && !sources.length) return null;
|
|
7411
|
+
return /* @__PURE__ */ jsxs4(Root22, { open, onOpenChange: (next) => {
|
|
7412
|
+
setOpen(next);
|
|
7413
|
+
if (!next) {
|
|
7414
|
+
setExpandedGroups({});
|
|
7415
|
+
setActiveAdd(null);
|
|
7416
|
+
}
|
|
7417
|
+
}, children: [
|
|
7418
|
+
/* @__PURE__ */ jsx21(Trigger, { asChild: true, children: /* @__PURE__ */ jsxs4(
|
|
7419
|
+
"button",
|
|
7420
|
+
{
|
|
7421
|
+
type: "button",
|
|
7422
|
+
className: "as-nav-button as-nav-activity-trigger",
|
|
7423
|
+
"aria-label": "Toggle pinned summary",
|
|
7424
|
+
title: "Sources and outputs",
|
|
7425
|
+
"aria-expanded": open,
|
|
7426
|
+
"aria-pressed": open,
|
|
7427
|
+
children: [
|
|
7428
|
+
/* @__PURE__ */ jsx21(PinnedSummaryIcon, {}),
|
|
7429
|
+
/* @__PURE__ */ jsx21("span", { className: "as-nav-icon-help", "aria-hidden": "true", children: "Sources and outputs" })
|
|
7430
|
+
]
|
|
7431
|
+
}
|
|
7432
|
+
) }),
|
|
7433
|
+
/* @__PURE__ */ jsx21(Portal22, { children: /* @__PURE__ */ jsx21(Content22, { align: "end", sideOffset: 8, collisionPadding: 12, children: /* @__PURE__ */ jsxs4(NavScope, { className: "as-nav-popover as-nav-summary-popover as-nav-activity-popover", children: [
|
|
7434
|
+
/* @__PURE__ */ jsx21(Label2, { className: "as-nav-activity-title", children: "Sources & outputs" }),
|
|
7435
|
+
subagents.length ? /* @__PURE__ */ jsxs4(Fragment8, { children: [
|
|
7436
|
+
/* @__PURE__ */ jsxs4("section", { className: "as-nav-activity-section", "aria-label": "Subagents", children: [
|
|
7437
|
+
/* @__PURE__ */ jsxs4("div", { className: "as-nav-activity-section-head", children: [
|
|
7438
|
+
/* @__PURE__ */ jsx21("span", { children: "Subagents" }),
|
|
7439
|
+
/* @__PURE__ */ jsxs4("small", { children: [
|
|
7440
|
+
subagents.length,
|
|
7441
|
+
" used"
|
|
7442
|
+
] })
|
|
7443
|
+
] }),
|
|
7444
|
+
(expandedGroups.subagents ? subagents : subagents.slice(0, 5)).map((agent) => /* @__PURE__ */ jsx21(Item22, { asChild: true, children: /* @__PURE__ */ jsxs4("button", { type: "button", className: "as-nav-activity-item", disabled: !agent.onSelect, onClick: agent.onSelect, children: [
|
|
7445
|
+
/* @__PURE__ */ jsx21(Users, { size: 16, "aria-hidden": "true" }),
|
|
7446
|
+
/* @__PURE__ */ jsx21("span", { className: "as-nav-activity-item__title", children: agent.label }),
|
|
7447
|
+
agent.status ? /* @__PURE__ */ jsx21("small", { children: agent.status }) : null
|
|
7448
|
+
] }) }, agent.id)),
|
|
7449
|
+
more("subagents", subagents.length)
|
|
7450
|
+
] }),
|
|
7451
|
+
/* @__PURE__ */ jsx21(Separator2, { className: "as-nav-menu-separator" })
|
|
7452
|
+
] }) : null,
|
|
7453
|
+
section("Outputs", outputs, "outputs", data.pinnedSummary?.outputActions, data.pinnedSummary?.onAddOutput),
|
|
7454
|
+
/* @__PURE__ */ jsx21(Separator2, { className: "as-nav-menu-separator" }),
|
|
7455
|
+
section("Sources", sources, "sources", data.pinnedSummary?.sourceActions, data.pinnedSummary?.onAddSource)
|
|
7456
|
+
] }) }) })
|
|
7457
|
+
] });
|
|
7458
|
+
}
|
|
7459
|
+
function PinnedSummaryIcon() {
|
|
7460
|
+
return /* @__PURE__ */ jsxs4("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
7461
|
+
/* @__PURE__ */ jsx21("rect", { width: "7", height: "7", x: "3", y: "3", rx: "1" }),
|
|
7462
|
+
/* @__PURE__ */ jsx21("rect", { width: "7", height: "7", x: "3", y: "14", rx: "1" }),
|
|
7463
|
+
/* @__PURE__ */ jsx21("path", { d: "M14 4h7" }),
|
|
7464
|
+
/* @__PURE__ */ jsx21("path", { d: "M14 9h7" }),
|
|
7465
|
+
/* @__PURE__ */ jsx21("path", { d: "M14 15h7" }),
|
|
7466
|
+
/* @__PURE__ */ jsx21("path", { d: "M14 20h7" })
|
|
7467
|
+
] });
|
|
7468
|
+
}
|
|
7469
|
+
function NavShareIcon() {
|
|
7470
|
+
return /* @__PURE__ */ jsxs4("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
7471
|
+
/* @__PURE__ */ jsx21("path", { d: "M12 2v13" }),
|
|
7472
|
+
/* @__PURE__ */ jsx21("path", { d: "m16 6-4-4-4 4" }),
|
|
7473
|
+
/* @__PURE__ */ jsx21("path", { d: "M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8" })
|
|
7474
|
+
] });
|
|
6940
7475
|
}
|
|
6941
7476
|
function NavConversationActions() {
|
|
6942
7477
|
const { data } = useNav();
|
|
6943
|
-
|
|
7478
|
+
const [renaming, setRenaming] = useState20(false);
|
|
7479
|
+
const [deleting, setDeleting] = useState20(false);
|
|
7480
|
+
const conversation = data.conversation;
|
|
7481
|
+
useEffect20(() => {
|
|
7482
|
+
setRenaming(false);
|
|
7483
|
+
setDeleting(false);
|
|
7484
|
+
}, [conversation?.id]);
|
|
7485
|
+
if (!conversation) return null;
|
|
7486
|
+
const extras = data.getConversationActions?.(conversation) ?? data.conversationActions ?? [];
|
|
7487
|
+
const actions = [];
|
|
7488
|
+
const add = (action) => {
|
|
7489
|
+
if (!actions.some((item) => item.id === action.id)) actions.push(action);
|
|
7490
|
+
};
|
|
7491
|
+
if (data.onRenameConversation) add({ id: "rename", label: "Rename", icon: /* @__PURE__ */ jsx21(Pencil, {}), onSelect: () => setRenaming(true) });
|
|
7492
|
+
if (data.onPinConversation) add({ id: "pin", label: conversation.pinned ? "Unpin" : "Pin", icon: /* @__PURE__ */ jsx21(Pin, {}), onSelect: () => data.onPinConversation?.(conversation.id) });
|
|
7493
|
+
extras.forEach((action, index2) => add({ ...action, separatorBefore: action.separatorBefore || index2 === 0 && actions.length > 0 }));
|
|
7494
|
+
if (data.onArchiveConversation) add({ id: "archive", label: "Archive", icon: /* @__PURE__ */ jsx21(Archive, {}), separatorBefore: true, onSelect: () => data.onArchiveConversation?.(conversation.id) });
|
|
7495
|
+
else if (data.onDeleteConversation) add({ id: "archive", label: "Archive (save to account first)", icon: /* @__PURE__ */ jsx21(Archive, {}), separatorBefore: true, disabled: true });
|
|
7496
|
+
if (data.onDeleteConversation) add({ id: "delete", label: "Delete", icon: /* @__PURE__ */ jsx21(Trash2, {}), destructive: true, separatorBefore: !data.onArchiveConversation && !actions.some((item) => item.id === "archive"), onSelect: () => setDeleting(true) });
|
|
7497
|
+
if (data.onAssignConversationToProject && data.projects?.length) add({
|
|
7498
|
+
id: "project",
|
|
7499
|
+
label: "Move to project",
|
|
7500
|
+
icon: /* @__PURE__ */ jsx21(Folder, {}),
|
|
7501
|
+
separatorBefore: true,
|
|
7502
|
+
children: [
|
|
7503
|
+
...data.projects.map((project) => ({ id: "project-" + project.id, label: project.name, onSelect: () => data.onAssignConversationToProject?.(conversation.id, project.id) })),
|
|
7504
|
+
...conversation.projectId ? [{ id: "project-clear", label: "Remove from project", separatorBefore: true, onSelect: () => data.onAssignConversationToProject?.(conversation.id, null) }] : []
|
|
7505
|
+
]
|
|
7506
|
+
});
|
|
7507
|
+
return /* @__PURE__ */ jsxs4(Fragment8, { children: [
|
|
7508
|
+
/* @__PURE__ */ jsx21(NavOverflowMenu, { id: "active-conversation-actions", label: "Conversation options", actions }),
|
|
7509
|
+
data.onRenameConversation ? /* @__PURE__ */ jsx21(RenameDialog, { open: renaming, onOpenChange: setRenaming, title: "Rename conversation", value: conversation.title, onSave: (title) => data.onRenameConversation?.(conversation.id, title) }) : null,
|
|
7510
|
+
data.onDeleteConversation ? /* @__PURE__ */ jsx21(ConfirmDeleteDialog, { open: deleting, onOpenChange: setDeleting, title: conversation.title, onConfirm: () => data.onDeleteConversation?.(conversation.id) }) : null
|
|
7511
|
+
] });
|
|
6944
7512
|
}
|
|
6945
7513
|
function NavShareButton() {
|
|
6946
7514
|
const { data } = useNav();
|
|
6947
7515
|
if (!data.onShare) return null;
|
|
6948
|
-
return /* @__PURE__ */
|
|
6949
|
-
/* @__PURE__ */ jsx21(
|
|
7516
|
+
return /* @__PURE__ */ jsxs4("button", { type: "button", className: "as-nav-button", onClick: data.onShare, "aria-label": "Create a public link", title: "Create a public link", children: [
|
|
7517
|
+
/* @__PURE__ */ jsx21(NavShareIcon, {}),
|
|
6950
7518
|
/* @__PURE__ */ jsx21("span", { className: "as-nav-share-label", children: "Share" })
|
|
6951
7519
|
] });
|
|
6952
7520
|
}
|
|
@@ -6959,9 +7527,9 @@ function NavAccountSwitcher({ accounts, activeAccountId, onAccountChange, expand
|
|
|
6959
7527
|
...options2.filter((item) => item.id !== account?.id).map((item) => ({ id: item.id, label: item.name, disabled: !change, onSelect: () => change?.(item.id) })),
|
|
6960
7528
|
...data.accountActions ?? []
|
|
6961
7529
|
];
|
|
6962
|
-
return /* @__PURE__ */ jsx21("div", { className: cx("as-nav-account", expanded && "as-nav-account--expanded"), children: /* @__PURE__ */
|
|
7530
|
+
return /* @__PURE__ */ jsx21("div", { className: cx("as-nav-account", expanded && "as-nav-account--expanded"), children: /* @__PURE__ */ jsxs4(NavOverflowMenu, { label: account?.name ?? "Account", actions, align: "start", children: [
|
|
6963
7531
|
/* @__PURE__ */ jsx21("span", { className: "as-nav-avatar", children: account?.avatar ? /* @__PURE__ */ jsx21("img", { src: account.avatar, alt: "" }) : /* @__PURE__ */ jsx21(User, {}) }),
|
|
6964
|
-
expanded ? /* @__PURE__ */
|
|
7532
|
+
expanded ? /* @__PURE__ */ jsxs4("span", { className: "as-nav-account-copy", children: [
|
|
6965
7533
|
/* @__PURE__ */ jsx21("strong", { children: account?.name ?? "Account" }),
|
|
6966
7534
|
account?.plan ? /* @__PURE__ */ jsx21("small", { children: account.plan }) : null
|
|
6967
7535
|
] }) : null,
|
|
@@ -6982,17 +7550,17 @@ function NavTopbar({
|
|
|
6982
7550
|
showNavigationTrigger = true,
|
|
6983
7551
|
showAccount = false
|
|
6984
7552
|
}) {
|
|
6985
|
-
return /* @__PURE__ */ jsx21(NavScope, { className: cx("as-nav-topbar", startup && "as-nav-topbar--startup", className), children: children ?? /* @__PURE__ */
|
|
6986
|
-
/* @__PURE__ */
|
|
6987
|
-
showNavigationTrigger ? /* @__PURE__ */ jsx21(
|
|
7553
|
+
return /* @__PURE__ */ jsx21(NavScope, { className: cx("as-nav-topbar", startup && "as-nav-topbar--startup", className), children: children ?? /* @__PURE__ */ jsxs4(Fragment8, { children: [
|
|
7554
|
+
/* @__PURE__ */ jsxs4("div", { className: "as-nav-topbar-leading", children: [
|
|
7555
|
+
showNavigationTrigger ? /* @__PURE__ */ jsx21(NavTrigger, { "aria-label": "Toggle sidebar" }) : null,
|
|
6988
7556
|
!startup ? contextSlot ?? /* @__PURE__ */ jsx21(NavProjectContext, {}) : null
|
|
6989
7557
|
] }),
|
|
6990
7558
|
startup ? /* @__PURE__ */ jsx21("div", { className: "as-nav-topbar-center", children: modeSlot ?? /* @__PURE__ */ jsx21(NavModeSwitcher, {}) }) : modeSlot,
|
|
6991
7559
|
/* @__PURE__ */ jsx21(NavTopbarSpacer, {}),
|
|
6992
|
-
/* @__PURE__ */
|
|
6993
|
-
!startup ? /* @__PURE__ */
|
|
6994
|
-
/* @__PURE__ */ jsx21(NavShareButton, {}),
|
|
7560
|
+
/* @__PURE__ */ jsxs4("div", { className: "as-nav-topbar-actions", children: [
|
|
7561
|
+
!startup ? /* @__PURE__ */ jsxs4(Fragment8, { children: [
|
|
6995
7562
|
/* @__PURE__ */ jsx21(NavConversationActions, {}),
|
|
7563
|
+
/* @__PURE__ */ jsx21(NavShareButton, {}),
|
|
6996
7564
|
/* @__PURE__ */ jsx21(NavPinnedSummary, {})
|
|
6997
7565
|
] }) : null,
|
|
6998
7566
|
rightSlot,
|
|
@@ -7003,16 +7571,19 @@ function NavTopbar({
|
|
|
7003
7571
|
function RenameDialog({ open, onOpenChange, title, value, onSave }) {
|
|
7004
7572
|
const { theme } = useNav();
|
|
7005
7573
|
const [draft, setDraft] = useState20(value);
|
|
7574
|
+
useEffect20(() => {
|
|
7575
|
+
if (open) setDraft(value);
|
|
7576
|
+
}, [open, value]);
|
|
7006
7577
|
const style = useNavStyle();
|
|
7007
7578
|
return /* @__PURE__ */ jsx21(Dialog, { open, onOpenChange: (next) => {
|
|
7008
7579
|
if (next) setDraft(value);
|
|
7009
7580
|
onOpenChange(next);
|
|
7010
|
-
}, children: /* @__PURE__ */
|
|
7581
|
+
}, children: /* @__PURE__ */ jsxs4(DialogPortal, { children: [
|
|
7011
7582
|
/* @__PURE__ */ jsx21(DialogOverlay, { className: "as-nav-dialog-overlay" }),
|
|
7012
|
-
/* @__PURE__ */
|
|
7583
|
+
/* @__PURE__ */ jsxs4(DialogContent, { "data-nav-theme": theme, style, className: "as-nav-scope as-nav-dialog", children: [
|
|
7013
7584
|
/* @__PURE__ */ jsx21(DialogTitle, { children: title }),
|
|
7014
7585
|
/* @__PURE__ */ jsx21(DialogDescription, { children: "Choose a clear name." }),
|
|
7015
|
-
/* @__PURE__ */
|
|
7586
|
+
/* @__PURE__ */ jsxs4("form", { onSubmit: (event) => {
|
|
7016
7587
|
event.preventDefault();
|
|
7017
7588
|
if (draft.trim()) {
|
|
7018
7589
|
onSave(draft.trim());
|
|
@@ -7020,7 +7591,7 @@ function RenameDialog({ open, onOpenChange, title, value, onSave }) {
|
|
|
7020
7591
|
}
|
|
7021
7592
|
}, children: [
|
|
7022
7593
|
/* @__PURE__ */ jsx21("input", { autoFocus: true, "aria-label": title, value: draft, onChange: (event) => setDraft(event.target.value), maxLength: 200 }),
|
|
7023
|
-
/* @__PURE__ */
|
|
7594
|
+
/* @__PURE__ */ jsxs4("div", { className: "as-nav-dialog-actions", children: [
|
|
7024
7595
|
/* @__PURE__ */ jsx21(DialogClose, { asChild: true, children: /* @__PURE__ */ jsx21("button", { type: "button", className: "as-nav-button", children: "Cancel" }) }),
|
|
7025
7596
|
/* @__PURE__ */ jsx21("button", { type: "submit", className: "as-nav-button", disabled: !draft.trim(), children: "Save" })
|
|
7026
7597
|
] })
|
|
@@ -7028,6 +7599,28 @@ function RenameDialog({ open, onOpenChange, title, value, onSave }) {
|
|
|
7028
7599
|
] })
|
|
7029
7600
|
] }) });
|
|
7030
7601
|
}
|
|
7602
|
+
function ConfirmDeleteDialog({ open, onOpenChange, title, onConfirm }) {
|
|
7603
|
+
const { theme } = useNav();
|
|
7604
|
+
const style = useNavStyle();
|
|
7605
|
+
return /* @__PURE__ */ jsx21(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs4(DialogPortal, { children: [
|
|
7606
|
+
/* @__PURE__ */ jsx21(DialogOverlay, { className: "as-nav-dialog-overlay" }),
|
|
7607
|
+
/* @__PURE__ */ jsxs4(DialogContent, { "data-nav-theme": theme, style, className: "as-nav-scope as-nav-dialog", children: [
|
|
7608
|
+
/* @__PURE__ */ jsx21(DialogTitle, { children: "Delete conversation?" }),
|
|
7609
|
+
/* @__PURE__ */ jsxs4(DialogDescription, { children: [
|
|
7610
|
+
"Delete \u201C",
|
|
7611
|
+
title,
|
|
7612
|
+
"\u201D? This cannot be undone."
|
|
7613
|
+
] }),
|
|
7614
|
+
/* @__PURE__ */ jsxs4("div", { className: "as-nav-dialog-actions", children: [
|
|
7615
|
+
/* @__PURE__ */ jsx21(DialogClose, { asChild: true, children: /* @__PURE__ */ jsx21("button", { type: "button", className: "as-nav-button", children: "Cancel" }) }),
|
|
7616
|
+
/* @__PURE__ */ jsx21("button", { type: "button", className: "as-nav-button", "data-destructive": "true", onClick: () => {
|
|
7617
|
+
onConfirm();
|
|
7618
|
+
onOpenChange(false);
|
|
7619
|
+
}, children: "Delete" })
|
|
7620
|
+
] })
|
|
7621
|
+
] })
|
|
7622
|
+
] }) });
|
|
7623
|
+
}
|
|
7031
7624
|
function ConversationRow({ item }) {
|
|
7032
7625
|
const { data, close, isMobile } = useNav();
|
|
7033
7626
|
const [rename, setRename] = useState20(false);
|
|
@@ -7036,15 +7629,15 @@ function ConversationRow({ item }) {
|
|
|
7036
7629
|
...data.onPinConversation ? [{ id: "pin", label: item.pinned ? "Unpin chat" : "Pin chat", icon: /* @__PURE__ */ jsx21(Pin, {}), onSelect: () => data.onPinConversation?.(item.id) }] : [],
|
|
7037
7630
|
...data.onDeleteConversation ? [{ id: "delete", label: "Delete chat", icon: /* @__PURE__ */ jsx21(Trash2, {}), destructive: true, separatorBefore: true, onSelect: () => data.onDeleteConversation?.(item.id) }] : []
|
|
7038
7631
|
];
|
|
7039
|
-
return /* @__PURE__ */
|
|
7040
|
-
/* @__PURE__ */
|
|
7632
|
+
return /* @__PURE__ */ jsxs4("div", { className: "as-nav-conversation", "data-active": selected || void 0, "data-nav-item-id": item.id, children: [
|
|
7633
|
+
/* @__PURE__ */ jsxs4("button", { type: "button", className: "as-nav-conversation-link", title: item.title, "aria-current": selected ? "page" : void 0, onClick: () => {
|
|
7041
7634
|
data.onSelectConversation?.(item.id);
|
|
7042
7635
|
if (isMobile) close();
|
|
7043
7636
|
}, children: [
|
|
7044
|
-
/* @__PURE__ */ jsx21(
|
|
7637
|
+
/* @__PURE__ */ jsx21("span", { className: "as-nav-chat-dot", "aria-hidden": "true" }),
|
|
7045
7638
|
/* @__PURE__ */ jsx21("span", { children: item.title })
|
|
7046
7639
|
] }),
|
|
7047
|
-
/* @__PURE__ */
|
|
7640
|
+
/* @__PURE__ */ jsxs4("div", { className: "as-nav-row-actions", children: [
|
|
7048
7641
|
data.onRenameConversation ? /* @__PURE__ */ jsx21("button", { type: "button", className: "as-nav-button", "aria-label": `Rename ${item.title}`, title: "Rename", onClick: (event) => {
|
|
7049
7642
|
event.stopPropagation();
|
|
7050
7643
|
setRename(true);
|
|
@@ -7054,109 +7647,487 @@ function ConversationRow({ item }) {
|
|
|
7054
7647
|
data.onRenameConversation ? /* @__PURE__ */ jsx21(RenameDialog, { open: rename, onOpenChange: setRename, title: "Rename conversation", value: item.title, onSave: (title) => data.onRenameConversation?.(item.id, title) }) : null
|
|
7055
7648
|
] });
|
|
7056
7649
|
}
|
|
7057
|
-
function
|
|
7650
|
+
function PinnedResourceRow({ item }) {
|
|
7651
|
+
const { data, close, isMobile } = useNav();
|
|
7652
|
+
const Icon2 = item.kind === "image" ? FileImage : item.kind === "video" ? Film : ["design", "website", "product"].includes(item.kind) ? Palette : item.kind === "model" ? Box : item.kind === "code" ? FileCode2 : FileText;
|
|
7653
|
+
return /* @__PURE__ */ jsx21("div", { className: "as-nav-conversation", "data-nav-item-id": item.id, children: /* @__PURE__ */ jsxs4(
|
|
7654
|
+
"button",
|
|
7655
|
+
{
|
|
7656
|
+
type: "button",
|
|
7657
|
+
className: "as-nav-conversation-link",
|
|
7658
|
+
title: item.title,
|
|
7659
|
+
onClick: () => {
|
|
7660
|
+
data.onOpenResource?.(item);
|
|
7661
|
+
if (isMobile) close();
|
|
7662
|
+
},
|
|
7663
|
+
children: [
|
|
7664
|
+
/* @__PURE__ */ jsx21(Icon2, {}),
|
|
7665
|
+
/* @__PURE__ */ jsx21("span", { children: item.title })
|
|
7666
|
+
]
|
|
7667
|
+
}
|
|
7668
|
+
) });
|
|
7669
|
+
}
|
|
7670
|
+
function ProjectRow({ item, threads = [] }) {
|
|
7058
7671
|
const { data, close, isMobile } = useNav();
|
|
7059
|
-
const [expanded, setExpanded] = useState20(item.id === data.project?.id);
|
|
7060
7672
|
const [rename, setRename] = useState20(false);
|
|
7673
|
+
const selected = item.id === data.project?.id;
|
|
7674
|
+
const [expanded, setExpanded] = useState20(item.id === data.conversation?.projectId);
|
|
7675
|
+
useEffect20(() => {
|
|
7676
|
+
if (item.id === data.conversation?.projectId) setExpanded(true);
|
|
7677
|
+
}, [item.id, data.conversation?.projectId]);
|
|
7061
7678
|
const actions = data.getProjectActions?.(item) ?? [
|
|
7062
7679
|
...data.onPinProject ? [{ id: "pin", label: item.pinned ? "Unpin project" : "Pin project", icon: /* @__PURE__ */ jsx21(Pin, {}), onSelect: () => data.onPinProject?.(item.id) }] : [],
|
|
7063
7680
|
...data.onDeleteProject ? [{ id: "delete", label: "Delete project", icon: /* @__PURE__ */ jsx21(Trash2, {}), destructive: true, separatorBefore: true, onSelect: () => data.onDeleteProject?.(item.id) }] : []
|
|
7064
7681
|
];
|
|
7065
|
-
return /* @__PURE__ */
|
|
7066
|
-
/* @__PURE__ */
|
|
7067
|
-
/* @__PURE__ */
|
|
7068
|
-
|
|
7069
|
-
|
|
7070
|
-
|
|
7071
|
-
|
|
7072
|
-
|
|
7073
|
-
|
|
7074
|
-
|
|
7682
|
+
return /* @__PURE__ */ jsxs4("div", { className: "as-nav-project", "data-active": selected || void 0, "data-nav-item-id": item.id, children: [
|
|
7683
|
+
/* @__PURE__ */ jsxs4("div", { className: "as-nav-project-row", children: [
|
|
7684
|
+
/* @__PURE__ */ jsxs4(
|
|
7685
|
+
"button",
|
|
7686
|
+
{
|
|
7687
|
+
type: "button",
|
|
7688
|
+
className: "as-nav-project-toggle",
|
|
7689
|
+
title: item.name,
|
|
7690
|
+
"aria-current": selected ? "page" : void 0,
|
|
7691
|
+
onClick: () => {
|
|
7692
|
+
data.onSelectProject?.(item.id);
|
|
7693
|
+
if (isMobile) close();
|
|
7694
|
+
},
|
|
7695
|
+
children: [
|
|
7696
|
+
/* @__PURE__ */ jsx21(Folder, {}),
|
|
7697
|
+
/* @__PURE__ */ jsx21("span", { children: item.name })
|
|
7698
|
+
]
|
|
7699
|
+
}
|
|
7700
|
+
),
|
|
7701
|
+
/* @__PURE__ */ jsxs4("div", { className: "as-nav-row-actions", children: [
|
|
7702
|
+
threads.length ? /* @__PURE__ */ jsx21(
|
|
7703
|
+
"button",
|
|
7704
|
+
{
|
|
7705
|
+
type: "button",
|
|
7706
|
+
className: "as-nav-button as-nav-project-disclose",
|
|
7707
|
+
"aria-label": (expanded ? "Collapse " : "Expand ") + item.name + " conversations",
|
|
7708
|
+
"aria-expanded": expanded,
|
|
7709
|
+
onClick: () => setExpanded((value) => !value),
|
|
7710
|
+
children: /* @__PURE__ */ jsx21(ChevronDown, { "aria-hidden": "true", "data-expanded": expanded })
|
|
7711
|
+
}
|
|
7712
|
+
) : null,
|
|
7713
|
+
data.onRenameProject ? /* @__PURE__ */ jsx21("button", { type: "button", className: "as-nav-button", "aria-label": "Rename " + item.name, title: "Rename", onClick: () => setRename(true), children: /* @__PURE__ */ jsx21(Pencil, {}) }) : null,
|
|
7714
|
+
actions.length ? /* @__PURE__ */ jsx21(NavOverflowMenu, { id: "project-" + item.id, label: item.name + " options", actions }) : null
|
|
7075
7715
|
] })
|
|
7076
7716
|
] }),
|
|
7077
|
-
expanded ? /* @__PURE__ */
|
|
7078
|
-
conversations.filter((conversation) => conversation.projectId === item.id && !conversation.pinned).map((conversation) => /* @__PURE__ */ jsx21(ConversationRow, { item: conversation }, conversation.id)),
|
|
7079
|
-
data.onSelectProject ? /* @__PURE__ */ jsx21("button", { className: "as-nav-project-home", type: "button", onClick: () => {
|
|
7080
|
-
data.onSelectProject?.(item.id);
|
|
7081
|
-
if (isMobile) close();
|
|
7082
|
-
}, children: "Open project" }) : null
|
|
7083
|
-
] }) : null,
|
|
7717
|
+
expanded && threads.length ? /* @__PURE__ */ jsx21("div", { className: "as-nav-project-threads", "aria-label": item.name + " conversations", children: threads.map((thread) => /* @__PURE__ */ jsx21(ConversationRow, { item: thread }, thread.id)) }) : null,
|
|
7084
7718
|
data.onRenameProject ? /* @__PURE__ */ jsx21(RenameDialog, { open: rename, onOpenChange: setRename, title: "Rename project", value: item.name, onSave: (name) => data.onRenameProject?.(item.id, name) }) : null
|
|
7085
7719
|
] });
|
|
7086
7720
|
}
|
|
7721
|
+
function NavIconAction({ label, children, ...props }) {
|
|
7722
|
+
const id = useId3();
|
|
7723
|
+
return /* @__PURE__ */ jsxs4("span", { className: "as-nav-icon-action", children: [
|
|
7724
|
+
/* @__PURE__ */ jsx21("button", { "aria-label": label, ...props, type: "button", "aria-describedby": id, children }),
|
|
7725
|
+
/* @__PURE__ */ jsx21("span", { id, role: "tooltip", className: "as-nav-icon-help", children: label })
|
|
7726
|
+
] });
|
|
7727
|
+
}
|
|
7728
|
+
function DestinationRow({ item, depth = 0 }) {
|
|
7729
|
+
const { data, close, isMobile, open, setOpen, storageKey } = useNav();
|
|
7730
|
+
const active = navDestinationActive(item);
|
|
7731
|
+
const [expanded, setExpanded] = useState20(active);
|
|
7732
|
+
useEffect20(() => {
|
|
7733
|
+
if (active) {
|
|
7734
|
+
setExpanded(true);
|
|
7735
|
+
return;
|
|
7736
|
+
}
|
|
7737
|
+
if (!storageKey) return;
|
|
7738
|
+
try {
|
|
7739
|
+
setExpanded(JSON.parse(localStorage.getItem(storageKey + ":groups") ?? "{}")[item.id] === true);
|
|
7740
|
+
} catch {
|
|
7741
|
+
}
|
|
7742
|
+
}, [active, storageKey, item.id]);
|
|
7743
|
+
const toggle = () => {
|
|
7744
|
+
if (!open && !isMobile) setOpen(true);
|
|
7745
|
+
setExpanded((current) => {
|
|
7746
|
+
const next = !current;
|
|
7747
|
+
if (storageKey) try {
|
|
7748
|
+
const saved = JSON.parse(localStorage.getItem(storageKey + ":groups") ?? "{}");
|
|
7749
|
+
localStorage.setItem(storageKey + ":groups", JSON.stringify({ ...saved, [item.id]: next }));
|
|
7750
|
+
} catch {
|
|
7751
|
+
}
|
|
7752
|
+
return next;
|
|
7753
|
+
});
|
|
7754
|
+
};
|
|
7755
|
+
const navigate = (event) => {
|
|
7756
|
+
if (item.href && (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || event.button !== 0)) return;
|
|
7757
|
+
if (item.onSelect) {
|
|
7758
|
+
event.preventDefault();
|
|
7759
|
+
item.onSelect();
|
|
7760
|
+
} else if (item.href && data.onNavigate) {
|
|
7761
|
+
event.preventDefault();
|
|
7762
|
+
data.onNavigate(item.href);
|
|
7763
|
+
}
|
|
7764
|
+
if (isMobile) close();
|
|
7765
|
+
};
|
|
7766
|
+
const rowClass = depth ? "as-nav-submenu-link" : "as-nav-destination";
|
|
7767
|
+
const action = item.action ? /* @__PURE__ */ jsx21(
|
|
7768
|
+
NavIconAction,
|
|
7769
|
+
{
|
|
7770
|
+
className: "as-nav-button as-nav-destination-action",
|
|
7771
|
+
label: item.action.label,
|
|
7772
|
+
disabled: item.action.disabled,
|
|
7773
|
+
onClick: (event) => {
|
|
7774
|
+
event.stopPropagation();
|
|
7775
|
+
item.action?.onSelect();
|
|
7776
|
+
if (isMobile) close();
|
|
7777
|
+
},
|
|
7778
|
+
children: /* @__PURE__ */ jsx21(Plus, { "aria-hidden": "true" })
|
|
7779
|
+
}
|
|
7780
|
+
) : null;
|
|
7781
|
+
if (item.children?.length) return /* @__PURE__ */ jsxs4("div", { className: "as-nav-destination-group", children: [
|
|
7782
|
+
item.href ? /* @__PURE__ */ jsxs4("div", { className: "as-nav-parent-row", "data-active": active || void 0, children: [
|
|
7783
|
+
/* @__PURE__ */ jsxs4("a", { className: rowClass, href: item.href, title: item.label, "aria-label": item.label, "aria-current": item.active ? "page" : void 0, "data-active": item.active || void 0, onClick: navigate, children: [
|
|
7784
|
+
item.icon,
|
|
7785
|
+
/* @__PURE__ */ jsx21("span", { children: item.label })
|
|
7786
|
+
] }),
|
|
7787
|
+
action,
|
|
7788
|
+
/* @__PURE__ */ jsx21(NavIconAction, { className: "as-nav-button as-nav-branch-toggle", label: (expanded ? "Collapse " : "Expand ") + item.label, "aria-expanded": expanded, "aria-controls": "as-nav-submenu-" + item.id, onClick: toggle, children: /* @__PURE__ */ jsx21(ChevronDown, { "aria-hidden": "true", className: "as-nav-destination-chevron" }) })
|
|
7789
|
+
] }) : /* @__PURE__ */ jsxs4("div", { className: "as-nav-parent-row", "data-active": active || void 0, children: [
|
|
7790
|
+
/* @__PURE__ */ jsxs4("button", { type: "button", className: rowClass, title: item.label, "aria-label": (expanded ? "Collapse " : "Expand ") + item.label, "data-active": active || void 0, "aria-expanded": expanded, "aria-controls": "as-nav-submenu-" + item.id, onClick: toggle, children: [
|
|
7791
|
+
item.icon,
|
|
7792
|
+
/* @__PURE__ */ jsx21("span", { children: item.label }),
|
|
7793
|
+
/* @__PURE__ */ jsx21(ChevronDown, { "aria-hidden": "true", className: "as-nav-destination-chevron" })
|
|
7794
|
+
] }),
|
|
7795
|
+
action
|
|
7796
|
+
] }),
|
|
7797
|
+
expanded ? /* @__PURE__ */ jsx21("div", { className: "as-nav-submenu", role: "group", "aria-label": item.label + " pages", id: "as-nav-submenu-" + item.id, children: item.children.map((child) => /* @__PURE__ */ jsx21(DestinationRow, { item: child, depth: depth + 1 }, child.id)) }) : null
|
|
7798
|
+
] });
|
|
7799
|
+
const props = { className: rowClass, title: item.label, "aria-label": item.label, "data-active": item.active || void 0, "aria-current": item.active ? "page" : void 0 };
|
|
7800
|
+
const destination = item.href ? /* @__PURE__ */ jsxs4("a", { ...props, href: item.href, onClick: navigate, children: [
|
|
7801
|
+
item.icon,
|
|
7802
|
+
/* @__PURE__ */ jsx21("span", { children: item.label })
|
|
7803
|
+
] }) : /* @__PURE__ */ jsxs4("button", { ...props, type: "button", disabled: !item.onSelect, onClick: navigate, children: [
|
|
7804
|
+
item.icon,
|
|
7805
|
+
/* @__PURE__ */ jsx21("span", { children: item.label })
|
|
7806
|
+
] });
|
|
7807
|
+
return action ? /* @__PURE__ */ jsxs4("div", { className: "as-nav-parent-row", "data-active": active || void 0, children: [
|
|
7808
|
+
destination,
|
|
7809
|
+
action
|
|
7810
|
+
] }) : destination;
|
|
7811
|
+
}
|
|
7812
|
+
function HistoryCollection({ id, title, items, empty, searching = false, onOpen }) {
|
|
7813
|
+
const { storageKey } = useNav();
|
|
7814
|
+
const [expanded, setExpanded] = useState20(id === "projects");
|
|
7815
|
+
const [more, setMore] = useState20(false);
|
|
7816
|
+
useEffect20(() => {
|
|
7817
|
+
if (!storageKey) return;
|
|
7818
|
+
try {
|
|
7819
|
+
setExpanded(JSON.parse(localStorage.getItem(storageKey + ":collections-v2") || "{}")[id] ?? id === "projects");
|
|
7820
|
+
} catch {
|
|
7821
|
+
}
|
|
7822
|
+
}, [storageKey, id]);
|
|
7823
|
+
const toggle = () => setExpanded((value) => {
|
|
7824
|
+
const next = !value;
|
|
7825
|
+
if (storageKey) try {
|
|
7826
|
+
const saved = JSON.parse(localStorage.getItem(storageKey + ":collections-v2") || "{}");
|
|
7827
|
+
localStorage.setItem(storageKey + ":collections-v2", JSON.stringify({ ...saved, [id]: next }));
|
|
7828
|
+
} catch {
|
|
7829
|
+
}
|
|
7830
|
+
return next;
|
|
7831
|
+
});
|
|
7832
|
+
const shown = searching || expanded;
|
|
7833
|
+
return /* @__PURE__ */ jsxs4("section", { "aria-label": title, children: [
|
|
7834
|
+
/* @__PURE__ */ jsxs4("h2", { className: "as-nav-collection-heading", children: [
|
|
7835
|
+
/* @__PURE__ */ jsxs4("button", { type: "button", className: "as-nav-collection-toggle", "aria-expanded": shown, onClick: toggle, children: [
|
|
7836
|
+
title,
|
|
7837
|
+
/* @__PURE__ */ jsx21(ChevronDown, { "data-expanded": shown })
|
|
7838
|
+
] }),
|
|
7839
|
+
onOpen ? /* @__PURE__ */ jsx21("button", { type: "button", className: "as-nav-collection-open", "aria-label": "Open " + title, title: "Open " + title, onClick: onOpen, children: /* @__PURE__ */ jsx21(FolderOpen, { "aria-hidden": "true" }) }) : null
|
|
7840
|
+
] }),
|
|
7841
|
+
shown ? /* @__PURE__ */ jsxs4(Fragment8, { children: [
|
|
7842
|
+
items.length ? more || searching ? items : items.slice(0, id === "recent" ? 20 : 6) : /* @__PURE__ */ jsx21("p", { className: "as-nav-empty", children: empty }),
|
|
7843
|
+
items.length > (id === "recent" ? 20 : 6) && !searching ? /* @__PURE__ */ jsx21("button", { type: "button", className: "as-nav-collection-more", onClick: () => setMore((value) => !value), children: more ? "Show less" : "Show more" }) : null
|
|
7844
|
+
] }) : null
|
|
7845
|
+
] });
|
|
7846
|
+
}
|
|
7087
7847
|
function SidenavContents() {
|
|
7088
|
-
const { data, close, isMobile } = useNav();
|
|
7848
|
+
const { data, close, isMobile, open, setOpen } = useNav();
|
|
7089
7849
|
const [query, setQuery] = useState20("");
|
|
7850
|
+
const [searchOpen, setSearchOpen] = useState20(false);
|
|
7851
|
+
const searchRef = useRef18(null);
|
|
7852
|
+
useEffect20(() => {
|
|
7853
|
+
if (searchOpen) searchRef.current?.focus();
|
|
7854
|
+
}, [searchOpen]);
|
|
7090
7855
|
const normalized = query.trim().toLowerCase();
|
|
7091
7856
|
const conversations = (data.conversations ?? []).filter((item) => !normalized || item.title.toLowerCase().includes(normalized));
|
|
7092
7857
|
const projects = (data.projects ?? []).filter((item) => !normalized || item.name.toLowerCase().includes(normalized) || conversations.some((conversation) => conversation.projectId === item.id));
|
|
7093
7858
|
const pinnedConversations = conversations.filter((item) => item.pinned);
|
|
7094
7859
|
const pinnedProjects = projects.filter((item) => item.pinned);
|
|
7095
|
-
const
|
|
7096
|
-
|
|
7097
|
-
|
|
7098
|
-
|
|
7099
|
-
|
|
7100
|
-
|
|
7101
|
-
|
|
7102
|
-
|
|
7103
|
-
|
|
7104
|
-
|
|
7105
|
-
|
|
7106
|
-
|
|
7107
|
-
|
|
7108
|
-
|
|
7109
|
-
|
|
7110
|
-
|
|
7111
|
-
|
|
7112
|
-
|
|
7113
|
-
|
|
7860
|
+
const unpinnedProjects = projects.filter((item) => !item.pinned);
|
|
7861
|
+
const recent = conversations.filter((item) => !item.pinned && (!item.projectId || !(data.projects ?? []).some((project) => project.id === item.projectId))).sort((a, b) => (b.updatedAt ?? 0) - (a.updatedAt ?? 0));
|
|
7862
|
+
const projectThreads = (id) => conversations.filter((item) => item.projectId === id && !item.pinned).sort((a, b) => (b.updatedAt ?? 0) - (a.updatedAt ?? 0));
|
|
7863
|
+
const newConversation = data.onCreateConversation ? /* @__PURE__ */ jsxs4("button", { type: "button", className: "as-nav-destination", title: "New chat", "aria-label": "New chat", onClick: () => {
|
|
7864
|
+
data.onCreateConversation?.();
|
|
7865
|
+
if (isMobile) close();
|
|
7866
|
+
}, children: [
|
|
7867
|
+
/* @__PURE__ */ jsx21(Plus, {}),
|
|
7868
|
+
/* @__PURE__ */ jsx21("span", { children: "New chat" })
|
|
7869
|
+
] }) : null;
|
|
7870
|
+
const insertAfter = data.destinations?.some((item) => item.id === data.newConversationAfter) ? data.newConversationAfter : void 0;
|
|
7871
|
+
return /* @__PURE__ */ jsxs4(Fragment8, { children: [
|
|
7872
|
+
data.showSidebarHeader !== false || isMobile ? /* @__PURE__ */ jsxs4("div", { className: "as-nav-sidenav-head", children: [
|
|
7873
|
+
/* @__PURE__ */ jsx21(NavTopbarLogo, { toggle: true }),
|
|
7874
|
+
/* @__PURE__ */ jsx21("span", { className: "as-nav-current-app", title: data.brand?.name, children: data.brand?.name ?? "InnerAnimalMedia" }),
|
|
7875
|
+
data.showHistory !== false ? /* @__PURE__ */ jsx21(
|
|
7876
|
+
"button",
|
|
7877
|
+
{
|
|
7878
|
+
type: "button",
|
|
7879
|
+
className: "as-nav-button as-nav-search-launch",
|
|
7880
|
+
"aria-label": "Search projects and conversations",
|
|
7881
|
+
"aria-expanded": searchOpen,
|
|
7882
|
+
onClick: () => {
|
|
7883
|
+
if (!open && !isMobile) setOpen(true);
|
|
7884
|
+
setSearchOpen((value) => !value);
|
|
7885
|
+
if (searchOpen) setQuery("");
|
|
7886
|
+
},
|
|
7887
|
+
children: /* @__PURE__ */ jsx21(Search, { "aria-hidden": "true" })
|
|
7888
|
+
}
|
|
7889
|
+
) : null
|
|
7890
|
+
] }) : null,
|
|
7891
|
+
/* @__PURE__ */ jsxs4("div", { className: "as-nav-sidenav-main", children: [
|
|
7892
|
+
data.showHistory !== false && searchOpen ? /* @__PURE__ */ jsx21("div", { className: "as-nav-drawer-search as-nav-expanded-only", children: /* @__PURE__ */ jsxs4("label", { className: "as-nav-search", children: [
|
|
7893
|
+
/* @__PURE__ */ jsx21(Search, { "aria-hidden": "true" }),
|
|
7894
|
+
/* @__PURE__ */ jsx21(
|
|
7895
|
+
"input",
|
|
7896
|
+
{
|
|
7897
|
+
ref: searchRef,
|
|
7898
|
+
"aria-label": "Filter projects and conversations",
|
|
7899
|
+
placeholder: "Find a chat or project",
|
|
7900
|
+
value: query,
|
|
7901
|
+
onChange: (event) => setQuery(event.target.value),
|
|
7902
|
+
onKeyDown: (event) => {
|
|
7903
|
+
if (event.key === "Escape") {
|
|
7904
|
+
event.stopPropagation();
|
|
7905
|
+
setSearchOpen(false);
|
|
7906
|
+
setQuery("");
|
|
7907
|
+
}
|
|
7908
|
+
}
|
|
7909
|
+
}
|
|
7910
|
+
)
|
|
7911
|
+
] }) }) : null,
|
|
7912
|
+
/* @__PURE__ */ jsxs4("div", { className: "as-nav-destinations", children: [
|
|
7913
|
+
!insertAfter ? newConversation : null,
|
|
7914
|
+
(data.destinations ?? []).map((item) => /* @__PURE__ */ jsxs4(Fragment7, { children: [
|
|
7915
|
+
/* @__PURE__ */ jsx21(DestinationRow, { item }),
|
|
7916
|
+
item.id === insertAfter ? newConversation : null
|
|
7114
7917
|
] }, item.id))
|
|
7115
7918
|
] }),
|
|
7116
|
-
/* @__PURE__ */
|
|
7117
|
-
/* @__PURE__ */
|
|
7118
|
-
|
|
7119
|
-
|
|
7120
|
-
|
|
7121
|
-
|
|
7122
|
-
|
|
7123
|
-
|
|
7124
|
-
|
|
7125
|
-
|
|
7126
|
-
|
|
7127
|
-
|
|
7128
|
-
|
|
7129
|
-
|
|
7130
|
-
|
|
7131
|
-
|
|
7132
|
-
|
|
7133
|
-
|
|
7134
|
-
|
|
7135
|
-
|
|
7919
|
+
data.showHistory !== false ? /* @__PURE__ */ jsxs4("div", { className: "as-nav-expanded-only as-nav-history", children: [
|
|
7920
|
+
data.historyStatus === "error" && data.onRetryHistory ? /* @__PURE__ */ jsx21("button", { type: "button", className: "as-nav-collection-more", onClick: data.onRetryHistory, children: "Retry project list" }) : null,
|
|
7921
|
+
/* @__PURE__ */ jsx21(
|
|
7922
|
+
HistoryCollection,
|
|
7923
|
+
{
|
|
7924
|
+
id: "pinned",
|
|
7925
|
+
title: "Pinned",
|
|
7926
|
+
searching: Boolean(query),
|
|
7927
|
+
empty: query ? "No matching pinned items." : "Pin projects or conversations from their menus.",
|
|
7928
|
+
items: [...pinnedProjects.map((item) => /* @__PURE__ */ jsx21(ProjectRow, { item, threads: projectThreads(item.id) }, item.id)), ...pinnedConversations.map((item) => /* @__PURE__ */ jsx21(ConversationRow, { item }, item.id)), ...(data.pinnedResources || []).map((item) => /* @__PURE__ */ jsx21(PinnedResourceRow, { item }, item.id))]
|
|
7929
|
+
}
|
|
7930
|
+
),
|
|
7931
|
+
/* @__PURE__ */ jsx21(
|
|
7932
|
+
HistoryCollection,
|
|
7933
|
+
{
|
|
7934
|
+
id: "projects",
|
|
7935
|
+
title: "Projects",
|
|
7936
|
+
searching: Boolean(query),
|
|
7937
|
+
empty: query ? "No matching projects." : "Your projects will appear here.",
|
|
7938
|
+
onOpen: data.onNavigate ? () => {
|
|
7939
|
+
data.onNavigate?.("/admin/projects");
|
|
7940
|
+
if (isMobile) close();
|
|
7941
|
+
} : void 0,
|
|
7942
|
+
items: unpinnedProjects.map((item) => /* @__PURE__ */ jsx21(ProjectRow, { item, threads: projectThreads(item.id) }, item.id))
|
|
7943
|
+
}
|
|
7944
|
+
),
|
|
7945
|
+
/* @__PURE__ */ jsx21(
|
|
7946
|
+
HistoryCollection,
|
|
7947
|
+
{
|
|
7948
|
+
id: "recent",
|
|
7949
|
+
title: "Recents",
|
|
7950
|
+
searching: Boolean(query),
|
|
7951
|
+
empty: query ? "No matching conversations." : "Your unfiled conversations will appear here.",
|
|
7952
|
+
items: recent.slice(0, 20).map((item) => /* @__PURE__ */ jsx21(ConversationRow, { item }, item.id))
|
|
7953
|
+
}
|
|
7954
|
+
)
|
|
7955
|
+
] }) : null
|
|
7136
7956
|
] }),
|
|
7957
|
+
data.showHistory !== false && data.onNavigate ? /* @__PURE__ */ jsx21("div", { className: "as-nav-sidenav-view-all as-nav-expanded-only", children: /* @__PURE__ */ jsx21("button", { type: "button", onClick: () => {
|
|
7958
|
+
data.onNavigate?.("/chats");
|
|
7959
|
+
if (isMobile) close();
|
|
7960
|
+
}, children: "View all" }) }) : null,
|
|
7137
7961
|
/* @__PURE__ */ jsx21("div", { className: "as-nav-sidenav-foot", children: /* @__PURE__ */ jsx21(NavAccountSwitcher, { expanded: true }) })
|
|
7138
7962
|
] });
|
|
7139
7963
|
}
|
|
7140
7964
|
function NavSidenav() {
|
|
7141
|
-
const { open, isMobile, isPeeking, peekable, setPeeking,
|
|
7142
|
-
const
|
|
7143
|
-
|
|
7144
|
-
|
|
7145
|
-
|
|
7146
|
-
|
|
7147
|
-
|
|
7148
|
-
|
|
7149
|
-
|
|
7150
|
-
|
|
7151
|
-
|
|
7152
|
-
|
|
7153
|
-
|
|
7154
|
-
if (!
|
|
7155
|
-
|
|
7965
|
+
const { open, isMobile, isPeeking, peekable, setPeeking, toggle, menu, resizable, width, setWidth } = useNav();
|
|
7966
|
+
const mobileDrawerRef = useRef18(null);
|
|
7967
|
+
const wasMobileOpen = useRef18(false);
|
|
7968
|
+
const [hint, setHint] = useState20(null);
|
|
7969
|
+
const hintTimer = useRef18(void 0);
|
|
7970
|
+
const hintRow = useRef18(null);
|
|
7971
|
+
const hideHint = () => {
|
|
7972
|
+
clearTimeout(hintTimer.current);
|
|
7973
|
+
hintTimer.current = void 0;
|
|
7974
|
+
hintRow.current = null;
|
|
7975
|
+
setHint(null);
|
|
7976
|
+
};
|
|
7977
|
+
const showHint = (target) => {
|
|
7978
|
+
if (open || isMobile || !(target instanceof Element)) {
|
|
7979
|
+
hideHint();
|
|
7980
|
+
return;
|
|
7981
|
+
}
|
|
7982
|
+
const row = target.closest(".as-nav-destination, .as-nav-account button");
|
|
7983
|
+
if (!row) {
|
|
7984
|
+
hideHint();
|
|
7985
|
+
return;
|
|
7986
|
+
}
|
|
7987
|
+
if (row === hintRow.current && (hintTimer.current !== void 0 || hint !== null)) return;
|
|
7988
|
+
clearTimeout(hintTimer.current);
|
|
7989
|
+
const label = row.getAttribute("aria-label") || row.getAttribute("title");
|
|
7990
|
+
if (!label) {
|
|
7991
|
+
hideHint();
|
|
7992
|
+
return;
|
|
7993
|
+
}
|
|
7994
|
+
hintRow.current = row;
|
|
7995
|
+
hintTimer.current = setTimeout(() => {
|
|
7996
|
+
if (hintRow.current !== row || !row.isConnected || open) {
|
|
7997
|
+
setHint(null);
|
|
7998
|
+
return;
|
|
7999
|
+
}
|
|
8000
|
+
const rect = row.getBoundingClientRect();
|
|
8001
|
+
if (rect.width === 0 && rect.height === 0) {
|
|
8002
|
+
setHint(null);
|
|
8003
|
+
return;
|
|
8004
|
+
}
|
|
8005
|
+
setHint({ label, top: Math.max(8, Math.min(window.innerHeight - 44, rect.top + (rect.height - 32) / 2)), left: rect.right + 10 });
|
|
8006
|
+
}, 160);
|
|
8007
|
+
};
|
|
8008
|
+
useEffect20(() => {
|
|
8009
|
+
hideHint();
|
|
8010
|
+
return () => clearTimeout(hintTimer.current);
|
|
8011
|
+
}, [open, isMobile, menu]);
|
|
8012
|
+
useEffect20(() => {
|
|
8013
|
+
const handleNavigationShortcut = (event) => {
|
|
8014
|
+
if ((event.metaKey || event.ctrlKey) && event.shiftKey && !event.altKey && event.key.toLowerCase() === "s") {
|
|
8015
|
+
event.preventDefault();
|
|
8016
|
+
toggle();
|
|
8017
|
+
}
|
|
8018
|
+
};
|
|
8019
|
+
window.addEventListener("keydown", handleNavigationShortcut);
|
|
8020
|
+
return () => window.removeEventListener("keydown", handleNavigationShortcut);
|
|
8021
|
+
}, [toggle]);
|
|
8022
|
+
useEffect20(() => {
|
|
8023
|
+
const dismiss = () => hideHint();
|
|
8024
|
+
window.addEventListener("agentsam:navigate", dismiss);
|
|
8025
|
+
window.addEventListener("popstate", dismiss);
|
|
8026
|
+
window.addEventListener("hashchange", dismiss);
|
|
8027
|
+
window.addEventListener("scroll", dismiss, true);
|
|
8028
|
+
window.addEventListener("blur", dismiss);
|
|
8029
|
+
document.addEventListener("visibilitychange", dismiss);
|
|
8030
|
+
return () => {
|
|
8031
|
+
window.removeEventListener("agentsam:navigate", dismiss);
|
|
8032
|
+
window.removeEventListener("popstate", dismiss);
|
|
8033
|
+
window.removeEventListener("hashchange", dismiss);
|
|
8034
|
+
window.removeEventListener("scroll", dismiss, true);
|
|
8035
|
+
window.removeEventListener("blur", dismiss);
|
|
8036
|
+
document.removeEventListener("visibilitychange", dismiss);
|
|
8037
|
+
};
|
|
8038
|
+
}, []);
|
|
8039
|
+
useEffect20(() => {
|
|
8040
|
+
if (!isMobile) {
|
|
8041
|
+
wasMobileOpen.current = false;
|
|
8042
|
+
return;
|
|
8043
|
+
}
|
|
8044
|
+
const previouslyOpen = wasMobileOpen.current;
|
|
8045
|
+
wasMobileOpen.current = open;
|
|
8046
|
+
if (open) {
|
|
8047
|
+
const frame = window.requestAnimationFrame(() => mobileDrawerRef.current?.querySelector(".as-nav-work-brand-toggle")?.focus());
|
|
8048
|
+
return () => window.cancelAnimationFrame(frame);
|
|
8049
|
+
}
|
|
8050
|
+
if (previouslyOpen) {
|
|
8051
|
+
document.querySelector("[data-shared-nav-toggle]")?.focus();
|
|
8052
|
+
}
|
|
8053
|
+
}, [isMobile, open]);
|
|
8054
|
+
if (isMobile) return /* @__PURE__ */ jsx21(NavScope, { className: "as-nav-mobile-push-shell", "data-open": open, children: /* @__PURE__ */ jsx21(
|
|
8055
|
+
"aside",
|
|
8056
|
+
{
|
|
8057
|
+
ref: mobileDrawerRef,
|
|
8058
|
+
className: "as-nav-mobile-drawer",
|
|
8059
|
+
"data-open": open,
|
|
8060
|
+
"aria-label": "Application navigation",
|
|
8061
|
+
"aria-hidden": !open,
|
|
8062
|
+
inert: !open,
|
|
8063
|
+
children: /* @__PURE__ */ jsx21(SidenavContents, {})
|
|
8064
|
+
}
|
|
8065
|
+
) });
|
|
8066
|
+
return /* @__PURE__ */ jsxs4(
|
|
8067
|
+
NavScope,
|
|
8068
|
+
{
|
|
8069
|
+
className: "as-nav-sidenav-reserve",
|
|
8070
|
+
"data-open": open,
|
|
8071
|
+
onMouseOver: (event) => showHint(event.target),
|
|
8072
|
+
onMouseLeave: hideHint,
|
|
8073
|
+
onFocus: (event) => {
|
|
8074
|
+
showHint(event.target);
|
|
8075
|
+
if (peekable && !open) setPeeking(true);
|
|
8076
|
+
},
|
|
8077
|
+
onBlur: (event) => {
|
|
8078
|
+
hideHint();
|
|
8079
|
+
if (!event.currentTarget.contains(event.relatedTarget) && !menu) setPeeking(false);
|
|
8080
|
+
},
|
|
8081
|
+
onPointerDown: hideHint,
|
|
8082
|
+
onClickCapture: hideHint,
|
|
8083
|
+
onScrollCapture: hideHint,
|
|
8084
|
+
children: [
|
|
8085
|
+
hint && !open ? createPortal2(/* @__PURE__ */ jsx21(NavScope, { role: "tooltip", className: "as-nav-rail-tooltip", style: { "--nav-tooltip-top": hint.top + "px", "--nav-tooltip-left": hint.left + "px" }, children: hint.label }), document.body) : null,
|
|
8086
|
+
/* @__PURE__ */ jsx21("aside", { "aria-label": "Application navigation", className: "as-nav-sidenav", "data-expanded": open || isPeeking, onMouseEnter: () => {
|
|
8087
|
+
if (peekable && !open) setPeeking(true);
|
|
8088
|
+
}, onMouseLeave: () => {
|
|
8089
|
+
if (!menu) setPeeking(false);
|
|
8090
|
+
}, children: /* @__PURE__ */ jsx21(SidenavContents, {}) }),
|
|
8091
|
+
open && resizable ? /* @__PURE__ */ jsx21(
|
|
8092
|
+
"div",
|
|
8093
|
+
{
|
|
8094
|
+
className: "as-nav-resize",
|
|
8095
|
+
role: "separator",
|
|
8096
|
+
"aria-label": "Resize navigation",
|
|
8097
|
+
"aria-orientation": "vertical",
|
|
8098
|
+
"aria-valuemin": 208,
|
|
8099
|
+
"aria-valuemax": 400,
|
|
8100
|
+
"aria-valuenow": width,
|
|
8101
|
+
tabIndex: 0,
|
|
8102
|
+
onKeyDown: (event) => {
|
|
8103
|
+
if (event.key === "ArrowLeft" || event.key === "ArrowRight") {
|
|
8104
|
+
event.preventDefault();
|
|
8105
|
+
setWidth(width + (event.key === "ArrowLeft" ? -8 : 8));
|
|
8106
|
+
} else if (event.key === "Home" || event.key === "End") {
|
|
8107
|
+
event.preventDefault();
|
|
8108
|
+
setWidth(event.key === "Home" ? 208 : 400);
|
|
8109
|
+
}
|
|
8110
|
+
},
|
|
8111
|
+
onDoubleClick: () => setWidth(264),
|
|
8112
|
+
onPointerDown: (event) => {
|
|
8113
|
+
event.preventDefault();
|
|
8114
|
+
event.currentTarget.setPointerCapture(event.pointerId);
|
|
8115
|
+
},
|
|
8116
|
+
onPointerMove: (event) => {
|
|
8117
|
+
if (event.currentTarget.hasPointerCapture(event.pointerId)) setWidth(event.clientX - event.currentTarget.parentElement.getBoundingClientRect().left);
|
|
8118
|
+
},
|
|
8119
|
+
onPointerUp: (event) => {
|
|
8120
|
+
if (event.currentTarget.hasPointerCapture(event.pointerId)) event.currentTarget.releasePointerCapture(event.pointerId);
|
|
8121
|
+
}
|
|
8122
|
+
}
|
|
8123
|
+
) : null
|
|
8124
|
+
]
|
|
8125
|
+
}
|
|
8126
|
+
);
|
|
7156
8127
|
}
|
|
7157
8128
|
|
|
7158
8129
|
// src/Nav.tsx
|
|
7159
|
-
import { Fragment as Fragment9, jsx as jsx23, jsxs as
|
|
8130
|
+
import { Fragment as Fragment9, jsx as jsx23, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
7160
8131
|
function NavRoot({ className, children, ...props }) {
|
|
7161
8132
|
const { close, isMobile, isPeeking, open, peekable, resizable, setPeeking, setWidth, width } = useNav();
|
|
7162
8133
|
const startResize = useCallback15((event) => {
|
|
@@ -7172,9 +8143,9 @@ function NavRoot({ className, children, ...props }) {
|
|
|
7172
8143
|
window.addEventListener("pointermove", onPointerMove);
|
|
7173
8144
|
window.addEventListener("pointerup", stop, { once: true });
|
|
7174
8145
|
}, [isMobile, setWidth, width]);
|
|
7175
|
-
return /* @__PURE__ */
|
|
8146
|
+
return /* @__PURE__ */ jsxs5(Fragment9, { children: [
|
|
7176
8147
|
isMobile && open ? /* @__PURE__ */ jsx23("button", { type: "button", className: "agentsam-nav__backdrop", "aria-label": "Close navigation", onClick: close }) : null,
|
|
7177
|
-
/* @__PURE__ */
|
|
8148
|
+
/* @__PURE__ */ jsxs5(
|
|
7178
8149
|
"aside",
|
|
7179
8150
|
{
|
|
7180
8151
|
"aria-label": "Application navigation",
|
|
@@ -7203,6 +8174,7 @@ var Nav = Object.assign(NavRoot, {
|
|
|
7203
8174
|
TopbarLogo: NavTopbarLogo,
|
|
7204
8175
|
TopbarSpacer: NavTopbarSpacer,
|
|
7205
8176
|
ProjectContext: NavProjectContext,
|
|
8177
|
+
Breadcrumbs: NavBreadcrumbs,
|
|
7206
8178
|
AccountSwitcher: NavAccountSwitcher,
|
|
7207
8179
|
FilesResources: NavFilesResources,
|
|
7208
8180
|
PinnedSummary: NavPinnedSummary,
|
|
@@ -7210,6 +8182,7 @@ var Nav = Object.assign(NavRoot, {
|
|
|
7210
8182
|
ShareButton: NavShareButton,
|
|
7211
8183
|
OverflowMenu: NavOverflowMenu,
|
|
7212
8184
|
ModeSwitcher: NavModeSwitcher,
|
|
8185
|
+
LaunchDock: NavLaunchDock,
|
|
7213
8186
|
Provider: NavProvider,
|
|
7214
8187
|
Header: NavHeader,
|
|
7215
8188
|
Content: NavContent,
|
|
@@ -7227,9 +8200,173 @@ var Nav = Object.assign(NavRoot, {
|
|
|
7227
8200
|
CollapsibleContent: NavCollapsibleContent,
|
|
7228
8201
|
Trigger: NavTrigger
|
|
7229
8202
|
});
|
|
8203
|
+
|
|
8204
|
+
// src/useAdminApps.ts
|
|
8205
|
+
import { useEffect as useEffect21, useState as useState21 } from "react";
|
|
8206
|
+
function useAdminApps({ loadApps, installApp, removeApp, updateApp, onInstalled, initialView = "installed" }) {
|
|
8207
|
+
const [apps, setApps] = useState21([]);
|
|
8208
|
+
const [view, setView] = useState21(initialView);
|
|
8209
|
+
const [query, setQuery] = useState21("");
|
|
8210
|
+
const [loading, setLoading] = useState21(true);
|
|
8211
|
+
const [error, setError] = useState21("");
|
|
8212
|
+
const [active, setActive] = useState21(null);
|
|
8213
|
+
const [confirmRemove, setConfirmRemove] = useState21(null);
|
|
8214
|
+
const [reload, setReload] = useState21(0);
|
|
8215
|
+
useEffect21(() => {
|
|
8216
|
+
let cancelled = false;
|
|
8217
|
+
setLoading(true);
|
|
8218
|
+
setError("");
|
|
8219
|
+
void loadApps().then((next) => {
|
|
8220
|
+
if (!cancelled) setApps(next);
|
|
8221
|
+
}).catch(() => {
|
|
8222
|
+
if (!cancelled) setError("Could not verify account Apps. Retry; no installations were changed.");
|
|
8223
|
+
}).finally(() => {
|
|
8224
|
+
if (!cancelled) setLoading(false);
|
|
8225
|
+
});
|
|
8226
|
+
return () => {
|
|
8227
|
+
cancelled = true;
|
|
8228
|
+
};
|
|
8229
|
+
}, [loadApps, reload]);
|
|
8230
|
+
const needle = query.trim().toLocaleLowerCase();
|
|
8231
|
+
const matching = apps.filter((app) => (view === "all" || (view === "installed" ? app.installed : !app.installed)) && (!needle || [app.label, app.key, app.kind].join(" ").toLocaleLowerCase().includes(needle)));
|
|
8232
|
+
const visible = view === "all" ? [...matching].sort((a, b) => Number(b.installed) - Number(a.installed)) : matching;
|
|
8233
|
+
async function perform(app, kind) {
|
|
8234
|
+
if (active) return;
|
|
8235
|
+
setError("");
|
|
8236
|
+
setActive(app.key);
|
|
8237
|
+
try {
|
|
8238
|
+
if (kind === "install") await installApp(app.key);
|
|
8239
|
+
if (kind === "remove") await removeApp?.(app.key);
|
|
8240
|
+
if (kind === "enable") await updateApp?.(app.key, true);
|
|
8241
|
+
if (kind === "disable") await updateApp?.(app.key, false);
|
|
8242
|
+
const verified = await loadApps();
|
|
8243
|
+
setApps(verified);
|
|
8244
|
+
setConfirmRemove(null);
|
|
8245
|
+
onInstalled?.();
|
|
8246
|
+
if (kind === "install" && view !== "all") setView("installed");
|
|
8247
|
+
} catch {
|
|
8248
|
+
setError("Account App change failed. No success has been assumed; refresh to verify its current state.");
|
|
8249
|
+
} finally {
|
|
8250
|
+
setActive(null);
|
|
8251
|
+
}
|
|
8252
|
+
}
|
|
8253
|
+
return {
|
|
8254
|
+
apps,
|
|
8255
|
+
visible,
|
|
8256
|
+
view,
|
|
8257
|
+
setView,
|
|
8258
|
+
query,
|
|
8259
|
+
setQuery,
|
|
8260
|
+
needle,
|
|
8261
|
+
loading,
|
|
8262
|
+
error,
|
|
8263
|
+
active,
|
|
8264
|
+
confirmRemove,
|
|
8265
|
+
setConfirmRemove,
|
|
8266
|
+
perform,
|
|
8267
|
+
refresh: () => setReload((x) => x + 1),
|
|
8268
|
+
installedCount: apps.filter((a) => a.installed).length,
|
|
8269
|
+
availableCount: apps.filter((a) => !a.installed).length
|
|
8270
|
+
};
|
|
8271
|
+
}
|
|
8272
|
+
|
|
8273
|
+
// src/AdminAppsDialog.tsx
|
|
8274
|
+
import { jsx as jsx24, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
8275
|
+
function AdminAppMark({ app, size: size4 = 20 }) {
|
|
8276
|
+
if (app.icon_url && (app.icon_url.startsWith("/") || /^https:\/\//.test(app.icon_url)))
|
|
8277
|
+
return /* @__PURE__ */ jsx24("img", { src: app.icon_url, alt: "", loading: "lazy" });
|
|
8278
|
+
const icon = app.nav_icon?.toLowerCase() || "";
|
|
8279
|
+
if (icon === "cad" || icon === "cad-creator") return /* @__PURE__ */ jsx24(Box, { size: size4 });
|
|
8280
|
+
if (icon === "moviemode" || icon === "film") return /* @__PURE__ */ jsx24(Clapperboard, { size: size4 });
|
|
8281
|
+
if (icon === "samsketch") return /* @__PURE__ */ jsx24(Layers, { size: size4 });
|
|
8282
|
+
if (icon === "growth") return /* @__PURE__ */ jsx24(TrendingUp, { size: size4 });
|
|
8283
|
+
if (icon === "database") return /* @__PURE__ */ jsx24(Database, { size: size4 });
|
|
8284
|
+
if (icon === "goalguru" || icon === "target") return /* @__PURE__ */ jsx24(Target, { size: size4 });
|
|
8285
|
+
if (icon === "cms" || icon === "commerce") return /* @__PURE__ */ jsx24(ShoppingBag, { size: size4 });
|
|
8286
|
+
if (icon === "forms") return /* @__PURE__ */ jsx24(ClipboardList, { size: size4 });
|
|
8287
|
+
if (icon === "canvas" || icon === "design-canvas") return /* @__PURE__ */ jsx24(PenTool, { size: size4 });
|
|
8288
|
+
return /* @__PURE__ */ jsx24(LayoutPanelTop, { size: size4 });
|
|
8289
|
+
}
|
|
8290
|
+
function AdminAppsDirectory({ loadApps, installApp, removeApp, updateApp, onOpenApp, onInstalled }) {
|
|
8291
|
+
const { apps, visible, view, setView, query, setQuery, needle, loading, error, active, confirmRemove, setConfirmRemove, perform, refresh } = useAdminApps({ loadApps, installApp, removeApp, updateApp, onInstalled });
|
|
8292
|
+
return /* @__PURE__ */ jsxs6("div", { className: "as-apps-directory", children: [
|
|
8293
|
+
/* @__PURE__ */ jsxs6("div", { className: "as-apps-picker-controls", children: [
|
|
8294
|
+
/* @__PURE__ */ jsxs6("div", { className: "as-apps-picker-tabs", role: "tablist", "aria-label": "Apps view", children: [
|
|
8295
|
+
/* @__PURE__ */ jsxs6("button", { role: "tab", "aria-selected": view === "installed", type: "button", onClick: () => setView("installed"), children: [
|
|
8296
|
+
"Installed (",
|
|
8297
|
+
apps.filter((a) => a.installed).length,
|
|
8298
|
+
")"
|
|
8299
|
+
] }),
|
|
8300
|
+
/* @__PURE__ */ jsxs6("button", { role: "tab", "aria-selected": view === "browse", type: "button", onClick: () => setView("browse"), children: [
|
|
8301
|
+
"Browse (",
|
|
8302
|
+
apps.filter((a) => !a.installed).length,
|
|
8303
|
+
")"
|
|
8304
|
+
] }),
|
|
8305
|
+
/* @__PURE__ */ jsx24("button", { type: "button", className: "as-apps-picker-refresh", onClick: () => refresh(), disabled: loading || Boolean(active), children: "Refresh" })
|
|
8306
|
+
] }),
|
|
8307
|
+
/* @__PURE__ */ jsxs6("label", { className: "as-apps-picker-search", children: [
|
|
8308
|
+
/* @__PURE__ */ jsx24(Search, { size: 17 }),
|
|
8309
|
+
/* @__PURE__ */ jsx24("input", { type: "search", value: query, onChange: (event) => setQuery(event.target.value), placeholder: "Search Apps", "aria-label": "Search Apps" })
|
|
8310
|
+
] })
|
|
8311
|
+
] }),
|
|
8312
|
+
/* @__PURE__ */ jsx24("section", { className: "as-apps-picker-list", "aria-label": view === "installed" ? "Installed Apps" : "Available Apps", "aria-live": "polite", children: loading ? /* @__PURE__ */ jsx24("p", { className: "as-apps-picker-state", children: "Verifying Apps\u2026" }) : error && !apps.length ? /* @__PURE__ */ jsxs6("div", { className: "as-apps-picker-state", role: "alert", children: [
|
|
8313
|
+
/* @__PURE__ */ jsx24("p", { children: error }),
|
|
8314
|
+
/* @__PURE__ */ jsx24("button", { type: "button", onClick: () => refresh(), children: "Retry" })
|
|
8315
|
+
] }) : visible.length ? visible.map((app) => /* @__PURE__ */ jsxs6("div", { className: "as-apps-picker-item", children: [
|
|
8316
|
+
/* @__PURE__ */ jsx24("span", { className: "as-apps-picker-symbol", "aria-hidden": "true", children: /* @__PURE__ */ jsx24(AdminAppMark, { app }) }),
|
|
8317
|
+
/* @__PURE__ */ jsxs6("div", { className: "as-apps-picker-item-label", children: [
|
|
8318
|
+
/* @__PURE__ */ jsx24("strong", { children: app.label }),
|
|
8319
|
+
/* @__PURE__ */ jsxs6("small", { children: [
|
|
8320
|
+
app.description || "Admin application",
|
|
8321
|
+
" \xB7 ",
|
|
8322
|
+
app.installed ? app.enabled ? "Installed" : "Disabled" : "Not installed"
|
|
8323
|
+
] })
|
|
8324
|
+
] }),
|
|
8325
|
+
confirmRemove === app.key ? /* @__PURE__ */ jsxs6("span", { className: "as-apps-picker-actions", children: [
|
|
8326
|
+
/* @__PURE__ */ jsx24("span", { className: "as-apps-picker-confirm-label", children: "Remove from this account?" }),
|
|
8327
|
+
/* @__PURE__ */ jsx24("button", { type: "button", onClick: () => setConfirmRemove(null), children: "Cancel" }),
|
|
8328
|
+
/* @__PURE__ */ jsx24("button", { type: "button", disabled: Boolean(active), onClick: () => void perform(app, "remove"), children: "Remove" })
|
|
8329
|
+
] }) : app.installed ? /* @__PURE__ */ jsxs6("span", { className: "as-apps-picker-actions", children: [
|
|
8330
|
+
app.enabled && app.href ? /* @__PURE__ */ jsx24("button", { type: "button", className: "as-apps-picker-primary", onClick: () => onOpenApp?.(app.href), children: "Open" }) : null,
|
|
8331
|
+
updateApp ? /* @__PURE__ */ jsx24("button", { type: "button", disabled: Boolean(active), onClick: () => void perform(app, app.enabled ? "disable" : "enable"), children: app.enabled ? "Disable" : "Enable" }) : null,
|
|
8332
|
+
removeApp ? /* @__PURE__ */ jsx24("button", { type: "button", disabled: Boolean(active), onClick: () => setConfirmRemove(app.key), children: "Remove" }) : null,
|
|
8333
|
+
!updateApp && !removeApp ? /* @__PURE__ */ jsxs6("span", { className: "as-apps-picker-status", children: [
|
|
8334
|
+
/* @__PURE__ */ jsx24(Check, { size: 14 }),
|
|
8335
|
+
" Installed"
|
|
8336
|
+
] }) : null
|
|
8337
|
+
] }) : app.installable ? /* @__PURE__ */ jsx24("button", { type: "button", className: "as-apps-picker-primary", disabled: Boolean(active), onClick: () => void perform(app, "install"), children: active === app.key ? "Installing\u2026" : "Install" }) : /* @__PURE__ */ jsx24("span", { className: "as-apps-picker-status", children: "Setup required" })
|
|
8338
|
+
] }, app.key)) : /* @__PURE__ */ jsx24("p", { className: "as-apps-picker-state", children: needle ? "No Apps match this search." : view === "installed" ? "No Apps installed for this account." : "No additional Apps available in this catalog." }) }),
|
|
8339
|
+
error && apps.length ? /* @__PURE__ */ jsx24("p", { role: "alert", className: "as-apps-picker-error", children: error }) : null,
|
|
8340
|
+
/* @__PURE__ */ jsx24("footer", { className: "as-apps-picker-footer", children: /* @__PURE__ */ jsx24("span", { children: "App installations belong to your account. Tool visibility, plugins and public storefront apps are managed separately." }) })
|
|
8341
|
+
] });
|
|
8342
|
+
}
|
|
8343
|
+
function AdminAppsDialog({ onClose, theme = "system", ...directory }) {
|
|
8344
|
+
return /* @__PURE__ */ jsx24(Dialog, { open: true, onOpenChange: (next) => {
|
|
8345
|
+
if (!next) onClose();
|
|
8346
|
+
}, children: /* @__PURE__ */ jsxs6(DialogPortal, { children: [
|
|
8347
|
+
/* @__PURE__ */ jsx24(DialogOverlay, { className: "as-apps-picker-overlay" }),
|
|
8348
|
+
/* @__PURE__ */ jsxs6(DialogContent, { className: "as-nav-scope as-apps-picker", "data-nav-theme": theme, "aria-describedby": "as-apps-picker-description", children: [
|
|
8349
|
+
/* @__PURE__ */ jsxs6("header", { className: "as-apps-picker-header", children: [
|
|
8350
|
+
/* @__PURE__ */ jsxs6("div", { children: [
|
|
8351
|
+
/* @__PURE__ */ jsx24(DialogTitle, { children: "Apps" }),
|
|
8352
|
+
/* @__PURE__ */ jsx24(DialogDescription, { id: "as-apps-picker-description", children: "Install, open and manage your account's applications." })
|
|
8353
|
+
] }),
|
|
8354
|
+
/* @__PURE__ */ jsx24(DialogClose, { className: "as-apps-picker-close", "aria-label": "Close Apps", children: /* @__PURE__ */ jsx24(X, { size: 18 }) })
|
|
8355
|
+
] }),
|
|
8356
|
+
/* @__PURE__ */ jsx24(AdminAppsDirectory, { ...directory, onOpenApp: (href) => {
|
|
8357
|
+
onClose();
|
|
8358
|
+
directory.onOpenApp?.(href);
|
|
8359
|
+
} })
|
|
8360
|
+
] })
|
|
8361
|
+
] }) });
|
|
8362
|
+
}
|
|
7230
8363
|
export {
|
|
8364
|
+
AdminAppMark,
|
|
8365
|
+
AdminAppsDialog,
|
|
8366
|
+
AdminAppsDirectory,
|
|
7231
8367
|
Nav,
|
|
7232
8368
|
NavAccountSwitcher,
|
|
8369
|
+
NavBreadcrumbs,
|
|
7233
8370
|
NavCollapsible,
|
|
7234
8371
|
NavCollapsibleContent,
|
|
7235
8372
|
NavCollapsibleTrigger,
|
|
@@ -7240,6 +8377,7 @@ export {
|
|
|
7240
8377
|
NavGroup,
|
|
7241
8378
|
NavGroupLabel,
|
|
7242
8379
|
NavHeader,
|
|
8380
|
+
NavLaunchDock,
|
|
7243
8381
|
NavMenu,
|
|
7244
8382
|
NavMenuButton,
|
|
7245
8383
|
NavMenuChevron,
|
|
@@ -7253,11 +8391,18 @@ export {
|
|
|
7253
8391
|
NavProvider,
|
|
7254
8392
|
NavScope,
|
|
7255
8393
|
NavShareButton,
|
|
8394
|
+
NavShareIcon,
|
|
7256
8395
|
NavSidenav,
|
|
7257
8396
|
NavTopbar,
|
|
7258
8397
|
NavTopbarLogo,
|
|
7259
8398
|
NavTopbarSpacer,
|
|
7260
8399
|
NavTrigger,
|
|
8400
|
+
createNavState,
|
|
8401
|
+
navBreadcrumbs,
|
|
8402
|
+
navDestinationActive,
|
|
8403
|
+
resolveNavDestinations,
|
|
8404
|
+
stabilizeNavStateStore,
|
|
8405
|
+
useAdminApps,
|
|
7261
8406
|
useNav,
|
|
7262
8407
|
useNavStyle
|
|
7263
8408
|
};
|
|
@@ -7267,20 +8412,39 @@ lucide-react/dist/esm/shared/src/utils.js:
|
|
|
7267
8412
|
lucide-react/dist/esm/defaultAttributes.js:
|
|
7268
8413
|
lucide-react/dist/esm/Icon.js:
|
|
7269
8414
|
lucide-react/dist/esm/createLucideIcon.js:
|
|
8415
|
+
lucide-react/dist/esm/icons/archive.js:
|
|
8416
|
+
lucide-react/dist/esm/icons/box.js:
|
|
8417
|
+
lucide-react/dist/esm/icons/check.js:
|
|
7270
8418
|
lucide-react/dist/esm/icons/chevron-down.js:
|
|
8419
|
+
lucide-react/dist/esm/icons/chevron-right.js:
|
|
8420
|
+
lucide-react/dist/esm/icons/clapperboard.js:
|
|
8421
|
+
lucide-react/dist/esm/icons/clipboard-list.js:
|
|
8422
|
+
lucide-react/dist/esm/icons/database.js:
|
|
7271
8423
|
lucide-react/dist/esm/icons/ellipsis.js:
|
|
8424
|
+
lucide-react/dist/esm/icons/file-code-2.js:
|
|
8425
|
+
lucide-react/dist/esm/icons/file-image.js:
|
|
8426
|
+
lucide-react/dist/esm/icons/file-text.js:
|
|
7272
8427
|
lucide-react/dist/esm/icons/files.js:
|
|
8428
|
+
lucide-react/dist/esm/icons/film.js:
|
|
8429
|
+
lucide-react/dist/esm/icons/folder-open.js:
|
|
7273
8430
|
lucide-react/dist/esm/icons/folder.js:
|
|
7274
|
-
lucide-react/dist/esm/icons/
|
|
8431
|
+
lucide-react/dist/esm/icons/layers.js:
|
|
8432
|
+
lucide-react/dist/esm/icons/layout-panel-top.js:
|
|
8433
|
+
lucide-react/dist/esm/icons/loader-circle.js:
|
|
8434
|
+
lucide-react/dist/esm/icons/palette.js:
|
|
7275
8435
|
lucide-react/dist/esm/icons/panel-left.js:
|
|
7276
|
-
lucide-react/dist/esm/icons/
|
|
8436
|
+
lucide-react/dist/esm/icons/pen-tool.js:
|
|
7277
8437
|
lucide-react/dist/esm/icons/pencil.js:
|
|
7278
8438
|
lucide-react/dist/esm/icons/pin.js:
|
|
7279
8439
|
lucide-react/dist/esm/icons/plus.js:
|
|
7280
8440
|
lucide-react/dist/esm/icons/search.js:
|
|
7281
|
-
lucide-react/dist/esm/icons/
|
|
8441
|
+
lucide-react/dist/esm/icons/shopping-bag.js:
|
|
8442
|
+
lucide-react/dist/esm/icons/target.js:
|
|
7282
8443
|
lucide-react/dist/esm/icons/trash-2.js:
|
|
8444
|
+
lucide-react/dist/esm/icons/trending-up.js:
|
|
7283
8445
|
lucide-react/dist/esm/icons/user.js:
|
|
8446
|
+
lucide-react/dist/esm/icons/users.js:
|
|
8447
|
+
lucide-react/dist/esm/icons/x.js:
|
|
7284
8448
|
lucide-react/dist/esm/lucide-react.js:
|
|
7285
8449
|
(**
|
|
7286
8450
|
* @license lucide-react v0.510.0 - ISC
|