@declarion/react 0.60.0 → 0.63.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/dist-lib/ActionDialog-uiuse5W8.js +374 -0
- package/dist-lib/ActionResultDialog.impl-BUBm9Ck3.js +273 -0
- package/dist-lib/ActionRunner-DAxgnKB3.js +1440 -0
- package/dist-lib/AdminCatalogPage.impl-BJGn7EvA.js +441 -0
- package/dist-lib/{AgentChatPanel.impl-BY-Ir7Sh.js → AgentChatPanel.impl-8bw8J-xV.js} +358 -319
- package/dist-lib/AgentOpenFollower.impl-Cga1q7_e.js +81 -0
- package/dist-lib/AssociatedBlock-D6qDYmRO.js +1515 -0
- package/dist-lib/AuthShell-DdiughRT.js +361 -0
- package/dist-lib/ChangePasswordDialog-DFe7lVQg.js +12 -0
- package/dist-lib/ChangePasswordDialog.impl-DtSIaP-A.js +194 -0
- package/dist-lib/CommandPalette.impl-Db3AFA5w.js +383 -0
- package/dist-lib/CopyButton-C0iEvaT1.js +119 -0
- package/dist-lib/DirtyTabsCloseDialog.impl-DWaFaWKn.js +191 -0
- package/dist-lib/{DraggableChildrenTable-CtL7rdT6.js → DraggableChildrenTable-Cy8uevS_.js} +45 -44
- package/dist-lib/DynamicIcon-DuBSz6TZ.js +133 -0
- package/dist-lib/FieldRow-BXBBFOZh.js +157 -0
- package/dist-lib/FilterChips-8fMDBXHp.js +1031 -0
- package/dist-lib/Forgot.impl-CmT5A__V.js +105 -0
- package/dist-lib/{Grid-CYERLdXO.js → Grid-Cg29k0jv.js} +98 -99
- package/dist-lib/Icons-Dzl-AkD_.d.ts +159 -0
- package/dist-lib/Icons-lt-7lhYR.js +151 -0
- package/dist-lib/ImpersonationBanner.impl-CBJJx6an.js +76 -0
- package/dist-lib/ImpersonationStartModal.impl-RaZcsJpG.js +158 -0
- package/dist-lib/Kbd-CNttVu0z.js +23 -0
- package/dist-lib/{LayoutRenderer-B08IJKsZ.js → LayoutRenderer-DEHtYtzV.js} +965 -942
- package/dist-lib/{ListCardsBody-Dje_rays.js → ListCardsBody-BAwFR3yO.js} +46 -52
- package/dist-lib/{MarkdownRenderer-N0IWjTH5.js → MarkdownRenderer-kNEMr6K_.js} +15 -16
- package/dist-lib/MenuItem-CfkVXPvC.js +140 -0
- package/dist-lib/NotFoundPage.impl-ZSBn4WWb.js +68 -0
- package/dist-lib/PageHeader-tw4pX3lI.js +71 -0
- package/dist-lib/PageShell-tI-mm0C5.js +47 -0
- package/dist-lib/Pill-D-wsfRhx.js +42 -0
- package/dist-lib/Preferences.impl-BG9XBZDf.js +162 -0
- package/dist-lib/Profile.impl-CbzSzxyG.js +527 -0
- package/dist-lib/PropertyGridEditor-BTjscqfz.js +4378 -0
- package/dist-lib/RecordHeader-Bv9nJXnG.js +217 -0
- package/dist-lib/RecordIdBadge-C3MgoZvt.js +25 -0
- package/dist-lib/RefreshControl-Ce-T_wSQ.js +195 -0
- package/dist-lib/Reset.impl-Cesyqt5p.js +168 -0
- package/dist-lib/SSOCallbackPage.impl-BC_W9nQA.js +31 -0
- package/dist-lib/SectionCard-VonaiLrx.js +150 -0
- package/dist-lib/SignUp.impl-C1KCQbfZ.js +212 -0
- package/dist-lib/SmartDetailPage.impl-8iOAMYQh.js +1609 -0
- package/dist-lib/SmartListPage.impl-Cc4Zwz5f.js +2818 -0
- package/dist-lib/SmartRecordListPage.impl-xTSohkqG.js +795 -0
- package/dist-lib/{SortHeaderMenu-DKKeCGTH.js → SortHeaderMenu-BKTrq0Wb.js} +23 -23
- package/dist-lib/TenantParamsPage.impl-DMuSs3eP.js +306 -0
- package/dist-lib/TwoFA.impl-BClZ3ndk.js +125 -0
- package/dist-lib/{cardProjection-nveYLvHR.js → cardProjection-Cr7fG6wJ.js} +134 -133
- package/dist-lib/declarion-react.css +1 -1
- package/dist-lib/format-count-CSEFw2ht.js +943 -0
- package/dist-lib/headerActionZone-bef-tZZ7.js +14 -0
- package/dist-lib/{stores/icon-registry.d.ts → icon-registry-CUT4eF63.d.ts} +14 -11
- package/dist-lib/icons.d.ts +20 -4
- package/dist-lib/icons.js +3 -2
- package/dist-lib/index.d.ts +2516 -150
- package/dist-lib/index.js +1532 -5053
- package/dist-lib/page-inset-D_kkVwwN.js +9 -0
- package/dist-lib/page-state-eA6J_KIR.js +124 -0
- package/dist-lib/param-editors-9yJr7xmN.js +201 -0
- package/dist-lib/payload-B2wODLAX.js +86 -0
- package/dist-lib/{peekDraftStore-DSExeoAh.js → peekDraftStore-D4GRsRKW.js} +44 -43
- package/dist-lib/registry-BpzE8-h8.js +119 -0
- package/dist-lib/screen-back-Cs4kzeqD.js +44 -0
- package/dist-lib/testing.d.ts +53 -56
- package/dist-lib/testing.js +54 -55
- package/dist-lib/use-filter-value-labels-DuqvAIVG.js +413 -0
- package/dist-lib/{useAgentConversation-BavrHfrU.js → useAgentConversation-D210VDCQ.js} +158 -169
- package/dist-lib/useAuth-CR2YKKXb.js +49 -0
- package/dist-lib/useBranding-Ckp_AuJb.js +41 -0
- package/dist-lib/useBrandingChrome-bKTXXDLy.js +170 -0
- package/dist-lib/useCurrentLocation-BdngVeQv.js +22 -0
- package/dist-lib/useCurrentScreen--UovgvRj.js +2511 -0
- package/dist-lib/useImpersonation-DNV23Ks1.js +35 -0
- package/dist-lib/useObject-1OCeV34A.js +26 -0
- package/dist-lib/useOwnRefresh-DkOuM4yo.js +435 -0
- package/dist-lib/useParams-ei6w4I7w.js +133 -0
- package/dist-lib/useProperties-CbdhlhZd.js +81 -0
- package/dist-lib/useResponsiveMode-DIR1bZfo.d.ts +1786 -0
- package/dist-lib/useScreenBack-J861tbwn.js +71 -0
- package/dist-lib/useTabNavigate-BZiW4q3M.js +78 -0
- package/dist-lib/useTabTitle-CZZnWIQi.js +22 -0
- package/dist-lib/utils-D_QDpB8_.js +11 -0
- package/dist-lib/{value-By1-WJ8J.js → value-CDCeHgOv.js} +8 -22
- package/dist-lib/{action-dispatch-DbiOpvd6.js → variants-CbAwl3Mn.js} +734 -740
- package/dist-lib/vite/index.d.ts +42 -16
- package/dist-lib/window-election-CHIvIZwx.js +45 -0
- package/package.json +17 -24
- package/dist-lib/DetailAuditStrip-B9p1XhjC.js +0 -288
- package/dist-lib/DynamicIcon-DW5krHuX.js +0 -280
- package/dist-lib/RefreshControl-BEWSHtAC.js +0 -399
- package/dist-lib/SmartDetailPage.impl-CYiM-ITJ.js +0 -1565
- package/dist-lib/SmartListPage.impl-Db_Pv9Xc.js +0 -3051
- package/dist-lib/SmartRecordListPage.impl-hbbLglC1.js +0 -780
- package/dist-lib/api/agents.d.ts +0 -140
- package/dist-lib/api/auth-redirect.d.ts +0 -3
- package/dist-lib/api/auth.d.ts +0 -26
- package/dist-lib/api/batch.d.ts +0 -25
- package/dist-lib/api/client.d.ts +0 -51
- package/dist-lib/api/data.d.ts +0 -153
- package/dist-lib/api/entities.d.ts +0 -149
- package/dist-lib/api/events.d.ts +0 -91
- package/dist-lib/api/params.d.ts +0 -28
- package/dist-lib/api/properties.d.ts +0 -3
- package/dist-lib/api/schema.d.ts +0 -2
- package/dist-lib/api/status.d.ts +0 -2
- package/dist-lib/app.d.ts +0 -1
- package/dist-lib/components/actions/ActionButton.d.ts +0 -18
- package/dist-lib/components/actions/ActionDialog.d.ts +0 -20
- package/dist-lib/components/actions/ActionResultDialog.d.ts +0 -22
- package/dist-lib/components/actions/ActionRunner.d.ts +0 -62
- package/dist-lib/components/actions/ObjectActionBar.d.ts +0 -29
- package/dist-lib/components/actions/PropertyGridEditor.d.ts +0 -20
- package/dist-lib/components/actions/ResponsiveActionBar.d.ts +0 -259
- package/dist-lib/components/actions/RowActionsKebab.d.ts +0 -20
- package/dist-lib/components/agents/AgentChatPanel.d.ts +0 -3
- package/dist-lib/components/agents/AgentChatPanel.impl.d.ts +0 -14
- package/dist-lib/components/agents/AgentConversationDrawer.d.ts +0 -11
- package/dist-lib/components/agents/AgentElicitForm.d.ts +0 -27
- package/dist-lib/components/agents/AgentPicker.d.ts +0 -8
- package/dist-lib/components/agents/transcript-runs.d.ts +0 -29
- package/dist-lib/components/chrome/AssociationTabs.d.ts +0 -9
- package/dist-lib/components/chrome/AuditMetaStrip.d.ts +0 -11
- package/dist-lib/components/chrome/Breadcrumbs.d.ts +0 -14
- package/dist-lib/components/chrome/HighlightsStrip.d.ts +0 -10
- package/dist-lib/components/chrome/PageHeader.d.ts +0 -16
- package/dist-lib/components/chrome/PageShell.d.ts +0 -7
- package/dist-lib/components/chrome/RecordHeader.d.ts +0 -17
- package/dist-lib/components/chrome/headerActionZone.d.ts +0 -27
- package/dist-lib/components/detail-layout/AssociatedBlock.d.ts +0 -20
- package/dist-lib/components/detail-layout/AssociatedToolbar.d.ts +0 -13
- package/dist-lib/components/detail-layout/ChildrenBlock.d.ts +0 -16
- package/dist-lib/components/detail-layout/ChildrenCards.d.ts +0 -2
- package/dist-lib/components/detail-layout/ChildrenList.d.ts +0 -2
- package/dist-lib/components/detail-layout/ChildrenTable.d.ts +0 -2
- package/dist-lib/components/detail-layout/ChildrenTimeline.d.ts +0 -2
- package/dist-lib/components/detail-layout/DetailAuditStrip.d.ts +0 -12
- package/dist-lib/components/detail-layout/DetailHighlights.d.ts +0 -14
- package/dist-lib/components/detail-layout/DraggableChildrenTable.d.ts +0 -16
- package/dist-lib/components/detail-layout/EditableChildrenTable.d.ts +0 -16
- package/dist-lib/components/detail-layout/ErrorSummary.d.ts +0 -11
- package/dist-lib/components/detail-layout/EvidenceBlock.d.ts +0 -6
- package/dist-lib/components/detail-layout/FieldRow.d.ts +0 -23
- package/dist-lib/components/detail-layout/FieldsBlock.d.ts +0 -8
- package/dist-lib/components/detail-layout/LayoutColumn.d.ts +0 -9
- package/dist-lib/components/detail-layout/LayoutRenderer.d.ts +0 -46
- package/dist-lib/components/detail-layout/LayoutRow.d.ts +0 -8
- package/dist-lib/components/detail-layout/LayoutTabs.d.ts +0 -8
- package/dist-lib/components/detail-layout/PropertiesBlock.d.ts +0 -8
- package/dist-lib/components/detail-layout/QuickAddForm.d.ts +0 -10
- package/dist-lib/components/detail-layout/SectionBlock.d.ts +0 -8
- package/dist-lib/components/detail-layout/StatusesBlock.d.ts +0 -8
- package/dist-lib/components/detail-layout/TimelineComposer.d.ts +0 -10
- package/dist-lib/components/detail-layout/blockMeta.d.ts +0 -5
- package/dist-lib/components/detail-layout/index.d.ts +0 -21
- package/dist-lib/components/detail-layout/useManualColumnResize.d.ts +0 -25
- package/dist-lib/components/detail-layout/useQuickAdd.d.ts +0 -16
- package/dist-lib/components/detail-layout/widgets/EntityScorecardWidget.d.ts +0 -2
- package/dist-lib/components/detail-layout/widgets/JsonDiffWidget.d.ts +0 -2
- package/dist-lib/components/detail-layout/widgets/MonacoJson.d.ts +0 -9
- package/dist-lib/components/detail-layout/widgets/WidgetHost.d.ts +0 -9
- package/dist-lib/components/detail-layout/widgets/builtins.d.ts +0 -1
- package/dist-lib/components/detail-layout/widgets/canonicalizeJson.d.ts +0 -1
- package/dist-lib/components/detail-layout/widgets/monacoBootstrap.d.ts +0 -1
- package/dist-lib/components/detail-layout/widgets/registry.d.ts +0 -14
- package/dist-lib/components/fields/BoolField.d.ts +0 -2
- package/dist-lib/components/fields/EmailField.d.ts +0 -2
- package/dist-lib/components/fields/EnumField.d.ts +0 -2
- package/dist-lib/components/fields/IntArrayField.d.ts +0 -2
- package/dist-lib/components/fields/JsonEditor.d.ts +0 -10
- package/dist-lib/components/fields/JsonField.d.ts +0 -3
- package/dist-lib/components/fields/MultilangArrayField.d.ts +0 -2
- package/dist-lib/components/fields/MultilangField.d.ts +0 -2
- package/dist-lib/components/fields/MultilangTextField.d.ts +0 -2
- package/dist-lib/components/fields/NumberField.d.ts +0 -2
- package/dist-lib/components/fields/PasswordField.d.ts +0 -2
- package/dist-lib/components/fields/PhoneField.d.ts +0 -2
- package/dist-lib/components/fields/RefCombobox.d.ts +0 -45
- package/dist-lib/components/fields/RefField.d.ts +0 -2
- package/dist-lib/components/fields/RichTextField.d.ts +0 -2
- package/dist-lib/components/fields/SecretField.d.ts +0 -2
- package/dist-lib/components/fields/StringArrayField.d.ts +0 -2
- package/dist-lib/components/fields/StringField.d.ts +0 -2
- package/dist-lib/components/fields/StructureField.d.ts +0 -2
- package/dist-lib/components/fields/TextField.d.ts +0 -2
- package/dist-lib/components/fields/TimestampField.d.ts +0 -2
- package/dist-lib/components/fields/UrlField.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/badge.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/boolPill.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/code.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/date.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/email.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/emptyCell.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/host-icons.d.ts +0 -17
- package/dist-lib/components/fields/cells/factories/json.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/link.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/markdown.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/markdownPreview.d.ts +0 -9
- package/dist-lib/components/fields/cells/factories/money.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/multilangInline.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/nextRun.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/number.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/passwordMask.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/phone.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/refLink.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/richTextPreview.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/statusPill.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/tagList.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/text.d.ts +0 -2
- package/dist-lib/components/fields/cells/factories/timestamp.d.ts +0 -3
- package/dist-lib/components/fields/cells/factories/url-helpers.d.ts +0 -12
- package/dist-lib/components/fields/cells/factories/url.d.ts +0 -2
- package/dist-lib/components/fields/cells/registry.d.ts +0 -21
- package/dist-lib/components/fields/index.d.ts +0 -28
- package/dist-lib/components/fields/langMap.d.ts +0 -2
- package/dist-lib/components/fields/secretValue.d.ts +0 -2
- package/dist-lib/components/file-widgets/CircleImage.d.ts +0 -2
- package/dist-lib/components/file-widgets/DocumentCard.d.ts +0 -2
- package/dist-lib/components/file-widgets/FileList.d.ts +0 -2
- package/dist-lib/components/file-widgets/Grid.d.ts +0 -2
- package/dist-lib/components/file-widgets/GridLazy.d.ts +0 -2
- package/dist-lib/components/file-widgets/ImageWidget.d.ts +0 -12
- package/dist-lib/components/file-widgets/LabeledSlots.d.ts +0 -2
- package/dist-lib/components/file-widgets/SquareImage.d.ts +0 -2
- package/dist-lib/components/file-widgets/UnknownFileWidget.d.ts +0 -3
- package/dist-lib/components/file-widgets/UploadFailureText.d.ts +0 -4
- package/dist-lib/components/file-widgets/WideBanner.d.ts +0 -2
- package/dist-lib/components/file-widgets/builtins.d.ts +0 -1
- package/dist-lib/components/file-widgets/cropper.d.ts +0 -14
- package/dist-lib/components/file-widgets/draft-scope.d.ts +0 -22
- package/dist-lib/components/file-widgets/helpers.d.ts +0 -15
- package/dist-lib/components/file-widgets/host.d.ts +0 -28
- package/dist-lib/components/file-widgets/index.d.ts +0 -16
- package/dist-lib/components/file-widgets/payload.d.ts +0 -21
- package/dist-lib/components/file-widgets/registry.d.ts +0 -5
- package/dist-lib/components/file-widgets/types.d.ts +0 -17
- package/dist-lib/components/file-widgets/upload.d.ts +0 -45
- package/dist-lib/components/file-widgets/useEmbedFileSrc.d.ts +0 -42
- package/dist-lib/components/file-widgets/value.d.ts +0 -4
- package/dist-lib/components/filters/FilterChips.d.ts +0 -14
- package/dist-lib/components/filters/FilterDrawer.d.ts +0 -32
- package/dist-lib/components/filters/filter-op-label.d.ts +0 -3
- package/dist-lib/components/layout/CommandPalette.d.ts +0 -21
- package/dist-lib/components/layout/DirtyTabsCloseDialog.d.ts +0 -9
- package/dist-lib/components/layout/ImpersonationBanner.d.ts +0 -11
- package/dist-lib/components/layout/ImpersonationFrame.d.ts +0 -11
- package/dist-lib/components/layout/ImpersonationStartModal.d.ts +0 -22
- package/dist-lib/components/layout/Layout.d.ts +0 -6
- package/dist-lib/components/layout/Rail.d.ts +0 -22
- package/dist-lib/components/layout/Sidebar.d.ts +0 -12
- package/dist-lib/components/layout/TabStrip.d.ts +0 -6
- package/dist-lib/components/layout/TenantChip.d.ts +0 -26
- package/dist-lib/components/layout/TopBar.d.ts +0 -22
- package/dist-lib/components/layout/tab-close.d.ts +0 -13
- package/dist-lib/components/list/ColumnPicker.d.ts +0 -20
- package/dist-lib/components/list/InlineEditCell.d.ts +0 -15
- package/dist-lib/components/list/PeekFieldCell.d.ts +0 -16
- package/dist-lib/components/list/QuickPeek.d.ts +0 -59
- package/dist-lib/components/list/ViewSwitcher.d.ts +0 -24
- package/dist-lib/components/list/peekDraftStore.d.ts +0 -6
- package/dist-lib/components/pages/AdminCatalogPage.d.ts +0 -1
- package/dist-lib/components/pages/DocumentsMenu.d.ts +0 -21
- package/dist-lib/components/pages/ExportMenu.d.ts +0 -30
- package/dist-lib/components/pages/NotFoundPage.d.ts +0 -1
- package/dist-lib/components/pages/RecordDocumentsPanel.d.ts +0 -41
- package/dist-lib/components/pages/SSOCallbackPage.d.ts +0 -1
- package/dist-lib/components/pages/SmartDetailPage.d.ts +0 -2
- package/dist-lib/components/pages/SmartDetailPage.impl.d.ts +0 -4
- package/dist-lib/components/pages/SmartListPage.d.ts +0 -2
- package/dist-lib/components/pages/SmartListPage.impl.d.ts +0 -4
- package/dist-lib/components/pages/SmartRecordListPage.d.ts +0 -2
- package/dist-lib/components/pages/SmartRecordListPage.impl.d.ts +0 -4
- package/dist-lib/components/pages/auth/AuthShell.d.ts +0 -18
- package/dist-lib/components/pages/auth/Forgot.d.ts +0 -1
- package/dist-lib/components/pages/auth/Reset.d.ts +0 -1
- package/dist-lib/components/pages/auth/SignIn.d.ts +0 -1
- package/dist-lib/components/pages/auth/SignUp.d.ts +0 -1
- package/dist-lib/components/pages/auth/TwoFA.d.ts +0 -1
- package/dist-lib/components/pages/auth/icons.d.ts +0 -6
- package/dist-lib/components/pages/exportRequest.d.ts +0 -69
- package/dist-lib/components/pages/list/DataCell.d.ts +0 -4
- package/dist-lib/components/pages/list/DeleteViewDialog.d.ts +0 -8
- package/dist-lib/components/pages/list/ListCardRow.d.ts +0 -39
- package/dist-lib/components/pages/list/ListCardsBody.d.ts +0 -33
- package/dist-lib/components/pages/list/ListFloatbar.d.ts +0 -29
- package/dist-lib/components/pages/list/ListFooter.d.ts +0 -26
- package/dist-lib/components/pages/list/ListHeader.d.ts +0 -26
- package/dist-lib/components/pages/list/ListNoRows.d.ts +0 -31
- package/dist-lib/components/pages/list/ListTable.d.ts +0 -33
- package/dist-lib/components/pages/list/ListTableRow.d.ts +0 -17
- package/dist-lib/components/pages/list/ListToolbar.d.ts +0 -46
- package/dist-lib/components/pages/list/ListUrlBanner.d.ts +0 -10
- package/dist-lib/components/pages/list/RowActionsCell.d.ts +0 -34
- package/dist-lib/components/pages/list/RowContextMenu.d.ts +0 -28
- package/dist-lib/components/pages/list/SaveViewDialog.d.ts +0 -10
- package/dist-lib/components/pages/list/SortHeaderMenu.d.ts +0 -14
- package/dist-lib/components/pages/list/cardProjection.d.ts +0 -67
- package/dist-lib/components/pages/list/column-sizing.d.ts +0 -14
- package/dist-lib/components/pages/list/columns.d.ts +0 -46
- package/dist-lib/components/pages/list/filter-meta.d.ts +0 -25
- package/dist-lib/components/pages/list/page-size.d.ts +0 -3
- package/dist-lib/components/pages/list/sortable-header.d.ts +0 -2
- package/dist-lib/components/pages/list/table-features.d.ts +0 -14
- package/dist-lib/components/pages/list/use-filter-value-labels.d.ts +0 -24
- package/dist-lib/components/pages/list/useActiveView.d.ts +0 -45
- package/dist-lib/components/pages/list/useHeaderReorder.d.ts +0 -26
- package/dist-lib/components/pages/list/useListColumnLayout.d.ts +0 -38
- package/dist-lib/components/pages/list/useListQuery.d.ts +0 -67
- package/dist-lib/components/pages/list/useListRowInteraction.d.ts +0 -61
- package/dist-lib/components/pages/list/useListSelection.d.ts +0 -31
- package/dist-lib/components/pages/list/useListSort.d.ts +0 -46
- package/dist-lib/components/pages/list/useListViews.d.ts +0 -57
- package/dist-lib/components/pages/list/useRowMenu.d.ts +0 -46
- package/dist-lib/components/pages/profile/Preferences.d.ts +0 -1
- package/dist-lib/components/pages/profile/Profile.d.ts +0 -7
- package/dist-lib/components/pages/tenant-params/TenantParamsPage.d.ts +0 -2
- package/dist-lib/components/params/ParamsBlock.d.ts +0 -13
- package/dist-lib/components/params/param-editors.d.ts +0 -20
- package/dist-lib/components/primitives/Avatar.d.ts +0 -6
- package/dist-lib/components/primitives/BoolToggle.d.ts +0 -7
- package/dist-lib/components/primitives/BrandGlyph.d.ts +0 -8
- package/dist-lib/components/primitives/BrandLogo.d.ts +0 -12
- package/dist-lib/components/primitives/Btn.d.ts +0 -19
- package/dist-lib/components/primitives/Check.d.ts +0 -7
- package/dist-lib/components/primitives/Chip.d.ts +0 -9
- package/dist-lib/components/primitives/ClassifiedFieldLocked.d.ts +0 -9
- package/dist-lib/components/primitives/Dropdown.d.ts +0 -20
- package/dist-lib/components/primitives/Fields.d.ts +0 -109
- package/dist-lib/components/primitives/HoverCard.d.ts +0 -15
- package/dist-lib/components/primitives/IconBtn.d.ts +0 -11
- package/dist-lib/components/primitives/Icons.d.ts +0 -136
- package/dist-lib/components/primitives/Kbd.d.ts +0 -4
- package/dist-lib/components/primitives/MenuItem.d.ts +0 -14
- package/dist-lib/components/primitives/Pill.d.ts +0 -11
- package/dist-lib/components/primitives/RecordIdBadge.d.ts +0 -8
- package/dist-lib/components/primitives/RowField.d.ts +0 -10
- package/dist-lib/components/primitives/SectionCard.d.ts +0 -24
- package/dist-lib/components/primitives/Spinner.d.ts +0 -3
- package/dist-lib/components/primitives/Tooltip.d.ts +0 -34
- package/dist-lib/components/primitives/dataTableStyles.d.ts +0 -4
- package/dist-lib/components/primitives/index.d.ts +0 -37
- package/dist-lib/components/shared/ChangePasswordDialog.d.ts +0 -9
- package/dist-lib/components/shared/ConfirmDialog.d.ts +0 -11
- package/dist-lib/components/shared/CopyButton.d.ts +0 -8
- package/dist-lib/components/shared/DynamicIcon.d.ts +0 -20
- package/dist-lib/components/shared/EmptyState.d.ts +0 -9
- package/dist-lib/components/shared/ErrorBoundary.d.ts +0 -17
- package/dist-lib/components/shared/LoadingSkeleton.d.ts +0 -6
- package/dist-lib/components/shared/LucideIcon.d.ts +0 -16
- package/dist-lib/components/shared/Markdown.d.ts +0 -3
- package/dist-lib/components/shared/MarkdownRenderer.d.ts +0 -11
- package/dist-lib/components/shared/RefreshControl.d.ts +0 -25
- package/dist-lib/components/shared/StatusGroupsDisplay.d.ts +0 -11
- package/dist-lib/components/shared/StatusStepper.d.ts +0 -13
- package/dist-lib/components/shared/toast/DeclarionToast.d.ts +0 -31
- package/dist-lib/components/shared/useOwnRefresh.d.ts +0 -9
- package/dist-lib/embed/EmbedAuthBootstrap.d.ts +0 -8
- package/dist-lib/embed/EmbedContext.d.ts +0 -50
- package/dist-lib/embed/EmbedDirtyReporter.d.ts +0 -10
- package/dist-lib/embed/EmbedHistoryTracker.d.ts +0 -1
- package/dist-lib/embed/EmbedLocationReporter.d.ts +0 -8
- package/dist-lib/embed/EmbedResizeReporter.d.ts +0 -6
- package/dist-lib/embed/EmbedUnsavedGuard.d.ts +0 -7
- package/dist-lib/embed/embed-dirty.d.ts +0 -24
- package/dist-lib/embed/embed-history.d.ts +0 -19
- package/dist-lib/embed/embed-nav-guard.d.ts +0 -20
- package/dist-lib/embed/file-src.d.ts +0 -63
- package/dist-lib/embed/handshake.d.ts +0 -57
- package/dist-lib/embed/index.d.ts +0 -19
- package/dist-lib/embed/params.d.ts +0 -75
- package/dist-lib/embed/protocol.d.ts +0 -165
- package/dist-lib/embed/screen-location.d.ts +0 -50
- package/dist-lib/embed/theme.d.ts +0 -34
- package/dist-lib/embed/token.d.ts +0 -57
- package/dist-lib/embed/useEmbedNavigate.d.ts +0 -48
- package/dist-lib/embed/useGlobalLinkInterceptor.d.ts +0 -66
- package/dist-lib/failure-BT54OLHy.js +0 -158
- package/dist-lib/format-count-DLFCdtME.js +0 -1771
- package/dist-lib/hooks/useActionData.d.ts +0 -61
- package/dist-lib/hooks/useAgentConversation.d.ts +0 -24
- package/dist-lib/hooks/useAllEntityData.d.ts +0 -16
- package/dist-lib/hooks/useAssociatedData.d.ts +0 -10
- package/dist-lib/hooks/useAuth.d.ts +0 -22
- package/dist-lib/hooks/useBranding.d.ts +0 -8
- package/dist-lib/hooks/useBrandingChrome.d.ts +0 -59
- package/dist-lib/hooks/useChildrenData.d.ts +0 -3
- package/dist-lib/hooks/useColumns.d.ts +0 -13
- package/dist-lib/hooks/useCurrentScreen.d.ts +0 -34
- package/dist-lib/hooks/useCursorEntityData.d.ts +0 -79
- package/dist-lib/hooks/useDebounce.d.ts +0 -1
- package/dist-lib/hooks/useEntity.d.ts +0 -2
- package/dist-lib/hooks/useEntityData.d.ts +0 -41
- package/dist-lib/hooks/useFilters.d.ts +0 -14
- package/dist-lib/hooks/useImpersonation.d.ts +0 -23
- package/dist-lib/hooks/useLanguage.d.ts +0 -4
- package/dist-lib/hooks/useLiveObject.d.ts +0 -9
- package/dist-lib/hooks/useLongPress.d.ts +0 -29
- package/dist-lib/hooks/useMutations.d.ts +0 -13
- package/dist-lib/hooks/useObject.d.ts +0 -11
- package/dist-lib/hooks/useObjectStatus.d.ts +0 -5
- package/dist-lib/hooks/usePageState.d.ts +0 -32
- package/dist-lib/hooks/usePageStateRuntime.d.ts +0 -27
- package/dist-lib/hooks/usePageStateTtl.d.ts +0 -11
- package/dist-lib/hooks/useParams.d.ts +0 -49
- package/dist-lib/hooks/useProperties.d.ts +0 -5
- package/dist-lib/hooks/useRealtimeThresholds.d.ts +0 -1
- package/dist-lib/hooks/useRegisterScreenTab.d.ts +0 -11
- package/dist-lib/hooks/useResponsiveMode.d.ts +0 -27
- package/dist-lib/hooks/useSSE.d.ts +0 -31
- package/dist-lib/hooks/useSchema.d.ts +0 -1
- package/dist-lib/hooks/useScreen.d.ts +0 -2
- package/dist-lib/hooks/useScreenBack.d.ts +0 -21
- package/dist-lib/hooks/useScreenTab.d.ts +0 -10
- package/dist-lib/hooks/useTabNavigate.d.ts +0 -34
- package/dist-lib/hooks/useTabSearchMirror.d.ts +0 -1
- package/dist-lib/hooks/useTabTitle.d.ts +0 -2
- package/dist-lib/hooks/useText.d.ts +0 -3
- package/dist-lib/hooks/useTimelineData.d.ts +0 -10
- package/dist-lib/hooks/useVersionWatcher.d.ts +0 -30
- package/dist-lib/hooks/useViews.d.ts +0 -26
- package/dist-lib/lib/action-dispatch.d.ts +0 -8
- package/dist-lib/lib/actions.d.ts +0 -254
- package/dist-lib/lib/anchor.d.ts +0 -36
- package/dist-lib/lib/brand-tokens.d.ts +0 -43
- package/dist-lib/lib/branding.d.ts +0 -20
- package/dist-lib/lib/canonical-url.d.ts +0 -27
- package/dist-lib/lib/capabilityPrefetch.d.ts +0 -6
- package/dist-lib/lib/child-config.d.ts +0 -24
- package/dist-lib/lib/children-validation.d.ts +0 -5
- package/dist-lib/lib/decimal-text.d.ts +0 -1
- package/dist-lib/lib/display-value.d.ts +0 -1
- package/dist-lib/lib/document-templates.d.ts +0 -11
- package/dist-lib/lib/download.d.ts +0 -21
- package/dist-lib/lib/evidence-verdict.d.ts +0 -11
- package/dist-lib/lib/failure.d.ts +0 -2
- package/dist-lib/lib/field-classification.d.ts +0 -61
- package/dist-lib/lib/field-regions.d.ts +0 -8
- package/dist-lib/lib/filter-evaluator.d.ts +0 -16
- package/dist-lib/lib/filters.d.ts +0 -93
- package/dist-lib/lib/format-count.d.ts +0 -41
- package/dist-lib/lib/html-state.d.ts +0 -11
- package/dist-lib/lib/language.d.ts +0 -19
- package/dist-lib/lib/longPressGesture.d.ts +0 -55
- package/dist-lib/lib/mass-edit.d.ts +0 -32
- package/dist-lib/lib/page-inset.d.ts +0 -3
- package/dist-lib/lib/quick-add.d.ts +0 -2
- package/dist-lib/lib/realtime-query-keys.d.ts +0 -22
- package/dist-lib/lib/realtime-reconcile.d.ts +0 -33
- package/dist-lib/lib/realtime-resync.d.ts +0 -23
- package/dist-lib/lib/record-documents-key.d.ts +0 -1
- package/dist-lib/lib/rich-text.d.ts +0 -14
- package/dist-lib/lib/rowClickGesture.d.ts +0 -26
- package/dist-lib/lib/safe-url.d.ts +0 -15
- package/dist-lib/lib/schema-routing.d.ts +0 -3
- package/dist-lib/lib/screen-back.d.ts +0 -70
- package/dist-lib/lib/scroll-restoration.d.ts +0 -90
- package/dist-lib/lib/size-value.d.ts +0 -16
- package/dist-lib/lib/sort.d.ts +0 -72
- package/dist-lib/lib/timestamp.d.ts +0 -53
- package/dist-lib/lib/toast.d.ts +0 -49
- package/dist-lib/lib/ui-actions.d.ts +0 -12
- package/dist-lib/lib/utils.d.ts +0 -9
- package/dist-lib/lib/variants.d.ts +0 -7
- package/dist-lib/lib/versionTracker.d.ts +0 -72
- package/dist-lib/lib/viewport-category.d.ts +0 -44
- package/dist-lib/main.d.ts +0 -1
- package/dist-lib/registry-CRPxNbkk.js +0 -1956
- package/dist-lib/safe-url-oSJw5pzO.js +0 -34
- package/dist-lib/stores/auth.d.ts +0 -16
- package/dist-lib/stores/list-layout.d.ts +0 -85
- package/dist-lib/stores/page-state.d.ts +0 -61
- package/dist-lib/stores/preferences.d.ts +0 -37
- package/dist-lib/stores/realtime.d.ts +0 -96
- package/dist-lib/stores/screen-registry.d.ts +0 -17
- package/dist-lib/stores/tabs.d.ts +0 -73
- package/dist-lib/types/api.d.ts +0 -580
- package/dist-lib/types/fieldType.d.ts +0 -2
- package/dist-lib/types/files.d.ts +0 -79
- package/dist-lib/types/ordmap.d.ts +0 -39
- package/dist-lib/types/schema.d.ts +0 -1089
- package/dist-lib/useCurrentScreen-BPq7HMF1.js +0 -7840
- package/dist-lib/useListQuery-CG1WM4cv.js +0 -103
- package/dist-lib/useOwnRefresh-C18iWRgr.js +0 -1167
- package/dist-lib/useProperties-C35JrjwQ.js +0 -83
- package/dist-lib/useTabSearchMirror-DKktWWLB.js +0 -175
- package/dist-lib/useText-BFDCTUSo.js +0 -952
- package/dist-lib/vite/fingerprint-plugin.d.ts +0 -44
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/** The React Router navigation action, as returned by `useNavigationType()`. */
|
|
2
|
-
export type EmbedNavAction = "PUSH" | "POP" | "REPLACE";
|
|
3
|
-
interface EmbedHistoryState {
|
|
4
|
-
/** In-frame history depth: 0 at the entry screen, +1 per in-frame drill. */
|
|
5
|
-
readonly depth: number;
|
|
6
|
-
/** When true, the NEXT applied navigation is treated as a fresh root (depth
|
|
7
|
-
* resets to 0) regardless of its action. Set by a host-driven `navigate`. */
|
|
8
|
-
readonly nextIsRoot: boolean;
|
|
9
|
-
/** Apply one navigation's action to the depth. PUSH +1, POP -1 (floored at
|
|
10
|
-
* 0), REPLACE unchanged; a pending root marker forces 0 and clears itself.
|
|
11
|
-
* Called once per navigation by the tracker. */
|
|
12
|
-
applyNavigation: (action: EmbedNavAction) => void;
|
|
13
|
-
/** Mark the next applied navigation as a fresh root (host-driven `navigate`). */
|
|
14
|
-
markRoot: () => void;
|
|
15
|
-
/** Reset to the entry screen (embed re-bootstrap). */
|
|
16
|
-
reset: () => void;
|
|
17
|
-
}
|
|
18
|
-
export declare const useEmbedHistoryStore: import("zustand").UseBoundStore<import("zustand").StoreApi<EmbedHistoryState>>;
|
|
19
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
interface EmbedNavGuardState {
|
|
2
|
-
/**
|
|
3
|
-
* The deferred navigation, or null when nothing is pending. Set by
|
|
4
|
-
* `useEmbedScreenNavigate` when it intercepts a dirty navigation; consumed
|
|
5
|
-
* by `EmbedUnsavedGuard`.
|
|
6
|
-
*/
|
|
7
|
-
readonly pendingNavigation: (() => void) | null;
|
|
8
|
-
/** Defer a navigation behind the unsaved-changes confirm dialog. */
|
|
9
|
-
requestNavigation: (run: () => void) => void;
|
|
10
|
-
/** Run the deferred navigation (the user chose discard + leave). */
|
|
11
|
-
confirmNavigation: () => void;
|
|
12
|
-
/** Drop the deferred navigation (the user chose to stay). */
|
|
13
|
-
cancelNavigation: () => void;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* The embed-mode pending-navigation store. A non-null `pendingNavigation`
|
|
17
|
-
* means a dirty navigation is waiting on the confirm dialog.
|
|
18
|
-
*/
|
|
19
|
-
export declare const useEmbedNavGuardStore: import("zustand").UseBoundStore<import("zustand").StoreApi<EmbedNavGuardState>>;
|
|
20
|
-
export {};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The kind of URL `resolveEmbedFileSrc` produced, so the caller knows whether
|
|
3
|
-
* an object URL was created and must be revoked.
|
|
4
|
-
*
|
|
5
|
-
* - `direct`: a presigned (non-proxy) URL or a `data:` URL. Nothing to revoke.
|
|
6
|
-
* - `blob`: a `blob:` object URL created from fetched bytes. The caller MUST
|
|
7
|
-
* call `URL.revokeObjectURL` on it when the file changes or the component
|
|
8
|
-
* unmounts.
|
|
9
|
-
*/
|
|
10
|
-
export type EmbedFileSrcKind = "direct" | "blob";
|
|
11
|
-
/** The resolved source for a file, plus the cleanup obligation. */
|
|
12
|
-
export interface EmbedFileSrc {
|
|
13
|
-
/** The URL to assign to `<img src>` / pass to `window.open`. */
|
|
14
|
-
readonly url: string;
|
|
15
|
-
/** Whether `url` is a revocable `blob:` object URL. */
|
|
16
|
-
readonly kind: EmbedFileSrcKind;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* What to resolve for a given file: the primary file, a named derivation
|
|
20
|
-
* (thumbnail), or the download (attachment-disposition) form.
|
|
21
|
-
*
|
|
22
|
-
* - `preview` -> `/api/files/{id}/url`, inline disposition.
|
|
23
|
-
* - `download` -> `/api/files/{id}/url`; when the result is a proxy URL the
|
|
24
|
-
* `disposition=attachment` query is preserved so the proxy stream forces a
|
|
25
|
-
* download. A presigned URL already carries its disposition.
|
|
26
|
-
* - a derivation key string -> `/api/files/{id}/derived/{key}/url`.
|
|
27
|
-
*/
|
|
28
|
-
export type EmbedFileVariant = "preview" | "download" | {
|
|
29
|
-
derivation: string;
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* A 202 `{ status: "generating" }` from the derived endpoint - the async
|
|
33
|
-
* generator has not produced the derivation yet. Thrown so the React hook can
|
|
34
|
-
* fall back to the primary file rather than rendering broken media.
|
|
35
|
-
*/
|
|
36
|
-
export declare class DerivationPendingError extends Error {
|
|
37
|
-
readonly fileId: string;
|
|
38
|
-
readonly key: string;
|
|
39
|
-
constructor(fileId: string, key: string);
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Resolve a file (or one of its derivations) into a URL a native element can
|
|
43
|
-
* load under Bearer-only embed auth.
|
|
44
|
-
*
|
|
45
|
-
* Step 1: call the file URL endpoint WITH the Bearer header and
|
|
46
|
-
* `credentials: "omit"`. A 202 from the derived endpoint throws
|
|
47
|
-
* `DerivationPendingError`.
|
|
48
|
-
* Step 2: when `proxy: false`, the endpoint returned a presigned URL - return
|
|
49
|
-
* it directly (`kind: "direct"`), nothing to revoke.
|
|
50
|
-
* Step 3: when `proxy: true`, fetch the proxy bytes WITH the Bearer header,
|
|
51
|
-
* wrap them in a `blob:` object URL, and return it (`kind: "blob"`).
|
|
52
|
-
* The caller owns revocation.
|
|
53
|
-
*
|
|
54
|
-
* Both requests go through `embedAuthedFetch`, so a missing/stale token is
|
|
55
|
-
* waited out and a 401 is retried once with a freshly minted token.
|
|
56
|
-
*
|
|
57
|
-
* `signal` aborts both the metadata request and the bytes fetch, so a file
|
|
58
|
-
* change or unmount mid-flight cancels the in-flight work cleanly.
|
|
59
|
-
*
|
|
60
|
-
* Throws when not in embed token mode - callers outside embed mode MUST use
|
|
61
|
-
* the static URL path instead and never reach this function.
|
|
62
|
-
*/
|
|
63
|
-
export declare function resolveEmbedFileSrc(fileId: string, variant: EmbedFileVariant, signal?: AbortSignal): Promise<EmbedFileSrc>;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { type EmbedSetTokenPayload, type EmbedMessage, type EmbedNavigatePayload, type EmbedSetThemePayload } from "./protocol";
|
|
2
|
-
/**
|
|
3
|
-
* The classification of an inbound `message` event after validation.
|
|
4
|
-
*
|
|
5
|
-
* - `valid`: a trusted, shape-correct, version-matched embed frame. `message`
|
|
6
|
-
* is the typed envelope.
|
|
7
|
-
* - `protocol-mismatch`: origin + source are trusted, but the `protocol`
|
|
8
|
-
* version differs. The caller logs a warning; the frame is not acted on.
|
|
9
|
-
* - `rejected`: the frame is not a trusted embed frame (wrong origin,
|
|
10
|
-
* missing/foreign `source`, malformed envelope). The caller drops it
|
|
11
|
-
* silently.
|
|
12
|
-
*/
|
|
13
|
-
export type InboundClassification = {
|
|
14
|
-
kind: "valid";
|
|
15
|
-
message: EmbedMessage;
|
|
16
|
-
} | {
|
|
17
|
-
kind: "protocol-mismatch";
|
|
18
|
-
received: unknown;
|
|
19
|
-
} | {
|
|
20
|
-
kind: "rejected";
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* Validate and classify an inbound `message` event against the trusted
|
|
24
|
-
* `parentOrigin`.
|
|
25
|
-
*
|
|
26
|
-
* Returns `rejected` for anything that is not a trusted embed frame - the
|
|
27
|
-
* caller drops those with no logging. Returns `protocol-mismatch` when the
|
|
28
|
-
* frame is trusted but on a different protocol version. Returns `valid` with
|
|
29
|
-
* the typed envelope otherwise.
|
|
30
|
-
*
|
|
31
|
-
* `parentOrigin` MUST be a concrete origin; the inbound listener is not
|
|
32
|
-
* installed at all when it is null, so this function assumes a real value.
|
|
33
|
-
*/
|
|
34
|
-
export declare function classifyInboundMessage(event: MessageEvent, parentOrigin: string): InboundClassification;
|
|
35
|
-
/**
|
|
36
|
-
* The set of inbound-message callbacks the embed bootstrap supplies. Each is
|
|
37
|
-
* invoked only for a `valid`, version-matched frame of the matching type.
|
|
38
|
-
*/
|
|
39
|
-
export interface InboundHandlers {
|
|
40
|
-
/** A host `auth` frame: store/refresh the embed token. */
|
|
41
|
-
onAuth: (payload: EmbedSetTokenPayload) => void;
|
|
42
|
-
/** A host `navigate` frame: drive the iframe to a screen route. */
|
|
43
|
-
onNavigate: (payload: EmbedNavigatePayload) => void;
|
|
44
|
-
/** A host `theme` frame: switch the iframe theme at runtime. */
|
|
45
|
-
onTheme: (payload: EmbedSetThemePayload) => void;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Build the `message` event listener for the inbound embed protocol.
|
|
49
|
-
*
|
|
50
|
-
* The returned listener validates every event via `classifyInboundMessage`,
|
|
51
|
-
* drops untrusted frames silently, warns once on a protocol mismatch, and
|
|
52
|
-
* dispatches a valid frame to the matching handler.
|
|
53
|
-
*
|
|
54
|
-
* Returned as a standalone function (not auto-attached) so the React
|
|
55
|
-
* bootstrap owns `addEventListener` / `removeEventListener` lifecycle.
|
|
56
|
-
*/
|
|
57
|
-
export declare function createInboundMessageListener(parentOrigin: string, handlers: InboundHandlers): (event: MessageEvent) => void;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export { EmbedProvider, useEmbed, toEmbedContextValue, type EmbedContextValue, } from "./EmbedContext";
|
|
2
|
-
export { parseEmbedParams, parseExactOrigin, appendEmbedParams, DEFAULT_NAVIGATION_MODE, EMBED_PARAM_EMBED, EMBED_PARAM_PARENT_ORIGIN, EMBED_PARAM_THEME, EMBED_PARAM_NAV, EMBED_PARAM_KEYS, type EmbedParams, type EmbedTheme, type EmbedNavigationMode, } from "./params";
|
|
3
|
-
export { applyEmbedTheme, applyEmbedThemeFromQuery, applyEmbedThemeFromLocation, } from "./theme";
|
|
4
|
-
export { initEmbedTokenMode, isEmbedTokenMode, getEmbedToken, getEmbedParentOrigin, setEmbedToken, clearEmbedToken, awaitEmbedToken, } from "./token";
|
|
5
|
-
export { resolveEmbedFileSrc, DerivationPendingError, type EmbedFileSrc, type EmbedFileSrcKind, type EmbedFileVariant, } from "./file-src";
|
|
6
|
-
export { classifyInboundMessage, createInboundMessageListener, type InboundClassification, type InboundHandlers, } from "./handshake";
|
|
7
|
-
export { EmbedAuthBootstrap } from "./EmbedAuthBootstrap";
|
|
8
|
-
export { EmbedResizeReporter } from "./EmbedResizeReporter";
|
|
9
|
-
export { EmbedDirtyReporter } from "./EmbedDirtyReporter";
|
|
10
|
-
export { EMBED_MESSAGE_SOURCE, EMBED_PROTOCOL_VERSION, EMBED_MESSAGE_TYPES, postToParent, type EmbedMessageType, type EmbedMessage, type EmbedMessagePayloadMap, type EmbedReadyPayload, type EmbedSetTokenPayload, type EmbedTokenExpiredPayload, type EmbedReloadRequiredPayload, type EmbedResizedPayload, type EmbedNavigationPayload, type EmbedDirtyChangedPayload, type EmbedNavigationFailedPayload, type EmbedNavigatePayload, type EmbedSetThemePayload, } from "./protocol";
|
|
11
|
-
export { resolveEmbedNavigation, resolveEmbedNavigationPayload, } from "./screen-location";
|
|
12
|
-
export type { EmbedNavigationResolution } from "./screen-location";
|
|
13
|
-
export { useEmbedNavigate, useEmbedScreenNavigate, useEmbedScreenBack, useEmbedNavigationFailed, } from "./useEmbedNavigate";
|
|
14
|
-
export { useEmbedHistoryStore, type EmbedNavAction } from "./embed-history";
|
|
15
|
-
export { EmbedHistoryTracker } from "./EmbedHistoryTracker";
|
|
16
|
-
export { useGlobalLinkInterceptor, interceptedNavigationTarget, interceptedProgrammaticTarget, NATIVE_LINK_ATTR, } from "./useGlobalLinkInterceptor";
|
|
17
|
-
export { EmbedLocationReporter } from "./EmbedLocationReporter";
|
|
18
|
-
export { useEmbedDirtyStore, useReportEmbedDirty } from "./embed-dirty";
|
|
19
|
-
export { EmbedUnsavedGuard } from "./EmbedUnsavedGuard";
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/** Theme hint carried on the `theme` query param. */
|
|
2
|
-
export type EmbedTheme = "light" | "dark";
|
|
3
|
-
/**
|
|
4
|
-
* Navigation mode carried on the `nav` query param.
|
|
5
|
-
*
|
|
6
|
-
* - `self`: the iframe navigates internally between Declarion screen routes.
|
|
7
|
-
* - `delegated`: the host owns navigation; the iframe stays put and only
|
|
8
|
-
* emits intent. Defaults to `self` (see DEFAULT_NAVIGATION_MODE).
|
|
9
|
-
*/
|
|
10
|
-
export type EmbedNavigationMode = "self" | "delegated";
|
|
11
|
-
/** Default navigation mode when `nav` is absent or invalid. */
|
|
12
|
-
export declare const DEFAULT_NAVIGATION_MODE: EmbedNavigationMode;
|
|
13
|
-
/** Query-param names that make up the embed contract. */
|
|
14
|
-
export declare const EMBED_PARAM_EMBED = "embed";
|
|
15
|
-
export declare const EMBED_PARAM_PARENT_ORIGIN = "parent_origin";
|
|
16
|
-
export declare const EMBED_PARAM_THEME = "theme";
|
|
17
|
-
export declare const EMBED_PARAM_NAV = "nav";
|
|
18
|
-
/**
|
|
19
|
-
* The four embed query params, in URL-stable order. `appendEmbedParams`
|
|
20
|
-
* iterates this list so preserved params always appear in the same order.
|
|
21
|
-
*/
|
|
22
|
-
export declare const EMBED_PARAM_KEYS: readonly ["embed", "parent_origin", "theme", "nav"];
|
|
23
|
-
/**
|
|
24
|
-
* Parsed, validated embed context.
|
|
25
|
-
*
|
|
26
|
-
* `enabled` is true ONLY when `embed=1` is explicitly present. Being inside
|
|
27
|
-
* an iframe (frame detection) MUST NOT enable embed mode - a Declarion app
|
|
28
|
-
* framed without `embed=1` still renders the full shell.
|
|
29
|
-
*/
|
|
30
|
-
export interface EmbedParams {
|
|
31
|
-
/** True only when `embed=1` is explicitly present in the query string. */
|
|
32
|
-
readonly enabled: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Exact parent origin from `parent_origin`, validated as a well-formed
|
|
35
|
-
* origin (scheme + host + optional port, no path/query/fragment). `null`
|
|
36
|
-
* when absent, malformed, or carrying anything beyond an origin.
|
|
37
|
-
*/
|
|
38
|
-
readonly parentOrigin: string | null;
|
|
39
|
-
/** Theme hint from `theme`; any value other than light/dark drops to null. */
|
|
40
|
-
readonly theme: EmbedTheme | null;
|
|
41
|
-
/** Navigation mode from `nav`; invalid or absent values fall back to `self`. */
|
|
42
|
-
readonly navigationMode: EmbedNavigationMode;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Validate that `raw` is exactly a well-formed origin: `scheme://host[:port]`
|
|
46
|
-
* with no path, query, fragment, or credentials. `new URL(raw).origin`
|
|
47
|
-
* normalizes the input; requiring `raw === url.origin` rejects any extra
|
|
48
|
-
* structure (`https://h.com/`, `https://h.com/path`, `https://h.com?x=1`).
|
|
49
|
-
*
|
|
50
|
-
* Returns the origin on success, `null` otherwise.
|
|
51
|
-
*/
|
|
52
|
-
export declare function parseExactOrigin(raw: string | null | undefined): string | null;
|
|
53
|
-
/**
|
|
54
|
-
* Parse the embed contract out of a query string.
|
|
55
|
-
*
|
|
56
|
-
* Accepts a raw query string (`window.location.search`) or a
|
|
57
|
-
* `URLSearchParams`. Pure and deterministic - the single parser used by
|
|
58
|
-
* both the React provider and the pre-paint theme bootstrap.
|
|
59
|
-
*/
|
|
60
|
-
export declare function parseEmbedParams(query: string | URLSearchParams): EmbedParams;
|
|
61
|
-
/**
|
|
62
|
-
* Given an internal Declarion URL or path, return it with the currently-set
|
|
63
|
-
* embed params (`embed`, `parent_origin`, `theme`, `nav`) preserved on its
|
|
64
|
-
* query string. Only params present in `current` are appended; absent ones
|
|
65
|
-
* are not invented.
|
|
66
|
-
*
|
|
67
|
-
* Used by internal navigation so a full iframe reload of the navigated URL
|
|
68
|
-
* still resolves to shellless embed mode. When embed mode is off, the input
|
|
69
|
-
* is returned unchanged.
|
|
70
|
-
*
|
|
71
|
-
* The input may be an absolute URL or a root-relative path. A relative path
|
|
72
|
-
* is resolved against a placeholder base purely so `URLSearchParams` can be
|
|
73
|
-
* manipulated; the returned string keeps the input's relative shape.
|
|
74
|
-
*/
|
|
75
|
-
export declare function appendEmbedParams(url: string, current: EmbedParams): string;
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `source` discriminator stamped on every embed frame. The host SDK and
|
|
3
|
-
* the iframe both filter inbound messages on this value so unrelated
|
|
4
|
-
* `postMessage` traffic (browser extensions, other widgets) is ignored.
|
|
5
|
-
*/
|
|
6
|
-
export declare const EMBED_MESSAGE_SOURCE: "declarion-embed";
|
|
7
|
-
/**
|
|
8
|
-
* The protocol version. Bumped only on a breaking envelope/payload change.
|
|
9
|
-
* The host SDK warns when its version and the iframe's version differ.
|
|
10
|
-
*/
|
|
11
|
-
export declare const EMBED_PROTOCOL_VERSION: 1;
|
|
12
|
-
/**
|
|
13
|
-
* Every protocol message `type`. The object key is the camelCase name used in
|
|
14
|
-
* code; the value is the on-wire string. Events (iframe -> host) are past
|
|
15
|
-
* tense; commands (host -> iframe) are imperative - see the naming contract
|
|
16
|
-
* at the top of this file.
|
|
17
|
-
*/
|
|
18
|
-
export declare const EMBED_MESSAGE_TYPES: {
|
|
19
|
-
/** iframe -> host: SDK mounted, requests the first token. */
|
|
20
|
-
readonly ready: "ready";
|
|
21
|
-
/** host -> iframe: deliver or refresh the embed token. */
|
|
22
|
-
readonly setToken: "set-token";
|
|
23
|
-
/** iframe -> host: token rejected or near expiry. */
|
|
24
|
-
readonly tokenExpired: "token-expired";
|
|
25
|
-
/** iframe -> host: the iframe must be reloaded. */
|
|
26
|
-
readonly reloadRequired: "reload-required";
|
|
27
|
-
/** iframe -> host: embed content height changed. */
|
|
28
|
-
readonly resized: "resized";
|
|
29
|
-
/** iframe -> host: `self` mode internal navigation happened. */
|
|
30
|
-
readonly navigated: "navigated";
|
|
31
|
-
/** iframe -> host: `delegated` mode navigation requested, iframe stayed. */
|
|
32
|
-
readonly navigationRequested: "navigation-requested";
|
|
33
|
-
/** iframe -> host: the embedded screen's unsaved-edits state flipped. */
|
|
34
|
-
readonly dirtyChanged: "dirty-changed";
|
|
35
|
-
/** iframe -> host: an in-frame navigation could not be handled (unknown
|
|
36
|
-
* route, or a 404 the host should recover from). The iframe stayed put. */
|
|
37
|
-
readonly navigationFailed: "navigation-failed";
|
|
38
|
-
/** host -> iframe: drive the iframe to a screen (deep-linking). */
|
|
39
|
-
readonly navigate: "navigate";
|
|
40
|
-
/** host -> iframe: runtime theme switch. */
|
|
41
|
-
readonly setTheme: "set-theme";
|
|
42
|
-
};
|
|
43
|
-
/** The union of all on-wire message `type` strings. */
|
|
44
|
-
export type EmbedMessageType = (typeof EMBED_MESSAGE_TYPES)[keyof typeof EMBED_MESSAGE_TYPES];
|
|
45
|
-
/** `ready` payload: empty - the frame itself is the signal. */
|
|
46
|
-
export type EmbedReadyPayload = Record<string, never>;
|
|
47
|
-
/** `set-token` payload: the embed token and its absolute expiry. */
|
|
48
|
-
export interface EmbedSetTokenPayload {
|
|
49
|
-
/** The scoped, refresh-less embed JWT. */
|
|
50
|
-
readonly token: string;
|
|
51
|
-
/** RFC 3339 expiry timestamp of the token. */
|
|
52
|
-
readonly expires_at: string;
|
|
53
|
-
}
|
|
54
|
-
/** `token-expired` payload: empty - the host re-mints via `getToken`. */
|
|
55
|
-
export type EmbedTokenExpiredPayload = Record<string, never>;
|
|
56
|
-
/** `reload-required` payload: a human-readable reason for the reload. */
|
|
57
|
-
export interface EmbedReloadRequiredPayload {
|
|
58
|
-
/** Why the iframe must be reloaded (asset drift, terminal auth failure). */
|
|
59
|
-
readonly reason: string;
|
|
60
|
-
}
|
|
61
|
-
/** `resized` payload: the measured content height in CSS pixels. */
|
|
62
|
-
export interface EmbedResizedPayload {
|
|
63
|
-
/** Content height in CSS pixels. */
|
|
64
|
-
readonly height: number;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* `navigated` / `navigation-requested` payload: the screen route and, when
|
|
68
|
-
* resolvable, the matched screen code, bound entity code, and record id.
|
|
69
|
-
*
|
|
70
|
-
* `screenCode`, `entity`, and `recordId` are optional: an unregistered path
|
|
71
|
-
* resolves to none of them, a `custom` screen has no entity, and a list route
|
|
72
|
-
* has no record id. The host needs `screenCode` to mint a scoped embed token
|
|
73
|
-
* for the target screen when it executes a `delegated` navigation intent.
|
|
74
|
-
*/
|
|
75
|
-
export interface EmbedNavigationPayload {
|
|
76
|
-
/** The Declarion screen route path the navigation targets. */
|
|
77
|
-
readonly route: string;
|
|
78
|
-
/**
|
|
79
|
-
* The matched screen's code (its key in the schema screen map), when a
|
|
80
|
-
* registered screen owns the route. Absent for an unresolved path. The host
|
|
81
|
-
* passes this as `screen_code` to `auth.create_embed_session`.
|
|
82
|
-
*/
|
|
83
|
-
readonly screenCode?: string;
|
|
84
|
-
/** The bound entity code, when the route resolves to one. */
|
|
85
|
-
readonly entity?: string;
|
|
86
|
-
/** The record id, when the route is a detail route with an id. */
|
|
87
|
-
readonly recordId?: string;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* `dirty-changed` payload: whether the embedded screen currently has unsaved
|
|
91
|
-
* edits. The host tracks this so it can guard its own navigation (its menu,
|
|
92
|
-
* a host-initiated `navigate`) before moving the iframe away from a dirty
|
|
93
|
-
* screen - the iframe never pops a dialog for host-driven navigation.
|
|
94
|
-
*/
|
|
95
|
-
export interface EmbedDirtyChangedPayload {
|
|
96
|
-
/** True when the embedded screen has unsaved edits. */
|
|
97
|
-
readonly dirty: boolean;
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* `navigation-failed` payload: an in-frame navigation the iframe refused or
|
|
101
|
-
* could not resolve. The iframe stayed put; the host owns recovery (show its
|
|
102
|
-
* own not-found, reset its sidebar selection, etc.).
|
|
103
|
-
*
|
|
104
|
-
* `reason` is a closed set, each with a real producer: `not_found` from the
|
|
105
|
-
* embedded 404 catch-all, `unresolved` from the navigation chokepoint when the
|
|
106
|
-
* target route matches no registered screen.
|
|
107
|
-
*/
|
|
108
|
-
export interface EmbedNavigationFailedPayload {
|
|
109
|
-
/** The route that could not be navigated to. */
|
|
110
|
-
readonly route: string;
|
|
111
|
-
/** Why it failed. */
|
|
112
|
-
readonly reason: "not_found" | "unresolved";
|
|
113
|
-
}
|
|
114
|
-
/** `navigate` payload: the route the host drives the iframe to. */
|
|
115
|
-
export interface EmbedNavigatePayload {
|
|
116
|
-
/** The Declarion screen route the host wants opened. */
|
|
117
|
-
readonly route: string;
|
|
118
|
-
}
|
|
119
|
-
/** `set-theme` payload: the theme the host switches the iframe to. */
|
|
120
|
-
export interface EmbedSetThemePayload {
|
|
121
|
-
/** The requested theme. */
|
|
122
|
-
readonly theme: "light" | "dark";
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Maps each message type to its payload shape. Used to type `postToParent`
|
|
126
|
-
* so the payload argument is checked against the message type.
|
|
127
|
-
*/
|
|
128
|
-
export interface EmbedMessagePayloadMap {
|
|
129
|
-
[EMBED_MESSAGE_TYPES.ready]: EmbedReadyPayload;
|
|
130
|
-
[EMBED_MESSAGE_TYPES.setToken]: EmbedSetTokenPayload;
|
|
131
|
-
[EMBED_MESSAGE_TYPES.tokenExpired]: EmbedTokenExpiredPayload;
|
|
132
|
-
[EMBED_MESSAGE_TYPES.reloadRequired]: EmbedReloadRequiredPayload;
|
|
133
|
-
[EMBED_MESSAGE_TYPES.resized]: EmbedResizedPayload;
|
|
134
|
-
[EMBED_MESSAGE_TYPES.navigated]: EmbedNavigationPayload;
|
|
135
|
-
[EMBED_MESSAGE_TYPES.navigationRequested]: EmbedNavigationPayload;
|
|
136
|
-
[EMBED_MESSAGE_TYPES.dirtyChanged]: EmbedDirtyChangedPayload;
|
|
137
|
-
[EMBED_MESSAGE_TYPES.navigationFailed]: EmbedNavigationFailedPayload;
|
|
138
|
-
[EMBED_MESSAGE_TYPES.navigate]: EmbedNavigatePayload;
|
|
139
|
-
[EMBED_MESSAGE_TYPES.setTheme]: EmbedSetThemePayload;
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* The wire envelope. Every embed frame is exactly this shape: a fixed
|
|
143
|
-
* `source` + `protocol` pair, a discriminating `type`, and the typed
|
|
144
|
-
* `payload` for that type.
|
|
145
|
-
*/
|
|
146
|
-
export interface EmbedMessage<T extends EmbedMessageType = EmbedMessageType> {
|
|
147
|
-
readonly source: typeof EMBED_MESSAGE_SOURCE;
|
|
148
|
-
readonly protocol: typeof EMBED_PROTOCOL_VERSION;
|
|
149
|
-
readonly type: T;
|
|
150
|
-
readonly payload: EmbedMessagePayloadMap[T];
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Post an enveloped embed message to the host page.
|
|
154
|
-
*
|
|
155
|
-
* Targets the EXACT `parentOrigin` - never `"*"` - so a malicious page that
|
|
156
|
-
* re-frames the iframe cannot intercept auth or navigation frames.
|
|
157
|
-
*
|
|
158
|
-
* No-op (returns false) when:
|
|
159
|
-
* - `parentOrigin` is null or empty (no trusted origin to target), or
|
|
160
|
-
* - the document is not framed (`window.parent === window`), or
|
|
161
|
-
* - there is no `window` (SSR / unit environment without a DOM).
|
|
162
|
-
*
|
|
163
|
-
* Returns true when a message was posted.
|
|
164
|
-
*/
|
|
165
|
-
export declare function postToParent<T extends EmbedMessageType>(parentOrigin: string | null, type: T, payload: EmbedMessagePayloadMap[T]): boolean;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type { EmbedNavigationPayload } from "./protocol";
|
|
2
|
-
import type { Screen } from "../types/schema.d.ts";
|
|
3
|
-
/**
|
|
4
|
-
* The result of resolving a router pathname against the screen schema.
|
|
5
|
-
*
|
|
6
|
-
* `matched` is the load-bearing flag for the navigation chokepoint: when a
|
|
7
|
-
* registered screen owns the path it is `true` and `screenCode` names that
|
|
8
|
-
* screen; when no screen owns the path it is `false` (the chokepoint then
|
|
9
|
-
* refuses an embed navigation and emits `navigation-failed`). `payload` is
|
|
10
|
-
* always present - it carries the matched screen route (or the raw pathname
|
|
11
|
-
* when unmatched) for the `navigated` / `navigation-requested` messages.
|
|
12
|
-
*/
|
|
13
|
-
export interface EmbedNavigationResolution {
|
|
14
|
-
/** True when a registered screen route owns this pathname. */
|
|
15
|
-
readonly matched: boolean;
|
|
16
|
-
/** The matched screen's code (its key in `screens`), when matched. */
|
|
17
|
-
readonly screenCode?: string;
|
|
18
|
-
/** The matched screen's `type` (`list` / `detail` / `custom` / ...), when
|
|
19
|
-
* matched. Matched-screen metadata the host may use (e.g. to label or
|
|
20
|
-
* classify a navigation it observes). */
|
|
21
|
-
readonly screenType?: string;
|
|
22
|
-
/** The navigation payload to emit (route always set; ids when resolvable). */
|
|
23
|
-
readonly payload: EmbedNavigationPayload;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Resolve a router pathname against the screen schema, with match status.
|
|
27
|
-
*
|
|
28
|
-
* Matches the pathname against every registered screen route. An exact
|
|
29
|
-
* (wildcard-free) route wins over a `:param` route, mirroring
|
|
30
|
-
* `screenTitleForPath`, so `/cases` resolves to the list screen even though
|
|
31
|
-
* the detail route `/cases/:id` also shares the prefix.
|
|
32
|
-
*
|
|
33
|
-
* - `matched` is true only when a registered screen owns the path.
|
|
34
|
-
* - `screenCode` is the matched screen's map key (so the host can mint a
|
|
35
|
-
* scoped token for it).
|
|
36
|
-
* - `payload.route` is the matched screen's own route pattern, or the raw
|
|
37
|
-
* pathname when no screen owns it (a route always exists in the payload).
|
|
38
|
-
* - `payload.entity` is the matched screen's bound entity code, when it has one.
|
|
39
|
-
* - `payload.recordId` is the last path segment for a detail (`:param`) route,
|
|
40
|
-
* when that segment is present and non-empty.
|
|
41
|
-
*
|
|
42
|
-
* `screens` may be undefined (schema not yet loaded); the result is then
|
|
43
|
-
* `matched: false` with the raw pathname as `payload.route`.
|
|
44
|
-
*/
|
|
45
|
-
export declare function resolveEmbedNavigation(pathname: string, screens: Record<string, Screen> | undefined): EmbedNavigationResolution;
|
|
46
|
-
/**
|
|
47
|
-
* Convenience wrapper returning just the payload, for the `navigated` and
|
|
48
|
-
* `navigation-requested` emitters that do not need the match status.
|
|
49
|
-
*/
|
|
50
|
-
export declare function resolveEmbedNavigationPayload(pathname: string, screens: Record<string, Screen> | undefined): EmbedNavigationPayload;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { type EmbedTheme } from "./params";
|
|
2
|
-
/**
|
|
3
|
-
* Apply an embed theme to <html> immediately, WITHOUT persisting it.
|
|
4
|
-
*
|
|
5
|
-
* The single theme-apply path for embed mode: the pre-paint URL bootstrap
|
|
6
|
-
* (`applyEmbedThemeFromQuery`) and the runtime `theme` postMessage handler
|
|
7
|
-
* both route through here, so they can never diverge.
|
|
8
|
-
*
|
|
9
|
-
* `applyPreferences` is the single writer of <html> preference attributes; it
|
|
10
|
-
* keeps accent / density / etc. intact. The store slice is then set directly
|
|
11
|
-
* (not via `setMany`) so later reads stay consistent WITHOUT writing
|
|
12
|
-
* localStorage - the embed color scheme is a host-supplied, ephemeral hint,
|
|
13
|
-
* not a user choice.
|
|
14
|
-
*/
|
|
15
|
-
export declare function applyEmbedTheme(theme: EmbedTheme): void;
|
|
16
|
-
/**
|
|
17
|
-
* Read the embed `theme` param from the given query string and, when it is a
|
|
18
|
-
* valid `light`/`dark` value under an active `embed=1`, apply it to
|
|
19
|
-
* <html> immediately.
|
|
20
|
-
*
|
|
21
|
-
* Returns true when an embed theme was applied, false otherwise.
|
|
22
|
-
*
|
|
23
|
-
* Apply path: routes through `applyEmbedTheme`, which writes `data-color-scheme` and
|
|
24
|
-
* updates the preferences store; nothing is persisted.
|
|
25
|
-
*/
|
|
26
|
-
export declare function applyEmbedThemeFromQuery(query: string | URLSearchParams): boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Apply the embed theme from `window.location.search` at module load.
|
|
29
|
-
*
|
|
30
|
-
* Called once from the embed barrel so importing the embed entry point is
|
|
31
|
-
* enough to get pre-paint theming, exactly like the preferences module's
|
|
32
|
-
* own module-load `applyPreferences(initial)`.
|
|
33
|
-
*/
|
|
34
|
-
export declare function applyEmbedThemeFromLocation(): boolean;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Activate embed token mode. Called once at bootstrap by the embed auth
|
|
3
|
-
* handshake. `parentOrigin` is the exact host origin that `token-expired`
|
|
4
|
-
* frames are emitted to.
|
|
5
|
-
*
|
|
6
|
-
* Idempotent: re-activation only refreshes the parent origin.
|
|
7
|
-
*/
|
|
8
|
-
export declare function initEmbedTokenMode(parentOrigin: string | null): void;
|
|
9
|
-
/**
|
|
10
|
-
* True when embed token mode is active. Transports branch on this to switch
|
|
11
|
-
* from the cookie path to the Bearer path. False everywhere outside an
|
|
12
|
-
* embed iframe, so the cookie path stays byte-equivalent to today.
|
|
13
|
-
*/
|
|
14
|
-
export declare function isEmbedTokenMode(): boolean;
|
|
15
|
-
/** The current embed token string, or null before the first `auth` frame. */
|
|
16
|
-
export declare function getEmbedToken(): string | null;
|
|
17
|
-
/**
|
|
18
|
-
* The exact parent origin embed frames are emitted to, or null before
|
|
19
|
-
* `initEmbedTokenMode` runs. Used by transports outside this module (e.g.
|
|
20
|
-
* the version probe) that need to post a frame to the host.
|
|
21
|
-
*/
|
|
22
|
-
export declare function getEmbedParentOrigin(): string | null;
|
|
23
|
-
/**
|
|
24
|
-
* Store a token delivered by the host's `auth` frame.
|
|
25
|
-
*
|
|
26
|
-
* Resolves any in-flight `awaitEmbedToken()` wait so every transport that
|
|
27
|
-
* was blocked on a fresh token unblocks at once. A malformed payload
|
|
28
|
-
* (missing token, unparseable expiry) is ignored - the wait stays pending
|
|
29
|
-
* until a well-formed frame arrives or the timeout fires.
|
|
30
|
-
*/
|
|
31
|
-
export declare function setEmbedToken(payload: {
|
|
32
|
-
token: string;
|
|
33
|
-
expires_at: string;
|
|
34
|
-
}): void;
|
|
35
|
-
/**
|
|
36
|
-
* Clear the held token. Used when a terminal failure makes the current
|
|
37
|
-
* token unusable; the next transport call will await a fresh one.
|
|
38
|
-
*/
|
|
39
|
-
export declare function clearEmbedToken(): void;
|
|
40
|
-
/**
|
|
41
|
-
* Return a usable embed token, requesting a fresh one from the host when
|
|
42
|
-
* needed.
|
|
43
|
-
*
|
|
44
|
-
* SINGLE-FLIGHT: when the held token is still usable it resolves
|
|
45
|
-
* immediately. When the token is missing or stale, it emits exactly one
|
|
46
|
-
* `token-expired` frame to the host and waits for the next `auth` frame.
|
|
47
|
-
* Concurrent callers during that window share the one in-flight wait - the
|
|
48
|
-
* `token-expired` frame is emitted once, not once per caller.
|
|
49
|
-
*
|
|
50
|
-
* The wait is bounded by `TOKEN_WAIT_TIMEOUT_MS`; on timeout the promise
|
|
51
|
-
* rejects so the transport caller fails loudly instead of hanging.
|
|
52
|
-
*/
|
|
53
|
-
export declare function awaitEmbedToken(): Promise<string>;
|
|
54
|
-
/**
|
|
55
|
-
* Test-only: reset all module state. Not exposed via package exports.
|
|
56
|
-
*/
|
|
57
|
-
export declare function __resetEmbedTokenForTests(): void;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { type NavigateOptions } from "react-router";
|
|
2
|
-
import { type EmbedNavigationFailedPayload } from "./protocol";
|
|
3
|
-
/**
|
|
4
|
-
* The shared embed navigation policy, decoupled from React Router's hook.
|
|
5
|
-
*
|
|
6
|
-
* `rawNavigate` is the underlying navigator (`useNavigate()`'s return value
|
|
7
|
-
* for `useEmbedNavigate`, the same for `useTabNavigate`). The returned
|
|
8
|
-
* `screenNavigate` applies the embed branch and reports whether it actually
|
|
9
|
-
* navigated:
|
|
10
|
-
*
|
|
11
|
-
* - returns `false` in `delegated` embed mode (intercepted; iframe stayed),
|
|
12
|
-
* - returns `true` otherwise (a real navigation happened).
|
|
13
|
-
*
|
|
14
|
-
* Callers in embed mode use the boolean to skip side effects (opening a tab)
|
|
15
|
-
* that only make sense for a navigation that actually moved.
|
|
16
|
-
*/
|
|
17
|
-
export declare function useEmbedScreenNavigate(): (to: string, opts?: NavigateOptions) => boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Embed-aware replacement for `useNavigate` at internal screen-route call
|
|
20
|
-
* sites. Returns a `navigate(to, opts)` function with the embed branch
|
|
21
|
-
* applied. Outside embed mode it is `useNavigate()` unchanged.
|
|
22
|
-
*
|
|
23
|
-
* Use this for every raw screen transition (cancel-edit, save success,
|
|
24
|
-
* delete success, Back). Do NOT use it for non-route navigation (anchors,
|
|
25
|
-
* external URLs); those are not screen routes and embed mode does not touch
|
|
26
|
-
* them.
|
|
27
|
-
*/
|
|
28
|
-
export declare function useEmbedNavigate(): (to: string, opts?: NavigateOptions) => void;
|
|
29
|
-
/**
|
|
30
|
-
* Embed-mode Back: pop the iframe's own browser history (`navigate(-1)`) to the
|
|
31
|
-
* exact prior URL, so the URL-keyed retained page + cache restore the prior
|
|
32
|
-
* screen's full state - "the same as a normal app", just without tab chrome.
|
|
33
|
-
*
|
|
34
|
-
* Routed through the SAME deferred unsaved-changes guard the rest of embed
|
|
35
|
-
* navigation uses: a raw `navigate(-1)` would bypass the dirty guard and
|
|
36
|
-
* silently discard an in-progress edit. The CALLER
|
|
37
|
-
* (`useScreenBack`) decides WHEN to use this (only when in-frame history depth
|
|
38
|
-
* > 0); this hook only performs the guarded pop.
|
|
39
|
-
*/
|
|
40
|
-
export declare function useEmbedScreenBack(): () => void;
|
|
41
|
-
/**
|
|
42
|
-
* Emit a `navigation-failed` event to the host. Used where an in-frame
|
|
43
|
-
* navigation cannot be handled OUTSIDE the chokepoint - chiefly the embedded
|
|
44
|
-
* 404 page, which the iframe reaches via a host-driven `navigate` command, a
|
|
45
|
-
* bad initial route, or a hard reload (none of which pass through the
|
|
46
|
-
* chokepoint's own guard). A no-op outside embed mode.
|
|
47
|
-
*/
|
|
48
|
-
export declare function useEmbedNavigationFailed(): (route: string, reason: EmbedNavigationFailedPayload["reason"]) => void;
|