@almadar/patterns 2.6.1 → 2.6.3
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/index.d.ts +4 -2
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -48303,8 +48303,10 @@ declare function getComponentForPattern(patternType: string): string | null;
|
|
|
48303
48303
|
/**
|
|
48304
48304
|
* Check if a pattern is entity-aware (requires data injection).
|
|
48305
48305
|
*
|
|
48306
|
-
*
|
|
48307
|
-
*
|
|
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.
|
|
48308
48310
|
*
|
|
48309
48311
|
* @param patternType - Pattern type to check
|
|
48310
48312
|
* @returns true if the pattern is entity-aware
|
package/dist/index.js
CHANGED
|
@@ -20289,8 +20289,7 @@ function isEntityAwarePattern(patternType) {
|
|
|
20289
20289
|
if (definition.entityAware === true) return true;
|
|
20290
20290
|
const propsSchema = definition.propsSchema;
|
|
20291
20291
|
if (!propsSchema) return false;
|
|
20292
|
-
|
|
20293
|
-
return entityTypes.includes("array") || entityTypes.includes("object");
|
|
20292
|
+
return "entity" in propsSchema;
|
|
20294
20293
|
}
|
|
20295
20294
|
|
|
20296
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 };
|