@almadar/ui 5.135.0 → 5.136.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/{TraitProvider-Ch79cUcb.d.cts → EntityBindingContext-CD9ZoXb4.d.cts} +30 -2
- package/dist/{TraitProvider-Ch79cUcb.d.ts → EntityBindingContext-CD9ZoXb4.d.ts} +30 -2
- package/dist/avl/index.cjs +1897 -1350
- package/dist/avl/index.js +959 -412
- package/dist/{cn-CZq0uJLA.d.ts → cn-CCaph5o9.d.ts} +1 -1
- package/dist/{cn-B8GXqrtp.d.cts → cn-CL0kdshO.d.cts} +1 -1
- package/dist/components/index.cjs +1558 -1224
- package/dist/components/index.d.cts +89 -12
- package/dist/components/index.d.ts +89 -12
- package/dist/components/index.js +614 -280
- package/dist/lib/drawable/three/index.cjs +1 -0
- package/dist/lib/drawable/three/index.d.cts +1 -1
- package/dist/lib/drawable/three/index.d.ts +1 -1
- package/dist/lib/drawable/three/index.js +1 -0
- package/dist/lib/index.d.cts +2 -2
- package/dist/lib/index.d.ts +2 -2
- package/dist/marketing/index.cjs +1 -0
- package/dist/marketing/index.js +1 -0
- package/dist/{paintDispatch-Bl2sfRFb.d.cts → paintDispatch-DXygiK7M.d.cts} +2 -2
- package/dist/{paintDispatch-Bl2sfRFb.d.ts → paintDispatch-DXygiK7M.d.ts} +2 -2
- package/dist/providers/index.cjs +1664 -1129
- package/dist/providers/index.d.cts +3 -3
- package/dist/providers/index.d.ts +3 -3
- package/dist/providers/index.js +812 -279
- package/dist/runtime/index.cjs +1758 -1211
- package/dist/runtime/index.d.cts +5 -2
- package/dist/runtime/index.d.ts +5 -2
- package/dist/runtime/index.js +939 -392
- package/package.json +6 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { ReactNode } from 'react';
|
|
3
|
-
import { ResolvedEntity, EventPayload, EntityRow, OrbitalSchema, BusEventSource, SExpr, ResolvedTrait, ResolvedTraitBinding } from '@almadar/core';
|
|
3
|
+
import { ResolvedEntity, EventPayload, EntityRow, OrbitalSchema, BusEventSource, SExpr, ResolvedTrait, ResolvedTraitBinding, TraitConfig } from '@almadar/core';
|
|
4
4
|
import { AnyPatternConfig } from '@almadar/core/patterns';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -238,4 +238,32 @@ declare function useTraitContext(): TraitContextValue;
|
|
|
238
238
|
*/
|
|
239
239
|
declare function useTrait(traitName: string): TraitInstance | undefined;
|
|
240
240
|
|
|
241
|
-
|
|
241
|
+
/**
|
|
242
|
+
* Read + subscribe surface over the live trait binding stores. Snapshots
|
|
243
|
+
* are cached objects — a new reference only when the trait's entity
|
|
244
|
+
* actually changed (the `useSyncExternalStore` contract).
|
|
245
|
+
*/
|
|
246
|
+
interface EntityBindingSource {
|
|
247
|
+
/** Current entity snapshot for a trait (shared-entity traits read the shared store). */
|
|
248
|
+
getEntitySnapshot: (traitName: string) => EntityRow;
|
|
249
|
+
/** Merged render-time config (declared defaults < resolved < call-site). */
|
|
250
|
+
getConfig: (traitName: string) => TraitConfig | undefined;
|
|
251
|
+
/** Current state-machine state — evaluation context for `@state` in marked expressions. */
|
|
252
|
+
getState: (traitName: string) => string;
|
|
253
|
+
/** Subscribe to entity commits for a trait. Returns unsubscribe. */
|
|
254
|
+
subscribe: (traitName: string, callback: () => void) => () => void;
|
|
255
|
+
}
|
|
256
|
+
declare const EntityBindingContext: React.Context<EntityBindingSource | null>;
|
|
257
|
+
/**
|
|
258
|
+
* Bridge one trait's live bindings into React. With no provider (compiled
|
|
259
|
+
* shell, static renders) or no owning trait, returns empty bindings and
|
|
260
|
+
* never re-renders — markers resolve to the same `undefined` they would
|
|
261
|
+
* have resolved to at flush time against an empty entity.
|
|
262
|
+
*/
|
|
263
|
+
declare function useEntityBindingSnapshot(traitName: string | undefined): {
|
|
264
|
+
entity: EntityRow;
|
|
265
|
+
config: TraitConfig | undefined;
|
|
266
|
+
state: string;
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
export { EntityBindingContext as E, type SendEventResult as S, TraitContext as T, type EntityBindingSource as a, type EntitySchemaContextValue as b, EntitySchemaProvider as c, type EntitySchemaProviderProps as d, type ServerBridgeContextValue as e, ServerBridgeProvider as f, type ServerBridgeProviderProps as g, type ServerBridgeTransport as h, type ServerClientEffect as i, type ServerResponseMeta as j, type TraitContextValue as k, type TraitInstance as l, TraitProvider as m, type TraitProviderProps as n, useEntitySchema as o, useEntitySchemaOptional as p, useServerBridge as q, useTrait as r, useTraitContext as s, useEntityBindingSnapshot as u };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { ReactNode } from 'react';
|
|
3
|
-
import { ResolvedEntity, EventPayload, EntityRow, OrbitalSchema, BusEventSource, SExpr, ResolvedTrait, ResolvedTraitBinding } from '@almadar/core';
|
|
3
|
+
import { ResolvedEntity, EventPayload, EntityRow, OrbitalSchema, BusEventSource, SExpr, ResolvedTrait, ResolvedTraitBinding, TraitConfig } from '@almadar/core';
|
|
4
4
|
import { AnyPatternConfig } from '@almadar/core/patterns';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -238,4 +238,32 @@ declare function useTraitContext(): TraitContextValue;
|
|
|
238
238
|
*/
|
|
239
239
|
declare function useTrait(traitName: string): TraitInstance | undefined;
|
|
240
240
|
|
|
241
|
-
|
|
241
|
+
/**
|
|
242
|
+
* Read + subscribe surface over the live trait binding stores. Snapshots
|
|
243
|
+
* are cached objects — a new reference only when the trait's entity
|
|
244
|
+
* actually changed (the `useSyncExternalStore` contract).
|
|
245
|
+
*/
|
|
246
|
+
interface EntityBindingSource {
|
|
247
|
+
/** Current entity snapshot for a trait (shared-entity traits read the shared store). */
|
|
248
|
+
getEntitySnapshot: (traitName: string) => EntityRow;
|
|
249
|
+
/** Merged render-time config (declared defaults < resolved < call-site). */
|
|
250
|
+
getConfig: (traitName: string) => TraitConfig | undefined;
|
|
251
|
+
/** Current state-machine state — evaluation context for `@state` in marked expressions. */
|
|
252
|
+
getState: (traitName: string) => string;
|
|
253
|
+
/** Subscribe to entity commits for a trait. Returns unsubscribe. */
|
|
254
|
+
subscribe: (traitName: string, callback: () => void) => () => void;
|
|
255
|
+
}
|
|
256
|
+
declare const EntityBindingContext: React.Context<EntityBindingSource | null>;
|
|
257
|
+
/**
|
|
258
|
+
* Bridge one trait's live bindings into React. With no provider (compiled
|
|
259
|
+
* shell, static renders) or no owning trait, returns empty bindings and
|
|
260
|
+
* never re-renders — markers resolve to the same `undefined` they would
|
|
261
|
+
* have resolved to at flush time against an empty entity.
|
|
262
|
+
*/
|
|
263
|
+
declare function useEntityBindingSnapshot(traitName: string | undefined): {
|
|
264
|
+
entity: EntityRow;
|
|
265
|
+
config: TraitConfig | undefined;
|
|
266
|
+
state: string;
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
export { EntityBindingContext as E, type SendEventResult as S, TraitContext as T, type EntityBindingSource as a, type EntitySchemaContextValue as b, EntitySchemaProvider as c, type EntitySchemaProviderProps as d, type ServerBridgeContextValue as e, ServerBridgeProvider as f, type ServerBridgeProviderProps as g, type ServerBridgeTransport as h, type ServerClientEffect as i, type ServerResponseMeta as j, type TraitContextValue as k, type TraitInstance as l, TraitProvider as m, type TraitProviderProps as n, useEntitySchema as o, useEntitySchemaOptional as p, useServerBridge as q, useTrait as r, useTraitContext as s, useEntityBindingSnapshot as u };
|