@tai42/studio-sdk 0.11.0 → 0.13.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/components/code-block.d.ts.map +1 -1
- package/dist/components/code-block.js +26 -13
- package/dist/components/code-block.js.map +1 -1
- package/dist/components/components.css +20 -0
- package/dist/components/copy-field.d.ts.map +1 -1
- package/dist/components/copy-field.js +8 -73
- package/dist/components/copy-field.js.map +1 -1
- package/dist/components/date-range-picker.d.ts +73 -0
- package/dist/components/date-range-picker.d.ts.map +1 -0
- package/dist/components/date-range-picker.js +146 -0
- package/dist/components/date-range-picker.js.map +1 -0
- package/dist/components/dialog.d.ts +19 -1
- package/dist/components/dialog.d.ts.map +1 -1
- package/dist/components/dialog.js +16 -13
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/dirty-guard.d.ts +28 -0
- package/dist/components/dirty-guard.d.ts.map +1 -0
- package/dist/components/dirty-guard.js +93 -0
- package/dist/components/dirty-guard.js.map +1 -0
- package/dist/components/extension-picker.d.ts.map +1 -1
- package/dist/components/extension-picker.js +7 -0
- package/dist/components/extension-picker.js.map +1 -1
- package/dist/components/form-dialog.d.ts +45 -0
- package/dist/components/form-dialog.d.ts.map +1 -0
- package/dist/components/form-dialog.js +71 -0
- package/dist/components/form-dialog.js.map +1 -0
- package/dist/components/json-tree.d.ts +7 -1
- package/dist/components/json-tree.d.ts.map +1 -1
- package/dist/components/json-tree.js +300 -13
- package/dist/components/json-tree.js.map +1 -1
- package/dist/components/markdown.d.ts +60 -0
- package/dist/components/markdown.d.ts.map +1 -0
- package/dist/components/markdown.js +435 -0
- package/dist/components/markdown.js.map +1 -0
- package/dist/components/tabs.d.ts +3 -1
- package/dist/components/tabs.d.ts.map +1 -1
- package/dist/components/tabs.js +2 -2
- package/dist/components/tabs.js.map +1 -1
- package/dist/hooks/useApi.d.ts +56 -28
- package/dist/hooks/useApi.d.ts.map +1 -1
- package/dist/hooks/useClipboardCopy.d.ts +26 -0
- package/dist/hooks/useClipboardCopy.d.ts.map +1 -0
- package/dist/hooks/useClipboardCopy.js +72 -0
- package/dist/hooks/useClipboardCopy.js.map +1 -0
- package/dist/hooks/useSystemKinds.d.ts +55 -0
- package/dist/hooks/useSystemKinds.d.ts.map +1 -0
- package/dist/hooks/useSystemKinds.js +78 -0
- package/dist/hooks/useSystemKinds.js.map +1 -0
- package/dist/index.d.ts +11 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/navigation/context.d.ts +13 -1
- package/dist/navigation/context.d.ts.map +1 -1
- package/dist/navigation/context.js +205 -7
- package/dist/navigation/context.js.map +1 -1
- package/dist/navigation/index.d.ts +2 -2
- package/dist/navigation/index.d.ts.map +1 -1
- package/dist/navigation/index.js +1 -1
- package/dist/navigation/index.js.map +1 -1
- package/dist/navigation/types.d.ts +11 -0
- package/dist/navigation/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/components/code-block.tsx +72 -9
- package/src/components/components.css +20 -0
- package/src/components/copy-field.tsx +25 -81
- package/src/components/date-range-picker.tsx +256 -0
- package/src/components/dialog.tsx +59 -18
- package/src/components/dirty-guard.tsx +153 -0
- package/src/components/extension-picker.tsx +12 -0
- package/src/components/form-dialog.tsx +133 -0
- package/src/components/json-tree.tsx +477 -42
- package/src/components/markdown.tsx +552 -0
- package/src/components/tabs.tsx +10 -1
- package/src/hooks/useClipboardCopy.ts +105 -0
- package/src/hooks/useSystemKinds.tsx +97 -0
- package/src/index.ts +20 -0
- package/src/navigation/context.tsx +245 -7
- package/src/navigation/index.ts +2 -0
- package/src/navigation/types.ts +12 -0
package/dist/hooks/useApi.d.ts
CHANGED
|
@@ -317,7 +317,21 @@ export declare const ApiProvider: import("react").Provider<{
|
|
|
317
317
|
cleared: true;
|
|
318
318
|
}>;
|
|
319
319
|
readonly getManifest: (signal?: AbortSignal) => Promise<{
|
|
320
|
-
mcp:
|
|
320
|
+
mcp: import("zod").objectOutputType<{
|
|
321
|
+
managed: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodObject<{
|
|
322
|
+
connection_id: import("zod").ZodString;
|
|
323
|
+
provider_id: import("zod").ZodString;
|
|
324
|
+
sub_service: import("zod").ZodString;
|
|
325
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
326
|
+
connection_id: string;
|
|
327
|
+
provider_id: string;
|
|
328
|
+
sub_service: string;
|
|
329
|
+
}, {
|
|
330
|
+
connection_id: string;
|
|
331
|
+
provider_id: string;
|
|
332
|
+
sub_service: string;
|
|
333
|
+
}>>>;
|
|
334
|
+
}, import("zod").ZodTypeAny, "passthrough">[];
|
|
321
335
|
user_tools: string[];
|
|
322
336
|
}>;
|
|
323
337
|
readonly setMcpConfig: (mcp: unknown[]) => Promise<{
|
|
@@ -374,10 +388,14 @@ export declare const ApiProvider: import("react").Provider<{
|
|
|
374
388
|
payload?: unknown;
|
|
375
389
|
}[];
|
|
376
390
|
}>;
|
|
377
|
-
readonly listSubMcp: (signal?: AbortSignal) => Promise<Record<string,
|
|
378
|
-
|
|
379
|
-
|
|
391
|
+
readonly listSubMcp: (signal?: AbortSignal) => Promise<Record<string, {
|
|
392
|
+
tools: string[];
|
|
393
|
+
transport: string;
|
|
394
|
+
}>>;
|
|
395
|
+
readonly createSubMcp: (slug: string, tools: string[], transport?: string) => Promise<{
|
|
380
396
|
tools: string[];
|
|
397
|
+
transport: string;
|
|
398
|
+
slug: string;
|
|
381
399
|
}>;
|
|
382
400
|
readonly deleteSubMcp: (slug: string) => Promise<{
|
|
383
401
|
slug: string;
|
|
@@ -426,27 +444,34 @@ export declare const ApiProvider: import("react").Provider<{
|
|
|
426
444
|
read_only: boolean;
|
|
427
445
|
}>;
|
|
428
446
|
readonly listProviders: (signal?: AbortSignal) => Promise<{
|
|
429
|
-
|
|
430
|
-
kind: "oauth" | "none";
|
|
431
|
-
id: string;
|
|
432
|
-
display_name: string;
|
|
433
|
-
origin: "system" | "community";
|
|
434
|
-
icon_url: string;
|
|
435
|
-
category: string;
|
|
436
|
-
sub_services: {
|
|
447
|
+
providers: {
|
|
437
448
|
description: string;
|
|
449
|
+
kind: "oauth" | "none";
|
|
438
450
|
id: string;
|
|
439
451
|
display_name: string;
|
|
440
|
-
|
|
452
|
+
origin: "system" | "community";
|
|
453
|
+
icon_url: string;
|
|
454
|
+
category: string;
|
|
455
|
+
sub_services: {
|
|
456
|
+
description: string;
|
|
457
|
+
id: string;
|
|
458
|
+
display_name: string;
|
|
459
|
+
scopes: string[];
|
|
460
|
+
}[];
|
|
461
|
+
config_fields: {
|
|
462
|
+
key: string;
|
|
463
|
+
required: boolean;
|
|
464
|
+
label: string;
|
|
465
|
+
target: "env" | "header";
|
|
466
|
+
secret: boolean;
|
|
467
|
+
}[];
|
|
441
468
|
}[];
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
target: "env" | "header";
|
|
447
|
-
secret: boolean;
|
|
469
|
+
categories: {
|
|
470
|
+
id: string;
|
|
471
|
+
display_name: string;
|
|
472
|
+
sort_order: number;
|
|
448
473
|
}[];
|
|
449
|
-
}
|
|
474
|
+
}>;
|
|
450
475
|
readonly listConnections: (signal?: AbortSignal) => Promise<{
|
|
451
476
|
items: {
|
|
452
477
|
kind: "oauth" | "none";
|
|
@@ -457,9 +482,11 @@ export declare const ApiProvider: import("react").Provider<{
|
|
|
457
482
|
account_identity: string | null;
|
|
458
483
|
enabled_sub_services: string[];
|
|
459
484
|
granted_scopes: string[];
|
|
485
|
+
unreachable_sub_services: string[];
|
|
460
486
|
auth_health_state: "healthy" | "reconnect_required" | "refresh_failing";
|
|
461
487
|
}[];
|
|
462
488
|
total: number;
|
|
489
|
+
unhealthy?: number | undefined;
|
|
463
490
|
}>;
|
|
464
491
|
readonly getConnection: (id: string, signal?: AbortSignal) => Promise<{
|
|
465
492
|
kind: "oauth" | "none";
|
|
@@ -470,12 +497,14 @@ export declare const ApiProvider: import("react").Provider<{
|
|
|
470
497
|
account_identity: string | null;
|
|
471
498
|
enabled_sub_services: string[];
|
|
472
499
|
granted_scopes: string[];
|
|
500
|
+
unreachable_sub_services: string[];
|
|
473
501
|
auth_health_state: "healthy" | "reconnect_required" | "refresh_failing";
|
|
474
502
|
}>;
|
|
475
503
|
readonly startConnect: (args: import("@tai42/api-client").StartConnectArgs) => Promise<{
|
|
476
504
|
flow_id: string;
|
|
477
505
|
authorize_url: string;
|
|
478
506
|
} | {
|
|
507
|
+
connection_id: string;
|
|
479
508
|
fanout: {
|
|
480
509
|
mode: "local-only";
|
|
481
510
|
note: string;
|
|
@@ -506,10 +535,10 @@ export declare const ApiProvider: import("react").Provider<{
|
|
|
506
535
|
}[];
|
|
507
536
|
mode: "unreachable";
|
|
508
537
|
} | null;
|
|
509
|
-
connection_id: string;
|
|
510
538
|
added_manifest_entries: string[];
|
|
511
539
|
}>;
|
|
512
540
|
readonly disconnect: (id: string) => Promise<{
|
|
541
|
+
connection_id: string;
|
|
513
542
|
fanout: {
|
|
514
543
|
mode: "local-only";
|
|
515
544
|
note: string;
|
|
@@ -540,7 +569,6 @@ export declare const ApiProvider: import("react").Provider<{
|
|
|
540
569
|
}[];
|
|
541
570
|
mode: "unreachable";
|
|
542
571
|
} | null;
|
|
543
|
-
connection_id: string;
|
|
544
572
|
upstream_revoke_outcome: "failed" | "success" | "skipped";
|
|
545
573
|
upstream_revoke_status: number | null;
|
|
546
574
|
removed_manifest_entries: string[];
|
|
@@ -550,6 +578,7 @@ export declare const ApiProvider: import("react").Provider<{
|
|
|
550
578
|
authorize_url: string;
|
|
551
579
|
}>;
|
|
552
580
|
readonly patchSubServices: (id: string, enabled_sub_services: string[], return_url?: string) => Promise<{
|
|
581
|
+
connection_id: string;
|
|
553
582
|
fanout: {
|
|
554
583
|
mode: "local-only";
|
|
555
584
|
note: string;
|
|
@@ -580,7 +609,6 @@ export declare const ApiProvider: import("react").Provider<{
|
|
|
580
609
|
}[];
|
|
581
610
|
mode: "unreachable";
|
|
582
611
|
} | null;
|
|
583
|
-
connection_id: string;
|
|
584
612
|
enabled_sub_services: string[];
|
|
585
613
|
flow_id: string | null;
|
|
586
614
|
authorize_url: string | null;
|
|
@@ -590,6 +618,7 @@ export declare const ApiProvider: import("react").Provider<{
|
|
|
590
618
|
}>;
|
|
591
619
|
readonly completeOAuth: (state: string, code: string, error?: string) => Promise<{
|
|
592
620
|
kind: "success";
|
|
621
|
+
connection_id: string;
|
|
593
622
|
fanout: {
|
|
594
623
|
mode: "local-only";
|
|
595
624
|
note: string;
|
|
@@ -620,7 +649,6 @@ export declare const ApiProvider: import("react").Provider<{
|
|
|
620
649
|
}[];
|
|
621
650
|
mode: "unreachable";
|
|
622
651
|
} | null;
|
|
623
|
-
connection_id: string;
|
|
624
652
|
return_url: string;
|
|
625
653
|
} | {
|
|
626
654
|
reason: string;
|
|
@@ -908,9 +936,9 @@ export declare const ApiProvider: import("react").Provider<{
|
|
|
908
936
|
pattern: string;
|
|
909
937
|
}[];
|
|
910
938
|
sub_mcp: {
|
|
911
|
-
slug: string;
|
|
912
939
|
tools: string[];
|
|
913
940
|
transport: string;
|
|
941
|
+
slug: string;
|
|
914
942
|
}[];
|
|
915
943
|
agents: string[];
|
|
916
944
|
mintable: boolean;
|
|
@@ -954,11 +982,11 @@ export declare const ApiProvider: import("react").Provider<{
|
|
|
954
982
|
user_id: string;
|
|
955
983
|
}>;
|
|
956
984
|
readonly getAuthCapabilities: (signal?: AbortSignal) => Promise<{
|
|
957
|
-
mintable: boolean;
|
|
958
985
|
providers: {
|
|
959
986
|
name: string;
|
|
960
987
|
mintable: boolean;
|
|
961
988
|
}[];
|
|
989
|
+
mintable: boolean;
|
|
962
990
|
}>;
|
|
963
991
|
readonly logout: () => Promise<{
|
|
964
992
|
revoked: boolean;
|
|
@@ -1138,6 +1166,7 @@ export declare const ApiProvider: import("react").Provider<{
|
|
|
1138
1166
|
tags: string[];
|
|
1139
1167
|
display_name: string | null;
|
|
1140
1168
|
icon_url: string | null;
|
|
1169
|
+
categories: string[];
|
|
1141
1170
|
item: {
|
|
1142
1171
|
name: string;
|
|
1143
1172
|
description: string;
|
|
@@ -1147,7 +1176,6 @@ export declare const ApiProvider: import("react").Provider<{
|
|
|
1147
1176
|
ref: string;
|
|
1148
1177
|
namespace: string;
|
|
1149
1178
|
package: string;
|
|
1150
|
-
categories: string[];
|
|
1151
1179
|
trust_tier: string;
|
|
1152
1180
|
pricing: string;
|
|
1153
1181
|
latest_version: string | null;
|
|
@@ -1164,6 +1192,7 @@ export declare const ApiProvider: import("react").Provider<{
|
|
|
1164
1192
|
tags: string[];
|
|
1165
1193
|
display_name: string | null;
|
|
1166
1194
|
icon_url: string | null;
|
|
1195
|
+
categories: string[];
|
|
1167
1196
|
versions: {
|
|
1168
1197
|
status: string;
|
|
1169
1198
|
version: string;
|
|
@@ -1172,7 +1201,6 @@ export declare const ApiProvider: import("react").Provider<{
|
|
|
1172
1201
|
}[];
|
|
1173
1202
|
namespace: string;
|
|
1174
1203
|
package: string;
|
|
1175
|
-
categories: string[];
|
|
1176
1204
|
trust_tier: string;
|
|
1177
1205
|
pricing: string;
|
|
1178
1206
|
downloads: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useApi.d.ts","sourceRoot":"","sources":["../../src/hooks/useApi.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAInD,eAAO,MAAM,WAAW;;+BAWy7T,CAAC;iDAAsF,CAAC;;;;;uCAAuM,CAAC;;;;;4EAAgO,CAAC;wFAAgG,CAAC;;;+CAA2G,CAAC;;;;;aAAqL,CAAC;cAAoC,CAAC;mBAA8B,CAAC;;oDAAkF,CAAC;;;;;mBAA2L,CAAC;;kCAAkE,CAAC;;;;;iCAA8I,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;6CAAk2B,CAAC;;;;;;;;;;;;;;sDAA4e,CAAC;;;;;;;;;;;;;;;;qEAAqiB,CAAC;;;;;;;;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;gBAA2B,CAAC;;kDAAqE,CAAC;;;aAA8H,CAAC;sCAAuE,CAAC,4DAAgC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;2EAA4zB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+CAA0hC,CAAC;0CAA+E,CAAC;qDAA0F,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8CAA+0D,CAAC;;;;;;;;;;;;+BAAkW,CAAC;oCAAuE,CAAC;;;;;;wCAAga,CAAC;SAX7/pD,CAAC;AAE/C,wBAAgB,MAAM,IAAI,SAAS,CAMlC;AAED,YAAY,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** How long a copy control shows its confirmed state before reverting. */
|
|
2
|
+
export declare const COPIED_RESET_MS = 2000;
|
|
3
|
+
/** A copy control's confirmed face; whichever face shows is also its accessible name. */
|
|
4
|
+
export declare const COPIED_LABEL = "Copied";
|
|
5
|
+
export interface ClipboardCopyMessages {
|
|
6
|
+
/** Shown when the browser offers no clipboard at all (any non-secure context). */
|
|
7
|
+
readonly noClipboard: string;
|
|
8
|
+
/** Shown when the write, or producing the value, is offered and refused. */
|
|
9
|
+
readonly writeFailed: (reason: unknown) => string;
|
|
10
|
+
}
|
|
11
|
+
export interface ClipboardCopy {
|
|
12
|
+
/** Whether the confirmed window is currently open. */
|
|
13
|
+
readonly copied: boolean;
|
|
14
|
+
/** The last failure's message, or `undefined` while the last copy stands. */
|
|
15
|
+
readonly error: string | undefined;
|
|
16
|
+
/** The polite live-region text: the announcement while confirmed, else empty. */
|
|
17
|
+
readonly announcement: string;
|
|
18
|
+
/**
|
|
19
|
+
* Writes the produced text to the clipboard, returning whether it landed. The
|
|
20
|
+
* value is produced lazily so a serialization that throws is reported through
|
|
21
|
+
* {@link ClipboardCopyMessages.writeFailed}, exactly as a refused write is.
|
|
22
|
+
*/
|
|
23
|
+
readonly copy: (produce: () => string) => Promise<boolean>;
|
|
24
|
+
}
|
|
25
|
+
export declare function useClipboardCopy(messages: ClipboardCopyMessages): ClipboardCopy;
|
|
26
|
+
//# sourceMappingURL=useClipboardCopy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useClipboardCopy.d.ts","sourceRoot":"","sources":["../../src/hooks/useClipboardCopy.ts"],"names":[],"mappings":"AAWA,0EAA0E;AAC1E,eAAO,MAAM,eAAe,OAAO,CAAC;AAEpC,yFAAyF;AACzF,eAAO,MAAM,YAAY,WAAW,CAAC;AAoBrC,MAAM,WAAW,qBAAqB;IACpC,kFAAkF;IAClF,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,4EAA4E;IAC5E,QAAQ,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,MAAM,CAAC;CACnD;AAED,MAAM,WAAW,aAAa;IAC5B,sDAAsD;IACtD,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,6EAA6E;IAC7E,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,iFAAiF;IACjF,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC5D;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,qBAAqB,GAAG,aAAa,CA+C/E"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `useClipboardCopy` — the shared clipboard-write interaction: reads the clipboard the
|
|
3
|
+
* browser actually offers, writes the value, and holds a transient "copied" window
|
|
4
|
+
* (confirmed face + polite announcement) reverting after {@link COPIED_RESET_MS}. A
|
|
5
|
+
* refused write, or a value that throws while being produced, surfaces as a
|
|
6
|
+
* caller-worded error string rather than a throw, so the control shows a visible alert.
|
|
7
|
+
*
|
|
8
|
+
* Only the WORDING is per control, supplied via {@link ClipboardCopyMessages}.
|
|
9
|
+
*/
|
|
10
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
11
|
+
/** How long a copy control shows its confirmed state before reverting. */
|
|
12
|
+
export const COPIED_RESET_MS = 2000;
|
|
13
|
+
/** A copy control's confirmed face; whichever face shows is also its accessible name. */
|
|
14
|
+
export const COPIED_LABEL = 'Copied';
|
|
15
|
+
/** Announced once on a successful copy, worded so it is never read as the label. */
|
|
16
|
+
const COPIED_ANNOUNCEMENT = 'Copied to clipboard';
|
|
17
|
+
/** The clipboard this browser actually offers, or `undefined` when it offers none. */
|
|
18
|
+
function clipboardOf(host) {
|
|
19
|
+
return host.clipboard;
|
|
20
|
+
}
|
|
21
|
+
export function useClipboardCopy(messages) {
|
|
22
|
+
const [copied, setCopied] = useState(false);
|
|
23
|
+
const [error, setError] = useState(undefined);
|
|
24
|
+
const resetTimer = useRef(null);
|
|
25
|
+
// The write is async, so a copy can be in flight when the control unmounts (a dialog
|
|
26
|
+
// holding it closes on the same click); checked before the resolution touches state.
|
|
27
|
+
// Clearing the timer alone can't cover it — at unmount no timer exists yet.
|
|
28
|
+
const mounted = useRef(true);
|
|
29
|
+
// Wording is read at write time, not closed over, so the callback stays stable even
|
|
30
|
+
// when the caller passes fresh message objects.
|
|
31
|
+
const messagesRef = useRef(messages);
|
|
32
|
+
messagesRef.current = messages;
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
mounted.current = true;
|
|
35
|
+
return () => {
|
|
36
|
+
mounted.current = false;
|
|
37
|
+
if (resetTimer.current !== null)
|
|
38
|
+
clearTimeout(resetTimer.current);
|
|
39
|
+
};
|
|
40
|
+
}, []);
|
|
41
|
+
const copy = useCallback(async (produce) => {
|
|
42
|
+
const clipboard = clipboardOf(navigator);
|
|
43
|
+
if (clipboard === undefined) {
|
|
44
|
+
setError(messagesRef.current.noClipboard);
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
// Clear any prior failure at the START of a new attempt, before awaiting the
|
|
48
|
+
// write, so a stale alert does not linger through an in-flight retry.
|
|
49
|
+
setError(undefined);
|
|
50
|
+
try {
|
|
51
|
+
const text = produce();
|
|
52
|
+
await clipboard.writeText(text);
|
|
53
|
+
if (!mounted.current)
|
|
54
|
+
return true;
|
|
55
|
+
setCopied(true);
|
|
56
|
+
if (resetTimer.current !== null)
|
|
57
|
+
clearTimeout(resetTimer.current);
|
|
58
|
+
resetTimer.current = setTimeout(() => {
|
|
59
|
+
if (mounted.current)
|
|
60
|
+
setCopied(false);
|
|
61
|
+
}, COPIED_RESET_MS);
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
catch (reason) {
|
|
65
|
+
if (mounted.current)
|
|
66
|
+
setError(messagesRef.current.writeFailed(reason));
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
}, []);
|
|
70
|
+
return { copied, error, announcement: copied ? COPIED_ANNOUNCEMENT : '', copy };
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=useClipboardCopy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useClipboardCopy.js","sourceRoot":"","sources":["../../src/hooks/useClipboardCopy.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjE,0EAA0E;AAC1E,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC;AAEpC,yFAAyF;AACzF,MAAM,CAAC,MAAM,YAAY,GAAG,QAAQ,CAAC;AAErC,oFAAoF;AACpF,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AAYlD,sFAAsF;AACtF,SAAS,WAAW,CAAC,IAAoB;IACvC,OAAO,IAAI,CAAC,SAAS,CAAC;AACxB,CAAC;AAwBD,MAAM,UAAU,gBAAgB,CAAC,QAA+B;IAC9D,MAAM,CAA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C,IAAI,CAAC,CAAC;YAChB,IAAI,UAAU,CAAC,OAAO,KAAK,IAAI;gBAAE,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;YAClE,UAAU,CAAC,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE;gBACnC,IAAI,OAAO,CAAC,OAAO;oBAAE,SAAS,CAAC,KAAK,CAAC,CAAC;YACxC,CAAC,EAAE,eAAe,CAAC,CAAC;YACpB,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,OAAO,MAAe,EAAE,CAAC;YACzB,IAAI,OAAO,CAAC,OAAO;gBAAE,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;YACvE,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC;AAClF,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `useFeatureOff` — the PROACTIVE read of a DB-backed feature's OFF state, off the
|
|
3
|
+
* system kind-status table (`GET /api/system/kinds`), fetched once per auth flip and
|
|
4
|
+
* held as SDK state.
|
|
5
|
+
*
|
|
6
|
+
* A deployment leaves a database-backed feature cleanly OFF by configuring no store
|
|
7
|
+
* for it; the kind-status table then reports that kind's `state` as `off` (rather
|
|
8
|
+
* than `active` / `default`). A write affordance for an OFF feature reads this and
|
|
9
|
+
* hides itself BEFORE the user acts, instead of learning OFF only from a write's 501
|
|
10
|
+
* refusal — the reactive `isFeatureDisabled` swallow stays as the backstop for a
|
|
11
|
+
* stale table.
|
|
12
|
+
*
|
|
13
|
+
* A PLAIN fetch state machine (`loading` / `ready` / `failed`), NOT TanStack Query:
|
|
14
|
+
* the SDK is the shared leaf across the plugin boundary and holds no query context,
|
|
15
|
+
* exactly as `useCapabilities` does. It is DELIBERATELY non-blocking — a kind counts
|
|
16
|
+
* as not-off until the table is `ready`, and a failed fetch leaves every kind not-off
|
|
17
|
+
* so the surface falls back to its reactive 501 handling, never a hard-failed page.
|
|
18
|
+
*/
|
|
19
|
+
import { type ReactNode } from 'react';
|
|
20
|
+
import type { KindStatus } from '@tai42/api-client';
|
|
21
|
+
export type SystemKindsState = {
|
|
22
|
+
readonly status: 'loading';
|
|
23
|
+
} | {
|
|
24
|
+
readonly status: 'ready';
|
|
25
|
+
readonly kinds: readonly KindStatus[];
|
|
26
|
+
} | {
|
|
27
|
+
readonly status: 'failed';
|
|
28
|
+
readonly error: unknown;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Fetch the kind-status table once the caller is authenticated and hold it as SDK
|
|
32
|
+
* state. Gated on `isAuthenticated` (the table is an authed read), so the login
|
|
33
|
+
* screen never fires a doomed request; a fetch failure settles into `failed`
|
|
34
|
+
* QUIETLY — no unauthorized routing, no loud error — because the consuming
|
|
35
|
+
* affordance falls back to its reactive OFF handling.
|
|
36
|
+
*/
|
|
37
|
+
export declare function SystemKindsProvider({ children }: {
|
|
38
|
+
children: ReactNode;
|
|
39
|
+
}): import("react").FunctionComponentElement<import("react").ProviderProps<SystemKindsState | null>>;
|
|
40
|
+
/**
|
|
41
|
+
* The live kind-status state. Falls back to `loading` when no provider is mounted, so
|
|
42
|
+
* a consumer rendered outside the shell reads every kind as not-off rather than
|
|
43
|
+
* throwing — the fail-open default this proactive-hiding idiom relies on.
|
|
44
|
+
*/
|
|
45
|
+
export declare function useSystemKinds(): SystemKindsState;
|
|
46
|
+
/**
|
|
47
|
+
* Whether `kind` is reported OFF by the kind-status table — the single proactive
|
|
48
|
+
* predicate a write affordance folds in to hide itself before a doomed write. It is
|
|
49
|
+
* `true` ONLY once the table is `ready` AND that kind's row carries `state: 'off'`;
|
|
50
|
+
* while the table is loading/failed, no provider is mounted, or the kind is unknown,
|
|
51
|
+
* it is `false` (treat as not-off until known — under-hiding is safe, the reactive
|
|
52
|
+
* 501 backstop still catches a genuinely-off feature).
|
|
53
|
+
*/
|
|
54
|
+
export declare function useFeatureOff(kind: string): boolean;
|
|
55
|
+
//# sourceMappingURL=useSystemKinds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSystemKinds.d.ts","sourceRoot":"","sources":["../../src/hooks/useSystemKinds.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAKpD,MAAM,MAAM,gBAAgB,GACxB;IAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;CAAE,GAC9B;IAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,SAAS,UAAU,EAAE,CAAA;CAAE,GACnE;IAAE,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC;AAI3D;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,oGA4BxE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,gBAAgB,CAEjD;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAInD"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `useFeatureOff` — the PROACTIVE read of a DB-backed feature's OFF state, off the
|
|
3
|
+
* system kind-status table (`GET /api/system/kinds`), fetched once per auth flip and
|
|
4
|
+
* held as SDK state.
|
|
5
|
+
*
|
|
6
|
+
* A deployment leaves a database-backed feature cleanly OFF by configuring no store
|
|
7
|
+
* for it; the kind-status table then reports that kind's `state` as `off` (rather
|
|
8
|
+
* than `active` / `default`). A write affordance for an OFF feature reads this and
|
|
9
|
+
* hides itself BEFORE the user acts, instead of learning OFF only from a write's 501
|
|
10
|
+
* refusal — the reactive `isFeatureDisabled` swallow stays as the backstop for a
|
|
11
|
+
* stale table.
|
|
12
|
+
*
|
|
13
|
+
* A PLAIN fetch state machine (`loading` / `ready` / `failed`), NOT TanStack Query:
|
|
14
|
+
* the SDK is the shared leaf across the plugin boundary and holds no query context,
|
|
15
|
+
* exactly as `useCapabilities` does. It is DELIBERATELY non-blocking — a kind counts
|
|
16
|
+
* as not-off until the table is `ready`, and a failed fetch leaves every kind not-off
|
|
17
|
+
* so the surface falls back to its reactive 501 handling, never a hard-failed page.
|
|
18
|
+
*/
|
|
19
|
+
import { createContext, createElement, useContext, useEffect, useState, } from 'react';
|
|
20
|
+
import { useApi } from './useApi';
|
|
21
|
+
import { useAuth } from './useAuth';
|
|
22
|
+
const SystemKindsContext = createContext(null);
|
|
23
|
+
/**
|
|
24
|
+
* Fetch the kind-status table once the caller is authenticated and hold it as SDK
|
|
25
|
+
* state. Gated on `isAuthenticated` (the table is an authed read), so the login
|
|
26
|
+
* screen never fires a doomed request; a fetch failure settles into `failed`
|
|
27
|
+
* QUIETLY — no unauthorized routing, no loud error — because the consuming
|
|
28
|
+
* affordance falls back to its reactive OFF handling.
|
|
29
|
+
*/
|
|
30
|
+
export function SystemKindsProvider({ children }) {
|
|
31
|
+
const { isAuthenticated } = useAuth();
|
|
32
|
+
const api = useApi();
|
|
33
|
+
const [state, setState] = useState({ status: 'loading' });
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
if (!isAuthenticated) {
|
|
36
|
+
// No credential → nothing to read. Reset to the neutral `loading` state so the
|
|
37
|
+
// next sign-in re-fetches cleanly; every kind reads not-off meanwhile.
|
|
38
|
+
setState({ status: 'loading' });
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const controller = new AbortController();
|
|
42
|
+
setState({ status: 'loading' });
|
|
43
|
+
api.getSystemKinds(controller.signal).then((kinds) => {
|
|
44
|
+
if (!controller.signal.aborted)
|
|
45
|
+
setState({ status: 'ready', kinds });
|
|
46
|
+
}, (error) => {
|
|
47
|
+
if (!controller.signal.aborted)
|
|
48
|
+
setState({ status: 'failed', error });
|
|
49
|
+
});
|
|
50
|
+
return () => {
|
|
51
|
+
controller.abort();
|
|
52
|
+
};
|
|
53
|
+
}, [api, isAuthenticated]);
|
|
54
|
+
return createElement(SystemKindsContext.Provider, { value: state }, children);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The live kind-status state. Falls back to `loading` when no provider is mounted, so
|
|
58
|
+
* a consumer rendered outside the shell reads every kind as not-off rather than
|
|
59
|
+
* throwing — the fail-open default this proactive-hiding idiom relies on.
|
|
60
|
+
*/
|
|
61
|
+
export function useSystemKinds() {
|
|
62
|
+
return useContext(SystemKindsContext) ?? { status: 'loading' };
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Whether `kind` is reported OFF by the kind-status table — the single proactive
|
|
66
|
+
* predicate a write affordance folds in to hide itself before a doomed write. It is
|
|
67
|
+
* `true` ONLY once the table is `ready` AND that kind's row carries `state: 'off'`;
|
|
68
|
+
* while the table is loading/failed, no provider is mounted, or the kind is unknown,
|
|
69
|
+
* it is `false` (treat as not-off until known — under-hiding is safe, the reactive
|
|
70
|
+
* 501 backstop still catches a genuinely-off feature).
|
|
71
|
+
*/
|
|
72
|
+
export function useFeatureOff(kind) {
|
|
73
|
+
const state = useSystemKinds();
|
|
74
|
+
if (state.status !== 'ready')
|
|
75
|
+
return false;
|
|
76
|
+
return state.kinds.some((row) => row.kind === kind && row.state === 'off');
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=useSystemKinds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSystemKinds.js","sourceRoot":"","sources":["../../src/hooks/useSystemKinds.tsx"],"names":[],"m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AAC,CACF,CAAC;QACF,OAAO,GAAG,EAAE;YACV,UAAU,CAAC,KAAK,EAAE,CAAC;QACrB,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,GAAG,EAAE,eAAe,CAAC,CAAC,CAAC;IAE3B,OAAO,aAAa,CAAC,kBAAkB,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,QAAQ,CAAC,CAAC;AAChF,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO,UAAU,CAAC,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AACjE,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,MAAM,KAAK,GAAG,cAAc,EAAE,CAAC;IAC/B,IAAI,KAAK,CAAC,MAAM,KAAK,OAAO;QAAE,OAAO,KAAK,CAAC;IAC3C,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,IAAI,IAAI,GAAG,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC;AAC7E,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -28,14 +28,16 @@ export { AuthProvider, useAuth } from './hooks/useAuth';
|
|
|
28
28
|
export type { AuthState } from './hooks/useAuth';
|
|
29
29
|
export { CapabilityProvider, useCapabilities, useCanWrite, isFullProjection, coversAnyRoute, coversRoute, coversWrite, } from './hooks/useCapabilities';
|
|
30
30
|
export type { CapabilityState, CapabilityContextValue } from './hooks/useCapabilities';
|
|
31
|
+
export { SystemKindsProvider, useSystemKinds, useFeatureOff } from './hooks/useSystemKinds';
|
|
32
|
+
export type { SystemKindsState } from './hooks/useSystemKinds';
|
|
31
33
|
export { ThemeProvider, useTheme } from './hooks/useTheme';
|
|
32
34
|
export type { Theme, ThemePreference, ThemeState } from './hooks/useTheme';
|
|
33
35
|
export { useBreakpoint } from './hooks/useBreakpoint';
|
|
34
36
|
export type { Breakpoint, BreakpointState } from './hooks/useBreakpoint';
|
|
35
37
|
export { useInteractionsStream } from './hooks/useSse';
|
|
36
38
|
export type { InteractionsStreamState, StreamInteraction } from './hooks/useSse';
|
|
37
|
-
export { NavigationProvider, AppLink, useAppNavigate, useResolvePath, usePluginNavigation, } from './navigation';
|
|
38
|
-
export type { AppLinkProps, RouteToken, RouteSearch, RouteSearchByToken, PageProps, NavigationContextValue, PluginSearch, } from './navigation';
|
|
39
|
+
export { NavigationProvider, AppLink, useAppNavigate, useResolvePath, usePluginNavigation, useNavigationGuard, } from './navigation';
|
|
40
|
+
export type { AppLinkProps, RouteToken, RouteSearch, RouteSearchByToken, PageProps, NavigationContextValue, PluginSearch, NavigationGuardHandler, } from './navigation';
|
|
39
41
|
export { errorMessage } from './errors';
|
|
40
42
|
export { downloadBlob } from './download';
|
|
41
43
|
export { isFeatureDisabled, FeatureDisabled } from './feature-disabled';
|
|
@@ -68,6 +70,9 @@ export { Dialog } from './components/dialog';
|
|
|
68
70
|
export type { DialogProps } from './components/dialog';
|
|
69
71
|
export { ConfirmDialog } from './components/confirm-dialog';
|
|
70
72
|
export type { ConfirmDialogProps } from './components/confirm-dialog';
|
|
73
|
+
export { GuardedTabs, useRegisterDirty } from './components/dirty-guard';
|
|
74
|
+
export { FormDialog } from './components/form-dialog';
|
|
75
|
+
export type { FormDialogProps } from './components/form-dialog';
|
|
71
76
|
export { Drawer } from './components/drawer';
|
|
72
77
|
export type { DrawerProps } from './components/drawer';
|
|
73
78
|
export { Tooltip } from './components/tooltip';
|
|
@@ -94,6 +99,10 @@ export { FolderBreadcrumb, FolderRow, FolderPicker, childFolders, folderPathTo,
|
|
|
94
99
|
export type { Folder, FolderBreadcrumbProps, FolderRowProps, FolderPickerProps, } from './components/folder-nav';
|
|
95
100
|
export { CodeBlock } from './components/code-block';
|
|
96
101
|
export type { CodeBlockProps } from './components/code-block';
|
|
102
|
+
export { Markdown, parseMarkdown } from './components/markdown';
|
|
103
|
+
export type { MarkdownProps, MarkdownBlock, HeadingLevel } from './components/markdown';
|
|
104
|
+
export { DateRangePicker, formatRangeLabel, normalizeCustomRange, DEFAULT_DATE_RANGE_PRESETS, } from './components/date-range-picker';
|
|
105
|
+
export type { DateRangePickerProps, DateRangePreset, DateRangeValue, } from './components/date-range-picker';
|
|
97
106
|
export { FleetReport } from './components/fleet-report';
|
|
98
107
|
export type { FleetReportProps } from './components/fleet-report';
|
|
99
108
|
export { ExternalLinkButton, isSafeHttpUrl } from './components/external-link';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAQH,OAAO,yBAAyB,CAAC;AACjC,OAAO,wBAAwB,CAAC;AAChC,OAAO,6BAA6B,CAAC;AAGrC,YAAY,EACV,aAAa,EACb,WAAW,EACX,cAAc,EACd,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,EACd,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACpF,YAAY,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAG1D,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACrD,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACxD,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;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UAAU,GACX,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,eAAe,EACf,kBAAkB,EAClB,UAAU,EACV,cAAc,EACd,aAAa,EACb,gBAAgB,GACjB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC/D,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAG/F,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,YAAY,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,YAAY,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,YAAY,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -31,11 +31,12 @@ export { ApiProvider, useApi } from './hooks/useApi';
|
|
|
31
31
|
export { UnauthorizedProvider, useOnUnauthorized } from './hooks/useUnauthorized';
|
|
32
32
|
export { AuthProvider, useAuth } from './hooks/useAuth';
|
|
33
33
|
export { CapabilityProvider, useCapabilities, useCanWrite, isFullProjection, coversAnyRoute, coversRoute, coversWrite, } from './hooks/useCapabilities';
|
|
34
|
+
export { SystemKindsProvider, useSystemKinds, useFeatureOff } from './hooks/useSystemKinds';
|
|
34
35
|
export { ThemeProvider, useTheme } from './hooks/useTheme';
|
|
35
36
|
export { useBreakpoint } from './hooks/useBreakpoint';
|
|
36
37
|
export { useInteractionsStream } from './hooks/useSse';
|
|
37
38
|
// -- Navigation (shell ⇄ feature route-token contract) -----------------------
|
|
38
|
-
export { NavigationProvider, AppLink, useAppNavigate, useResolvePath, usePluginNavigation, } from './navigation';
|
|
39
|
+
export { NavigationProvider, AppLink, useAppNavigate, useResolvePath, usePluginNavigation, useNavigationGuard, } from './navigation';
|
|
39
40
|
// -- Utilities ---------------------------------------------------------------
|
|
40
41
|
export { errorMessage } from './errors';
|
|
41
42
|
export { downloadBlob } from './download';
|
|
@@ -61,6 +62,8 @@ export { Badge } from './components/badge';
|
|
|
61
62
|
export { Tabs } from './components/tabs';
|
|
62
63
|
export { Dialog } from './components/dialog';
|
|
63
64
|
export { ConfirmDialog } from './components/confirm-dialog';
|
|
65
|
+
export { GuardedTabs, useRegisterDirty } from './components/dirty-guard';
|
|
66
|
+
export { FormDialog } from './components/form-dialog';
|
|
64
67
|
export { Drawer } from './components/drawer';
|
|
65
68
|
export { Tooltip } from './components/tooltip';
|
|
66
69
|
export { Table, THead, TBody, TR, TH, TD } from './components/table';
|
|
@@ -74,6 +77,8 @@ export { EntityCardGrid } from './components/entity-card-grid';
|
|
|
74
77
|
export { ExplorerView, buildTagVocabulary, matchesSelectedTags, UNTAGGED_TOKEN, } from './components/explorer-view';
|
|
75
78
|
export { FolderBreadcrumb, FolderRow, FolderPicker, childFolders, folderPathTo, } from './components/folder-nav';
|
|
76
79
|
export { CodeBlock } from './components/code-block';
|
|
80
|
+
export { Markdown, parseMarkdown } from './components/markdown';
|
|
81
|
+
export { DateRangePicker, formatRangeLabel, normalizeCustomRange, DEFAULT_DATE_RANGE_PRESETS, } from './components/date-range-picker';
|
|
77
82
|
export { FleetReport } from './components/fleet-report';
|
|
78
83
|
export { ExternalLinkButton, isSafeHttpUrl } from './components/external-link';
|
|
79
84
|
// The URL half of the link-safety pair: `isSafeHttpUrl` answers yes/no, this one
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,kFAAkF;AAClF,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