@magicvr/schema-ui-lib 0.1.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/i18n/catalog.d.ts +51 -0
- package/i18n/format.d.ts +17 -0
- package/i18n/locale.d.ts +51 -0
- package/i18n/money.d.ts +69 -0
- package/i18n/runtime.d.ts +90 -0
- package/i18n/timezone.d.ts +57 -0
- package/index.js +5765 -0
- package/lib/datetime.d.ts +14 -0
- package/lib/fetch-timeout.d.ts +13 -0
- package/lib/index.d.ts +12 -0
- package/lib/utils.d.ts +2 -0
- package/package.json +30 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Display-time formatting (GOAL-011 table style): ISO-8601 timestamps are
|
|
3
|
+
* rendered in a human-readable local-time form ("2026-08-01 18:02") instead
|
|
4
|
+
* of the raw wire value ("2026-08-01T18:02:44.000Z").
|
|
5
|
+
*
|
|
6
|
+
* Returns null when the value is not a renderable timestamp so callers fall
|
|
7
|
+
* back to the raw text (numbers, booleans, plain strings, arbitrary dates
|
|
8
|
+
* with other shapes stay untouched).
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Formats an ISO-8601 timestamp string to local "YYYY-MM-DD HH:mm". Returns
|
|
12
|
+
* null for non-timestamp values, malformed dates, or non-string input.
|
|
13
|
+
*/
|
|
14
|
+
export declare function formatDisplayTime(value: unknown): string | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* W10 F-002: fetch timeout wrapper.
|
|
3
|
+
*
|
|
4
|
+
* Wraps a fetch implementation so a hung request (slow network, stalled
|
|
5
|
+
* server) aborts after a bounded window instead of pending forever. The
|
|
6
|
+
* returned function is drop-in compatible with `typeof fetch`; a caller-
|
|
7
|
+
* provided AbortSignal in `init` is composed with the timeout signal (either
|
|
8
|
+
* firing aborts the request). Timers are cleared once the request settles, so
|
|
9
|
+
* no handles leak on the happy path.
|
|
10
|
+
*/
|
|
11
|
+
/** Default ceiling for a single request (30s). */
|
|
12
|
+
export declare const DEFAULT_FETCH_TIMEOUT_MS = 30000;
|
|
13
|
+
export declare function withTimeout(fetchImpl?: typeof fetch, timeoutMs?: number): typeof fetch;
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @schema-ui/lib 聚合导出(R3 六包化):通用工具 + i18n 运行时面。
|
|
3
|
+
*/
|
|
4
|
+
export * from "./datetime";
|
|
5
|
+
export * from "./fetch-timeout";
|
|
6
|
+
export * from "./utils";
|
|
7
|
+
export * from "../i18n/runtime";
|
|
8
|
+
export * from "../i18n/catalog";
|
|
9
|
+
export type * from "../i18n/locale";
|
|
10
|
+
export * from "../i18n/format";
|
|
11
|
+
export * from "../i18n/money";
|
|
12
|
+
export * from "../i18n/timezone";
|
package/lib/utils.d.ts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@magicvr/schema-ui-lib",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "schema-ui-core 包面(VP-023 R3 六包化)",
|
|
6
|
+
"main": "index.js",
|
|
7
|
+
"types": "./lib/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./lib/index.d.ts",
|
|
11
|
+
"import": "./index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"index.js",
|
|
16
|
+
"lib",
|
|
17
|
+
"theme",
|
|
18
|
+
"components",
|
|
19
|
+
"app",
|
|
20
|
+
"host",
|
|
21
|
+
"i18n",
|
|
22
|
+
"ui",
|
|
23
|
+
"renderer",
|
|
24
|
+
"render"
|
|
25
|
+
],
|
|
26
|
+
"license": "UNLICENSED",
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public"
|
|
29
|
+
}
|
|
30
|
+
}
|