@almadar/patterns 2.6.0 → 2.6.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/dist/component-mapping.json +1 -1
- package/dist/event-contracts.json +1 -1
- package/dist/index.d.ts +27 -10
- package/dist/index.js +14 -10
- package/dist/index.js.map +1 -1
- package/dist/patterns-registry.json +11 -6
- package/dist/registry.json +11 -6
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var version$3 = "1.0.0";
|
|
2
|
-
var exportedAt$3 = "2026-03-
|
|
2
|
+
var exportedAt$3 = "2026-03-12T02:35:44.580Z";
|
|
3
3
|
var patterns = {
|
|
4
4
|
"entity-table": {
|
|
5
5
|
type: "entity-table",
|
|
@@ -14043,13 +14043,15 @@ var patterns = {
|
|
|
14043
14043
|
types: [
|
|
14044
14044
|
"unknown"
|
|
14045
14045
|
],
|
|
14046
|
-
description: "Entity data array"
|
|
14046
|
+
description: "Entity data array",
|
|
14047
|
+
required: true
|
|
14047
14048
|
},
|
|
14048
14049
|
fields: {
|
|
14049
14050
|
types: [
|
|
14050
14051
|
"unknown"
|
|
14051
14052
|
],
|
|
14052
|
-
description: "Field definitions for rendering each card"
|
|
14053
|
+
description: "Field definitions for rendering each card",
|
|
14054
|
+
required: true
|
|
14053
14055
|
},
|
|
14054
14056
|
columns: {
|
|
14055
14057
|
types: [
|
|
@@ -14164,13 +14166,15 @@ var patterns = {
|
|
|
14164
14166
|
types: [
|
|
14165
14167
|
"unknown"
|
|
14166
14168
|
],
|
|
14167
|
-
description: "Entity data array"
|
|
14169
|
+
description: "Entity data array",
|
|
14170
|
+
required: true
|
|
14168
14171
|
},
|
|
14169
14172
|
fields: {
|
|
14170
14173
|
types: [
|
|
14171
14174
|
"unknown"
|
|
14172
14175
|
],
|
|
14173
|
-
description: "Field definitions for rendering each row"
|
|
14176
|
+
description: "Field definitions for rendering each row",
|
|
14177
|
+
required: true
|
|
14174
14178
|
},
|
|
14175
14179
|
columns: {
|
|
14176
14180
|
types: [
|
|
@@ -15395,7 +15399,8 @@ var patterns = {
|
|
|
15395
15399
|
"number",
|
|
15396
15400
|
"string"
|
|
15397
15401
|
],
|
|
15398
|
-
description: "Primary value (number or formatted string)"
|
|
15402
|
+
description: "Primary value (number or formatted string)",
|
|
15403
|
+
required: true
|
|
15399
15404
|
},
|
|
15400
15405
|
max: {
|
|
15401
15406
|
types: [
|
|
@@ -17600,7 +17605,7 @@ var integratorsRegistry = {
|
|
|
17600
17605
|
};
|
|
17601
17606
|
|
|
17602
17607
|
var version$1 = "1.0.0";
|
|
17603
|
-
var exportedAt$1 = "2026-03-
|
|
17608
|
+
var exportedAt$1 = "2026-03-12T02:35:44.580Z";
|
|
17604
17609
|
var mappings = {
|
|
17605
17610
|
"page-header": {
|
|
17606
17611
|
component: "PageHeader",
|
|
@@ -18828,7 +18833,7 @@ var componentMapping = {
|
|
|
18828
18833
|
};
|
|
18829
18834
|
|
|
18830
18835
|
var version = "1.0.0";
|
|
18831
|
-
var exportedAt = "2026-03-
|
|
18836
|
+
var exportedAt = "2026-03-12T02:35:44.580Z";
|
|
18832
18837
|
var contracts = {
|
|
18833
18838
|
form: {
|
|
18834
18839
|
emits: [
|
|
@@ -32519,10 +32524,12 @@ declare const registry: {
|
|
|
32519
32524
|
entity: {
|
|
32520
32525
|
types: string[];
|
|
32521
32526
|
description: string;
|
|
32527
|
+
required: boolean;
|
|
32522
32528
|
};
|
|
32523
32529
|
fields: {
|
|
32524
32530
|
types: string[];
|
|
32525
32531
|
description: string;
|
|
32532
|
+
required: boolean;
|
|
32526
32533
|
};
|
|
32527
32534
|
columns: {
|
|
32528
32535
|
types: string[];
|
|
@@ -32600,10 +32607,12 @@ declare const registry: {
|
|
|
32600
32607
|
entity: {
|
|
32601
32608
|
types: string[];
|
|
32602
32609
|
description: string;
|
|
32610
|
+
required: boolean;
|
|
32603
32611
|
};
|
|
32604
32612
|
fields: {
|
|
32605
32613
|
types: string[];
|
|
32606
32614
|
description: string;
|
|
32615
|
+
required: boolean;
|
|
32607
32616
|
};
|
|
32608
32617
|
columns: {
|
|
32609
32618
|
types: string[];
|
|
@@ -33432,6 +33441,7 @@ declare const registry: {
|
|
|
33432
33441
|
value: {
|
|
33433
33442
|
types: string[];
|
|
33434
33443
|
description: string;
|
|
33444
|
+
required: boolean;
|
|
33435
33445
|
};
|
|
33436
33446
|
max: {
|
|
33437
33447
|
types: string[];
|
|
@@ -43884,10 +43894,12 @@ declare const PATTERN_REGISTRY: {
|
|
|
43884
43894
|
entity: {
|
|
43885
43895
|
types: string[];
|
|
43886
43896
|
description: string;
|
|
43897
|
+
required: boolean;
|
|
43887
43898
|
};
|
|
43888
43899
|
fields: {
|
|
43889
43900
|
types: string[];
|
|
43890
43901
|
description: string;
|
|
43902
|
+
required: boolean;
|
|
43891
43903
|
};
|
|
43892
43904
|
columns: {
|
|
43893
43905
|
types: string[];
|
|
@@ -43965,10 +43977,12 @@ declare const PATTERN_REGISTRY: {
|
|
|
43965
43977
|
entity: {
|
|
43966
43978
|
types: string[];
|
|
43967
43979
|
description: string;
|
|
43980
|
+
required: boolean;
|
|
43968
43981
|
};
|
|
43969
43982
|
fields: {
|
|
43970
43983
|
types: string[];
|
|
43971
43984
|
description: string;
|
|
43985
|
+
required: boolean;
|
|
43972
43986
|
};
|
|
43973
43987
|
columns: {
|
|
43974
43988
|
types: string[];
|
|
@@ -44797,6 +44811,7 @@ declare const PATTERN_REGISTRY: {
|
|
|
44797
44811
|
value: {
|
|
44798
44812
|
types: string[];
|
|
44799
44813
|
description: string;
|
|
44814
|
+
required: boolean;
|
|
44800
44815
|
};
|
|
44801
44816
|
max: {
|
|
44802
44817
|
types: string[];
|
|
@@ -48288,8 +48303,10 @@ declare function getComponentForPattern(patternType: string): string | null;
|
|
|
48288
48303
|
/**
|
|
48289
48304
|
* Check if a pattern is entity-aware (requires data injection).
|
|
48290
48305
|
*
|
|
48291
|
-
*
|
|
48292
|
-
*
|
|
48306
|
+
* A pattern is entity-aware when it declares an `entity` prop in its
|
|
48307
|
+
* propsSchema, regardless of the declared type. Display patterns like
|
|
48308
|
+
* DataGrid and Timeline declare entity as "string" or "unknown" but
|
|
48309
|
+
* still need entity data injected at runtime.
|
|
48293
48310
|
*
|
|
48294
48311
|
* @param patternType - Pattern type to check
|
|
48295
48312
|
* @returns true if the pattern is entity-aware
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/patterns-registry.json
|
|
2
2
|
var patterns_registry_default = {
|
|
3
3
|
version: "1.0.0",
|
|
4
|
-
exportedAt: "2026-03-
|
|
4
|
+
exportedAt: "2026-03-12T02:35:44.580Z",
|
|
5
5
|
patterns: {
|
|
6
6
|
"entity-table": {
|
|
7
7
|
type: "entity-table",
|
|
@@ -14045,13 +14045,15 @@ var patterns_registry_default = {
|
|
|
14045
14045
|
types: [
|
|
14046
14046
|
"unknown"
|
|
14047
14047
|
],
|
|
14048
|
-
description: "Entity data array"
|
|
14048
|
+
description: "Entity data array",
|
|
14049
|
+
required: true
|
|
14049
14050
|
},
|
|
14050
14051
|
fields: {
|
|
14051
14052
|
types: [
|
|
14052
14053
|
"unknown"
|
|
14053
14054
|
],
|
|
14054
|
-
description: "Field definitions for rendering each card"
|
|
14055
|
+
description: "Field definitions for rendering each card",
|
|
14056
|
+
required: true
|
|
14055
14057
|
},
|
|
14056
14058
|
columns: {
|
|
14057
14059
|
types: [
|
|
@@ -14166,13 +14168,15 @@ var patterns_registry_default = {
|
|
|
14166
14168
|
types: [
|
|
14167
14169
|
"unknown"
|
|
14168
14170
|
],
|
|
14169
|
-
description: "Entity data array"
|
|
14171
|
+
description: "Entity data array",
|
|
14172
|
+
required: true
|
|
14170
14173
|
},
|
|
14171
14174
|
fields: {
|
|
14172
14175
|
types: [
|
|
14173
14176
|
"unknown"
|
|
14174
14177
|
],
|
|
14175
|
-
description: "Field definitions for rendering each row"
|
|
14178
|
+
description: "Field definitions for rendering each row",
|
|
14179
|
+
required: true
|
|
14176
14180
|
},
|
|
14177
14181
|
columns: {
|
|
14178
14182
|
types: [
|
|
@@ -15397,7 +15401,8 @@ var patterns_registry_default = {
|
|
|
15397
15401
|
"number",
|
|
15398
15402
|
"string"
|
|
15399
15403
|
],
|
|
15400
|
-
description: "Primary value (number or formatted string)"
|
|
15404
|
+
description: "Primary value (number or formatted string)",
|
|
15405
|
+
required: true
|
|
15401
15406
|
},
|
|
15402
15407
|
max: {
|
|
15403
15408
|
types: [
|
|
@@ -17479,7 +17484,7 @@ var integrators_registry_default = {
|
|
|
17479
17484
|
// src/component-mapping.json
|
|
17480
17485
|
var component_mapping_default = {
|
|
17481
17486
|
version: "1.0.0",
|
|
17482
|
-
exportedAt: "2026-03-
|
|
17487
|
+
exportedAt: "2026-03-12T02:35:44.580Z",
|
|
17483
17488
|
mappings: {
|
|
17484
17489
|
"page-header": {
|
|
17485
17490
|
component: "PageHeader",
|
|
@@ -18705,7 +18710,7 @@ var component_mapping_default = {
|
|
|
18705
18710
|
// src/event-contracts.json
|
|
18706
18711
|
var event_contracts_default = {
|
|
18707
18712
|
version: "1.0.0",
|
|
18708
|
-
exportedAt: "2026-03-
|
|
18713
|
+
exportedAt: "2026-03-12T02:35:44.580Z",
|
|
18709
18714
|
contracts: {
|
|
18710
18715
|
form: {
|
|
18711
18716
|
emits: [
|
|
@@ -20284,8 +20289,7 @@ function isEntityAwarePattern(patternType) {
|
|
|
20284
20289
|
if (definition.entityAware === true) return true;
|
|
20285
20290
|
const propsSchema = definition.propsSchema;
|
|
20286
20291
|
if (!propsSchema) return false;
|
|
20287
|
-
|
|
20288
|
-
return entityTypes.includes("array") || entityTypes.includes("object");
|
|
20292
|
+
return "entity" in propsSchema;
|
|
20289
20293
|
}
|
|
20290
20294
|
|
|
20291
20295
|
export { COMPONENT_MAPPING, EVENT_CONTRACTS, INTEGRATORS_REGISTRY, PATTERN_REGISTRY, PATTERN_TYPES, buildRecommendationContext, component_mapping_default as componentMapping, event_contracts_default as eventContracts, formatRecommendationsForPrompt, generatePatternDescription, getAllPatternTypes, getComponentForPattern, getPatternActionsRef, getPatternDefinition, getPatternMetadata, getPatternPropsCompact, getPatternsGroupedByCategory, integrators_registry_default as integratorsRegistry, isEntityAwarePattern, isValidPatternType, patterns_registry_default as patternsRegistry, recommendPatterns, registry };
|