@almadar/patterns 2.11.0 → 2.12.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.
@@ -7,13 +7,11 @@
7
7
  * @packageDocumentation
8
8
  */
9
9
  import type { PatternType } from '../pattern-types.js';
10
+ import type { PatternPropDef } from '../types.js';
10
11
  type PatternEntry = {
11
12
  category?: string;
12
13
  description?: string;
13
- propsSchema?: Record<string, {
14
- types?: string[];
15
- required?: boolean;
16
- }>;
14
+ propsSchema?: Record<string, PatternPropDef>;
17
15
  entityAware?: boolean;
18
16
  };
19
17
  /**
package/dist/index.d.ts CHANGED
@@ -34108,16 +34108,15 @@ export declare const EVENT_CONTRACTS: {
34108
34108
  };
34109
34109
  };
34110
34110
  };
34111
+ import type { PatternPropDef } from './types.js';
34112
+ export type { PatternPropDef } from './types.js';
34111
34113
  type PatternEntry = {
34112
34114
  type: string;
34113
34115
  category: string;
34114
34116
  description?: string;
34115
34117
  suggestedFor?: string[];
34116
34118
  typicalSize?: string;
34117
- propsSchema?: Record<string, {
34118
- types?: string[];
34119
- required?: boolean;
34120
- }>;
34119
+ propsSchema?: Record<string, PatternPropDef>;
34121
34120
  entityAware?: boolean;
34122
34121
  };
34123
34122
  export declare function getPatternDefinition(patternType: string): PatternEntry | null;
package/dist/index.js CHANGED
@@ -27169,7 +27169,8 @@ function getPatternDefinition(patternType) {
27169
27169
  return patterns_registry_default.patterns?.[patternType] ?? null;
27170
27170
  }
27171
27171
  function getComponentForPattern(patternType) {
27172
- return component_mapping_default.mappings?.[patternType] ?? null;
27172
+ const mapping = component_mapping_default;
27173
+ return mapping.mappings?.[patternType]?.component ?? null;
27173
27174
  }
27174
27175
  function isEntityAwarePattern(patternType) {
27175
27176
  const definition = getPatternDefinition(patternType);