@ai-matrx/content-ir-react 0.24.0 → 0.24.2
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/CHANGELOG.md +12 -0
- package/dist/db-component.cjs.map +1 -1
- package/dist/db-component.d.cts +10 -2
- package/dist/db-component.d.ts +10 -2
- package/dist/db-component.js.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -2
- package/dist/index.d.ts +10 -2
- package/dist/index.js.map +1 -1
- package/dist/kind-kit.cjs +9 -3
- package/dist/kind-kit.cjs.map +1 -1
- package/dist/kind-kit.d.cts +14 -2
- package/dist/kind-kit.d.ts +14 -2
- package/dist/kind-kit.js +9 -3
- package/dist/kind-kit.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -511,8 +511,9 @@ declare function useRecordValues(read: RecordReader | undefined, ref: DirectiveR
|
|
|
511
511
|
*
|
|
512
512
|
* Contract (the db-row component contract, SHAPE_SYSTEM.md):
|
|
513
513
|
* - `component_source` compiles to a React component receiving
|
|
514
|
-
* `{ data, kind, config, runAction, onResolve?, uiOptions? }`
|
|
515
|
-
* is the kind instance value
|
|
514
|
+
* `{ data, kind, config, runAction, itemState?, onResolve?, uiOptions? }`
|
|
515
|
+
* where `data` is the kind instance value and `itemState` what actions
|
|
516
|
+
* saved onto this item.
|
|
516
517
|
* - `props_transform` (optional) compiles to a `(data) => data` function
|
|
517
518
|
* applied to the value BEFORE it reaches the component. A throwing or
|
|
518
519
|
* non-compiling transform screams and the untransformed value is used
|
|
@@ -579,6 +580,13 @@ interface DbKindComponentRenderProps {
|
|
|
579
580
|
onResolve?: ResolveKindValue;
|
|
580
581
|
/** Settings the mounting surface dictates (e.g. `{ selectionMode: "single" }`). */
|
|
581
582
|
uiOptions?: KindComponentUiOptions;
|
|
583
|
+
/**
|
|
584
|
+
* This item's durable state: what `save_item_state` / `run_shortcut` with
|
|
585
|
+
* `saveAs` wrote onto it (`{}` when nothing yet; survives reload). The host
|
|
586
|
+
* adds `src` to every saved image ref (`{ file_id, mime_type, width, height }`)
|
|
587
|
+
* so the component renders `<img src={itemState.key.src}>`.
|
|
588
|
+
*/
|
|
589
|
+
itemState?: Record<string, unknown>;
|
|
582
590
|
}
|
|
583
591
|
interface CompiledDbKindComponent {
|
|
584
592
|
Component: react.ComponentType<DbKindComponentRenderProps>;
|
package/dist/index.d.ts
CHANGED
|
@@ -511,8 +511,9 @@ declare function useRecordValues(read: RecordReader | undefined, ref: DirectiveR
|
|
|
511
511
|
*
|
|
512
512
|
* Contract (the db-row component contract, SHAPE_SYSTEM.md):
|
|
513
513
|
* - `component_source` compiles to a React component receiving
|
|
514
|
-
* `{ data, kind, config, runAction, onResolve?, uiOptions? }`
|
|
515
|
-
* is the kind instance value
|
|
514
|
+
* `{ data, kind, config, runAction, itemState?, onResolve?, uiOptions? }`
|
|
515
|
+
* where `data` is the kind instance value and `itemState` what actions
|
|
516
|
+
* saved onto this item.
|
|
516
517
|
* - `props_transform` (optional) compiles to a `(data) => data` function
|
|
517
518
|
* applied to the value BEFORE it reaches the component. A throwing or
|
|
518
519
|
* non-compiling transform screams and the untransformed value is used
|
|
@@ -579,6 +580,13 @@ interface DbKindComponentRenderProps {
|
|
|
579
580
|
onResolve?: ResolveKindValue;
|
|
580
581
|
/** Settings the mounting surface dictates (e.g. `{ selectionMode: "single" }`). */
|
|
581
582
|
uiOptions?: KindComponentUiOptions;
|
|
583
|
+
/**
|
|
584
|
+
* This item's durable state: what `save_item_state` / `run_shortcut` with
|
|
585
|
+
* `saveAs` wrote onto it (`{}` when nothing yet; survives reload). The host
|
|
586
|
+
* adds `src` to every saved image ref (`{ file_id, mime_type, width, height }`)
|
|
587
|
+
* so the component renders `<img src={itemState.key.src}>`.
|
|
588
|
+
*/
|
|
589
|
+
itemState?: Record<string, unknown>;
|
|
582
590
|
}
|
|
583
591
|
interface CompiledDbKindComponent {
|
|
584
592
|
Component: react.ComponentType<DbKindComponentRenderProps>;
|