@ttt-productions/ui-core 0.11.27 → 0.11.28
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/browser/index.d.ts +3 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +3 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/reload-recovery-watch.d.ts +13 -0
- package/dist/browser/reload-recovery-watch.d.ts.map +1 -0
- package/dist/browser/reload-recovery-watch.js +34 -0
- package/dist/browser/reload-recovery-watch.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/reload-recovery.d.ts +15 -0
- package/dist/lib/reload-recovery.d.ts.map +1 -0
- package/dist/lib/reload-recovery.js +38 -0
- package/dist/lib/reload-recovery.js.map +1 -0
- package/dist/react/components/reload-recovery-notice.d.ts +27 -0
- package/dist/react/components/reload-recovery-notice.d.ts.map +1 -0
- package/dist/react/components/reload-recovery-notice.js +21 -0
- package/dist/react/components/reload-recovery-notice.js.map +1 -0
- package/dist/react/components/toast.d.ts +1 -1
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +1 -0
- package/dist/react/index.js.map +1 -1
- package/package.json +6 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvE,YAAY,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC","sourcesContent":["// Browser runtime with no React: what a client entry starts before the app mounts.\nexport { createReloadRecoveryWatch } from \"./reload-recovery-watch.js\";\nexport type { ReloadRecoveryTarget, ReloadRecoveryWatch } from \"./reload-recovery-watch.js\";\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ReloadRecoveryKind } from "../lib/reload-recovery.js";
|
|
2
|
+
/** What the watch listens on: the page's window. */
|
|
3
|
+
export type ReloadRecoveryTarget = Pick<Window, "addEventListener" | "removeEventListener">;
|
|
4
|
+
export interface ReloadRecoveryWatch {
|
|
5
|
+
/** The first failure only a reload repairs since the watch started, or `null` while there is none. */
|
|
6
|
+
current: () => ReloadRecoveryKind | null;
|
|
7
|
+
/** Calls `listener` once, when the first failure is recorded. Answers the unsubscribe. */
|
|
8
|
+
subscribe: (listener: () => void) => () => void;
|
|
9
|
+
/** Stops listening; a failure already recorded stays. */
|
|
10
|
+
stop: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function createReloadRecoveryWatch(target?: ReloadRecoveryTarget): ReloadRecoveryWatch;
|
|
13
|
+
//# sourceMappingURL=reload-recovery-watch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reload-recovery-watch.d.ts","sourceRoot":"","sources":["../../src/browser/reload-recovery-watch.ts"],"names":[],"mappings":"AAKA,OAAO,EAAwB,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE1F,oDAAoD;AACpD,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,MAAM,EAAE,kBAAkB,GAAG,qBAAqB,CAAC,CAAC;AAE5F,MAAM,WAAW,mBAAmB;IAClC,sGAAsG;IACtG,OAAO,EAAE,MAAM,kBAAkB,GAAG,IAAI,CAAC;IACzC,0FAA0F;IAC1F,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;IAChD,yDAAyD;IACzD,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB;AAED,wBAAgB,yBAAyB,CAAC,MAAM,GAAE,oBAA6B,GAAG,mBAAmB,CA6BpG"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Watches the page for the first failure only a reload repairs. Started once at the app's client
|
|
2
|
+
// entry, before React mounts, so a failure raised during startup is recorded for the notice to show
|
|
3
|
+
// once it mounts. It only listens: it never calls `preventDefault`, so the app's monitoring still
|
|
4
|
+
// captures every event once, and it never reloads the page.
|
|
5
|
+
import { reloadRecoveryKindOf } from "../lib/reload-recovery.js";
|
|
6
|
+
export function createReloadRecoveryWatch(target = window) {
|
|
7
|
+
let recorded = null;
|
|
8
|
+
const listeners = new Set();
|
|
9
|
+
const record = (kind) => {
|
|
10
|
+
// The first failure stands: a repeat of it, or the other one after it, changes nothing.
|
|
11
|
+
if (kind === null || recorded !== null)
|
|
12
|
+
return;
|
|
13
|
+
recorded = kind;
|
|
14
|
+
for (const listener of [...listeners])
|
|
15
|
+
listener();
|
|
16
|
+
};
|
|
17
|
+
// An error event's `error` is the thrown value; a cross-origin script's carries only the message.
|
|
18
|
+
const onError = (event) => record(reloadRecoveryKindOf(event.error) ?? reloadRecoveryKindOf({ message: event.message }));
|
|
19
|
+
const onRejection = (event) => record(reloadRecoveryKindOf(event.reason));
|
|
20
|
+
target.addEventListener("error", onError);
|
|
21
|
+
target.addEventListener("unhandledrejection", onRejection);
|
|
22
|
+
return {
|
|
23
|
+
current: () => recorded,
|
|
24
|
+
subscribe: (listener) => {
|
|
25
|
+
listeners.add(listener);
|
|
26
|
+
return () => listeners.delete(listener);
|
|
27
|
+
},
|
|
28
|
+
stop: () => {
|
|
29
|
+
target.removeEventListener("error", onError);
|
|
30
|
+
target.removeEventListener("unhandledrejection", onRejection);
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=reload-recovery-watch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reload-recovery-watch.js","sourceRoot":"","sources":["../../src/browser/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I,EAAE,GAAG,EAAE;YACT,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAC7C,MAAM,CAAC,mBAAmB,CAAC,oBAAoB,EAAE,WAAW,CAAC,CAAC;QAChE,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Watches the page for the first failure only a reload repairs. Started once at the app's client\n// entry, before React mounts, so a failure raised during startup is recorded for the notice to show\n// once it mounts. It only listens: it never calls `preventDefault`, so the app's monitoring still\n// captures every event once, and it never reloads the page.\n\nimport { reloadRecoveryKindOf, type ReloadRecoveryKind } from \"../lib/reload-recovery.js\";\n\n/** What the watch listens on: the page's window. */\nexport type ReloadRecoveryTarget = Pick<Window, \"addEventListener\" | \"removeEventListener\">;\n\nexport interface ReloadRecoveryWatch {\n /** The first failure only a reload repairs since the watch started, or `null` while there is none. */\n current: () => ReloadRecoveryKind | null;\n /** Calls `listener` once, when the first failure is recorded. Answers the unsubscribe. */\n subscribe: (listener: () => void) => () => void;\n /** Stops listening; a failure already recorded stays. */\n stop: () => void;\n}\n\nexport function createReloadRecoveryWatch(target: ReloadRecoveryTarget = window): ReloadRecoveryWatch {\n let recorded: ReloadRecoveryKind | null = null;\n const listeners = new Set<() => void>();\n\n const record = (kind: ReloadRecoveryKind | null) => {\n // The first failure stands: a repeat of it, or the other one after it, changes nothing.\n if (kind === null || recorded !== null) return;\n recorded = kind;\n for (const listener of [...listeners]) listener();\n };\n // An error event's `error` is the thrown value; a cross-origin script's carries only the message.\n const onError = (event: ErrorEvent) =>\n record(reloadRecoveryKindOf(event.error) ?? reloadRecoveryKindOf({ message: event.message }));\n const onRejection = (event: PromiseRejectionEvent) => record(reloadRecoveryKindOf(event.reason));\n\n target.addEventListener(\"error\", onError);\n target.addEventListener(\"unhandledrejection\", onRejection);\n\n return {\n current: () => recorded,\n subscribe: (listener) => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n },\n stop: () => {\n target.removeEventListener(\"error\", onError);\n target.removeEventListener(\"unhandledrejection\", onRejection);\n },\n };\n}\n"]}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC","sourcesContent":["// Server-safe utilities only. React components and hooks live behind ./react.\nexport * from \"./lib/utils.js\";\nexport * from \"./lib/format-numbers.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC","sourcesContent":["// Server-safe utilities only. React components and hooks live behind ./react.\nexport * from \"./lib/utils.js\";\nexport * from \"./lib/format-numbers.js\";\nexport * from \"./lib/reload-recovery.js\";\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Each failure only a reload repairs. */
|
|
2
|
+
export declare const RELOAD_RECOVERY_KINDS: readonly ["storageDisconnect", "staleChunk"];
|
|
3
|
+
export type ReloadRecoveryKind = (typeof RELOAD_RECOVERY_KINDS)[number];
|
|
4
|
+
/**
|
|
5
|
+
* WebKit dropping a page's IndexedDB connection when it reclaims a backgrounded tab: an
|
|
6
|
+
* `UnknownError` whose message says the connection to the Indexed Database server was lost. Every
|
|
7
|
+
* storage call after it fails until the page reloads. No other `UnknownError`, and no quota, blocked
|
|
8
|
+
* storage, or network failure, is this one.
|
|
9
|
+
*/
|
|
10
|
+
export declare function isStorageDisconnectError(reason: unknown): boolean;
|
|
11
|
+
/** A code chunk the deployed build no longer serves: a `ChunkLoadError`, or "Failed to load chunk". */
|
|
12
|
+
export declare function isStaleChunkError(reason: unknown): boolean;
|
|
13
|
+
/** Which failure only a reload repairs `reason` is, or `null` for any other. */
|
|
14
|
+
export declare function reloadRecoveryKindOf(reason: unknown): ReloadRecoveryKind | null;
|
|
15
|
+
//# sourceMappingURL=reload-recovery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reload-recovery.d.ts","sourceRoot":"","sources":["../../src/lib/reload-recovery.ts"],"names":[],"mappings":"AAGA,0CAA0C;AAC1C,eAAO,MAAM,qBAAqB,8CAA+C,CAAC;AAClF,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAaxE;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAKjE;AAED,uGAAuG;AACvG,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAK1D;AAED,gFAAgF;AAChF,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,kBAAkB,GAAG,IAAI,CAI/E"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// The failures that leave a page only a reload repairs, recognised narrowly. Server-safe: pure
|
|
2
|
+
// predicates over whatever an `error` or `unhandledrejection` event carries.
|
|
3
|
+
/** Each failure only a reload repairs. */
|
|
4
|
+
export const RELOAD_RECOVERY_KINDS = ["storageDisconnect", "staleChunk"];
|
|
5
|
+
const STORAGE_DISCONNECT_NAME = "UnknownError";
|
|
6
|
+
const STORAGE_DISCONNECT_MESSAGE = "Connection to Indexed Database server lost";
|
|
7
|
+
const STALE_CHUNK_NAME = "ChunkLoadError";
|
|
8
|
+
const STALE_CHUNK_MESSAGE = "Failed to load chunk";
|
|
9
|
+
function fieldOf(reason, field) {
|
|
10
|
+
if (typeof reason !== "object" || reason === null)
|
|
11
|
+
return null;
|
|
12
|
+
const value = reason[field];
|
|
13
|
+
return typeof value === "string" ? value : null;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* WebKit dropping a page's IndexedDB connection when it reclaims a backgrounded tab: an
|
|
17
|
+
* `UnknownError` whose message says the connection to the Indexed Database server was lost. Every
|
|
18
|
+
* storage call after it fails until the page reloads. No other `UnknownError`, and no quota, blocked
|
|
19
|
+
* storage, or network failure, is this one.
|
|
20
|
+
*/
|
|
21
|
+
export function isStorageDisconnectError(reason) {
|
|
22
|
+
return (fieldOf(reason, "name") === STORAGE_DISCONNECT_NAME &&
|
|
23
|
+
(fieldOf(reason, "message")?.includes(STORAGE_DISCONNECT_MESSAGE) ?? false));
|
|
24
|
+
}
|
|
25
|
+
/** A code chunk the deployed build no longer serves: a `ChunkLoadError`, or "Failed to load chunk". */
|
|
26
|
+
export function isStaleChunkError(reason) {
|
|
27
|
+
return (fieldOf(reason, "name") === STALE_CHUNK_NAME ||
|
|
28
|
+
(fieldOf(reason, "message")?.includes(STALE_CHUNK_MESSAGE) ?? false));
|
|
29
|
+
}
|
|
30
|
+
/** Which failure only a reload repairs `reason` is, or `null` for any other. */
|
|
31
|
+
export function reloadRecoveryKindOf(reason) {
|
|
32
|
+
if (isStorageDisconnectError(reason))
|
|
33
|
+
return "storageDisconnect";
|
|
34
|
+
if (isStaleChunkError(reason))
|
|
35
|
+
return "staleChunk";
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=reload-recovery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reload-recovery.js","sourceRoot":"","sources":["../../src/lib/reload-recovery.ts"],"names":[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;QAAE,OAAO,YAAY,CAAC;IACnD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["// The failures that leave a page only a reload repairs, recognised narrowly. Server-safe: pure\n// predicates over whatever an `error` or `unhandledrejection` event carries.\n\n/** Each failure only a reload repairs. */\nexport const RELOAD_RECOVERY_KINDS = [\"storageDisconnect\", \"staleChunk\"] as const;\nexport type ReloadRecoveryKind = (typeof RELOAD_RECOVERY_KINDS)[number];\n\nconst STORAGE_DISCONNECT_NAME = \"UnknownError\";\nconst STORAGE_DISCONNECT_MESSAGE = \"Connection to Indexed Database server lost\";\nconst STALE_CHUNK_NAME = \"ChunkLoadError\";\nconst STALE_CHUNK_MESSAGE = \"Failed to load chunk\";\n\nfunction fieldOf(reason: unknown, field: \"name\" | \"message\"): string | null {\n if (typeof reason !== \"object\" || reason === null) return null;\n const value = (reason as Record<string, unknown>)[field];\n return typeof value === \"string\" ? value : null;\n}\n\n/**\n * WebKit dropping a page's IndexedDB connection when it reclaims a backgrounded tab: an\n * `UnknownError` whose message says the connection to the Indexed Database server was lost. Every\n * storage call after it fails until the page reloads. No other `UnknownError`, and no quota, blocked\n * storage, or network failure, is this one.\n */\nexport function isStorageDisconnectError(reason: unknown): boolean {\n return (\n fieldOf(reason, \"name\") === STORAGE_DISCONNECT_NAME &&\n (fieldOf(reason, \"message\")?.includes(STORAGE_DISCONNECT_MESSAGE) ?? false)\n );\n}\n\n/** A code chunk the deployed build no longer serves: a `ChunkLoadError`, or \"Failed to load chunk\". */\nexport function isStaleChunkError(reason: unknown): boolean {\n return (\n fieldOf(reason, \"name\") === STALE_CHUNK_NAME ||\n (fieldOf(reason, \"message\")?.includes(STALE_CHUNK_MESSAGE) ?? false)\n );\n}\n\n/** Which failure only a reload repairs `reason` is, or `null` for any other. */\nexport function reloadRecoveryKindOf(reason: unknown): ReloadRecoveryKind | null {\n if (isStorageDisconnectError(reason)) return \"storageDisconnect\";\n if (isStaleChunkError(reason)) return \"staleChunk\";\n return null;\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { ReloadRecoveryWatch } from "../../browser/reload-recovery-watch.js";
|
|
3
|
+
import type { ReloadRecoveryKind } from "../../lib/reload-recovery.js";
|
|
4
|
+
export interface ReloadRecoveryNoticeProps {
|
|
5
|
+
/** The watch the app's client entry started. */
|
|
6
|
+
watch: ReloadRecoveryWatch;
|
|
7
|
+
/** The app's sentence for each failure. */
|
|
8
|
+
messages: Readonly<Record<ReloadRecoveryKind, React.ReactNode>>;
|
|
9
|
+
/** The app's label for the refresh control. */
|
|
10
|
+
refreshLabel: React.ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* The app's own reload, which runs its unsaved-work guard first. Refresh is pending until it
|
|
13
|
+
* settles: a reload that proceeds keeps it pending until the page unloads, and a cancelled guard
|
|
14
|
+
* settles it with the page, its input, and the notice as they were.
|
|
15
|
+
*/
|
|
16
|
+
onRefresh: () => Promise<unknown>;
|
|
17
|
+
/** Receives anything `onRefresh` throws. */
|
|
18
|
+
onRefreshError: (error: unknown) => void;
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* One notice pinned to the top of the screen once the page hits a failure only a reload repairs.
|
|
23
|
+
* It cannot be dismissed and never reloads by itself: the page and every editor beneath it stay
|
|
24
|
+
* mounted and usable until the person presses Refresh. A repeat of the failure changes nothing.
|
|
25
|
+
*/
|
|
26
|
+
export declare function ReloadRecoveryNotice({ watch, messages, refreshLabel, onRefresh, onRefreshError, className, }: ReloadRecoveryNoticeProps): React.JSX.Element | null;
|
|
27
|
+
//# sourceMappingURL=reload-recovery-notice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reload-recovery-notice.d.ts","sourceRoot":"","sources":["../../../src/react/components/reload-recovery-notice.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAMvE,MAAM,WAAW,yBAAyB;IACxC,gDAAgD;IAChD,KAAK,EAAE,mBAAmB,CAAC;IAC3B,2CAA2C;IAC3C,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,kBAAkB,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IAChE,+CAA+C;IAC/C,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B;;;;OAIG;IACH,SAAS,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAClC,4CAA4C;IAC5C,cAAc,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,cAAc,EACd,SAAS,GACV,EAAE,yBAAyB,4BAiB3B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
|
+
import { useAsyncAction } from "../hooks/use-async-action.js";
|
|
6
|
+
import { Alert, AlertDescription } from "./alert.js";
|
|
7
|
+
import { Button } from "./button.js";
|
|
8
|
+
const noFailureOnServer = () => null;
|
|
9
|
+
/**
|
|
10
|
+
* One notice pinned to the top of the screen once the page hits a failure only a reload repairs.
|
|
11
|
+
* It cannot be dismissed and never reloads by itself: the page and every editor beneath it stay
|
|
12
|
+
* mounted and usable until the person presses Refresh. A repeat of the failure changes nothing.
|
|
13
|
+
*/
|
|
14
|
+
export function ReloadRecoveryNotice({ watch, messages, refreshLabel, onRefresh, onRefreshError, className, }) {
|
|
15
|
+
const kind = React.useSyncExternalStore(watch.subscribe, watch.current, noFailureOnServer);
|
|
16
|
+
const refresh = useAsyncAction(onRefresh, { onError: onRefreshError });
|
|
17
|
+
if (kind === null)
|
|
18
|
+
return null;
|
|
19
|
+
return (_jsxs(Alert, { className: cn("ui-reload-recovery-notice fixed inset-x-0 top-0 z-50 flex items-center justify-between gap-4 rounded-none border-x-0 border-t-0", className), children: [_jsx(AlertDescription, { children: messages[kind] }), _jsx(Button, { type: "button", size: "sm", pending: refresh.pending, onClick: () => void refresh.run(), children: refreshLabel })] }));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=reload-recovery-notice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reload-recovery-notice.js","sourceRoot":"","sources":["../../../src/react/components/reload-recovery-notice.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAoBrC,MAAM,iBAAiB,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC;AAErC;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,EACnC,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,cAAc,EACd,SAAS,GACiB;IAC1B,MAAM,IAAI,GAAG,KAAK,CAAC,oBAAoB,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;IAC3F,MAAM,OAAO,GAAG,cAAc,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC,CAAC;IACvE,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC/B,OAAO,CACL,MAAC,KAAK,IACJ,SAAS,EAAE,EAAE,CACX,iIAAiI,EACjI,SAAS,CACV,aAED,KAAC,gBAAgB,cAAE,QAAQ,CAAC,IAAI,CAAC,GAAoB,EACrD,KAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,OAAO,CAAC,GAAG,EAAE,YACxF,YAAY,GACN,IACH,CACT,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport type { ReloadRecoveryWatch } from \"../../browser/reload-recovery-watch.js\";\nimport type { ReloadRecoveryKind } from \"../../lib/reload-recovery.js\";\nimport { cn } from \"../../lib/utils.js\";\nimport { useAsyncAction } from \"../hooks/use-async-action.js\";\nimport { Alert, AlertDescription } from \"./alert.js\";\nimport { Button } from \"./button.js\";\n\nexport interface ReloadRecoveryNoticeProps {\n /** The watch the app's client entry started. */\n watch: ReloadRecoveryWatch;\n /** The app's sentence for each failure. */\n messages: Readonly<Record<ReloadRecoveryKind, React.ReactNode>>;\n /** The app's label for the refresh control. */\n refreshLabel: React.ReactNode;\n /**\n * The app's own reload, which runs its unsaved-work guard first. Refresh is pending until it\n * settles: a reload that proceeds keeps it pending until the page unloads, and a cancelled guard\n * settles it with the page, its input, and the notice as they were.\n */\n onRefresh: () => Promise<unknown>;\n /** Receives anything `onRefresh` throws. */\n onRefreshError: (error: unknown) => void;\n className?: string;\n}\n\nconst noFailureOnServer = () => null;\n\n/**\n * One notice pinned to the top of the screen once the page hits a failure only a reload repairs.\n * It cannot be dismissed and never reloads by itself: the page and every editor beneath it stay\n * mounted and usable until the person presses Refresh. A repeat of the failure changes nothing.\n */\nexport function ReloadRecoveryNotice({\n watch,\n messages,\n refreshLabel,\n onRefresh,\n onRefreshError,\n className,\n}: ReloadRecoveryNoticeProps) {\n const kind = React.useSyncExternalStore(watch.subscribe, watch.current, noFailureOnServer);\n const refresh = useAsyncAction(onRefresh, { onError: onRefreshError });\n if (kind === null) return null;\n return (\n <Alert\n className={cn(\n \"ui-reload-recovery-notice fixed inset-x-0 top-0 z-50 flex items-center justify-between gap-4 rounded-none border-x-0 border-t-0\",\n className,\n )}\n >\n <AlertDescription>{messages[kind]}</AlertDescription>\n <Button type=\"button\" size=\"sm\" pending={refresh.pending} onClick={() => void refresh.run()}>\n {refreshLabel}\n </Button>\n </Alert>\n );\n}\n"]}
|
|
@@ -4,7 +4,7 @@ import { type VariantProps } from "class-variance-authority";
|
|
|
4
4
|
declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
|
|
5
5
|
declare const ToastViewport: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
|
|
6
6
|
declare const Toast: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
|
|
7
|
-
variant?: "
|
|
7
|
+
variant?: "error" | "default" | "destructive" | "success" | "warning" | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
|
|
9
9
|
/** ms; ignored when `persistent` is true */
|
|
10
10
|
duration?: number;
|
package/dist/react/index.d.ts
CHANGED
|
@@ -62,6 +62,8 @@ export { ShowMoreToggle } from "./components/show-more-toggle.js";
|
|
|
62
62
|
export type { ShowMoreToggleProps } from "./components/show-more-toggle.js";
|
|
63
63
|
export { ChunkErrorRecovery } from "./components/chunk-error-recovery.js";
|
|
64
64
|
export type { ChunkErrorRecoveryProps } from "./components/chunk-error-recovery.js";
|
|
65
|
+
export { ReloadRecoveryNotice } from "./components/reload-recovery-notice.js";
|
|
66
|
+
export type { ReloadRecoveryNoticeProps } from "./components/reload-recovery-notice.js";
|
|
65
67
|
export { ListPagination } from "./components/list-pagination.js";
|
|
66
68
|
export type { ListPaginationProps } from "./components/list-pagination.js";
|
|
67
69
|
export { usePagedList } from "./hooks/use-paged-list.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAChE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC7G,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,YAAY,EAAE,aAAa,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACrI,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACpL,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACjG,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,eAAe,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EA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M,+BAA+B,CAAC;AAEvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,YAAY,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAErF,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,YAAY,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAEnF,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,YAAY,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAE5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,YAAY,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAEpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAC9E,YAAY,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAIxF,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,YAAY,EAAE,mBAAmB,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAErG,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAKhG,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACtH,YAAY,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC"}
|
package/dist/react/index.js
CHANGED
|
@@ -45,6 +45,7 @@ export { EndOfListIndicator } from "./components/end-of-list-indicator.js";
|
|
|
45
45
|
export { ScrollToTopButton } from "./components/scroll-to-top-button.js";
|
|
46
46
|
export { ShowMoreToggle } from "./components/show-more-toggle.js";
|
|
47
47
|
export { ChunkErrorRecovery } from "./components/chunk-error-recovery.js";
|
|
48
|
+
export { ReloadRecoveryNotice } from "./components/reload-recovery-notice.js";
|
|
48
49
|
// List pagination — the one Previous / counter / Next control plus the page-state
|
|
49
50
|
// hooks for its two flavors (known total, and cursor/`hasMore`).
|
|
50
51
|
export { ListPagination } from "./components/list-pagination.js";
|
package/dist/react/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAGb,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAEhE,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC7G,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAE9C,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACpL,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACjG,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,eAAe,EAAE,sBAAsB,EAAE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,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAGjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAGvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AAEjF,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAG7D,yBAAyB;AACzB,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAG7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAG3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAGzE,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAGlE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAG1E,kFAAkF;AAClF,iEAAiE;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAGjE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGzD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D,uFAAuF;AACvF,wFAAwF;AACxF,gCAAgC;AAChC,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC","sourcesContent":["\"use client\";\n\nexport type { ButtonProps } from \"./components/button.js\";\nexport { Button, buttonVariants } from \"./components/button.js\";\nexport type { SpinnerProps, SpinnerSize } from \"./components/spinner.js\";\nexport { Spinner } from \"./components/spinner.js\";\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from \"./components/card.js\";\nexport { Label } from \"./components/label.js\";\nexport type { TextareaProps, FreeTextTextareaProps, NonFreeTextTextareaProps, NonFreeTextareaEntry } from \"./components/textarea.js\";\nexport { Textarea } from \"./components/textarea.js\";\nexport { Skeleton } from \"./components/skeleton.js\";\nexport { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription } from \"./components/dialog.js\";\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor } from \"./components/popover.js\";\nexport { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup } from \"./components/dropdown-menu.js\";\nexport { Menubar, MenubarMenu, MenubarTrigger, MenubarContent, MenubarItem, MenubarSeparator, MenubarLabel, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarPortal, MenubarSubContent, MenubarSubTrigger, MenubarGroup, MenubarSub, MenubarShortcut } from \"./components/menubar.js\";\nexport { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel } from \"./components/alert-dialog.js\";\nexport { Alert, AlertTitle, AlertDescription } from \"./components/alert.js\";\nexport type { ToastProps, ToastActionElement } from \"./components/toast.js\";\nexport { ToastProvider, ToastViewport, Toast, ToastTitle, ToastDescription, ToastClose, ToastAction } from \"./components/toast.js\";\nexport { Toaster } from \"./components/toaster.js\";\nexport type { ToastVariant, ToasterToast } from \"./hooks/use-toast.js\";\nexport { toast, useToast } from \"./hooks/use-toast.js\";\nexport type { InputProps, FreeTextInputProps, NonFreeTextInputProps, NonFreeTextEntry, BuiltInFormatInputProps, BuiltInFormatInputType } from \"./components/input.js\";\nexport { Input } from \"./components/input.js\";\nexport { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton } from \"./components/select.js\";\nexport { Tabs, TabsList, TabsTrigger, TabsContent } from \"./components/tabs.js\";\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } from \"./components/tooltip.js\";\nexport { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField } from \"./components/form.js\";\nexport { Checkbox } from \"./components/checkbox.js\";\nexport { Switch } from \"./components/switch.js\";\nexport type { BadgeProps } from \"./components/badge.js\";\nexport { Badge, badgeVariants } from \"./components/badge.js\";\nexport { Avatar, AvatarImage, AvatarFallback } from \"./components/avatar.js\";\nexport { Separator } from \"./components/separator.js\";\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from \"./components/accordion.js\";\nexport { RadioGroup, RadioGroupItem } from \"./components/radio-group.js\";\nexport { Progress } from \"./components/progress.js\";\nexport { Slider } from \"./components/slider.js\";\nexport type { DatePickerProps } from \"./components/date-picker.js\";\nexport { DatePicker } from \"./components/date-picker.js\";\nexport type { DateTimePickerProps, DateTimePickerTime } from \"./components/date-time-picker.js\";\nexport { DateTimePicker } from \"./components/date-time-picker.js\";\nexport { ScrollArea, ScrollBar } from \"./components/scroll-area.js\";\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, SortableTableHead, TableRow, TableCell, TableCaption } from \"./components/table.js\";\nexport type { SortableTableHeadProps, SortDirection } from \"./components/table.js\";\nexport { Sheet, SheetPortal, SheetOverlay, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription } from \"./components/sheet.js\";\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent } from \"./components/collapsible.js\";\nexport type { SearchDropdownProps } from \"./components/search-dropdown.js\";\nexport { SearchDropdown } from \"./components/search-dropdown.js\";\n\nexport type { ConsequenceDialogProps, ConsequenceDialogReason, ConsequenceDialogTypedConfirmation } from \"./components/consequence-dialog.js\";\nexport { ConsequenceDialog } from \"./components/consequence-dialog.js\";\n\nexport type { MaxWidthOption, ScreenAdaptiveViewProps } from \"./components/layout/screen-adaptive-view.js\";\nexport { ScreenAdaptiveView } from \"./components/layout/screen-adaptive-view.js\";\n\nexport { useMediaQuery } from \"./hooks/use-media-query.js\";\n\nexport { useAsyncAction } from \"./hooks/use-async-action.js\";\nexport type { AsyncAction, UseAsyncActionOptions } from \"./hooks/use-async-action.js\";\n\n// Shared building blocks\nexport { RelativeTime } from \"./components/relative-time.js\";\nexport type { RelativeTimeProps } from \"./components/relative-time.js\";\n\nexport { EndOfListIndicator } from \"./components/end-of-list-indicator.js\";\nexport type { EndOfListIndicatorProps } from \"./components/end-of-list-indicator.js\";\n\nexport { ScrollToTopButton } from \"./components/scroll-to-top-button.js\";\nexport type { ScrollToTopButtonProps } from \"./components/scroll-to-top-button.js\";\n\nexport { ShowMoreToggle } from \"./components/show-more-toggle.js\";\nexport type { ShowMoreToggleProps } from \"./components/show-more-toggle.js\";\n\nexport { ChunkErrorRecovery } from \"./components/chunk-error-recovery.js\";\nexport type { ChunkErrorRecoveryProps } from \"./components/chunk-error-recovery.js\";\n\n// List pagination — the one Previous / counter / Next control plus the page-state\n// hooks for its two flavors (known total, and cursor/`hasMore`).\nexport { ListPagination } from \"./components/list-pagination.js\";\nexport type { ListPaginationProps } from \"./components/list-pagination.js\";\n\nexport { usePagedList } from \"./hooks/use-paged-list.js\";\nexport type { ListPaginationState, PagedList, UsePagedListOptions } from \"./hooks/use-paged-list.js\";\n\nexport { useCursorPage } from \"./hooks/use-cursor-page.js\";\nexport type { CursorPage, CursorPager, UseCursorPageOptions } from \"./hooks/use-cursor-page.js\";\n\n// Return-scroll: restore a list's window offset when the user comes back to it after a\n// route change (save on leave, restore once on an eligible + ready return, keyed by the\n// caller's canonical list URL).\nexport { useReturnScroll, saveReturnScroll, clearReturnScroll, readReturnScroll } from \"./hooks/use-return-scroll.js\";\nexport type { ReturnScrollEntry, UseReturnScrollOptions, UseReturnScrollResult } from \"./hooks/use-return-scroll.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,YA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EAAE,MAAM,sCAAsC,CAAC;AAGzE,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAGlE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAG1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAG9E,kFAAkF;AAClF,iEAAiE;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAGjE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGzD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D,uFAAuF;AACvF,wFAAwF;AACxF,gCAAgC;AAChC,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC","sourcesContent":["\"use client\";\n\nexport type { ButtonProps } from \"./components/button.js\";\nexport { Button, buttonVariants } from \"./components/button.js\";\nexport type { SpinnerProps, SpinnerSize } from \"./components/spinner.js\";\nexport { Spinner } from \"./components/spinner.js\";\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from \"./components/card.js\";\nexport { Label } from \"./components/label.js\";\nexport type { TextareaProps, FreeTextTextareaProps, NonFreeTextTextareaProps, NonFreeTextareaEntry } from \"./components/textarea.js\";\nexport { Textarea } from \"./components/textarea.js\";\nexport { Skeleton } from \"./components/skeleton.js\";\nexport { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription } from \"./components/dialog.js\";\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor } from \"./components/popover.js\";\nexport { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup } from \"./components/dropdown-menu.js\";\nexport { Menubar, MenubarMenu, MenubarTrigger, MenubarContent, MenubarItem, MenubarSeparator, MenubarLabel, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarPortal, MenubarSubContent, MenubarSubTrigger, MenubarGroup, MenubarSub, MenubarShortcut } from \"./components/menubar.js\";\nexport { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel } from \"./components/alert-dialog.js\";\nexport { Alert, AlertTitle, AlertDescription } from \"./components/alert.js\";\nexport type { ToastProps, ToastActionElement } from \"./components/toast.js\";\nexport { ToastProvider, ToastViewport, Toast, ToastTitle, ToastDescription, ToastClose, ToastAction } from \"./components/toast.js\";\nexport { Toaster } from \"./components/toaster.js\";\nexport type { ToastVariant, ToasterToast } from \"./hooks/use-toast.js\";\nexport { toast, useToast } from \"./hooks/use-toast.js\";\nexport type { InputProps, FreeTextInputProps, NonFreeTextInputProps, NonFreeTextEntry, BuiltInFormatInputProps, BuiltInFormatInputType } from \"./components/input.js\";\nexport { Input } from \"./components/input.js\";\nexport { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton } from \"./components/select.js\";\nexport { Tabs, TabsList, TabsTrigger, TabsContent } from \"./components/tabs.js\";\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } from \"./components/tooltip.js\";\nexport { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField } from \"./components/form.js\";\nexport { Checkbox } from \"./components/checkbox.js\";\nexport { Switch } from \"./components/switch.js\";\nexport type { BadgeProps } from \"./components/badge.js\";\nexport { Badge, badgeVariants } from \"./components/badge.js\";\nexport { Avatar, AvatarImage, AvatarFallback } from \"./components/avatar.js\";\nexport { Separator } from \"./components/separator.js\";\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from \"./components/accordion.js\";\nexport { RadioGroup, RadioGroupItem } from \"./components/radio-group.js\";\nexport { Progress } from \"./components/progress.js\";\nexport { Slider } from \"./components/slider.js\";\nexport type { DatePickerProps } from \"./components/date-picker.js\";\nexport { DatePicker } from \"./components/date-picker.js\";\nexport type { DateTimePickerProps, DateTimePickerTime } from \"./components/date-time-picker.js\";\nexport { DateTimePicker } from \"./components/date-time-picker.js\";\nexport { ScrollArea, ScrollBar } from \"./components/scroll-area.js\";\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, SortableTableHead, TableRow, TableCell, TableCaption } from \"./components/table.js\";\nexport type { SortableTableHeadProps, SortDirection } from \"./components/table.js\";\nexport { Sheet, SheetPortal, SheetOverlay, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription } from \"./components/sheet.js\";\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent } from \"./components/collapsible.js\";\nexport type { SearchDropdownProps } from \"./components/search-dropdown.js\";\nexport { SearchDropdown } from \"./components/search-dropdown.js\";\n\nexport type { ConsequenceDialogProps, ConsequenceDialogReason, ConsequenceDialogTypedConfirmation } from \"./components/consequence-dialog.js\";\nexport { ConsequenceDialog } from \"./components/consequence-dialog.js\";\n\nexport type { MaxWidthOption, ScreenAdaptiveViewProps } from \"./components/layout/screen-adaptive-view.js\";\nexport { ScreenAdaptiveView } from \"./components/layout/screen-adaptive-view.js\";\n\nexport { useMediaQuery } from \"./hooks/use-media-query.js\";\n\nexport { useAsyncAction } from \"./hooks/use-async-action.js\";\nexport type { AsyncAction, UseAsyncActionOptions } from \"./hooks/use-async-action.js\";\n\n// Shared building blocks\nexport { RelativeTime } from \"./components/relative-time.js\";\nexport type { RelativeTimeProps } from \"./components/relative-time.js\";\n\nexport { EndOfListIndicator } from \"./components/end-of-list-indicator.js\";\nexport type { EndOfListIndicatorProps } from \"./components/end-of-list-indicator.js\";\n\nexport { ScrollToTopButton } from \"./components/scroll-to-top-button.js\";\nexport type { ScrollToTopButtonProps } from \"./components/scroll-to-top-button.js\";\n\nexport { ShowMoreToggle } from \"./components/show-more-toggle.js\";\nexport type { ShowMoreToggleProps } from \"./components/show-more-toggle.js\";\n\nexport { ChunkErrorRecovery } from \"./components/chunk-error-recovery.js\";\nexport type { ChunkErrorRecoveryProps } from \"./components/chunk-error-recovery.js\";\n\nexport { ReloadRecoveryNotice } from \"./components/reload-recovery-notice.js\";\nexport type { ReloadRecoveryNoticeProps } from \"./components/reload-recovery-notice.js\";\n\n// List pagination — the one Previous / counter / Next control plus the page-state\n// hooks for its two flavors (known total, and cursor/`hasMore`).\nexport { ListPagination } from \"./components/list-pagination.js\";\nexport type { ListPaginationProps } from \"./components/list-pagination.js\";\n\nexport { usePagedList } from \"./hooks/use-paged-list.js\";\nexport type { ListPaginationState, PagedList, UsePagedListOptions } from \"./hooks/use-paged-list.js\";\n\nexport { useCursorPage } from \"./hooks/use-cursor-page.js\";\nexport type { CursorPage, CursorPager, UseCursorPageOptions } from \"./hooks/use-cursor-page.js\";\n\n// Return-scroll: restore a list's window offset when the user comes back to it after a\n// route change (save on leave, restore once on an eligible + ready return, keyed by the\n// caller's canonical list URL).\nexport { useReturnScroll, saveReturnScroll, clearReturnScroll, readReturnScroll } from \"./hooks/use-return-scroll.js\";\nexport type { ReturnScrollEntry, UseReturnScrollOptions, UseReturnScrollResult } from \"./hooks/use-return-scroll.js\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttt-productions/ui-core",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.28",
|
|
4
4
|
"description": "Shared UI components for TTT Productions projects",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,6 +28,11 @@
|
|
|
28
28
|
"types": "./dist/react/index.d.ts",
|
|
29
29
|
"import": "./dist/react/index.js",
|
|
30
30
|
"default": "./dist/react/index.js"
|
|
31
|
+
},
|
|
32
|
+
"./browser": {
|
|
33
|
+
"types": "./dist/browser/index.d.ts",
|
|
34
|
+
"import": "./dist/browser/index.js",
|
|
35
|
+
"default": "./dist/browser/index.js"
|
|
31
36
|
}
|
|
32
37
|
},
|
|
33
38
|
"scripts": {
|