@kosdev-code/kos-ui-sdk 3.0.17 → 3.0.19
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/core/core/dependency-manager.d.ts +6 -0
- package/core/core/dependency-manager.d.ts.map +1 -1
- package/core/core/kosModelManager.d.ts.map +1 -1
- package/core/core/model/model-hook-cache.d.ts +30 -0
- package/core/core/model/model-hook-cache.d.ts.map +1 -0
- package/core/core/transport/mock/mock-recorder.d.ts +7 -0
- package/core/core/transport/mock/mock-recorder.d.ts.map +1 -1
- package/core/core/transport/mock/mock-registry.d.ts.map +1 -1
- package/core/core/transport/mock/mock-types.d.ts +26 -0
- package/core/core/transport/mock/mock-types.d.ts.map +1 -1
- package/core/index.d.ts +1 -0
- package/core/index.d.ts.map +1 -1
- package/core/util/kos-config-init.d.ts.map +1 -1
- package/index.cjs +486 -361
- package/index.cjs.map +1 -1
- package/index.js +486 -361
- package/index.js.map +1 -1
- package/package.json +2 -2
- package/ui/components/error-boundary/error-boundary.d.ts +9 -0
- package/ui/components/error-boundary/error-boundary.d.ts.map +1 -1
- package/ui/hooks/translation-container/use-translation.d.ts.map +1 -1
- package/ui/hooks/use-kos-model.d.ts +8 -0
- package/ui/hooks/use-kos-model.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kosdev-code/kos-ui-sdk",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.19",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.cjs",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
},
|
|
50
50
|
"kos": {
|
|
51
51
|
"build": {
|
|
52
|
-
"gitHash": "
|
|
52
|
+
"gitHash": "442efeac4f5ebe09b50bc6dfa13190bc3799fbbe"
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
}
|
|
@@ -5,9 +5,18 @@ export interface ErrorBoundaryState {
|
|
|
5
5
|
}
|
|
6
6
|
export interface ErrorBoundaryProps extends React.PropsWithChildren {
|
|
7
7
|
fallback?: React.ReactNode;
|
|
8
|
+
/** Names the guarded region so a caught error is traceable to its seam. */
|
|
9
|
+
name?: string;
|
|
8
10
|
}
|
|
9
11
|
declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
10
12
|
constructor(props: ErrorBoundaryProps);
|
|
13
|
+
/**
|
|
14
|
+
* Recovers during the render phase. Without this React renders the boundary
|
|
15
|
+
* with `null` children and waits for `componentDidCatch` to schedule a
|
|
16
|
+
* fallback, and a second error in the same batch escalates past the boundary
|
|
17
|
+
* to the root, unmounting the whole tree.
|
|
18
|
+
*/
|
|
19
|
+
static getDerivedStateFromError(error: Error): Pick<ErrorBoundaryState, "error">;
|
|
11
20
|
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
12
21
|
render(): string | number | boolean | Iterable<React.ReactNode> | import("@emotion/react/jsx-runtime").JSX.Element | null | undefined;
|
|
13
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-boundary.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/ui/components/error-boundary/error-boundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"error-boundary.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/ui/components/error-boundary/error-boundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKzC,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,iBAAiB;IACjE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,2EAA2E;IAC3E,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AACD,cAAM,aAAc,SAAQ,KAAK,CAAC,SAAS,CACzC,kBAAkB,EAClB,kBAAkB,CACnB;gBACa,KAAK,EAAE,kBAAkB;IAKrC;;;;;OAKG;IACH,MAAM,CAAC,wBAAwB,CAC7B,KAAK,EAAE,KAAK,GACX,IAAI,CAAC,kBAAkB,EAAE,OAAO,CAAC;IAI3B,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS;IAiBpD,MAAM;CAqBhB;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-translation.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/ui/hooks/translation-container/use-translation.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,yBAAyB,EAG1B,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"use-translation.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/ui/hooks/translation-container/use-translation.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,yBAAyB,EAG1B,MAAM,iBAAiB,CAAC;AAuCzB,wBAAgB,eAAe,CAAC,CAAC,EAC/B,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,CAAC,CAAC,KAOxC;AAwBD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,GAAG,MAAM,EACjC,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,yBAAyB,CAAC,CAAC,CAAC,GAAG,MAAM,KAC5C,CAAC,GAAG,MAAM,CAAC;AAEhB,MAAM,WAAW,wBAAwB;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AACD;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAC5B,WAAW,MAAM,GAAG,MAAM,EAAE,EAC5B,cAAc,wBAAwB;;;sBAiBpB,MAAM;;CAgCzB,CAAC"}
|
|
@@ -8,6 +8,14 @@ interface Options<T extends IKosDataModel, O extends Object = {}> {
|
|
|
8
8
|
destroyOnUnmount?: boolean;
|
|
9
9
|
forceUpdate?: boolean;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Reads a model out of the suspense cache, suspending or rethrowing as the
|
|
13
|
+
* entry requires. Exported for tests.
|
|
14
|
+
*/
|
|
15
|
+
export declare function readModelHookEntry(key: string, fetcher: () => Promise<unknown>): {
|
|
16
|
+
kosModel: import('../../core').IKosModel<IKosDataModel> | undefined;
|
|
17
|
+
model: IKosDataModel | undefined;
|
|
18
|
+
};
|
|
11
19
|
/**
|
|
12
20
|
* Primary hook for consuming KOS models in React components.
|
|
13
21
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-kos-model.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/ui/hooks/use-kos-model.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"use-kos-model.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/ui/hooks/use-kos-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,aAAa,EAGb,YAAY,EACb,MAAM,YAAY,CAAC;AASpB,UAAU,OAAO,CAAC,CAAC,SAAS,aAAa,EAAE,CAAC,SAAS,MAAM,GAAG,EAAE;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAUD;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC;;;EA+BhC;AAqDD;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,aAAa,EAAE,CAAC,SAAS,MAAM,GAAG,EAAE,EACxE,cAAc,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;;;;;;;;;;CAsG5B,CAAC"}
|