@almadar/core 10.44.0 → 10.46.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/builders.d.ts +3 -3
- package/dist/builders.js +31 -23
- package/dist/builders.js.map +1 -1
- package/dist/{effect-NbTgX2yB.d.ts → effect-DomdqOGT.d.ts} +45 -2
- package/dist/factory/index.d.ts +4 -4
- package/dist/factory-runtime/index.d.ts +3 -3
- package/dist/factory-runtime/index.js +31 -23
- package/dist/factory-runtime/index.js.map +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.js +474 -53
- package/dist/index.js.map +1 -1
- package/dist/mock/index.d.ts +34 -5
- package/dist/mock/index.js +60 -1
- package/dist/mock/index.js.map +1 -1
- package/dist/patterns/component-mapping.json +1 -1
- package/dist/patterns/event-contracts.json +1 -1
- package/dist/patterns/index.d.ts +905 -6
- package/dist/patterns/index.js +417 -4
- package/dist/patterns/index.js.map +1 -1
- package/dist/patterns/patterns-registry.json +415 -2
- package/dist/patterns/registry.json +415 -2
- package/dist/{schema-DdcBBHkb.d.ts → schema-B2h0ZwN5.d.ts} +530 -78
- package/dist/{trait-DdBiEffx.d.ts → trait-B1oP0din.d.ts} +73 -13
- package/dist/types/index.d.ts +7 -7
- package/dist/types/index.js +57 -49
- package/dist/types/index.js.map +1 -1
- package/dist/{types-B4NVh8V9.d.ts → types-ijezwoxO.d.ts} +2 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { J as JsonValue,
|
|
2
|
+
import { J as JsonValue, S as SExpr, R as RuntimeValue, a as EventPayload, E as Expression } from './expression-Yf7qvvOs.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Service Types for Orbital Schema
|
|
@@ -1958,6 +1958,18 @@ type OrbitalEntity = {
|
|
|
1958
1958
|
* current viewer. At most one per composed program.
|
|
1959
1959
|
*/
|
|
1960
1960
|
identity?: boolean;
|
|
1961
|
+
/**
|
|
1962
|
+
* `@read` — a per-row predicate (`@entity` = candidate row, `@user` =
|
|
1963
|
+
* viewer) ANDed with any call-site `filter:`. The un-bypassable twin of
|
|
1964
|
+
* `filter:`, enforced once for every trait that fetches this entity.
|
|
1965
|
+
*/
|
|
1966
|
+
read_policy?: SExpr;
|
|
1967
|
+
/** `@create` — `@entity` binds the incoming data about to become a row. */
|
|
1968
|
+
create_policy?: SExpr;
|
|
1969
|
+
/** `@update` — `@entity` binds the existing row before mutation. */
|
|
1970
|
+
update_policy?: SExpr;
|
|
1971
|
+
/** `@delete` — same binding shape as `@update`. */
|
|
1972
|
+
delete_policy?: SExpr;
|
|
1961
1973
|
/** Collection name (auto-derived if not provided for persistent entities) */
|
|
1962
1974
|
collection?: string;
|
|
1963
1975
|
/** Entity fields */
|
|
@@ -1980,6 +1992,10 @@ declare const OrbitalEntitySchema: z.ZodObject<{
|
|
|
1980
1992
|
persistence: z.ZodDefault<z.ZodEnum<["persistent", "runtime"]>>;
|
|
1981
1993
|
shared: z.ZodOptional<z.ZodBoolean>;
|
|
1982
1994
|
identity: z.ZodOptional<z.ZodBoolean>;
|
|
1995
|
+
read_policy: z.ZodOptional<z.ZodType<SExpr, z.ZodTypeDef, SExpr>>;
|
|
1996
|
+
create_policy: z.ZodOptional<z.ZodType<SExpr, z.ZodTypeDef, SExpr>>;
|
|
1997
|
+
update_policy: z.ZodOptional<z.ZodType<SExpr, z.ZodTypeDef, SExpr>>;
|
|
1998
|
+
delete_policy: z.ZodOptional<z.ZodType<SExpr, z.ZodTypeDef, SExpr>>;
|
|
1983
1999
|
collection: z.ZodOptional<z.ZodString>;
|
|
1984
2000
|
fields: z.ZodArray<z.ZodType<EntityField, z.ZodTypeDef, unknown>, "many">;
|
|
1985
2001
|
instances: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, z.ZodTypeDef, JsonValue>>, "many">>;
|
|
@@ -2019,6 +2035,10 @@ declare const OrbitalEntitySchema: z.ZodObject<{
|
|
|
2019
2035
|
description?: string | undefined;
|
|
2020
2036
|
shared?: boolean | undefined;
|
|
2021
2037
|
identity?: boolean | undefined;
|
|
2038
|
+
read_policy?: SExpr | undefined;
|
|
2039
|
+
create_policy?: SExpr | undefined;
|
|
2040
|
+
update_policy?: SExpr | undefined;
|
|
2041
|
+
delete_policy?: SExpr | undefined;
|
|
2022
2042
|
collection?: string | undefined;
|
|
2023
2043
|
instances?: Record<string, JsonValue>[] | undefined;
|
|
2024
2044
|
timestamps?: boolean | undefined;
|
|
@@ -2040,6 +2060,10 @@ declare const OrbitalEntitySchema: z.ZodObject<{
|
|
|
2040
2060
|
persistence?: "persistent" | "runtime" | undefined;
|
|
2041
2061
|
shared?: boolean | undefined;
|
|
2042
2062
|
identity?: boolean | undefined;
|
|
2063
|
+
read_policy?: SExpr | undefined;
|
|
2064
|
+
create_policy?: SExpr | undefined;
|
|
2065
|
+
update_policy?: SExpr | undefined;
|
|
2066
|
+
delete_policy?: SExpr | undefined;
|
|
2043
2067
|
collection?: string | undefined;
|
|
2044
2068
|
instances?: Record<string, JsonValue>[] | undefined;
|
|
2045
2069
|
timestamps?: boolean | undefined;
|
|
@@ -2064,6 +2088,10 @@ declare const EntitySchema: z.ZodObject<{
|
|
|
2064
2088
|
persistence: z.ZodDefault<z.ZodEnum<["persistent", "runtime"]>>;
|
|
2065
2089
|
shared: z.ZodOptional<z.ZodBoolean>;
|
|
2066
2090
|
identity: z.ZodOptional<z.ZodBoolean>;
|
|
2091
|
+
read_policy: z.ZodOptional<z.ZodType<SExpr, z.ZodTypeDef, SExpr>>;
|
|
2092
|
+
create_policy: z.ZodOptional<z.ZodType<SExpr, z.ZodTypeDef, SExpr>>;
|
|
2093
|
+
update_policy: z.ZodOptional<z.ZodType<SExpr, z.ZodTypeDef, SExpr>>;
|
|
2094
|
+
delete_policy: z.ZodOptional<z.ZodType<SExpr, z.ZodTypeDef, SExpr>>;
|
|
2067
2095
|
collection: z.ZodOptional<z.ZodString>;
|
|
2068
2096
|
fields: z.ZodArray<z.ZodType<EntityField, z.ZodTypeDef, unknown>, "many">;
|
|
2069
2097
|
instances: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, z.ZodTypeDef, JsonValue>>, "many">>;
|
|
@@ -2103,6 +2131,10 @@ declare const EntitySchema: z.ZodObject<{
|
|
|
2103
2131
|
description?: string | undefined;
|
|
2104
2132
|
shared?: boolean | undefined;
|
|
2105
2133
|
identity?: boolean | undefined;
|
|
2134
|
+
read_policy?: SExpr | undefined;
|
|
2135
|
+
create_policy?: SExpr | undefined;
|
|
2136
|
+
update_policy?: SExpr | undefined;
|
|
2137
|
+
delete_policy?: SExpr | undefined;
|
|
2106
2138
|
collection?: string | undefined;
|
|
2107
2139
|
instances?: Record<string, JsonValue>[] | undefined;
|
|
2108
2140
|
timestamps?: boolean | undefined;
|
|
@@ -2124,6 +2156,10 @@ declare const EntitySchema: z.ZodObject<{
|
|
|
2124
2156
|
persistence?: "persistent" | "runtime" | undefined;
|
|
2125
2157
|
shared?: boolean | undefined;
|
|
2126
2158
|
identity?: boolean | undefined;
|
|
2159
|
+
read_policy?: SExpr | undefined;
|
|
2160
|
+
create_policy?: SExpr | undefined;
|
|
2161
|
+
update_policy?: SExpr | undefined;
|
|
2162
|
+
delete_policy?: SExpr | undefined;
|
|
2127
2163
|
collection?: string | undefined;
|
|
2128
2164
|
instances?: Record<string, JsonValue>[] | undefined;
|
|
2129
2165
|
timestamps?: boolean | undefined;
|
|
@@ -2254,7 +2290,7 @@ type EntityData = Record<string, EntityRow[]>;
|
|
|
2254
2290
|
*
|
|
2255
2291
|
* DO NOT EDIT MANUALLY — regenerated by almadar-pattern-sync `patterns` command.
|
|
2256
2292
|
*
|
|
2257
|
-
* Generated: 2026-07-
|
|
2293
|
+
* Generated: 2026-07-31T03:04:40.163Z
|
|
2258
2294
|
* Pattern count: 268
|
|
2259
2295
|
*/
|
|
2260
2296
|
|
|
@@ -2649,6 +2685,7 @@ interface PatternPropsMap {
|
|
|
2649
2685
|
featureClickEvent?: string | SExpr;
|
|
2650
2686
|
keyMap?: PatternPropValue | string | SExpr;
|
|
2651
2687
|
keyUpMap?: PatternPropValue | string | SExpr;
|
|
2688
|
+
children?: unknown | string | SExpr;
|
|
2652
2689
|
};
|
|
2653
2690
|
'canvas-2d': {
|
|
2654
2691
|
type: 'canvas-2d';
|
|
@@ -2672,6 +2709,7 @@ interface PatternPropsMap {
|
|
|
2672
2709
|
followTarget?: PatternPropValue | string | SExpr;
|
|
2673
2710
|
cameraPos?: PatternPropValue | string | SExpr;
|
|
2674
2711
|
bgColor?: string | SExpr;
|
|
2712
|
+
children?: unknown | string | SExpr;
|
|
2675
2713
|
};
|
|
2676
2714
|
'card': {
|
|
2677
2715
|
type: 'card';
|
|
@@ -3258,8 +3296,13 @@ interface PatternPropsMap {
|
|
|
3258
3296
|
points?: unknown[] | string | SExpr;
|
|
3259
3297
|
d?: string | SExpr;
|
|
3260
3298
|
fill?: string | SExpr;
|
|
3299
|
+
gradient?: PatternPropValue | string | SExpr;
|
|
3261
3300
|
stroke?: string | SExpr;
|
|
3262
3301
|
strokeWidth?: number | string | SExpr;
|
|
3302
|
+
rotate?: number | string | SExpr;
|
|
3303
|
+
pivot?: PatternPropValue | string | SExpr;
|
|
3304
|
+
shadow?: PatternPropValue | string | SExpr;
|
|
3305
|
+
animation?: PatternPropValue | string | SExpr;
|
|
3263
3306
|
opacity?: number | string | SExpr;
|
|
3264
3307
|
};
|
|
3265
3308
|
'draw-shape-layer': {
|
package/dist/factory/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { h as FactoryParamValue, c as FactoryConfigTier, b as FactoryConfigParam, F as FactoryCallSite, j as FactorySignature, R as RuleOverlay, p as RuleOverlayEntry, o as PresentationOverlay, T as TraitOverlay } from '../types-
|
|
2
|
-
export { a as FactoryCallSiteParams, d as FactoryEntitySignature, e as FactoryEventSignature, f as FactoryExposure, g as FactoryPageSignature, i as FactoryProvenance, k as FactorySignatureCatalog, l as FactorySignatureEntityField, m as FactoryTraitSignature, J as JsonSchema, n as JsonSchemaType, O as OwnershipOverlayEntry, P as PresentationNavItem, S as SchemaFieldType, q as TraitOverlayEntry, r as TraitOverlayListener } from '../types-
|
|
3
|
-
import { a as EntityPersistence, E as EntityField } from '../effect-
|
|
4
|
-
import { a as TraitReference } from '../trait-
|
|
1
|
+
import { h as FactoryParamValue, c as FactoryConfigTier, b as FactoryConfigParam, F as FactoryCallSite, j as FactorySignature, R as RuleOverlay, p as RuleOverlayEntry, o as PresentationOverlay, T as TraitOverlay } from '../types-ijezwoxO.js';
|
|
2
|
+
export { a as FactoryCallSiteParams, d as FactoryEntitySignature, e as FactoryEventSignature, f as FactoryExposure, g as FactoryPageSignature, i as FactoryProvenance, k as FactorySignatureCatalog, l as FactorySignatureEntityField, m as FactoryTraitSignature, J as JsonSchema, n as JsonSchemaType, O as OwnershipOverlayEntry, P as PresentationNavItem, S as SchemaFieldType, q as TraitOverlayEntry, r as TraitOverlayListener } from '../types-ijezwoxO.js';
|
|
3
|
+
import { a as EntityPersistence, E as EntityField } from '../effect-DomdqOGT.js';
|
|
4
|
+
import { a as TraitReference } from '../trait-B1oP0din.js';
|
|
5
5
|
export { J as JsonValue } from '../expression-Yf7qvvOs.js';
|
|
6
6
|
import 'zod';
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { O as OrbitalSchema, a as OrbitalDefinition } from '../schema-
|
|
2
|
-
import { h as CallSiteConfig, i as CallSiteConfigEntry, g as Trait } from '../trait-
|
|
3
|
-
import { E as EntityField, a as EntityPersistence } from '../effect-
|
|
1
|
+
import { O as OrbitalSchema, a as OrbitalDefinition } from '../schema-B2h0ZwN5.js';
|
|
2
|
+
import { h as CallSiteConfig, i as CallSiteConfigEntry, g as Trait } from '../trait-B1oP0din.js';
|
|
3
|
+
import { E as EntityField, a as EntityPersistence } from '../effect-DomdqOGT.js';
|
|
4
4
|
import { MakeTraitRefOpts } from '../builders.js';
|
|
5
5
|
import '../expression-Yf7qvvOs.js';
|
|
6
6
|
import 'zod';
|
|
@@ -326,6 +326,27 @@ z.object({
|
|
|
326
326
|
fov: z.number().optional(),
|
|
327
327
|
mode: CameraModeSchema.optional()
|
|
328
328
|
});
|
|
329
|
+
var SExprDataSchema = z.lazy(
|
|
330
|
+
() => z.union([SExprAtomSchema, z.array(SExprDataSchema)])
|
|
331
|
+
);
|
|
332
|
+
var SExprAtomSchema = z.union([
|
|
333
|
+
z.string(),
|
|
334
|
+
z.number(),
|
|
335
|
+
z.boolean(),
|
|
336
|
+
z.null(),
|
|
337
|
+
z.record(SExprDataSchema)
|
|
338
|
+
// Objects for payload data
|
|
339
|
+
]);
|
|
340
|
+
var SExprSchema = z.lazy(
|
|
341
|
+
() => z.union([
|
|
342
|
+
SExprAtomSchema,
|
|
343
|
+
z.array(z.lazy(() => SExprSchema)).min(1).refine(
|
|
344
|
+
(arr) => typeof arr[0] === "string",
|
|
345
|
+
{ message: "S-expression array must have a string operator as first element" }
|
|
346
|
+
)
|
|
347
|
+
])
|
|
348
|
+
);
|
|
349
|
+
var ExpressionSchema = SExprSchema;
|
|
329
350
|
|
|
330
351
|
// src/types/entity.ts
|
|
331
352
|
var EntityPersistenceSchema = z.enum([
|
|
@@ -341,6 +362,16 @@ var OrbitalEntitySchema = z.object({
|
|
|
341
362
|
// than rejecting them, so a Rust-only field works on the compiled path and
|
|
342
363
|
// silently vanishes on the interpreter path.
|
|
343
364
|
identity: z.boolean().optional(),
|
|
365
|
+
// Same "must stay in step with Rust serde" hazard as `identity` above —
|
|
366
|
+
// these four mirror `EntityDefinition.{read,create,update,delete}_policy`.
|
|
367
|
+
// Rust has no `rename_all` on this struct, so the wire key IS snake_case
|
|
368
|
+
// (unlike this file's other camelCase fields, which are Rust-side-absent
|
|
369
|
+
// and so never hit this cross-language constraint — see `visual_prompt`
|
|
370
|
+
// just below for the existing precedent).
|
|
371
|
+
read_policy: SExprSchema.optional(),
|
|
372
|
+
create_policy: SExprSchema.optional(),
|
|
373
|
+
update_policy: SExprSchema.optional(),
|
|
374
|
+
delete_policy: SExprSchema.optional(),
|
|
344
375
|
collection: z.string().optional(),
|
|
345
376
|
fields: z.array(EntityFieldSchema).min(1, "At least one field is required"),
|
|
346
377
|
instances: z.array(z.record(JsonValueSchema)).optional(),
|
|
@@ -354,29 +385,6 @@ var EntitySchema = OrbitalEntitySchema;
|
|
|
354
385
|
function persistenceModeAllowsOverrides(persistence) {
|
|
355
386
|
return persistence === "persistent" || persistence === void 0;
|
|
356
387
|
}
|
|
357
|
-
var SExprDataSchema = z.lazy(
|
|
358
|
-
() => z.union([SExprAtomSchema, z.array(SExprDataSchema)])
|
|
359
|
-
);
|
|
360
|
-
var SExprAtomSchema = z.union([
|
|
361
|
-
z.string(),
|
|
362
|
-
z.number(),
|
|
363
|
-
z.boolean(),
|
|
364
|
-
z.null(),
|
|
365
|
-
z.record(SExprDataSchema)
|
|
366
|
-
// Objects for payload data
|
|
367
|
-
]);
|
|
368
|
-
var SExprSchema = z.lazy(
|
|
369
|
-
() => z.union([
|
|
370
|
-
SExprAtomSchema,
|
|
371
|
-
z.array(z.lazy(() => SExprSchema)).min(1).refine(
|
|
372
|
-
(arr) => typeof arr[0] === "string",
|
|
373
|
-
{ message: "S-expression array must have a string operator as first element" }
|
|
374
|
-
)
|
|
375
|
-
])
|
|
376
|
-
);
|
|
377
|
-
var ExpressionSchema = SExprSchema;
|
|
378
|
-
|
|
379
|
-
// src/types/effect.ts
|
|
380
388
|
var UI_SLOTS = [
|
|
381
389
|
// App slots
|
|
382
390
|
"main",
|