@tai42/studio-sdk 16.0.0 → 16.0.1
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/components/explorer-body.d.ts +49 -0
- package/dist/components/explorer-body.d.ts.map +1 -0
- package/dist/components/explorer-body.js +67 -0
- package/dist/components/explorer-body.js.map +1 -0
- package/dist/components/explorer-page-size.d.ts +4 -0
- package/dist/components/explorer-page-size.d.ts.map +1 -0
- package/dist/components/explorer-page-size.js +36 -0
- package/dist/components/explorer-page-size.js.map +1 -0
- package/dist/components/explorer-tag-filter.d.ts +17 -0
- package/dist/components/explorer-tag-filter.d.ts.map +1 -0
- package/dist/components/explorer-tag-filter.js +29 -0
- package/dist/components/explorer-tag-filter.js.map +1 -0
- package/dist/components/explorer-tags.d.ts +22 -0
- package/dist/components/explorer-tags.d.ts.map +1 -0
- package/dist/components/explorer-tags.js +51 -0
- package/dist/components/explorer-tags.js.map +1 -0
- package/dist/components/explorer-view.d.ts +3 -17
- package/dist/components/explorer-view.d.ts.map +1 -1
- package/dist/components/explorer-view.js +53 -170
- package/dist/components/explorer-view.js.map +1 -1
- package/dist/components/extension-combo-builder.d.ts +0 -5
- package/dist/components/extension-combo-builder.d.ts.map +1 -1
- package/dist/components/extension-combo-builder.js +4 -42
- package/dist/components/extension-combo-builder.js.map +1 -1
- package/dist/components/extension-combo-parts.d.ts +44 -0
- package/dist/components/extension-combo-parts.d.ts.map +1 -0
- package/dist/components/extension-combo-parts.js +57 -0
- package/dist/components/extension-combo-parts.js.map +1 -0
- package/dist/components/fleet-report.d.ts.map +1 -1
- package/dist/components/fleet-report.js +51 -37
- package/dist/components/fleet-report.js.map +1 -1
- package/dist/components/icons/chrome-marks.d.ts +50 -0
- package/dist/components/icons/chrome-marks.d.ts.map +1 -0
- package/dist/components/icons/chrome-marks.js +51 -0
- package/dist/components/icons/chrome-marks.js.map +1 -0
- package/dist/components/icons/icon-frame.d.ts +29 -0
- package/dist/components/icons/icon-frame.d.ts.map +1 -0
- package/dist/components/icons/icon-frame.js +19 -0
- package/dist/components/icons/icon-frame.js.map +1 -0
- package/dist/components/icons/index.d.ts +40 -0
- package/dist/components/icons/index.d.ts.map +1 -0
- package/dist/components/icons/index.js +6 -0
- package/dist/components/icons/index.js.map +1 -0
- package/dist/components/icons/nav-map.d.ts +14 -0
- package/dist/components/icons/nav-map.d.ts.map +1 -0
- package/dist/components/icons/nav-map.js +28 -0
- package/dist/components/icons/nav-map.js.map +1 -0
- package/dist/components/icons/nav-marks.d.ts +44 -0
- package/dist/components/icons/nav-marks.d.ts.map +1 -0
- package/dist/components/icons/nav-marks.js +45 -0
- package/dist/components/icons/nav-marks.js.map +1 -0
- package/dist/components/icons/status-marks.d.ts +21 -0
- package/dist/components/icons/status-marks.d.ts.map +1 -0
- package/dist/components/icons/status-marks.js +22 -0
- package/dist/components/icons/status-marks.js.map +1 -0
- package/dist/components/icons/theme-marks.d.ts +9 -0
- package/dist/components/icons/theme-marks.d.ts.map +1 -0
- package/dist/components/icons/theme-marks.js +10 -0
- package/dist/components/icons/theme-marks.js.map +1 -0
- package/dist/components/json-diff.d.ts.map +1 -1
- package/dist/components/json-diff.js +1 -3
- package/dist/components/json-diff.js.map +1 -1
- package/dist/components/json-tree-context.d.ts +13 -0
- package/dist/components/json-tree-context.d.ts.map +1 -0
- package/dist/components/json-tree-context.js +15 -0
- package/dist/components/json-tree-context.js.map +1 -0
- package/dist/components/json-tree-model.d.ts +56 -0
- package/dist/components/json-tree-model.d.ts.map +1 -0
- package/dist/components/json-tree-model.js +125 -0
- package/dist/components/json-tree-model.js.map +1 -0
- package/dist/components/json-tree-nodes.d.ts +30 -0
- package/dist/components/json-tree-nodes.d.ts.map +1 -0
- package/dist/components/json-tree-nodes.js +118 -0
- package/dist/components/json-tree-nodes.js.map +1 -0
- package/dist/components/json-tree.d.ts.map +1 -1
- package/dist/components/json-tree.js +7 -295
- package/dist/components/json-tree.js.map +1 -1
- package/dist/components/json-value-format.d.ts +20 -0
- package/dist/components/json-value-format.d.ts.map +1 -0
- package/dist/components/json-value-format.js +63 -0
- package/dist/components/json-value-format.js.map +1 -0
- package/dist/components/markdown-blocks.d.ts +38 -0
- package/dist/components/markdown-blocks.d.ts.map +1 -0
- package/dist/components/markdown-blocks.js +168 -0
- package/dist/components/markdown-blocks.js.map +1 -0
- package/dist/components/markdown-inline.d.ts +24 -0
- package/dist/components/markdown-inline.d.ts.map +1 -0
- package/dist/components/markdown-inline.js +257 -0
- package/dist/components/markdown-inline.js.map +1 -0
- package/dist/components/markdown.d.ts +3 -52
- package/dist/components/markdown.d.ts.map +1 -1
- package/dist/components/markdown.js +4 -376
- package/dist/components/markdown.js.map +1 -1
- package/dist/components/observer-registry.d.ts +38 -0
- package/dist/components/observer-registry.d.ts.map +1 -0
- package/dist/components/observer-registry.js +131 -0
- package/dist/components/observer-registry.js.map +1 -0
- package/dist/components/overflow-measure.d.ts +38 -0
- package/dist/components/overflow-measure.d.ts.map +1 -0
- package/dist/components/overflow-measure.js +54 -0
- package/dist/components/overflow-measure.js.map +1 -0
- package/dist/components/prose-regions.d.ts +81 -0
- package/dist/components/prose-regions.d.ts.map +1 -0
- package/dist/components/prose-regions.js +128 -0
- package/dist/components/prose-regions.js.map +1 -0
- package/dist/components/scroll-region.d.ts.map +1 -1
- package/dist/components/scroll-region.js +3 -298
- package/dist/components/scroll-region.js.map +1 -1
- package/dist/components/tab-stop-parse.d.ts +53 -0
- package/dist/components/tab-stop-parse.d.ts.map +1 -0
- package/dist/components/tab-stop-parse.js +202 -0
- package/dist/components/tab-stop-parse.js.map +1 -0
- package/dist/components/templated-text-field.d.ts.map +1 -1
- package/dist/components/templated-text-field.js +10 -148
- package/dist/components/templated-text-field.js.map +1 -1
- package/dist/components/templated-text-kwargs-editor.d.ts +24 -0
- package/dist/components/templated-text-kwargs-editor.d.ts.map +1 -0
- package/dist/components/templated-text-kwargs-editor.js +48 -0
- package/dist/components/templated-text-kwargs-editor.js.map +1 -0
- package/dist/components/templated-text-kwargs.d.ts +37 -0
- package/dist/components/templated-text-kwargs.d.ts.map +1 -0
- package/dist/components/templated-text-kwargs.js +66 -0
- package/dist/components/templated-text-kwargs.js.map +1 -0
- package/dist/components/templated-text-source.d.ts +33 -0
- package/dist/components/templated-text-source.d.ts.map +1 -0
- package/dist/components/templated-text-source.js +53 -0
- package/dist/components/templated-text-source.js.map +1 -0
- package/dist/components/tool-picker-parts.d.ts +39 -0
- package/dist/components/tool-picker-parts.d.ts.map +1 -0
- package/dist/components/tool-picker-parts.js +87 -0
- package/dist/components/tool-picker-parts.js.map +1 -0
- package/dist/components/tool-picker.d.ts +1 -2
- package/dist/components/tool-picker.d.ts.map +1 -1
- package/dist/components/tool-picker.js +4 -66
- package/dist/components/tool-picker.js.map +1 -1
- package/dist/components/version-history-panel.d.ts.map +1 -1
- package/dist/components/version-history-panel.js +7 -34
- package/dist/components/version-history-panel.js.map +1 -1
- package/dist/components/version-history-rows.d.ts +48 -0
- package/dist/components/version-history-rows.d.ts.map +1 -0
- package/dist/components/version-history-rows.js +51 -0
- package/dist/components/version-history-rows.js.map +1 -0
- package/dist/guards.d.ts +6 -0
- package/dist/guards.d.ts.map +1 -0
- package/dist/guards.js +8 -0
- package/dist/guards.js.map +1 -0
- package/dist/hooks/interactions-connection.d.ts +43 -0
- package/dist/hooks/interactions-connection.d.ts.map +1 -0
- package/dist/hooks/interactions-connection.js +171 -0
- package/dist/hooks/interactions-connection.js.map +1 -0
- package/dist/hooks/interactions-stream.d.ts +80 -0
- package/dist/hooks/interactions-stream.d.ts.map +1 -0
- package/dist/hooks/interactions-stream.js +233 -0
- package/dist/hooks/interactions-stream.js.map +1 -0
- package/dist/hooks/useApi.d.ts +2192 -2192
- package/dist/hooks/useApi.d.ts.map +1 -1
- package/dist/hooks/useSse.d.ts +3 -6
- package/dist/hooks/useSse.d.ts.map +1 -1
- package/dist/hooks/useSse.js +38 -451
- package/dist/hooks/useSse.js.map +1 -1
- package/dist/navigation/app-link.d.ts +25 -0
- package/dist/navigation/app-link.d.ts.map +1 -0
- package/dist/navigation/app-link.js +33 -0
- package/dist/navigation/app-link.js.map +1 -0
- package/dist/navigation/context.d.ts +3 -20
- package/dist/navigation/context.d.ts.map +1 -1
- package/dist/navigation/context.js +7 -267
- package/dist/navigation/context.js.map +1 -1
- package/dist/navigation/entry-state.d.ts +23 -0
- package/dist/navigation/entry-state.d.ts.map +1 -0
- package/dist/navigation/entry-state.js +39 -0
- package/dist/navigation/entry-state.js.map +1 -0
- package/dist/navigation/guard-registry.d.ts +30 -0
- package/dist/navigation/guard-registry.d.ts.map +1 -0
- package/dist/navigation/guard-registry.js +46 -0
- package/dist/navigation/guard-registry.js.map +1 -0
- package/dist/navigation/guarded-navigation.d.ts +24 -0
- package/dist/navigation/guarded-navigation.d.ts.map +1 -0
- package/dist/navigation/guarded-navigation.js +102 -0
- package/dist/navigation/guarded-navigation.js.map +1 -0
- package/dist/navigation/index.d.ts +3 -2
- package/dist/navigation/index.d.ts.map +1 -1
- package/dist/navigation/index.js +2 -1
- package/dist/navigation/index.js.map +1 -1
- package/dist/navigation/types.d.ts +8 -11
- package/dist/navigation/types.d.ts.map +1 -1
- package/dist/navigation/use-back-forward-guard.d.ts +5 -0
- package/dist/navigation/use-back-forward-guard.d.ts.map +1 -0
- package/dist/navigation/use-back-forward-guard.js +82 -0
- package/dist/navigation/use-back-forward-guard.js.map +1 -0
- package/dist/plugin/registry.d.ts +6 -15
- package/dist/plugin/registry.d.ts.map +1 -1
- package/dist/plugin/registry.js +83 -75
- package/dist/plugin/registry.js.map +1 -1
- package/dist/schema-form/SecretRefField.d.ts +2 -3
- package/dist/schema-form/SecretRefField.d.ts.map +1 -1
- package/dist/schema-form/SecretRefField.js +23 -12
- package/dist/schema-form/SecretRefField.js.map +1 -1
- package/dist/schema-form/classify.d.ts +1 -122
- package/dist/schema-form/classify.d.ts.map +1 -1
- package/dist/schema-form/classify.js +174 -237
- package/dist/schema-form/classify.js.map +1 -1
- package/dist/schema-form/default-value.d.ts.map +1 -1
- package/dist/schema-form/default-value.js +42 -19
- package/dist/schema-form/default-value.js.map +1 -1
- package/dist/schema-form/enum-field.d.ts +1 -1
- package/dist/schema-form/enum-field.d.ts.map +1 -1
- package/dist/schema-form/field-model.d.ts +121 -0
- package/dist/schema-form/field-model.d.ts.map +1 -0
- package/dist/schema-form/field-model.js +2 -0
- package/dist/schema-form/field-model.js.map +1 -0
- package/dist/schema-form/field-node.d.ts.map +1 -1
- package/dist/schema-form/field-node.js +25 -14
- package/dist/schema-form/field-node.js.map +1 -1
- package/dist/schema-form/media-field.d.ts +1 -1
- package/dist/schema-form/media-field.d.ts.map +1 -1
- package/dist/schema-form/media-field.js +47 -28
- package/dist/schema-form/media-field.js.map +1 -1
- package/dist/schema-form/string-annotations.d.ts +20 -0
- package/dist/schema-form/string-annotations.d.ts.map +1 -0
- package/dist/schema-form/string-annotations.js +105 -0
- package/dist/schema-form/string-annotations.js.map +1 -0
- package/dist/schema-form/string-field.d.ts +1 -1
- package/dist/schema-form/string-field.d.ts.map +1 -1
- package/dist/schema-form/union-field.d.ts +1 -1
- package/dist/schema-form/union-field.d.ts.map +1 -1
- package/dist/schema-form/union-field.js.map +1 -1
- package/dist/schema-form/union.d.ts +1 -1
- package/dist/schema-form/union.d.ts.map +1 -1
- package/dist/schema-form/validate.d.ts.map +1 -1
- package/dist/schema-form/validate.js +126 -105
- package/dist/schema-form/validate.js.map +1 -1
- package/dist/state-binding/AdapterMapping.d.ts.map +1 -1
- package/dist/state-binding/AdapterMapping.js +0 -0
- package/dist/state-binding/AdapterMapping.js.map +1 -1
- package/dist/state-binding/StateAttachRow.d.ts.map +1 -1
- package/dist/state-binding/StateAttachRow.js +52 -36
- package/dist/state-binding/StateAttachRow.js.map +1 -1
- package/dist/state-binding/adapter-mapping-row.d.ts +17 -0
- package/dist/state-binding/adapter-mapping-row.d.ts.map +1 -0
- package/dist/state-binding/adapter-mapping-row.js +87 -0
- package/dist/state-binding/adapter-mapping-row.js.map +1 -0
- package/dist/structured-output/StructuredOutput.d.ts.map +1 -1
- package/dist/structured-output/StructuredOutput.js +1 -3
- package/dist/structured-output/StructuredOutput.js.map +1 -1
- package/package.json +2 -2
- package/src/components/explorer-body.tsx +239 -0
- package/src/components/explorer-page-size.ts +39 -0
- package/src/components/explorer-tag-filter.tsx +80 -0
- package/src/components/explorer-tags.ts +64 -0
- package/src/components/explorer-view.tsx +114 -366
- package/src/components/extension-combo-builder.tsx +35 -152
- package/src/components/extension-combo-parts.tsx +237 -0
- package/src/components/fleet-report.tsx +97 -54
- package/src/components/icons/chrome-marks.tsx +195 -0
- package/src/components/icons/icon-frame.tsx +50 -0
- package/src/components/icons/index.ts +84 -0
- package/src/components/icons/nav-map.ts +55 -0
- package/src/components/icons/nav-marks.tsx +205 -0
- package/src/components/icons/status-marks.tsx +46 -0
- package/src/components/icons/theme-marks.tsx +33 -0
- package/src/components/json-diff.tsx +1 -4
- package/src/components/json-tree-context.ts +26 -0
- package/src/components/json-tree-model.ts +139 -0
- package/src/components/json-tree-nodes.tsx +224 -0
- package/src/components/json-tree.tsx +15 -434
- package/src/components/json-value-format.ts +64 -0
- package/src/components/markdown-blocks.ts +198 -0
- package/src/components/markdown-inline.tsx +365 -0
- package/src/components/markdown.tsx +5 -471
- package/src/components/observer-registry.ts +139 -0
- package/src/components/overflow-measure.ts +69 -0
- package/src/components/prose-regions.ts +153 -0
- package/src/components/scroll-region.tsx +20 -360
- package/src/components/tab-stop-parse.ts +217 -0
- package/src/components/templated-text-field.tsx +38 -330
- package/src/components/templated-text-kwargs-editor.tsx +147 -0
- package/src/components/templated-text-kwargs.ts +92 -0
- package/src/components/templated-text-source.tsx +226 -0
- package/src/components/tool-picker-parts.tsx +184 -0
- package/src/components/tool-picker.tsx +22 -114
- package/src/components/version-history-panel.tsx +38 -142
- package/src/components/version-history-rows.tsx +220 -0
- package/src/guards.ts +7 -0
- package/src/hooks/interactions-connection.ts +227 -0
- package/src/hooks/interactions-stream.ts +274 -0
- package/src/hooks/useSse.ts +50 -477
- package/src/navigation/app-link.tsx +70 -0
- package/src/navigation/context.tsx +11 -330
- package/src/navigation/entry-state.ts +42 -0
- package/src/navigation/guard-registry.ts +65 -0
- package/src/navigation/guarded-navigation.ts +147 -0
- package/src/navigation/index.ts +2 -2
- package/src/navigation/types.ts +8 -11
- package/src/navigation/use-back-forward-guard.ts +90 -0
- package/src/plugin/registry.ts +111 -90
- package/src/schema-form/SecretRefField.tsx +121 -71
- package/src/schema-form/classify.ts +244 -395
- package/src/schema-form/default-value.ts +48 -17
- package/src/schema-form/enum-field.tsx +1 -1
- package/src/schema-form/field-model.ts +133 -0
- package/src/schema-form/field-node.tsx +94 -38
- package/src/schema-form/media-field.tsx +134 -65
- package/src/schema-form/string-annotations.ts +111 -0
- package/src/schema-form/string-field.tsx +1 -1
- package/src/schema-form/union-field.tsx +2 -1
- package/src/schema-form/union.ts +1 -1
- package/src/schema-form/validate.ts +184 -103
- package/src/state-binding/AdapterMapping.tsx +0 -0
- package/src/state-binding/StateAttachRow.tsx +222 -147
- package/src/state-binding/adapter-mapping-row.tsx +232 -0
- package/src/structured-output/StructuredOutput.tsx +1 -4
- package/dist/components/icons.d.ts +0 -160
- package/dist/components/icons.d.ts.map +0 -1
- package/dist/components/icons.js +0 -160
- package/dist/components/icons.js.map +0 -1
- package/src/components/icons.tsx +0 -586
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `AppLink` — the SDK's route-token anchor: a real `<a>` whose plain left-click is
|
|
3
|
+
* intercepted for a client-side transition.
|
|
4
|
+
*/
|
|
5
|
+
import { type AriaAttributes, type CSSProperties, type ReactNode } from 'react';
|
|
6
|
+
import type { RouteSearch, RouteToken } from './types';
|
|
7
|
+
export interface AppLinkProps<T extends RouteToken> {
|
|
8
|
+
to: T;
|
|
9
|
+
search?: RouteSearch<T>;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
'aria-label'?: string;
|
|
13
|
+
'aria-current'?: AriaAttributes['aria-current'];
|
|
14
|
+
/** Native tooltip text (also a sensible non-AT hover hint). */
|
|
15
|
+
title?: string;
|
|
16
|
+
/** Inline styles for the anchor. */
|
|
17
|
+
style?: CSSProperties;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A real anchor (so middle-click / open-in-new-tab keep working) that drives a
|
|
21
|
+
* client-side transition on plain left-click. Modified clicks (new tab/window,
|
|
22
|
+
* download) fall through to the browser's default handling.
|
|
23
|
+
*/
|
|
24
|
+
export declare function AppLink<T extends RouteToken>({ to, search, children, className, 'aria-label': ariaLabel, 'aria-current': ariaCurrent, title, style, }: AppLinkProps<T>): ReactNode;
|
|
25
|
+
//# sourceMappingURL=app-link.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-link.d.ts","sourceRoot":"","sources":["../../src/navigation/app-link.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,aAAa,EAElB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEvD,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,UAAU;IAChD,EAAE,EAAE,CAAC,CAAC;IACN,MAAM,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IACxB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;IAChD,+DAA+D;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,UAAU,EAAE,EAC5C,EAAE,EACF,MAAM,EACN,QAAQ,EACR,SAAS,EACT,YAAY,EAAE,SAAS,EACvB,cAAc,EAAE,WAAW,EAC3B,KAAK,EACL,KAAK,GACN,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,SAAS,CA0B7B"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `AppLink` — the SDK's route-token anchor: a real `<a>` whose plain left-click is
|
|
3
|
+
* intercepted for a client-side transition.
|
|
4
|
+
*/
|
|
5
|
+
import { createElement, useCallback, } from 'react';
|
|
6
|
+
import { useNavigation } from './context';
|
|
7
|
+
/**
|
|
8
|
+
* A real anchor (so middle-click / open-in-new-tab keep working) that drives a
|
|
9
|
+
* client-side transition on plain left-click. Modified clicks (new tab/window,
|
|
10
|
+
* download) fall through to the browser's default handling.
|
|
11
|
+
*/
|
|
12
|
+
export function AppLink({ to, search, children, className, 'aria-label': ariaLabel, 'aria-current': ariaCurrent, title, style, }) {
|
|
13
|
+
const { navigate, resolvePath } = useNavigation();
|
|
14
|
+
const href = resolvePath(to, search);
|
|
15
|
+
const onClick = useCallback((event) => {
|
|
16
|
+
if (event.defaultPrevented)
|
|
17
|
+
return;
|
|
18
|
+
if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)
|
|
19
|
+
return;
|
|
20
|
+
event.preventDefault();
|
|
21
|
+
navigate(to, search);
|
|
22
|
+
}, [navigate, to, search]);
|
|
23
|
+
return createElement('a', {
|
|
24
|
+
href,
|
|
25
|
+
className,
|
|
26
|
+
'aria-label': ariaLabel,
|
|
27
|
+
'aria-current': ariaCurrent,
|
|
28
|
+
title,
|
|
29
|
+
style,
|
|
30
|
+
onClick,
|
|
31
|
+
}, children);
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=app-link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-link.js","sourceRoot":"","sources":["../../src/navigation/app-link.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,aAAa,EACb,WAAW,GAKZ,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAgB1C;;;;GAIG;AACH,MAAM,UAAU,OAAO,CAAuB,EAC5C,EAAE,EACF,MAAM,EACN,QAAQ,EACR,SAAS,EACT,YAAY,EAAE,SAAS,EACvB,cAAc,EAAE,WAAW,EAC3B,KAAK,EACL,KAAK,GACW;IAChB,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,aAAa,EAAE,CAAC;IAClD,MAAM,IAAI,GAAG,WAAW,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IACrC,MAAM,OAAO,GAAG,WAAW,CACzB,CAAC,KAAoC,EAAE,EAAE;QACvC,IAAI,KAAK,CAAC,gBAAgB;YAAE,OAAO;QACnC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,MAAM;YACxF,OAAO;QACT,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IACvB,CAAC,EACD,CAAC,QAAQ,EAAE,EAAE,EAAE,MAAM,CAAC,CACvB,CAAC;IACF,OAAO,aAAa,CAClB,GAAG,EACH;QACE,IAAI;QACJ,SAAS;QACT,YAAY,EAAE,SAAS;QACvB,cAAc,EAAE,WAAW;QAC3B,KAAK;QACL,KAAK;QACL,OAAO;KACR,EACD,QAAQ,CACT,CAAC;AACJ,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import type { NavigationContextValue, NavigationGuardHandler
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { NavigationContextValue, NavigationGuardHandler } from './types';
|
|
3
3
|
export declare function NavigationProvider({ value, children, }: {
|
|
4
4
|
value: NavigationContextValue;
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
}): ReactNode;
|
|
7
|
+
export declare function useNavigation(): NavigationContextValue;
|
|
7
8
|
/** Imperative navigation to a shell route token with its typed search params. */
|
|
8
9
|
export declare function useAppNavigate(): NavigationContextValue['navigate'];
|
|
9
10
|
/** Resolve a token + search to the href the shell would route to. */
|
|
@@ -50,22 +51,4 @@ export declare function usePluginEntryNavigation(): {
|
|
|
50
51
|
navigatePluginWithOptions: NonNullable<NavigationContextValue['navigatePluginWithOptions']>;
|
|
51
52
|
updatePluginEntryState: NonNullable<NavigationContextValue['updatePluginEntryState']>;
|
|
52
53
|
};
|
|
53
|
-
export interface AppLinkProps<T extends RouteToken> {
|
|
54
|
-
to: T;
|
|
55
|
-
search?: RouteSearch<T>;
|
|
56
|
-
children: ReactNode;
|
|
57
|
-
className?: string;
|
|
58
|
-
'aria-label'?: string;
|
|
59
|
-
'aria-current'?: AriaAttributes['aria-current'];
|
|
60
|
-
/** Native tooltip text (also a sensible non-AT hover hint). */
|
|
61
|
-
title?: string;
|
|
62
|
-
/** Inline styles for the anchor. */
|
|
63
|
-
style?: CSSProperties;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* A real anchor (so middle-click / open-in-new-tab keep working) that drives a
|
|
67
|
-
* client-side transition on plain left-click. Modified clicks (new tab/window,
|
|
68
|
-
* download) fall through to the browser's default handling.
|
|
69
|
-
*/
|
|
70
|
-
export declare function AppLink<T extends RouteToken>({ to, search, children, className, 'aria-label': ariaLabel, 'aria-current': ariaCurrent, title, style, }: AppLinkProps<T>): ReactNode;
|
|
71
54
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/navigation/context.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/navigation/context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAKf,OAAO,KAAK,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AA0B9E,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,sBAAsB,CAAC;IAC9B,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,SAAS,CAgCZ;AAED,wBAAgB,aAAa,IAAI,sBAAsB,CAQtD;AAED,iFAAiF;AACjF,wBAAgB,cAAc,IAAI,sBAAsB,CAAC,UAAU,CAAC,CAEnE;AAED,qEAAqE;AACrE,wBAAgB,cAAc,IAAI,sBAAsB,CAAC,aAAa,CAAC,CAEtE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,sBAAsB,GAAG,IAAI,CAWvF;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,IAAI,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAWtE;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CACzC,sBAAsB,EACtB,gBAAgB,GAAG,mBAAmB,CACvC,CAGA;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,IAAI;IAC1C,yBAAyB,EAAE,WAAW,CAAC,sBAAsB,CAAC,2BAA2B,CAAC,CAAC,CAAC;IAC5F,sBAAsB,EAAE,WAAW,CAAC,sBAAsB,CAAC,wBAAwB,CAAC,CAAC,CAAC;CACvF,CAWA"}
|
|
@@ -1,57 +1,9 @@
|
|
|
1
|
-
import { createContext, createElement, useCallback, useContext, useEffect, useMemo, useRef,
|
|
1
|
+
import { createContext, createElement, useCallback, useContext, useEffect, useMemo, useRef, } from 'react';
|
|
2
|
+
import { NavigationGuardRegistry } from './guard-registry';
|
|
3
|
+
import { buildGuardedNavigation } from './guarded-navigation';
|
|
4
|
+
import { useBackForwardGuard } from './use-back-forward-guard';
|
|
2
5
|
/** Shell-provided navigation; no default, so use outside {@link NavigationProvider} throws. */
|
|
3
6
|
const NavigationContext = createContext(null);
|
|
4
|
-
/**
|
|
5
|
-
* The guards active under one {@link NavigationProvider} — the single registry
|
|
6
|
-
* every SDK-controlled navigation consults, so feature and plugin-page guards
|
|
7
|
-
* compose against the same set. `run` stops at the first veto (at most one confirm
|
|
8
|
-
* dialog); `subscribe` re-evaluates browser-level listeners when the armed set changes.
|
|
9
|
-
*/
|
|
10
|
-
class NavigationGuardRegistry {
|
|
11
|
-
guards = new Set();
|
|
12
|
-
listeners = new Set();
|
|
13
|
-
/** Register a guard; returns the unregister function. */
|
|
14
|
-
add(entry) {
|
|
15
|
-
this.guards.add(entry);
|
|
16
|
-
this.emit();
|
|
17
|
-
return () => {
|
|
18
|
-
this.guards.delete(entry);
|
|
19
|
-
this.emit();
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
/** Notify subscribers that a guard's `when` may have changed. */
|
|
23
|
-
touch() {
|
|
24
|
-
this.emit();
|
|
25
|
-
}
|
|
26
|
-
subscribe(listener) {
|
|
27
|
-
this.listeners.add(listener);
|
|
28
|
-
return () => {
|
|
29
|
-
this.listeners.delete(listener);
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
hasArmedGuards() {
|
|
33
|
-
for (const entry of this.guards) {
|
|
34
|
-
if (entry.when)
|
|
35
|
-
return true;
|
|
36
|
-
}
|
|
37
|
-
return false;
|
|
38
|
-
}
|
|
39
|
-
/** Resolve `true` only if every armed guard allows the navigation. */
|
|
40
|
-
async run() {
|
|
41
|
-
for (const entry of this.guards) {
|
|
42
|
-
if (!entry.when)
|
|
43
|
-
continue;
|
|
44
|
-
const allowed = await entry.handler();
|
|
45
|
-
if (!allowed)
|
|
46
|
-
return false;
|
|
47
|
-
}
|
|
48
|
-
return true;
|
|
49
|
-
}
|
|
50
|
-
emit() {
|
|
51
|
-
for (const listener of this.listeners)
|
|
52
|
-
listener();
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
7
|
/**
|
|
56
8
|
* Carries the provider's guard registry to {@link useNavigationGuard}. Separate from
|
|
57
9
|
* {@link NavigationContext} so the shell-supplied value stays exactly the shell's
|
|
@@ -68,38 +20,6 @@ function useGuardRegistry() {
|
|
|
68
20
|
}
|
|
69
21
|
return registry;
|
|
70
22
|
}
|
|
71
|
-
/**
|
|
72
|
-
* The `history.state` namespace under which the host stores per-history-entry plugin
|
|
73
|
-
* state, keyed by pluginId. Shared, by literal contract, with the shell's
|
|
74
|
-
* `createNavigation` (which WRITES the slot) and the plugin catch-all page (which
|
|
75
|
-
* READS it) — this SDK layer only reconstructs it for the committed-entry mirror.
|
|
76
|
-
*/
|
|
77
|
-
const ENTRY_STATE_KEY = 'studioPluginEntryState';
|
|
78
|
-
/**
|
|
79
|
-
* Reconstruct the `history.state` bag a guard-approved plugin navigation LANDS on, so
|
|
80
|
-
* a subsequently vetoed Back restores the entry with the state it just wrote intact
|
|
81
|
-
* rather than clobbering it with null. Mirrors the host's
|
|
82
|
-
* `{ studioPluginEntryState: { [pluginId]: state } }` namespace. TanStack's own
|
|
83
|
-
* `key`/`__TSR_*` keys are unobservable at this layer, so this is a best-effort bag —
|
|
84
|
-
* no worse than the `null` it replaces for those keys, and correct for the plugin slot.
|
|
85
|
-
*/
|
|
86
|
-
function reconstructEntryState(pluginId, state) {
|
|
87
|
-
return { [ENTRY_STATE_KEY]: { [pluginId]: state } };
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Merge one plugin's state slot into a prior `history.state` bag, preserving BOTH the
|
|
91
|
-
* router's own keys and every other plugin's slot. Used to refresh the committed entry
|
|
92
|
-
* after {@link NavigationContextValue.updatePluginEntryState}, so a later vetoed Back
|
|
93
|
-
* restores the UPDATED slot instead of the pre-update one.
|
|
94
|
-
*/
|
|
95
|
-
function mergeEntryState(prev, pluginId, state) {
|
|
96
|
-
const base = prev !== null && typeof prev === 'object' ? prev : {};
|
|
97
|
-
const priorSlot = base[ENTRY_STATE_KEY];
|
|
98
|
-
const priorBag = priorSlot !== null && typeof priorSlot === 'object'
|
|
99
|
-
? priorSlot
|
|
100
|
-
: {};
|
|
101
|
-
return { ...base, [ENTRY_STATE_KEY]: { ...priorBag, [pluginId]: state } };
|
|
102
|
-
}
|
|
103
23
|
export function NavigationProvider({ value, children, }) {
|
|
104
24
|
const registryRef = useRef(null);
|
|
105
25
|
registryRef.current ??= new NavigationGuardRegistry();
|
|
@@ -108,171 +28,17 @@ export function NavigationProvider({ value, children, }) {
|
|
|
108
28
|
// canceled back/forward restores to. URL changes made outside the SDK's navigate
|
|
109
29
|
// entry points are unobservable by design at this layer.
|
|
110
30
|
const committedRef = useRef(null);
|
|
111
|
-
|
|
112
|
-
// while at least one guard is armed.
|
|
113
|
-
const [armed, setArmed] = useState(false);
|
|
114
|
-
useEffect(() => {
|
|
115
|
-
setArmed(registry.hasArmedGuards());
|
|
116
|
-
return registry.subscribe(() => {
|
|
117
|
-
setArmed(registry.hasArmedGuards());
|
|
118
|
-
});
|
|
119
|
-
}, [registry]);
|
|
120
|
-
useEffect(() => {
|
|
121
|
-
if (!armed)
|
|
122
|
-
return;
|
|
123
|
-
// The protected entry (URL + state); a back/forward landing elsewhere is first
|
|
124
|
-
// canceled back to here while the guard is consulted.
|
|
125
|
-
committedRef.current = { href: window.location.href, state: window.history.state };
|
|
126
|
-
// Set while replaying a guard-approved back/forward, so its `popstate` passes
|
|
127
|
-
// through instead of being re-intercepted.
|
|
128
|
-
let bypass = false;
|
|
129
|
-
// Latched while a decision is pending, so a second Back mid-decision keeps canceling
|
|
130
|
-
// without starting a concurrent `registry.run()` — one gesture, one dialog.
|
|
131
|
-
let pending = false;
|
|
132
|
-
// Restore pushes stacked for the pending decision, so an approved replay unwinds
|
|
133
|
-
// exactly that far in one `go(-depth)`. Reset per decision.
|
|
134
|
-
let restores = 0;
|
|
135
|
-
const onPopState = () => {
|
|
136
|
-
if (bypass) {
|
|
137
|
-
bypass = false;
|
|
138
|
-
committedRef.current = { href: window.location.href, state: window.history.state };
|
|
139
|
-
return;
|
|
140
|
-
}
|
|
141
|
-
if (!registry.hasArmedGuards()) {
|
|
142
|
-
committedRef.current = { href: window.location.href, state: window.history.state };
|
|
143
|
-
return;
|
|
144
|
-
}
|
|
145
|
-
const committed = committedRef.current;
|
|
146
|
-
if (committed === null)
|
|
147
|
-
return;
|
|
148
|
-
// Cancel the browser's move by pushing the committed entry on top of wherever it
|
|
149
|
-
// landed. popstate exposes no direction/distance and the router owns
|
|
150
|
-
// `history.state`, so restore can only push, not delete. A vetoed forward thus
|
|
151
|
-
// strands a stub entry — an accepted limit the next pushState truncates.
|
|
152
|
-
window.history.pushState(committed.state, '', committed.href);
|
|
153
|
-
restores += 1;
|
|
154
|
-
if (pending)
|
|
155
|
-
return;
|
|
156
|
-
pending = true;
|
|
157
|
-
void registry.run().then((allowed) => {
|
|
158
|
-
pending = false;
|
|
159
|
-
const depth = restores;
|
|
160
|
-
restores = 0;
|
|
161
|
-
if (!allowed)
|
|
162
|
-
return;
|
|
163
|
-
bypass = true;
|
|
164
|
-
window.history.go(-depth);
|
|
165
|
-
});
|
|
166
|
-
};
|
|
167
|
-
const onBeforeUnload = (event) => {
|
|
168
|
-
event.preventDefault();
|
|
169
|
-
// Browsers below the floor (Chrome 108) gate the prompt on a set `returnValue`,
|
|
170
|
-
// not `preventDefault` alone; the string is ignored. Typed deprecated, still required.
|
|
171
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated -- required beforeunload trigger for the supported browser range.
|
|
172
|
-
event.returnValue = '';
|
|
173
|
-
};
|
|
174
|
-
window.addEventListener('popstate', onPopState);
|
|
175
|
-
window.addEventListener('beforeunload', onBeforeUnload);
|
|
176
|
-
return () => {
|
|
177
|
-
committedRef.current = null;
|
|
178
|
-
window.removeEventListener('popstate', onPopState);
|
|
179
|
-
window.removeEventListener('beforeunload', onBeforeUnload);
|
|
180
|
-
};
|
|
181
|
-
}, [armed, registry]);
|
|
31
|
+
useBackForwardGuard(registry, committedRef);
|
|
182
32
|
// Wrap the shell's transitions so an armed guard is consulted before they commit.
|
|
183
33
|
// With no guard armed the call stays synchronous — identical to the raw shell value.
|
|
184
|
-
const guarded = useMemo(() =>
|
|
185
|
-
// Forwarded as a REST tuple, so the shell's `navigate` is called with exactly
|
|
186
|
-
// the arguments the caller passed — a caller that wants the default history
|
|
187
|
-
// behaviour never turns into one that passed an explicit `undefined` for it.
|
|
188
|
-
const navigate = (...args) => {
|
|
189
|
-
const [token, search] = args;
|
|
190
|
-
if (!registry.hasArmedGuards()) {
|
|
191
|
-
value.navigate(...args);
|
|
192
|
-
return;
|
|
193
|
-
}
|
|
194
|
-
void registry.run().then((allowed) => {
|
|
195
|
-
if (!allowed)
|
|
196
|
-
return;
|
|
197
|
-
value.navigate(...args);
|
|
198
|
-
// Advance the committed entry to the resolved destination (the router may commit
|
|
199
|
-
// async, so `window.location` would be stale). Its router state is unobservable
|
|
200
|
-
// here, hence `state: null`.
|
|
201
|
-
if (committedRef.current !== null) {
|
|
202
|
-
committedRef.current = { href: value.resolvePath(token, search), state: null };
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
};
|
|
206
|
-
const navigatePlugin = (pluginId, pagePath, params, search) => {
|
|
207
|
-
if (!registry.hasArmedGuards()) {
|
|
208
|
-
value.navigatePlugin(pluginId, pagePath, params, search);
|
|
209
|
-
return;
|
|
210
|
-
}
|
|
211
|
-
void registry.run().then((allowed) => {
|
|
212
|
-
if (!allowed)
|
|
213
|
-
return;
|
|
214
|
-
value.navigatePlugin(pluginId, pagePath, params, search);
|
|
215
|
-
if (committedRef.current !== null) {
|
|
216
|
-
committedRef.current = {
|
|
217
|
-
href: value.resolvePluginPath(pluginId, pagePath, params, search),
|
|
218
|
-
state: null,
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
});
|
|
222
|
-
};
|
|
223
|
-
const result = { ...value, navigate, navigatePlugin };
|
|
224
|
-
// navigatePluginWithOptions: guard-gated exactly like navigatePlugin (a veto never
|
|
225
|
-
// reaches the host member — no entry, no state). On approval, refresh the committed
|
|
226
|
-
// entry with the reconstructed state bag so a subsequent vetoed Back restores the
|
|
227
|
-
// slot this navigation just wrote, not null. Only wrapped when the host provides it;
|
|
228
|
-
// an older host leaves it undefined and the plugin-facing hook throws loudly.
|
|
229
|
-
const hostNavigateWithOptions = value.navigatePluginWithOptions;
|
|
230
|
-
if (hostNavigateWithOptions !== undefined) {
|
|
231
|
-
result.navigatePluginWithOptions = (pluginId, pagePath, params, search, options) => {
|
|
232
|
-
if (!registry.hasArmedGuards()) {
|
|
233
|
-
hostNavigateWithOptions(pluginId, pagePath, params, search, options);
|
|
234
|
-
return;
|
|
235
|
-
}
|
|
236
|
-
void registry.run().then((allowed) => {
|
|
237
|
-
if (!allowed)
|
|
238
|
-
return;
|
|
239
|
-
hostNavigateWithOptions(pluginId, pagePath, params, search, options);
|
|
240
|
-
if (committedRef.current !== null) {
|
|
241
|
-
committedRef.current = {
|
|
242
|
-
href: value.resolvePluginPath(pluginId, pagePath, params, search),
|
|
243
|
-
state: options?.state !== undefined
|
|
244
|
-
? reconstructEntryState(pluginId, options.state)
|
|
245
|
-
: null,
|
|
246
|
-
};
|
|
247
|
-
}
|
|
248
|
-
});
|
|
249
|
-
};
|
|
250
|
-
}
|
|
251
|
-
// updatePluginEntryState: guard-FREE — rewriting the current entry's state is not a
|
|
252
|
-
// navigation away, so no guard is consulted. But the SDK MUST wrap it to refresh the
|
|
253
|
-
// committed entry with the merged slot, so a later vetoed Back restores the UPDATED
|
|
254
|
-
// state rather than the pre-update one. URL is unchanged, so href is preserved.
|
|
255
|
-
const hostUpdateEntryState = value.updatePluginEntryState;
|
|
256
|
-
if (hostUpdateEntryState !== undefined) {
|
|
257
|
-
result.updatePluginEntryState = (pluginId, state) => {
|
|
258
|
-
hostUpdateEntryState(pluginId, state);
|
|
259
|
-
if (committedRef.current !== null) {
|
|
260
|
-
committedRef.current = {
|
|
261
|
-
href: committedRef.current.href,
|
|
262
|
-
state: mergeEntryState(committedRef.current.state, pluginId, state),
|
|
263
|
-
};
|
|
264
|
-
}
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
return result;
|
|
268
|
-
}, [value, registry]);
|
|
34
|
+
const guarded = useMemo(() => buildGuardedNavigation(value, registry, committedRef), [value, registry]);
|
|
269
35
|
const commitHref = useCallback((href) => {
|
|
270
36
|
if (committedRef.current !== null)
|
|
271
37
|
committedRef.current = { href, state: null };
|
|
272
38
|
}, []);
|
|
273
39
|
return createElement(GuardRegistryContext.Provider, { value: registry }, createElement(CommitHrefContext.Provider, { value: commitHref }, createElement(NavigationContext.Provider, { value: guarded }, children)));
|
|
274
40
|
}
|
|
275
|
-
function useNavigation() {
|
|
41
|
+
export function useNavigation() {
|
|
276
42
|
const ctx = useContext(NavigationContext);
|
|
277
43
|
if (ctx === null) {
|
|
278
44
|
throw new Error('useNavigation must be used within a <NavigationProvider> (the shell provides it).');
|
|
@@ -357,30 +123,4 @@ export function usePluginEntryNavigation() {
|
|
|
357
123
|
}
|
|
358
124
|
return { navigatePluginWithOptions, updatePluginEntryState };
|
|
359
125
|
}
|
|
360
|
-
/**
|
|
361
|
-
* A real anchor (so middle-click / open-in-new-tab keep working) that drives a
|
|
362
|
-
* client-side transition on plain left-click. Modified clicks (new tab/window,
|
|
363
|
-
* download) fall through to the browser's default handling.
|
|
364
|
-
*/
|
|
365
|
-
export function AppLink({ to, search, children, className, 'aria-label': ariaLabel, 'aria-current': ariaCurrent, title, style, }) {
|
|
366
|
-
const { navigate, resolvePath } = useNavigation();
|
|
367
|
-
const href = resolvePath(to, search);
|
|
368
|
-
const onClick = useCallback((event) => {
|
|
369
|
-
if (event.defaultPrevented)
|
|
370
|
-
return;
|
|
371
|
-
if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)
|
|
372
|
-
return;
|
|
373
|
-
event.preventDefault();
|
|
374
|
-
navigate(to, search);
|
|
375
|
-
}, [navigate, to, search]);
|
|
376
|
-
return createElement('a', {
|
|
377
|
-
href,
|
|
378
|
-
className,
|
|
379
|
-
'aria-label': ariaLabel,
|
|
380
|
-
'aria-current': ariaCurrent,
|
|
381
|
-
title,
|
|
382
|
-
style,
|
|
383
|
-
onClick,
|
|
384
|
-
}, children);
|
|
385
|
-
}
|
|
386
126
|
//# sourceMappingURL=context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/navigation/context.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,aAAa,EACb,WAAW,EACX,UAAU,EACV,SAAS,EACT,OAAO,EACP,MAAM,EACN,QAAQ,GAKT,MAAM,OAAO,CAAC;AASf,+FAA+F;AAC/F,MAAM,iBAAiB,GAAG,aAAa,CAAgC,IAAI,CAAC,CAAC;AAY7E;;;;;GAKG;AACH,MAAM,uBAAuB;IACV,MAAM,GAAG,IAAI,GAAG,EAAc,CAAC;IAC/B,SAAS,GAAG,IAAI,GAAG,EAAc,CAAC;IAEnD,yDAAyD;IACzD,GAAG,CAAC,KAAiB;QACnB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACvB,IAAI,CAAC,IAAI,EAAE,CAAC;QACZ,OAAO,GAAG,EAAE;YACV,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAC1B,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,CAAC,CAAC;IACJ,CAAC;IAED,iEAAiE;IACjE,KAAK;QACH,IAAI,CAAC,IAAI,EAAE,CAAC;IACd,CAAC;IAED,SAAS,CAAC,QAAoB;QAC5B,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC7B,OAAO,GAAG,EAAE;YACV,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAClC,CAAC,CAAC;IACJ,CAAC;IAED,cAAc;QACZ,KAAK,MAAM,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B,EAAE,CAAC;AAC/C,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,wBAAwB;IAItC,MAAM,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,GAAG,aAAa,EAAE,CAAC;IAC9E,IAAI,yBAAyB,KAAK,SAAS,IAAI,sBAAsB,KAAK,SAAS,EAAE,CAAC;QACpF,MAAM,IAAI,KAAK,CACb,sFAAsF;YACpF,yFAAyF;YACzF,2FAA2F;YAC3F,sDAAsD,CACzD,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,CAAC;AAC/D,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The committed-entry mirror of the host's per-history-entry plugin state. The SDK
|
|
3
|
+
* reconstructs and merges the `{ studioPluginEntryState: { [pluginId]: state } }`
|
|
4
|
+
* `history.state` namespace so a vetoed Back restores the entry with the slot a
|
|
5
|
+
* plugin navigation just wrote, rather than clobbering it with null.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Reconstruct the `history.state` bag a guard-approved plugin navigation LANDS on, so
|
|
9
|
+
* a subsequently vetoed Back restores the entry with the state it just wrote intact
|
|
10
|
+
* rather than clobbering it with null. Mirrors the host's
|
|
11
|
+
* `{ studioPluginEntryState: { [pluginId]: state } }` namespace. TanStack's own
|
|
12
|
+
* `key`/`__TSR_*` keys are unobservable at this layer, so this is a best-effort bag —
|
|
13
|
+
* no worse than the `null` it replaces for those keys, and correct for the plugin slot.
|
|
14
|
+
*/
|
|
15
|
+
export declare function reconstructEntryState(pluginId: string, state: unknown): unknown;
|
|
16
|
+
/**
|
|
17
|
+
* Merge one plugin's state slot into a prior `history.state` bag, preserving BOTH the
|
|
18
|
+
* router's own keys and every other plugin's slot. Used to refresh the committed entry
|
|
19
|
+
* after an entry-state update, so a later vetoed Back restores the UPDATED slot instead
|
|
20
|
+
* of the pre-update one.
|
|
21
|
+
*/
|
|
22
|
+
export declare function mergeEntryState(prev: unknown, pluginId: string, state: unknown): unknown;
|
|
23
|
+
//# sourceMappingURL=entry-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entry-state.d.ts","sourceRoot":"","sources":["../../src/navigation/entry-state.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAUH;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAE/E;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAQxF"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The committed-entry mirror of the host's per-history-entry plugin state. The SDK
|
|
3
|
+
* reconstructs and merges the `{ studioPluginEntryState: { [pluginId]: state } }`
|
|
4
|
+
* `history.state` namespace so a vetoed Back restores the entry with the slot a
|
|
5
|
+
* plugin navigation just wrote, rather than clobbering it with null.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* The `history.state` namespace under which the host stores per-history-entry plugin
|
|
9
|
+
* state, keyed by pluginId. Shared, by literal contract, with the shell's
|
|
10
|
+
* `createNavigation` (which WRITES the slot) and the plugin catch-all page (which
|
|
11
|
+
* READS it) — this SDK layer only reconstructs it for the committed-entry mirror.
|
|
12
|
+
*/
|
|
13
|
+
const ENTRY_STATE_KEY = 'studioPluginEntryState';
|
|
14
|
+
/**
|
|
15
|
+
* Reconstruct the `history.state` bag a guard-approved plugin navigation LANDS on, so
|
|
16
|
+
* a subsequently vetoed Back restores the entry with the state it just wrote intact
|
|
17
|
+
* rather than clobbering it with null. Mirrors the host's
|
|
18
|
+
* `{ studioPluginEntryState: { [pluginId]: state } }` namespace. TanStack's own
|
|
19
|
+
* `key`/`__TSR_*` keys are unobservable at this layer, so this is a best-effort bag —
|
|
20
|
+
* no worse than the `null` it replaces for those keys, and correct for the plugin slot.
|
|
21
|
+
*/
|
|
22
|
+
export function reconstructEntryState(pluginId, state) {
|
|
23
|
+
return { [ENTRY_STATE_KEY]: { [pluginId]: state } };
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Merge one plugin's state slot into a prior `history.state` bag, preserving BOTH the
|
|
27
|
+
* router's own keys and every other plugin's slot. Used to refresh the committed entry
|
|
28
|
+
* after an entry-state update, so a later vetoed Back restores the UPDATED slot instead
|
|
29
|
+
* of the pre-update one.
|
|
30
|
+
*/
|
|
31
|
+
export function mergeEntryState(prev, pluginId, state) {
|
|
32
|
+
const base = prev !== null && typeof prev === 'object' ? prev : {};
|
|
33
|
+
const priorSlot = base[ENTRY_STATE_KEY];
|
|
34
|
+
const priorBag = priorSlot !== null && typeof priorSlot === 'object'
|
|
35
|
+
? priorSlot
|
|
36
|
+
: {};
|
|
37
|
+
return { ...base, [ENTRY_STATE_KEY]: { ...priorBag, [pluginId]: state } };
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=entry-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entry-state.js","sourceRoot":"","sources":["../../src/navigation/entry-state.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;GAKG;AACH,MAAM,eAAe,GAAG,wBAAwB,CAAC;AAEjD;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB,CAAC,QAAgB,EAAE,KAAc;IACpE,OAAO,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC;AACtD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,IAAa,EAAE,QAAgB,EAAE,KAAc;IAC7E,MAAM,IAAI,GAAG,IAAI,KAAK,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAE,IAAgC,CAAC,CAAC,CAAC,EAAE,CAAC;IAChG,MAAM,SAAS,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC;IACxC,MAAM,QAAQ,GACZ,SAAS,KAAK,IAAI,IAAI,OAAO,SAAS,KAAK,QAAQ;QACjD,CAAC,CAAE,SAAqC;QACxC,CAAC,CAAC,EAAE,CAAC;IACT,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE,GAAG,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC;AAC5E,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The armed-navigation-guard registry: the single set every SDK-controlled
|
|
3
|
+
* navigation consults, so feature and plugin-page guards compose against the same
|
|
4
|
+
* guards. `run` stops at the first veto (at most one confirm dialog); `subscribe`
|
|
5
|
+
* lets the provider re-evaluate browser-level listeners when the armed set changes.
|
|
6
|
+
*/
|
|
7
|
+
import type { NavigationGuardHandler } from './types';
|
|
8
|
+
/**
|
|
9
|
+
* One armed navigation guard. The registry holds this exact object (not a
|
|
10
|
+
* snapshot), so flipping `when` or swapping `handler` on re-render takes effect
|
|
11
|
+
* without re-registering.
|
|
12
|
+
*/
|
|
13
|
+
export interface GuardEntry {
|
|
14
|
+
when: boolean;
|
|
15
|
+
handler: NavigationGuardHandler;
|
|
16
|
+
}
|
|
17
|
+
export declare class NavigationGuardRegistry {
|
|
18
|
+
private readonly guards;
|
|
19
|
+
private readonly listeners;
|
|
20
|
+
/** Register a guard; returns the unregister function. */
|
|
21
|
+
add(entry: GuardEntry): () => void;
|
|
22
|
+
/** Notify subscribers that a guard's `when` may have changed. */
|
|
23
|
+
touch(): void;
|
|
24
|
+
subscribe(listener: () => void): () => void;
|
|
25
|
+
hasArmedGuards(): boolean;
|
|
26
|
+
/** Resolve `true` only if every armed guard allows the navigation. */
|
|
27
|
+
run(): Promise<boolean>;
|
|
28
|
+
private emit;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=guard-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guard-registry.d.ts","sourceRoot":"","sources":["../../src/navigation/guard-registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEtD;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,sBAAsB,CAAC;CACjC;AAED,qBAAa,uBAAuB;IAClC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAyB;IAChD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAyB;IAEnD,yDAAyD;IACzD,GAAG,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,IAAI;IASlC,iEAAiE;IACjE,KAAK,IAAI,IAAI;IAIb,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAO3C,cAAc,IAAI,OAAO;IAOzB,sEAAsE;IAChE,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC;IAS7B,OAAO,CAAC,IAAI;CAGb"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export class NavigationGuardRegistry {
|
|
2
|
+
guards = new Set();
|
|
3
|
+
listeners = new Set();
|
|
4
|
+
/** Register a guard; returns the unregister function. */
|
|
5
|
+
add(entry) {
|
|
6
|
+
this.guards.add(entry);
|
|
7
|
+
this.emit();
|
|
8
|
+
return () => {
|
|
9
|
+
this.guards.delete(entry);
|
|
10
|
+
this.emit();
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
/** Notify subscribers that a guard's `when` may have changed. */
|
|
14
|
+
touch() {
|
|
15
|
+
this.emit();
|
|
16
|
+
}
|
|
17
|
+
subscribe(listener) {
|
|
18
|
+
this.listeners.add(listener);
|
|
19
|
+
return () => {
|
|
20
|
+
this.listeners.delete(listener);
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
hasArmedGuards() {
|
|
24
|
+
for (const entry of this.guards) {
|
|
25
|
+
if (entry.when)
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
/** Resolve `true` only if every armed guard allows the navigation. */
|
|
31
|
+
async run() {
|
|
32
|
+
for (const entry of this.guards) {
|
|
33
|
+
if (!entry.when)
|
|
34
|
+
continue;
|
|
35
|
+
const allowed = await entry.handler();
|
|
36
|
+
if (!allowed)
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
emit() {
|
|
42
|
+
for (const listener of this.listeners)
|
|
43
|
+
listener();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=guard-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guard-registry.js","sourceRoot":"","sources":["../../src/navigation/guard-registry.ts"],"names":[],"mappings":"AAkBA,MAAM,OAAO,uBAAuB;IACjB,MAAM,GAAG,IAAI,GAAG,EAAc,CAAC;IAC/B,SAAS,GAAG,IAAI,GAAG,EAAc,CAAC;IAEnD,yDAAyD;IACzD,GAAG,CAAC,KAAiB;QACnB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACvB,IAAI,CAAC,IAAI,EAAE,CAAC;QACZ,OAAO,GAAG,EAAE;YACV,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAC1B,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,CAAC,CAAC;IACJ,CAAC;IAED,iEAAiE;IACjE,KAAK;QACH,IAAI,CAAC,IAAI,EAAE,CAAC;IACd,CAAC;IAED,SAAS,CAAC,QAAoB;QAC5B,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC7B,OAAO,GAAG,EAAE;YACV,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAClC,CAAC,CAAC;IACJ,CAAC;IAED,cAAc;QACZ,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChC,IAAI,KAAK,CAAC,IAAI;gBAAE,OAAO,IAAI,CAAC;QAC9B,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,sEAAsE;IACtE,KAAK,CAAC,GAAG;QACP,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChC,IAAI,CAAC,KAAK,CAAC,IAAI;gBAAE,SAAS;YAC1B,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC;YACtC,IAAI,CAAC,OAAO;gBAAE,OAAO,KAAK,CAAC;QAC7B,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,IAAI;QACV,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,SAAS;YAAE,QAAQ,EAAE,CAAC;IACpD,CAAC;CACF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wrap a shell-supplied {@link NavigationContextValue} so every SDK-controlled
|
|
3
|
+
* transition consults the armed guards before it commits, and — on approval —
|
|
4
|
+
* advances the committed-entry mirror to the resolved destination. With no guard
|
|
5
|
+
* armed each call stays synchronous, identical to the raw shell value.
|
|
6
|
+
*/
|
|
7
|
+
import type { RefObject } from 'react';
|
|
8
|
+
import type { NavigationGuardRegistry } from './guard-registry';
|
|
9
|
+
import type { NavigationContextValue } from './types';
|
|
10
|
+
/** The last committed history entry the SDK observed: what a canceled back/forward restores to. */
|
|
11
|
+
export interface CommittedEntry {
|
|
12
|
+
href: string;
|
|
13
|
+
state: unknown;
|
|
14
|
+
}
|
|
15
|
+
type CommittedRef = RefObject<CommittedEntry | null>;
|
|
16
|
+
/**
|
|
17
|
+
* Build the guarded navigation value. The two host-optional members
|
|
18
|
+
* (`navigatePluginWithOptions`, `updatePluginEntryState`) are wrapped only when the
|
|
19
|
+
* host provides them; an older host leaves them undefined and the plugin-facing hook
|
|
20
|
+
* throws loudly.
|
|
21
|
+
*/
|
|
22
|
+
export declare function buildGuardedNavigation(value: NavigationContextValue, registry: NavigationGuardRegistry, committedRef: CommittedRef): NavigationContextValue;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=guarded-navigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guarded-navigation.d.ts","sourceRoot":"","sources":["../../src/navigation/guarded-navigation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEtD,mGAAmG;AACnG,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,KAAK,YAAY,GAAG,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;AAkGrD;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,sBAAsB,EAC7B,QAAQ,EAAE,uBAAuB,EACjC,YAAY,EAAE,YAAY,GACzB,sBAAsB,CAoBxB"}
|