@stigmer/react 3.2.2 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agent/AgentDetailView.d.ts.map +1 -1
- package/agent/AgentDetailView.js +6 -3
- package/agent/AgentDetailView.js.map +1 -1
- package/agent/steps/ReviewStep.d.ts.map +1 -1
- package/agent/steps/ReviewStep.js +2 -3
- package/agent/steps/ReviewStep.js.map +1 -1
- package/billing/BaselineEditor.d.ts +9 -0
- package/billing/BaselineEditor.d.ts.map +1 -0
- package/billing/BaselineEditor.js +253 -0
- package/billing/BaselineEditor.js.map +1 -0
- package/billing/ModelCatalogPanel.d.ts +28 -0
- package/billing/ModelCatalogPanel.d.ts.map +1 -0
- package/billing/ModelCatalogPanel.js +102 -0
- package/billing/ModelCatalogPanel.js.map +1 -0
- package/billing/ModelGovernanceDetail.d.ts +8 -0
- package/billing/ModelGovernanceDetail.d.ts.map +1 -0
- package/billing/ModelGovernanceDetail.js +64 -0
- package/billing/ModelGovernanceDetail.js.map +1 -0
- package/billing/OperatorAccessNotice.d.ts +12 -0
- package/billing/OperatorAccessNotice.d.ts.map +1 -0
- package/billing/OperatorAccessNotice.js +15 -0
- package/billing/OperatorAccessNotice.js.map +1 -0
- package/billing/PricingGovernanceConsole.d.ts +57 -0
- package/billing/PricingGovernanceConsole.d.ts.map +1 -0
- package/billing/PricingGovernanceConsole.js +164 -0
- package/billing/PricingGovernanceConsole.js.map +1 -0
- package/billing/PricingGovernancePanel.d.ts +26 -0
- package/billing/PricingGovernancePanel.d.ts.map +1 -0
- package/billing/PricingGovernancePanel.js +64 -0
- package/billing/PricingGovernancePanel.js.map +1 -0
- package/billing/RetireConfirm.d.ts +9 -0
- package/billing/RetireConfirm.d.ts.map +1 -0
- package/billing/RetireConfirm.js +19 -0
- package/billing/RetireConfirm.js.map +1 -0
- package/billing/form-primitives.d.ts +18 -0
- package/billing/form-primitives.d.ts.map +1 -0
- package/billing/form-primitives.js +19 -0
- package/billing/form-primitives.js.map +1 -0
- package/billing/governance-primitives.d.ts +33 -0
- package/billing/governance-primitives.d.ts.map +1 -0
- package/billing/governance-primitives.js +43 -0
- package/billing/governance-primitives.js.map +1 -0
- package/billing/index.d.ts +18 -0
- package/billing/index.d.ts.map +1 -1
- package/billing/index.js +9 -0
- package/billing/index.js.map +1 -1
- package/billing/pricing-format.d.ts +12 -0
- package/billing/pricing-format.d.ts.map +1 -0
- package/billing/pricing-format.js +50 -0
- package/billing/pricing-format.js.map +1 -0
- package/billing/useDecidePricingOverride.d.ts +46 -0
- package/billing/useDecidePricingOverride.d.ts.map +1 -0
- package/billing/useDecidePricingOverride.js +44 -0
- package/billing/useDecidePricingOverride.js.map +1 -0
- package/billing/useModelGovernanceView.d.ts +103 -0
- package/billing/useModelGovernanceView.d.ts.map +1 -0
- package/billing/useModelGovernanceView.js +144 -0
- package/billing/useModelGovernanceView.js.map +1 -0
- package/billing/useModelPricingBaselines.d.ts +40 -0
- package/billing/useModelPricingBaselines.d.ts.map +1 -0
- package/billing/useModelPricingBaselines.js +32 -0
- package/billing/useModelPricingBaselines.js.map +1 -0
- package/billing/usePricingGovernance.d.ts +39 -0
- package/billing/usePricingGovernance.d.ts.map +1 -0
- package/billing/usePricingGovernance.js +31 -0
- package/billing/usePricingGovernance.js.map +1 -0
- package/billing/useRetireModelPricingBaseline.d.ts +31 -0
- package/billing/useRetireModelPricingBaseline.d.ts.map +1 -0
- package/billing/useRetireModelPricingBaseline.js +36 -0
- package/billing/useRetireModelPricingBaseline.js.map +1 -0
- package/billing/useUpsertModelPricingBaseline.d.ts +38 -0
- package/billing/useUpsertModelPricingBaseline.d.ts.map +1 -0
- package/billing/useUpsertModelPricingBaseline.js +37 -0
- package/billing/useUpsertModelPricingBaseline.js.map +1 -0
- package/channel/AgentChannelsPanel.d.ts.map +1 -1
- package/channel/AgentChannelsPanel.js +11 -5
- package/channel/AgentChannelsPanel.js.map +1 -1
- package/composer/SessionComposer.d.ts +1 -1
- package/cursor-accounts/CursorAccountEditor.d.ts +28 -0
- package/cursor-accounts/CursorAccountEditor.d.ts.map +1 -0
- package/cursor-accounts/CursorAccountEditor.js +51 -0
- package/cursor-accounts/CursorAccountEditor.js.map +1 -0
- package/cursor-accounts/CursorAccountsAccessNotice.d.ts +11 -0
- package/cursor-accounts/CursorAccountsAccessNotice.d.ts.map +1 -0
- package/cursor-accounts/CursorAccountsAccessNotice.js +14 -0
- package/cursor-accounts/CursorAccountsAccessNotice.js.map +1 -0
- package/cursor-accounts/CursorAccountsConsole.d.ts +28 -0
- package/cursor-accounts/CursorAccountsConsole.d.ts.map +1 -0
- package/cursor-accounts/CursorAccountsConsole.js +275 -0
- package/cursor-accounts/CursorAccountsConsole.js.map +1 -0
- package/cursor-accounts/cursor-account-format.d.ts +10 -0
- package/cursor-accounts/cursor-account-format.d.ts.map +1 -0
- package/cursor-accounts/cursor-account-format.js +26 -0
- package/cursor-accounts/cursor-account-format.js.map +1 -0
- package/cursor-accounts/index.d.ts +18 -0
- package/cursor-accounts/index.d.ts.map +1 -0
- package/cursor-accounts/index.js +13 -0
- package/cursor-accounts/index.js.map +1 -0
- package/cursor-accounts/useCursorAccountView.d.ts +30 -0
- package/cursor-accounts/useCursorAccountView.d.ts.map +1 -0
- package/cursor-accounts/useCursorAccountView.js +25 -0
- package/cursor-accounts/useCursorAccountView.js.map +1 -0
- package/cursor-accounts/useCursorAccounts.d.ts +33 -0
- package/cursor-accounts/useCursorAccounts.d.ts.map +1 -0
- package/cursor-accounts/useCursorAccounts.js +25 -0
- package/cursor-accounts/useCursorAccounts.js.map +1 -0
- package/cursor-accounts/useCursorMemberKeyActions.d.ts +49 -0
- package/cursor-accounts/useCursorMemberKeyActions.d.ts.map +1 -0
- package/cursor-accounts/useCursorMemberKeyActions.js +38 -0
- package/cursor-accounts/useCursorMemberKeyActions.js.map +1 -0
- package/cursor-accounts/useDeleteCursorAccount.d.ts +30 -0
- package/cursor-accounts/useDeleteCursorAccount.d.ts.map +1 -0
- package/cursor-accounts/useDeleteCursorAccount.js +32 -0
- package/cursor-accounts/useDeleteCursorAccount.js.map +1 -0
- package/cursor-accounts/useSyncCursorAccount.d.ts +23 -0
- package/cursor-accounts/useSyncCursorAccount.d.ts.map +1 -0
- package/cursor-accounts/useSyncCursorAccount.js +31 -0
- package/cursor-accounts/useSyncCursorAccount.js.map +1 -0
- package/cursor-accounts/useUpsertCursorAccount.d.ts +26 -0
- package/cursor-accounts/useUpsertCursorAccount.d.ts.map +1 -0
- package/cursor-accounts/useUpsertCursorAccount.js +34 -0
- package/cursor-accounts/useUpsertCursorAccount.js.map +1 -0
- package/datastore/CollectionRecordsBrowser.d.ts +34 -0
- package/datastore/CollectionRecordsBrowser.d.ts.map +1 -0
- package/datastore/CollectionRecordsBrowser.js +209 -0
- package/datastore/CollectionRecordsBrowser.js.map +1 -0
- package/datastore/CollectionSchemaView.d.ts +29 -0
- package/datastore/CollectionSchemaView.d.ts.map +1 -0
- package/datastore/CollectionSchemaView.js +93 -0
- package/datastore/CollectionSchemaView.js.map +1 -0
- package/datastore/DatastoreDetailView.d.ts +44 -0
- package/datastore/DatastoreDetailView.d.ts.map +1 -0
- package/datastore/DatastoreDetailView.js +76 -0
- package/datastore/DatastoreDetailView.js.map +1 -0
- package/datastore/DatastoreSyncReport.d.ts +19 -0
- package/datastore/DatastoreSyncReport.d.ts.map +1 -0
- package/datastore/DatastoreSyncReport.js +45 -0
- package/datastore/DatastoreSyncReport.js.map +1 -0
- package/datastore/DeleteDatastoreDialog.d.ts +35 -0
- package/datastore/DeleteDatastoreDialog.d.ts.map +1 -0
- package/datastore/DeleteDatastoreDialog.js +90 -0
- package/datastore/DeleteDatastoreDialog.js.map +1 -0
- package/datastore/FieldValueControl.d.ts +55 -0
- package/datastore/FieldValueControl.d.ts.map +1 -0
- package/datastore/FieldValueControl.js +138 -0
- package/datastore/FieldValueControl.js.map +1 -0
- package/datastore/RecordFilterBuilder.d.ts +30 -0
- package/datastore/RecordFilterBuilder.d.ts.map +1 -0
- package/datastore/RecordFilterBuilder.js +122 -0
- package/datastore/RecordFilterBuilder.js.map +1 -0
- package/datastore/RecordFormPanel.d.ts +45 -0
- package/datastore/RecordFormPanel.d.ts.map +1 -0
- package/datastore/RecordFormPanel.js +215 -0
- package/datastore/RecordFormPanel.js.map +1 -0
- package/datastore/index.d.ts +43 -0
- package/datastore/index.d.ts.map +1 -0
- package/datastore/index.js +22 -0
- package/datastore/index.js.map +1 -0
- package/datastore/recordFilter.d.ts +54 -0
- package/datastore/recordFilter.d.ts.map +1 -0
- package/datastore/recordFilter.js +93 -0
- package/datastore/recordFilter.js.map +1 -0
- package/datastore/recordValues.d.ts +85 -0
- package/datastore/recordValues.d.ts.map +1 -0
- package/datastore/recordValues.js +282 -0
- package/datastore/recordValues.js.map +1 -0
- package/datastore/useDatastore.d.ts +39 -0
- package/datastore/useDatastore.d.ts.map +1 -0
- package/datastore/useDatastore.js +44 -0
- package/datastore/useDatastore.js.map +1 -0
- package/datastore/useDatastoreCount.d.ts +48 -0
- package/datastore/useDatastoreCount.d.ts.map +1 -0
- package/datastore/useDatastoreCount.js +27 -0
- package/datastore/useDatastoreCount.js.map +1 -0
- package/datastore/useDatastoreDescription.d.ts +54 -0
- package/datastore/useDatastoreDescription.d.ts.map +1 -0
- package/datastore/useDatastoreDescription.js +50 -0
- package/datastore/useDatastoreDescription.js.map +1 -0
- package/datastore/useDatastoreList.d.ts +57 -0
- package/datastore/useDatastoreList.d.ts.map +1 -0
- package/datastore/useDatastoreList.js +29 -0
- package/datastore/useDatastoreList.js.map +1 -0
- package/datastore/useDatastoreSearch.d.ts +19 -0
- package/datastore/useDatastoreSearch.d.ts.map +1 -0
- package/datastore/useDatastoreSearch.js +22 -0
- package/datastore/useDatastoreSearch.js.map +1 -0
- package/datastore/useDeleteDatastore.d.ts +53 -0
- package/datastore/useDeleteDatastore.d.ts.map +1 -0
- package/datastore/useDeleteDatastore.js +40 -0
- package/datastore/useDeleteDatastore.js.map +1 -0
- package/datastore/useDeleteRecord.d.ts +34 -0
- package/datastore/useDeleteRecord.d.ts.map +1 -0
- package/datastore/useDeleteRecord.js +43 -0
- package/datastore/useDeleteRecord.js.map +1 -0
- package/datastore/useInsertRecord.d.ts +50 -0
- package/datastore/useInsertRecord.d.ts.map +1 -0
- package/datastore/useInsertRecord.js +55 -0
- package/datastore/useInsertRecord.js.map +1 -0
- package/datastore/useRecordCollection.d.ts +104 -0
- package/datastore/useRecordCollection.d.ts.map +1 -0
- package/datastore/useRecordCollection.js +136 -0
- package/datastore/useRecordCollection.js.map +1 -0
- package/datastore/useRecordList.d.ts +66 -0
- package/datastore/useRecordList.d.ts.map +1 -0
- package/datastore/useRecordList.js +58 -0
- package/datastore/useRecordList.js.map +1 -0
- package/datastore/useUpdateRecord.d.ts +52 -0
- package/datastore/useUpdateRecord.d.ts.map +1 -0
- package/datastore/useUpdateRecord.js +55 -0
- package/datastore/useUpdateRecord.js.map +1 -0
- package/environment/EnvironmentListPanel.d.ts.map +1 -1
- package/environment/EnvironmentListPanel.js +12 -7
- package/environment/EnvironmentListPanel.js.map +1 -1
- package/execution/index.d.ts +1 -2
- package/execution/index.d.ts.map +1 -1
- package/execution/index.js +0 -1
- package/execution/index.js.map +1 -1
- package/execution/useLiveAgentExecution.d.ts +17 -1
- package/execution/useLiveAgentExecution.d.ts.map +1 -1
- package/execution/useLiveAgentExecution.js +19 -4
- package/execution/useLiveAgentExecution.js.map +1 -1
- package/iam-policy/index.d.ts +1 -1
- package/iam-policy/index.d.ts.map +1 -1
- package/iam-policy/index.js.map +1 -1
- package/iam-policy/useCheckPermission.d.ts +32 -11
- package/iam-policy/useCheckPermission.d.ts.map +1 -1
- package/iam-policy/useCheckPermission.js +24 -19
- package/iam-policy/useCheckPermission.js.map +1 -1
- package/index.d.ts +16 -10
- package/index.d.ts.map +1 -1
- package/index.js +16 -5
- package/index.js.map +1 -1
- package/internal/useInViewport.d.ts +24 -0
- package/internal/useInViewport.d.ts.map +1 -0
- package/internal/useInViewport.js +49 -0
- package/internal/useInViewport.js.map +1 -0
- package/library/VisibilitySelector.d.ts +22 -6
- package/library/VisibilitySelector.d.ts.map +1 -1
- package/library/VisibilitySelector.js +12 -4
- package/library/VisibilitySelector.js.map +1 -1
- package/library/index.d.ts +1 -8
- package/library/index.d.ts.map +1 -1
- package/library/index.js +0 -4
- package/library/index.js.map +1 -1
- package/library/useApplyResource.d.ts +12 -12
- package/library/useApplyResource.d.ts.map +1 -1
- package/library/useApplyResource.js +16 -25
- package/library/useApplyResource.js.map +1 -1
- package/library/useExportResource.d.ts +13 -9
- package/library/useExportResource.d.ts.map +1 -1
- package/library/useExportResource.js +18 -36
- package/library/useExportResource.js.map +1 -1
- package/manifest/ApplyManifestDialog.d.ts +48 -0
- package/manifest/ApplyManifestDialog.d.ts.map +1 -0
- package/manifest/ApplyManifestDialog.js +135 -0
- package/manifest/ApplyManifestDialog.js.map +1 -0
- package/manifest/EditResourceYamlDialog.d.ts +51 -0
- package/manifest/EditResourceYamlDialog.d.ts.map +1 -0
- package/manifest/EditResourceYamlDialog.js +104 -0
- package/manifest/EditResourceYamlDialog.js.map +1 -0
- package/manifest/RedactedSecretsNotice.d.ts +14 -0
- package/manifest/RedactedSecretsNotice.d.ts.map +1 -0
- package/manifest/RedactedSecretsNotice.js +14 -0
- package/manifest/RedactedSecretsNotice.js.map +1 -0
- package/manifest/YamlEditor.d.ts +44 -0
- package/manifest/YamlEditor.d.ts.map +1 -0
- package/manifest/YamlEditor.js +216 -0
- package/manifest/YamlEditor.js.map +1 -0
- package/manifest/index.d.ts +13 -0
- package/manifest/index.d.ts.map +1 -0
- package/manifest/index.js +13 -0
- package/manifest/index.js.map +1 -0
- package/manifest/useApplyManifest.d.ts +82 -0
- package/manifest/useApplyManifest.d.ts.map +1 -0
- package/manifest/useApplyManifest.js +180 -0
- package/manifest/useApplyManifest.js.map +1 -0
- package/manifest/useEditResourceYaml.d.ts +106 -0
- package/manifest/useEditResourceYaml.d.ts.map +1 -0
- package/manifest/useEditResourceYaml.js +168 -0
- package/manifest/useEditResourceYaml.js.map +1 -0
- package/mcp-server/McpServerDetailView.d.ts.map +1 -1
- package/mcp-server/McpServerDetailView.js +4 -3
- package/mcp-server/McpServerDetailView.js.map +1 -1
- package/mcp-server/steps/ReviewStep.d.ts.map +1 -1
- package/mcp-server/steps/ReviewStep.js +2 -3
- package/mcp-server/steps/ReviewStep.js.map +1 -1
- package/package.json +4 -4
- package/resource-creation/templates/workflow-templates.js +4 -4
- package/session/SessionViewer.js +8 -1
- package/session/SessionViewer.js.map +1 -1
- package/session/audience.d.ts +6 -1
- package/session/audience.d.ts.map +1 -1
- package/session/useEditSessionPrep.js +3 -3
- package/session/useEditSessionPrep.js.map +1 -1
- package/settings/index.d.ts +2 -1
- package/settings/index.d.ts.map +1 -1
- package/settings/index.js +2 -1
- package/settings/index.js.map +1 -1
- package/settings/settings-nav.d.ts +22 -0
- package/settings/settings-nav.d.ts.map +1 -1
- package/settings/settings-nav.js +32 -1
- package/settings/settings-nav.js.map +1 -1
- package/settings/useSettingsNavGroups.d.ts +29 -0
- package/settings/useSettingsNavGroups.d.ts.map +1 -0
- package/settings/useSettingsNavGroups.js +61 -0
- package/settings/useSettingsNavGroups.js.map +1 -0
- package/skill/SkillDetailView.d.ts.map +1 -1
- package/skill/SkillDetailView.js +4 -3
- package/skill/SkillDetailView.js.map +1 -1
- package/src/access/__tests__/useManageAccess.test.tsx +104 -0
- package/src/agent/AgentDetailView.tsx +9 -3
- package/src/agent/steps/ReviewStep.tsx +2 -3
- package/src/billing/BaselineEditor.tsx +619 -0
- package/src/billing/ModelCatalogPanel.tsx +283 -0
- package/src/billing/ModelGovernanceDetail.tsx +289 -0
- package/src/billing/OperatorAccessNotice.tsx +32 -0
- package/src/billing/PricingGovernanceConsole.tsx +465 -0
- package/src/billing/PricingGovernancePanel.tsx +166 -0
- package/src/billing/RetireConfirm.tsx +82 -0
- package/src/billing/__tests__/ModelCatalogPanel.test.tsx +253 -0
- package/src/billing/__tests__/PricingGovernanceConsole.test.tsx +410 -0
- package/src/billing/__tests__/useModelGovernanceView.test.tsx +308 -0
- package/src/billing/form-primitives.tsx +68 -0
- package/src/billing/governance-primitives.tsx +133 -0
- package/src/billing/index.ts +37 -0
- package/src/billing/pricing-format.ts +53 -0
- package/src/billing/useDecidePricingOverride.ts +78 -0
- package/src/billing/useModelGovernanceView.ts +290 -0
- package/src/billing/useModelPricingBaselines.ts +69 -0
- package/src/billing/usePricingGovernance.ts +57 -0
- package/src/billing/useRetireModelPricingBaseline.ts +65 -0
- package/src/billing/useUpsertModelPricingBaseline.ts +72 -0
- package/src/channel/AgentChannelsPanel.tsx +27 -1
- package/src/composer/SessionComposer.tsx +1 -1
- package/src/cursor-accounts/CursorAccountEditor.tsx +181 -0
- package/src/cursor-accounts/CursorAccountsAccessNotice.tsx +36 -0
- package/src/cursor-accounts/CursorAccountsConsole.tsx +810 -0
- package/src/cursor-accounts/__tests__/CursorAccountsConsole.test.tsx +384 -0
- package/src/cursor-accounts/cursor-account-format.ts +29 -0
- package/src/cursor-accounts/index.ts +29 -0
- package/src/cursor-accounts/useCursorAccountView.ts +49 -0
- package/src/cursor-accounts/useCursorAccounts.ts +49 -0
- package/src/cursor-accounts/useCursorMemberKeyActions.ts +106 -0
- package/src/cursor-accounts/useDeleteCursorAccount.ts +62 -0
- package/src/cursor-accounts/useSyncCursorAccount.ts +54 -0
- package/src/cursor-accounts/useUpsertCursorAccount.ts +57 -0
- package/src/datastore/CollectionRecordsBrowser.tsx +544 -0
- package/src/datastore/CollectionSchemaView.tsx +247 -0
- package/src/datastore/DatastoreDetailView.tsx +201 -0
- package/src/datastore/DatastoreSyncReport.tsx +105 -0
- package/src/datastore/DeleteDatastoreDialog.tsx +202 -0
- package/src/datastore/FieldValueControl.tsx +289 -0
- package/src/datastore/RecordFilterBuilder.tsx +411 -0
- package/src/datastore/RecordFormPanel.tsx +432 -0
- package/src/datastore/__tests__/CollectionRecordsBrowser.test.tsx +207 -0
- package/src/datastore/__tests__/DeleteDatastoreDialog.test.tsx +133 -0
- package/src/datastore/__tests__/FieldValueControl.test.tsx +160 -0
- package/src/datastore/__tests__/RecordFilterBuilder.test.tsx +141 -0
- package/src/datastore/__tests__/RecordFormPanel.test.tsx +227 -0
- package/src/datastore/__tests__/recordFilter.test.ts +156 -0
- package/src/datastore/__tests__/recordMutations.test.tsx +195 -0
- package/src/datastore/__tests__/recordValues.test.ts +359 -0
- package/src/datastore/__tests__/schemaAndSyncViews.test.tsx +142 -0
- package/src/datastore/__tests__/useDatastoreDescription.test.tsx +143 -0
- package/src/datastore/__tests__/useRecordCollection.test.tsx +250 -0
- package/src/datastore/__tests__/useRecordList.test.tsx +85 -0
- package/src/datastore/index.ts +111 -0
- package/src/datastore/recordFilter.ts +140 -0
- package/src/datastore/recordValues.ts +327 -0
- package/src/datastore/useDatastore.ts +67 -0
- package/src/datastore/useDatastoreCount.ts +67 -0
- package/src/datastore/useDatastoreDescription.ts +90 -0
- package/src/datastore/useDatastoreList.ts +79 -0
- package/src/datastore/useDatastoreSearch.ts +39 -0
- package/src/datastore/useDeleteDatastore.ts +87 -0
- package/src/datastore/useDeleteRecord.ts +77 -0
- package/src/datastore/useInsertRecord.ts +92 -0
- package/src/datastore/useRecordCollection.ts +256 -0
- package/src/datastore/useRecordList.ts +131 -0
- package/src/datastore/useUpdateRecord.ts +95 -0
- package/src/environment/EnvironmentListPanel.tsx +24 -0
- package/src/execution/__tests__/useArtifactInspection.test.tsx +12 -2
- package/src/execution/__tests__/useLiveAgentExecution.test.tsx +125 -0
- package/src/execution/index.ts +4 -7
- package/src/execution/useLiveAgentExecution.ts +41 -3
- package/src/iam-policy/__tests__/useCheckPermission.test.tsx +221 -0
- package/src/iam-policy/index.ts +1 -0
- package/src/iam-policy/useCheckPermission.ts +45 -19
- package/src/index.ts +167 -18
- package/src/internal/__tests__/useInViewport.test.tsx +115 -0
- package/src/internal/useInViewport.ts +63 -0
- package/src/library/VisibilitySelector.tsx +50 -9
- package/src/library/__tests__/VisibilitySelector.test.tsx +38 -0
- package/src/library/index.ts +4 -21
- package/src/library/useApplyResource.ts +27 -34
- package/src/library/useExportResource.ts +21 -40
- package/src/manifest/ApplyManifestDialog.tsx +315 -0
- package/src/manifest/EditResourceYamlDialog.tsx +265 -0
- package/src/manifest/RedactedSecretsNotice.tsx +30 -0
- package/src/manifest/YamlEditor.tsx +272 -0
- package/src/manifest/__tests__/EditResourceYamlDialog.test.tsx +118 -0
- package/src/manifest/__tests__/useApplyManifest.test.tsx +237 -0
- package/src/manifest/__tests__/useEditResourceYaml.test.tsx +252 -0
- package/src/manifest/index.ts +33 -0
- package/src/manifest/useApplyManifest.ts +270 -0
- package/src/manifest/useEditResourceYaml.ts +273 -0
- package/src/mcp-server/McpServerDetailView.tsx +7 -3
- package/src/mcp-server/steps/ReviewStep.tsx +2 -3
- package/src/resource-creation/templates/workflow-templates.ts +4 -4
- package/src/session/SessionViewer.tsx +7 -1
- package/src/session/__tests__/audienceWiring.test.tsx +31 -1
- package/src/session/audience.ts +6 -1
- package/src/session/useEditSessionPrep.ts +3 -3
- package/src/settings/__tests__/useSettingsNavGroups.test.tsx +138 -0
- package/src/settings/index.ts +5 -1
- package/src/settings/settings-nav.ts +43 -0
- package/src/settings/useSettingsNavGroups.ts +81 -0
- package/src/skill/SkillDetailView.tsx +7 -3
- package/src/workflow/WorkflowAgentCallTranscript.tsx +279 -0
- package/src/workflow/WorkflowDetailView.tsx +7 -3
- package/src/workflow/WorkflowExecutionViewer.tsx +20 -77
- package/src/workflow/WorkflowTaskApprovalSummary.tsx +45 -8
- package/src/workflow/WorkflowYamlEditor.tsx +6 -270
- package/src/workflow/__tests__/WorkflowAgentCallTranscript.liveregion.test.tsx +124 -0
- package/src/workflow/__tests__/{WorkflowAgentExecutionDocument.test.tsx → WorkflowAgentCallTranscript.test.tsx} +146 -121
- package/src/workflow/__tests__/WorkflowExecutionViewer.approvals.test.tsx +81 -220
- package/src/workflow/__tests__/WorkflowExecutionViewer.reconciliation.test.tsx +17 -16
- package/src/workflow/__tests__/WorkflowTaskApprovalSummary.test.tsx +52 -2
- package/src/workflow/__tests__/WorkflowTaskThread.test.tsx +168 -185
- package/src/workflow/__tests__/agent-call-live-experience.test.ts +4 -4
- package/src/workflow/__tests__/task-approval.test.ts +119 -0
- package/src/workflow/__tests__/task-presentation.test.ts +35 -1
- package/src/workflow/__tests__/useWorkflowExecutionPanel.test.ts +0 -57
- package/src/workflow/index.ts +6 -3
- package/src/workflow/task-detail/index.ts +3 -0
- package/src/workflow/task-detail/task-approval.ts +95 -1
- package/src/workflow/thread/WorkflowTaskThread.tsx +96 -252
- package/src/workflow/thread/task-presentation.ts +8 -2
- package/src/workflow/useWorkflowExecutionPanel.ts +0 -47
- package/styles.css +1 -1
- package/workflow/CanvasTransitionEdge.d.ts +1 -1
- package/workflow/WorkflowAgentCallTranscript.d.ts +87 -0
- package/workflow/WorkflowAgentCallTranscript.d.ts.map +1 -0
- package/workflow/WorkflowAgentCallTranscript.js +98 -0
- package/workflow/WorkflowAgentCallTranscript.js.map +1 -0
- package/workflow/WorkflowDetailView.d.ts.map +1 -1
- package/workflow/WorkflowDetailView.js +4 -3
- package/workflow/WorkflowDetailView.js.map +1 -1
- package/workflow/WorkflowExecutionViewer.d.ts.map +1 -1
- package/workflow/WorkflowExecutionViewer.js +23 -52
- package/workflow/WorkflowExecutionViewer.js.map +1 -1
- package/workflow/WorkflowTaskApprovalSummary.d.ts +1 -1
- package/workflow/WorkflowTaskApprovalSummary.d.ts.map +1 -1
- package/workflow/WorkflowTaskApprovalSummary.js +18 -1
- package/workflow/WorkflowTaskApprovalSummary.js.map +1 -1
- package/workflow/WorkflowYamlEditor.d.ts +2 -42
- package/workflow/WorkflowYamlEditor.d.ts.map +1 -1
- package/workflow/WorkflowYamlEditor.js +5 -214
- package/workflow/WorkflowYamlEditor.js.map +1 -1
- package/workflow/index.d.ts +2 -2
- package/workflow/index.d.ts.map +1 -1
- package/workflow/index.js +2 -2
- package/workflow/index.js.map +1 -1
- package/workflow/task-detail/index.d.ts +1 -1
- package/workflow/task-detail/index.d.ts.map +1 -1
- package/workflow/task-detail/index.js +1 -1
- package/workflow/task-detail/index.js.map +1 -1
- package/workflow/task-detail/task-approval.d.ts +44 -1
- package/workflow/task-detail/task-approval.d.ts.map +1 -1
- package/workflow/task-detail/task-approval.js +47 -0
- package/workflow/task-detail/task-approval.js.map +1 -1
- package/workflow/thread/WorkflowTaskThread.d.ts +17 -25
- package/workflow/thread/WorkflowTaskThread.d.ts.map +1 -1
- package/workflow/thread/WorkflowTaskThread.js +60 -105
- package/workflow/thread/WorkflowTaskThread.js.map +1 -1
- package/workflow/thread/task-presentation.d.ts.map +1 -1
- package/workflow/thread/task-presentation.js +7 -2
- package/workflow/thread/task-presentation.js.map +1 -1
- package/workflow/useWorkflowExecutionPanel.d.ts +0 -12
- package/workflow/useWorkflowExecutionPanel.d.ts.map +1 -1
- package/workflow/useWorkflowExecutionPanel.js +0 -12
- package/workflow/useWorkflowExecutionPanel.js.map +1 -1
- package/execution/agent-execution-document.d.ts +0 -31
- package/execution/agent-execution-document.d.ts.map +0 -1
- package/execution/agent-execution-document.js +0 -48
- package/execution/agent-execution-document.js.map +0 -1
- package/library/ImportResourceDialog.d.ts +0 -43
- package/library/ImportResourceDialog.d.ts.map +0 -1
- package/library/ImportResourceDialog.js +0 -90
- package/library/ImportResourceDialog.js.map +0 -1
- package/library/parse-resource-yaml.d.ts +0 -63
- package/library/parse-resource-yaml.d.ts.map +0 -1
- package/library/parse-resource-yaml.js +0 -407
- package/library/parse-resource-yaml.js.map +0 -1
- package/library/serialize-resource-yaml.d.ts +0 -103
- package/library/serialize-resource-yaml.d.ts.map +0 -1
- package/library/serialize-resource-yaml.js +0 -565
- package/library/serialize-resource-yaml.js.map +0 -1
- package/library/useImportResource.d.ts +0 -84
- package/library/useImportResource.d.ts.map +0 -1
- package/library/useImportResource.js +0 -188
- package/library/useImportResource.js.map +0 -1
- package/src/execution/__tests__/agent-execution-document.test.ts +0 -45
- package/src/execution/agent-execution-document.ts +0 -54
- package/src/library/ImportResourceDialog.tsx +0 -227
- package/src/library/parse-resource-yaml.ts +0 -630
- package/src/library/serialize-resource-yaml.ts +0 -756
- package/src/library/useImportResource.ts +0 -253
- package/src/workflow/WorkflowAgentExecutionDocument.tsx +0 -283
- package/workflow/WorkflowAgentExecutionDocument.d.ts +0 -79
- package/workflow/WorkflowAgentExecutionDocument.d.ts.map +0 -1
- package/workflow/WorkflowAgentExecutionDocument.js +0 -87
- package/workflow/WorkflowAgentExecutionDocument.js.map +0 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type ManifestPreviewEntry } from "./useApplyManifest.js";
|
|
2
|
+
/** Props for {@link ApplyManifestDialog}. */
|
|
3
|
+
export interface ApplyManifestDialogProps {
|
|
4
|
+
/** Whether the dialog is open. */
|
|
5
|
+
readonly open: boolean;
|
|
6
|
+
/** Called when the dialog should open or close. */
|
|
7
|
+
readonly onOpenChange: (open: boolean) => void;
|
|
8
|
+
/** Target organization slug for documents that omit `metadata.org`. */
|
|
9
|
+
readonly org: string;
|
|
10
|
+
/**
|
|
11
|
+
* Called after every document applied successfully, with the per-document
|
|
12
|
+
* results in apply order. Use for navigation or list refresh.
|
|
13
|
+
*/
|
|
14
|
+
readonly onSuccess?: (entries: readonly ManifestPreviewEntry[]) => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Modal dialog for applying a Stigmer resource manifest — paste YAML or
|
|
18
|
+
* upload a file, review what will change, and apply. The console
|
|
19
|
+
* counterpart of `stigmer apply -f`, for every supported resource kind.
|
|
20
|
+
*
|
|
21
|
+
* Workflow:
|
|
22
|
+
* 1. Paste manifest YAML (or JSON) into the editor, or pick a file
|
|
23
|
+
* 2. Each document is validated against its kind's generated proto schema
|
|
24
|
+
* and previewed with a create-or-update badge resolved from server state
|
|
25
|
+
* 3. Apply runs the documents sequentially in dependency order with live
|
|
26
|
+
* per-document status; a failure stops the run and renders inline
|
|
27
|
+
*
|
|
28
|
+
* Multi-document manifests (`---` separators) are supported. Documents
|
|
29
|
+
* that omit `metadata.org` are applied to the active org; documents naming
|
|
30
|
+
* a different org are honored with a warning (matching `stigmer apply`).
|
|
31
|
+
*
|
|
32
|
+
* Uses the native `<dialog>` element for built-in focus trapping, Escape
|
|
33
|
+
* key handling, and backdrop — consistent with {@link ConfirmDialog}.
|
|
34
|
+
*
|
|
35
|
+
* Zero Console dependencies — safe for platform builder embedding.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```tsx
|
|
39
|
+
* <ApplyManifestDialog
|
|
40
|
+
* open={open}
|
|
41
|
+
* onOpenChange={setOpen}
|
|
42
|
+
* org={activeOrg}
|
|
43
|
+
* onSuccess={() => refetchList()}
|
|
44
|
+
* />
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export declare function ApplyManifestDialog({ open, onOpenChange, org, onSuccess, }: ApplyManifestDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
//# sourceMappingURL=ApplyManifestDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApplyManifestDialog.d.ts","sourceRoot":"","sources":["../../src/manifest/ApplyManifestDialog.tsx"],"names":[],"mappings":"AAMA,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,uBAAuB,CAAC;AAO/B,6CAA6C;AAC7C,MAAM,WAAW,wBAAwB;IACvC,kCAAkC;IAClC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,mDAAmD;IACnD,QAAQ,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,uEAAuE;IACvE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,SAAS,oBAAoB,EAAE,KAAK,IAAI,CAAC;CACzE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,YAAY,EACZ,GAAG,EACH,SAAS,GACV,EAAE,wBAAwB,2CAqK1B"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { lazy, Suspense, useCallback, useEffect, useRef } from "react";
|
|
4
|
+
import { cn } from "@stigmer/theme";
|
|
5
|
+
import { toast } from "../feedback/toast.js";
|
|
6
|
+
import { RedactedSecretsNotice } from "./RedactedSecretsNotice.js";
|
|
7
|
+
import { useApplyManifest, } from "./useApplyManifest.js";
|
|
8
|
+
// CodeMirror loads only when the dialog actually opens (DD-013).
|
|
9
|
+
const LazyYamlEditor = lazy(() => import("./YamlEditor.js").then((m) => ({ default: m.YamlEditor })));
|
|
10
|
+
/**
|
|
11
|
+
* Modal dialog for applying a Stigmer resource manifest — paste YAML or
|
|
12
|
+
* upload a file, review what will change, and apply. The console
|
|
13
|
+
* counterpart of `stigmer apply -f`, for every supported resource kind.
|
|
14
|
+
*
|
|
15
|
+
* Workflow:
|
|
16
|
+
* 1. Paste manifest YAML (or JSON) into the editor, or pick a file
|
|
17
|
+
* 2. Each document is validated against its kind's generated proto schema
|
|
18
|
+
* and previewed with a create-or-update badge resolved from server state
|
|
19
|
+
* 3. Apply runs the documents sequentially in dependency order with live
|
|
20
|
+
* per-document status; a failure stops the run and renders inline
|
|
21
|
+
*
|
|
22
|
+
* Multi-document manifests (`---` separators) are supported. Documents
|
|
23
|
+
* that omit `metadata.org` are applied to the active org; documents naming
|
|
24
|
+
* a different org are honored with a warning (matching `stigmer apply`).
|
|
25
|
+
*
|
|
26
|
+
* Uses the native `<dialog>` element for built-in focus trapping, Escape
|
|
27
|
+
* key handling, and backdrop — consistent with {@link ConfirmDialog}.
|
|
28
|
+
*
|
|
29
|
+
* Zero Console dependencies — safe for platform builder embedding.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* <ApplyManifestDialog
|
|
34
|
+
* open={open}
|
|
35
|
+
* onOpenChange={setOpen}
|
|
36
|
+
* org={activeOrg}
|
|
37
|
+
* onSuccess={() => refetchList()}
|
|
38
|
+
* />
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export function ApplyManifestDialog({ open, onOpenChange, org, onSuccess, }) {
|
|
42
|
+
const dialogRef = useRef(null);
|
|
43
|
+
const fileInputRef = useRef(null);
|
|
44
|
+
const manifest = useApplyManifest(org);
|
|
45
|
+
const { reset } = manifest;
|
|
46
|
+
// Sync dialog open state with the native <dialog> element.
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
const dialog = dialogRef.current;
|
|
49
|
+
if (!dialog)
|
|
50
|
+
return;
|
|
51
|
+
if (open && !dialog.open) {
|
|
52
|
+
dialog.showModal();
|
|
53
|
+
}
|
|
54
|
+
else if (!open && dialog.open) {
|
|
55
|
+
dialog.close();
|
|
56
|
+
}
|
|
57
|
+
}, [open]);
|
|
58
|
+
// Start each session clean.
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
if (open) {
|
|
61
|
+
reset();
|
|
62
|
+
if (fileInputRef.current)
|
|
63
|
+
fileInputRef.current.value = "";
|
|
64
|
+
}
|
|
65
|
+
}, [open, reset]);
|
|
66
|
+
const handleCancel = useCallback((e) => {
|
|
67
|
+
e.preventDefault();
|
|
68
|
+
onOpenChange(false);
|
|
69
|
+
}, [onOpenChange]);
|
|
70
|
+
const handleFileChange = useCallback((e) => {
|
|
71
|
+
const file = e.target.files?.[0];
|
|
72
|
+
if (file)
|
|
73
|
+
manifest.readFile(file);
|
|
74
|
+
}, [manifest]);
|
|
75
|
+
const handleApply = useCallback(async () => {
|
|
76
|
+
const allApplied = await manifest.applyAll();
|
|
77
|
+
if (allApplied && manifest.entries) {
|
|
78
|
+
const count = manifest.entries.length;
|
|
79
|
+
toast.success(count === 1 ? "Resource applied" : `${count} resources applied`);
|
|
80
|
+
onOpenChange(false);
|
|
81
|
+
onSuccess?.(manifest.entries);
|
|
82
|
+
}
|
|
83
|
+
// On failure the dialog stays open — per-entry status shows what
|
|
84
|
+
// applied and what failed.
|
|
85
|
+
}, [manifest, onOpenChange, onSuccess]);
|
|
86
|
+
const canApply = manifest.entries !== null &&
|
|
87
|
+
manifest.entries.length > 0 &&
|
|
88
|
+
!manifest.isValidating &&
|
|
89
|
+
!manifest.isApplying;
|
|
90
|
+
return (_jsx("dialog", { ref: dialogRef, onCancel: handleCancel, className: cn("fixed inset-0 z-50 m-auto w-full max-w-3xl rounded-lg border border-border bg-popover p-0 text-popover-foreground shadow-lg", "backdrop:bg-black/50", "open:animate-in open:fade-in-0 open:zoom-in-95"), children: _jsxs("div", { className: "flex flex-col gap-4 p-6", children: [_jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("h3", { className: "text-base font-semibold text-foreground", children: "Apply YAML" }), _jsx("p", { className: "text-sm text-muted-foreground", children: "Paste a resource manifest or upload a file. Resources are created when new and updated when they already exist." })] }), _jsx("input", { ref: fileInputRef, type: "file", accept: ".yaml,.yml,.json", onChange: handleFileChange, className: cn("w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground", "file:mr-3 file:rounded-md file:border-0 file:bg-primary file:px-2.5 file:py-1 file:text-xs file:font-medium file:text-primary-foreground", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"), "aria-label": "Select manifest file" }), _jsx(Suspense, { fallback: _jsx(EditorLoading, {}), children: _jsx(LazyYamlEditor, { value: manifest.content, onChange: manifest.setContent, className: "h-56" }) }), manifest.hasRedactedSecrets && _jsx(RedactedSecretsNotice, {}), manifest.validationError && (_jsx("div", { role: "alert", className: "rounded-md border border-destructive bg-card px-3 py-2.5 text-sm text-destructive", children: manifest.validationError })), manifest.entries && manifest.entries.length > 0 && (_jsx("ul", { className: "flex max-h-48 flex-col gap-2 overflow-y-auto", "aria-label": "Resources to apply", children: manifest.entries.map((entry, index) => (_jsx(PreviewRow, { entry: entry }, `${entry.document.handler.yamlKind}/${entry.document.org}/${entry.document.slug}/${index}`))) })), _jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("p", { className: "text-xs text-muted-foreground", "aria-live": "polite", children: manifest.isValidating ? "Validating…" : "" }), _jsxs("div", { className: "flex gap-2", children: [_jsx("button", { type: "button", onClick: () => onOpenChange(false), disabled: manifest.isApplying, className: cn("rounded-md px-3 py-1.5 text-sm font-medium transition-colors", "border border-input bg-background text-foreground", "hover:bg-accent hover:text-accent-foreground", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", "disabled:pointer-events-none disabled:opacity-50"), children: "Cancel" }), _jsx("button", { type: "button", onClick: handleApply, disabled: !canApply, className: cn("rounded-md px-3 py-1.5 text-sm font-medium transition-colors", "bg-primary text-primary-foreground hover:bg-primary-hover", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", "disabled:pointer-events-none disabled:opacity-50"), children: manifest.isApplying
|
|
91
|
+
? "Applying…"
|
|
92
|
+
: applyLabel(manifest.entries?.length ?? 0) })] })] })] }) }));
|
|
93
|
+
}
|
|
94
|
+
function applyLabel(count) {
|
|
95
|
+
if (count <= 1)
|
|
96
|
+
return "Apply";
|
|
97
|
+
return `Apply ${count} resources`;
|
|
98
|
+
}
|
|
99
|
+
function EditorLoading() {
|
|
100
|
+
return (_jsx("div", { className: "flex h-56 items-center justify-center rounded-md border border-border bg-muted text-sm text-muted-foreground", children: "Loading editor\u2026" }));
|
|
101
|
+
}
|
|
102
|
+
// ---------------------------------------------------------------------------
|
|
103
|
+
// Per-document preview row
|
|
104
|
+
// ---------------------------------------------------------------------------
|
|
105
|
+
function PreviewRow({ entry }) {
|
|
106
|
+
return (_jsxs("li", { className: "rounded-md border border-border bg-card px-3 py-2", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "inline-flex rounded bg-muted px-1.5 py-0.5 text-xs font-medium text-muted-foreground", children: entry.document.handler.displayName }), _jsx("span", { className: "text-sm font-medium text-foreground", children: entry.document.name }), _jsx(ActionBadge, { entry: entry }), _jsx("span", { className: "ml-auto text-xs text-muted-foreground", children: entry.document.org })] }), entry.document.warning && (_jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: entry.document.warning })), entry.status === "failed" && entry.errorMessage && (_jsx("p", { role: "alert", className: "mt-1 text-xs text-destructive", children: entry.errorMessage }))] }));
|
|
107
|
+
}
|
|
108
|
+
function ActionBadge({ entry }) {
|
|
109
|
+
const label = badgeLabel(entry);
|
|
110
|
+
return (_jsx("span", { className: cn("inline-flex rounded px-1.5 py-0.5 text-xs font-medium", entry.status === "failed"
|
|
111
|
+
? "bg-card text-destructive border border-destructive"
|
|
112
|
+
: "bg-muted text-muted-foreground"), children: label }));
|
|
113
|
+
}
|
|
114
|
+
function badgeLabel(entry) {
|
|
115
|
+
switch (entry.status) {
|
|
116
|
+
case "applying":
|
|
117
|
+
return "Applying…";
|
|
118
|
+
case "applied":
|
|
119
|
+
return "Applied";
|
|
120
|
+
case "failed":
|
|
121
|
+
return "Failed";
|
|
122
|
+
case "skipped":
|
|
123
|
+
return "Skipped";
|
|
124
|
+
case "pending":
|
|
125
|
+
switch (entry.action) {
|
|
126
|
+
case "create":
|
|
127
|
+
return "Will create";
|
|
128
|
+
case "update":
|
|
129
|
+
return "Will update";
|
|
130
|
+
case "unknown":
|
|
131
|
+
return "Create or update";
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=ApplyManifestDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApplyManifestDialog.js","sourceRoot":"","sources":["../../src/manifest/ApplyManifestDialog.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACvE,OA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ClB,KAAK,SAAS;YACZ,OAAO,SAAS,CAAC;QACnB,KAAK,SAAS;YACZ,QAAQ,KAAK,CAAC,MAAM,EAAE,CAAC;gBACrB,KAAK,QAAQ;oBACX,OAAO,aAAa,CAAC;gBACvB,KAAK,QAAQ;oBACX,OAAO,aAAa,CAAC;gBACvB,KAAK,SAAS;oBACZ,OAAO,kBAAkB,CAAC;YAC9B,CAAC;IACL,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { Message } from "@bufbuild/protobuf";
|
|
2
|
+
import { type AppliedManifest } from "@stigmer/sdk";
|
|
3
|
+
/** Props for {@link EditResourceYamlDialog}. */
|
|
4
|
+
export interface EditResourceYamlDialogProps {
|
|
5
|
+
/** Whether the dialog is open. */
|
|
6
|
+
readonly open: boolean;
|
|
7
|
+
/** Called when the dialog should open or close. */
|
|
8
|
+
readonly onOpenChange: (open: boolean) => void;
|
|
9
|
+
/**
|
|
10
|
+
* The resource to edit, as returned by the server. `null` while loading —
|
|
11
|
+
* the dialog shows the editor as soon as the resource arrives.
|
|
12
|
+
*/
|
|
13
|
+
readonly resource: Message | null;
|
|
14
|
+
/** Called after a successful apply. Use for refetching or navigation. */
|
|
15
|
+
readonly onApplied?: (result: AppliedManifest) => void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Modal dialog for editing a resource as YAML and applying the changes —
|
|
19
|
+
* the kind-agnostic "Edit YAML" experience for detail pages and panels.
|
|
20
|
+
*
|
|
21
|
+
* Workflow:
|
|
22
|
+
* 1. The resource is serialized to canonical YAML (system-managed state
|
|
23
|
+
* stripped) and seeded into a CodeMirror editor
|
|
24
|
+
* 2. Every edit is validated against the kind's generated proto schema;
|
|
25
|
+
* errors render inline with the exact schema complaint
|
|
26
|
+
* 3. A live summary states what applying will do ("update X" / "create Y"),
|
|
27
|
+
* resolved against server state — so a rename reads as a create
|
|
28
|
+
* 4. Apply calls the kind's `apply` RPC (create-or-update by slug)
|
|
29
|
+
*
|
|
30
|
+
* Redacted secret values (`***REDACTED***`) are explained inline: applying
|
|
31
|
+
* them preserves the stored secrets (the server's marker contract).
|
|
32
|
+
*
|
|
33
|
+
* Uses the native `<dialog>` element for built-in focus trapping, Escape
|
|
34
|
+
* key handling, and backdrop — consistent with {@link ConfirmDialog}.
|
|
35
|
+
*
|
|
36
|
+
* Zero Console dependencies — safe for platform builder embedding.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```tsx
|
|
40
|
+
* const { agent, refetch } = useAgent(org, slug);
|
|
41
|
+
*
|
|
42
|
+
* <EditResourceYamlDialog
|
|
43
|
+
* open={editOpen}
|
|
44
|
+
* onOpenChange={setEditOpen}
|
|
45
|
+
* resource={agent}
|
|
46
|
+
* onApplied={() => refetch()}
|
|
47
|
+
* />
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
export declare function EditResourceYamlDialog({ open, onOpenChange, resource, onApplied, }: EditResourceYamlDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
//# sourceMappingURL=EditResourceYamlDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditResourceYamlDialog.d.ts","sourceRoot":"","sources":["../../src/manifest/EditResourceYamlDialog.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAkB,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAUpE,gDAAgD;AAChD,MAAM,WAAW,2BAA2B;IAC1C,kCAAkC;IAClC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,mDAAmD;IACnD,QAAQ,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,yEAAyE;IACzE,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;CACxD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,SAAS,GACV,EAAE,2BAA2B,2CA0K7B"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { lazy, Suspense, useCallback, useEffect, useRef } from "react";
|
|
4
|
+
import { cn } from "@stigmer/theme";
|
|
5
|
+
import { getUserMessage } from "@stigmer/sdk";
|
|
6
|
+
import { toast } from "../feedback/toast.js";
|
|
7
|
+
import { RedactedSecretsNotice } from "./RedactedSecretsNotice.js";
|
|
8
|
+
import { useEditResourceYaml } from "./useEditResourceYaml.js";
|
|
9
|
+
// CodeMirror loads only when an editor dialog actually opens (DD-013).
|
|
10
|
+
const LazyYamlEditor = lazy(() => import("./YamlEditor.js").then((m) => ({ default: m.YamlEditor })));
|
|
11
|
+
/**
|
|
12
|
+
* Modal dialog for editing a resource as YAML and applying the changes —
|
|
13
|
+
* the kind-agnostic "Edit YAML" experience for detail pages and panels.
|
|
14
|
+
*
|
|
15
|
+
* Workflow:
|
|
16
|
+
* 1. The resource is serialized to canonical YAML (system-managed state
|
|
17
|
+
* stripped) and seeded into a CodeMirror editor
|
|
18
|
+
* 2. Every edit is validated against the kind's generated proto schema;
|
|
19
|
+
* errors render inline with the exact schema complaint
|
|
20
|
+
* 3. A live summary states what applying will do ("update X" / "create Y"),
|
|
21
|
+
* resolved against server state — so a rename reads as a create
|
|
22
|
+
* 4. Apply calls the kind's `apply` RPC (create-or-update by slug)
|
|
23
|
+
*
|
|
24
|
+
* Redacted secret values (`***REDACTED***`) are explained inline: applying
|
|
25
|
+
* them preserves the stored secrets (the server's marker contract).
|
|
26
|
+
*
|
|
27
|
+
* Uses the native `<dialog>` element for built-in focus trapping, Escape
|
|
28
|
+
* key handling, and backdrop — consistent with {@link ConfirmDialog}.
|
|
29
|
+
*
|
|
30
|
+
* Zero Console dependencies — safe for platform builder embedding.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```tsx
|
|
34
|
+
* const { agent, refetch } = useAgent(org, slug);
|
|
35
|
+
*
|
|
36
|
+
* <EditResourceYamlDialog
|
|
37
|
+
* open={editOpen}
|
|
38
|
+
* onOpenChange={setEditOpen}
|
|
39
|
+
* resource={agent}
|
|
40
|
+
* onApplied={() => refetch()}
|
|
41
|
+
* />
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export function EditResourceYamlDialog({ open, onOpenChange, resource, onApplied, }) {
|
|
45
|
+
const dialogRef = useRef(null);
|
|
46
|
+
const edit = useEditResourceYaml({ resource });
|
|
47
|
+
const { reset } = edit;
|
|
48
|
+
// Sync dialog open state with the native <dialog> element.
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
const dialog = dialogRef.current;
|
|
51
|
+
if (!dialog)
|
|
52
|
+
return;
|
|
53
|
+
if (open && !dialog.open) {
|
|
54
|
+
dialog.showModal();
|
|
55
|
+
}
|
|
56
|
+
else if (!open && dialog.open) {
|
|
57
|
+
dialog.close();
|
|
58
|
+
}
|
|
59
|
+
}, [open]);
|
|
60
|
+
// Discard stale edits from a previous session when the dialog opens.
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
if (open)
|
|
63
|
+
reset();
|
|
64
|
+
}, [open, reset]);
|
|
65
|
+
const handleCancel = useCallback((e) => {
|
|
66
|
+
e.preventDefault();
|
|
67
|
+
onOpenChange(false);
|
|
68
|
+
}, [onOpenChange]);
|
|
69
|
+
const handleApply = useCallback(async () => {
|
|
70
|
+
try {
|
|
71
|
+
const result = await edit.apply();
|
|
72
|
+
if (!result)
|
|
73
|
+
return;
|
|
74
|
+
toast.success(`${result.displayName} "${result.name}" applied`);
|
|
75
|
+
onOpenChange(false);
|
|
76
|
+
onApplied?.(result);
|
|
77
|
+
}
|
|
78
|
+
catch {
|
|
79
|
+
// error state is set by the hook and rendered inline
|
|
80
|
+
}
|
|
81
|
+
}, [edit, onOpenChange, onApplied]);
|
|
82
|
+
const canApply = edit.validation.status === "valid" && edit.isDirty && !edit.isApplying;
|
|
83
|
+
return (_jsx("dialog", { ref: dialogRef, onCancel: handleCancel, className: cn("fixed inset-0 z-50 m-auto w-full max-w-3xl rounded-lg border border-border bg-popover p-0 text-popover-foreground shadow-lg", "backdrop:bg-black/50", "open:animate-in open:fade-in-0 open:zoom-in-95"), children: _jsxs("div", { className: "flex flex-col gap-4 p-6", children: [_jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("h3", { className: "text-base font-semibold text-foreground", children: "Edit YAML" }), _jsx("p", { className: "text-sm text-muted-foreground", children: "Edit the resource definition and apply. Changes are validated against the resource schema as you type." })] }), resource ? (_jsx(Suspense, { fallback: _jsx(EditorLoading, {}), children: _jsx(LazyYamlEditor, { value: edit.yaml, onChange: edit.setYaml, className: "h-80" }) })) : (_jsx(EditorLoading, { label: "Loading resource\u2026" })), edit.hasRedactedSecrets && _jsx(RedactedSecretsNotice, {}), edit.validation.status === "invalid" && (_jsx("div", { role: "alert", className: "rounded-md border border-destructive bg-card px-3 py-2.5 text-sm text-destructive", children: edit.validation.message })), edit.error && (_jsxs("div", { role: "alert", className: "flex items-start gap-3 rounded-md border border-destructive bg-card px-3 py-2.5", children: [_jsx("p", { className: "flex-1 text-sm text-destructive", children: getUserMessage(edit.error) }), _jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [_jsx("button", { type: "button", onClick: handleApply, disabled: edit.validation.status !== "valid" || edit.isApplying, className: cn("rounded-md border border-input bg-background px-2 py-1 text-xs font-medium text-foreground", "hover:bg-accent hover:text-accent-foreground", "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", "disabled:pointer-events-none disabled:opacity-50"), children: "Try again" }), _jsx("button", { type: "button", onClick: edit.clearError, "aria-label": "Dismiss error", className: cn("rounded-md px-2 py-1 text-xs font-medium text-muted-foreground", "hover:bg-accent hover:text-foreground", "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"), children: "Dismiss" })] })] })), _jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("p", { className: "text-xs text-muted-foreground", "aria-live": "polite", children: targetSummary(edit.validation.status, edit.isDirty, edit.target) }), _jsxs("div", { className: "flex gap-2", children: [_jsx("button", { type: "button", onClick: () => onOpenChange(false), disabled: edit.isApplying, className: cn("rounded-md px-3 py-1.5 text-sm font-medium transition-colors", "border border-input bg-background text-foreground", "hover:bg-accent hover:text-accent-foreground", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", "disabled:pointer-events-none disabled:opacity-50"), children: "Cancel" }), _jsx("button", { type: "button", onClick: handleApply, disabled: !canApply, className: cn("rounded-md px-3 py-1.5 text-sm font-medium transition-colors", "bg-primary text-primary-foreground hover:bg-primary-hover", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", "disabled:pointer-events-none disabled:opacity-50"), children: edit.isApplying ? "Applying…" : "Apply changes" })] })] })] }) }));
|
|
84
|
+
}
|
|
85
|
+
function targetSummary(validationStatus, isDirty, target) {
|
|
86
|
+
if (validationStatus !== "valid")
|
|
87
|
+
return "";
|
|
88
|
+
if (!isDirty)
|
|
89
|
+
return "No changes yet.";
|
|
90
|
+
if (target === null)
|
|
91
|
+
return "Checking what applying will do…";
|
|
92
|
+
switch (target.action) {
|
|
93
|
+
case "update":
|
|
94
|
+
return `Applying will update ${target.slug}.`;
|
|
95
|
+
case "create":
|
|
96
|
+
return `Applying will create ${target.slug} — the name or slug changed.`;
|
|
97
|
+
case "unknown":
|
|
98
|
+
return `Applying will create or update ${target.slug}.`;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
function EditorLoading({ label = "Loading editor…" }) {
|
|
102
|
+
return (_jsx("div", { className: "flex h-80 items-center justify-center rounded-md border border-border bg-muted text-sm text-muted-foreground", children: label }));
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=EditResourceYamlDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditResourceYamlDialog.js","sourceRoot":"","sources":["../../src/manifest/EditResourceYamlDialog.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,cAAc,EAAwB,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,uEAAuE;AACvE,MAAM,cAAc,GAAG,IAAI,CAAC,GAAG,EAAE,CAC/B,MAAM,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,CACnE,CAAC;AAiBF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,UAAU,sBAAsB,CAAC,EACrC,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,SAAS,GACmB;IAC5B,MAAM,SAAS,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAC;IAClD,MAAM,IAAI,GAAG,mBAAmB,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC/C,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IAEvB,2DAA2D;IAC3D,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,CAAC;QACjC,IAAI,CAAC,MAAM;YAAE,OAAO;QACpB,IA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X,OAAO,wBAAwB,MAAM,CAAC,IAAI,8BAA8B,CAAC;QAC3E,KAAK,SAAS;YACZ,OAAO,kCAAkC,MAAM,CAAC,IAAI,GAAG,CAAC;IAC5D,CAAC;AACH,CAAC;AAED,SAAS,aAAa,CAAC,EAAE,KAAK,GAAG,iBAAiB,EAA+B;IAC/E,OAAO,CACL,cAAK,SAAS,EAAC,8GAA8G,YAC1H,KAAK,GACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Props for {@link RedactedSecretsNotice}. */
|
|
2
|
+
export interface RedactedSecretsNoticeProps {
|
|
3
|
+
/** Additional CSS classes for the root container. */
|
|
4
|
+
readonly className?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Inline explanation shown when manifest content contains `***REDACTED***`
|
|
8
|
+
* secret markers, so the marker reads as a contract rather than a bug:
|
|
9
|
+
* applying it preserves the stored secret; replacing it sets a new value.
|
|
10
|
+
*
|
|
11
|
+
* Shared by {@link EditResourceYamlDialog} and {@link ApplyManifestDialog}.
|
|
12
|
+
*/
|
|
13
|
+
export declare function RedactedSecretsNotice({ className }: RedactedSecretsNoticeProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
//# sourceMappingURL=RedactedSecretsNotice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RedactedSecretsNotice.d.ts","sourceRoot":"","sources":["../../src/manifest/RedactedSecretsNotice.tsx"],"names":[],"mappings":"AAIA,+CAA+C;AAC/C,MAAM,WAAW,0BAA0B;IACzC,qDAAqD;IACrD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,SAAS,EAAE,EAAE,0BAA0B,2CAY9E"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "@stigmer/theme";
|
|
4
|
+
/**
|
|
5
|
+
* Inline explanation shown when manifest content contains `***REDACTED***`
|
|
6
|
+
* secret markers, so the marker reads as a contract rather than a bug:
|
|
7
|
+
* applying it preserves the stored secret; replacing it sets a new value.
|
|
8
|
+
*
|
|
9
|
+
* Shared by {@link EditResourceYamlDialog} and {@link ApplyManifestDialog}.
|
|
10
|
+
*/
|
|
11
|
+
export function RedactedSecretsNotice({ className }) {
|
|
12
|
+
return (_jsxs("p", { className: cn("rounded-md border border-border bg-muted px-3 py-2 text-xs text-muted-foreground", className), children: ["Secret values are shown as ", _jsx("code", { className: "font-mono", children: "***REDACTED***" }), ". Applying keeps the stored secrets; replace a marker to set a new value."] }));
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=RedactedSecretsNotice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RedactedSecretsNotice.js","sourceRoot":"","sources":["../../src/manifest/RedactedSecretsNotice.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAQpC;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,EAAE,SAAS,EAA8B;IAC7E,OAAO,CACL,aACE,SAAS,EAAE,EAAE,CACX,kFAAkF,EAClF,SAAS,CACV,4CAE0B,eAAM,SAAS,EAAC,WAAW,+BAAsB,iFAE1E,CACL,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { type CSSProperties } from "react";
|
|
2
|
+
import { type Diagnostic } from "@codemirror/lint";
|
|
3
|
+
/** Props for {@link YamlEditor}. */
|
|
4
|
+
export interface YamlEditorProps {
|
|
5
|
+
/** Current YAML content. */
|
|
6
|
+
readonly value: string;
|
|
7
|
+
/** Called when the editor content changes. */
|
|
8
|
+
readonly onChange?: (value: string) => void;
|
|
9
|
+
/** Validation diagnostics to display as inline markers. */
|
|
10
|
+
readonly diagnostics?: readonly Diagnostic[];
|
|
11
|
+
/** Whether the editor is read-only. @default false */
|
|
12
|
+
readonly readOnly?: boolean;
|
|
13
|
+
/** Additional CSS class names for the root container. */
|
|
14
|
+
readonly className?: string;
|
|
15
|
+
/** Additional inline styles for the root container. */
|
|
16
|
+
readonly style?: CSSProperties;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* YAML editor built on CodeMirror 6, shared by every YAML surface in the
|
|
20
|
+
* SDK (workflow editor tab, resource manifest dialogs).
|
|
21
|
+
*
|
|
22
|
+
* Provides syntax highlighting, line numbers, bracket matching,
|
|
23
|
+
* code folding, undo/redo, and inline diagnostic markers driven by
|
|
24
|
+
* external validation (via the `diagnostics` prop).
|
|
25
|
+
*
|
|
26
|
+
* Themed via `--stgm-*` CSS custom properties to respect the host
|
|
27
|
+
* application's design tokens.
|
|
28
|
+
*
|
|
29
|
+
* This is an optional SDK component — it requires CodeMirror peer
|
|
30
|
+
* dependencies. Consumers that render it conditionally should load it
|
|
31
|
+
* via `React.lazy` so the CodeMirror bundle stays out of paths that
|
|
32
|
+
* never open an editor (DD-013).
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* <YamlEditor
|
|
37
|
+
* value={yaml}
|
|
38
|
+
* onChange={setYaml}
|
|
39
|
+
* diagnostics={diagnostics}
|
|
40
|
+
* />
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare const YamlEditor: import("react").NamedExoticComponent<YamlEditorProps>;
|
|
44
|
+
//# sourceMappingURL=YamlEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"YamlEditor.d.ts","sourceRoot":"","sources":["../../src/manifest/YamlEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,OAAO,CAAC;AAOf,OAAO,EAAc,KAAK,UAAU,EAAkB,MAAM,kBAAkB,CAAC;AAI/E,oCAAoC;AACpC,MAAM,WAAW,eAAe;IAC9B,4BAA4B;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,8CAA8C;IAC9C,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,2DAA2D;IAC3D,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;IAC7C,sDAAsD;IACtD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,yDAAyD;IACzD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,uDAAuD;IACvD,QAAQ,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC;CAChC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,UAAU,uDAwHrB,CAAC"}
|