@almadar/core 10.49.0 → 10.50.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/index.d.ts +1 -1
- package/dist/index.js +26 -1
- package/dist/index.js.map +1 -1
- package/dist/patterns/index.d.ts +23 -1
- package/dist/patterns/index.js +26 -1
- package/dist/patterns/index.js.map +1 -1
- package/package.json +1 -1
package/dist/patterns/index.d.ts
CHANGED
|
@@ -101384,6 +101384,28 @@ declare function getComponentForPattern(patternType: string): string | null;
|
|
|
101384
101384
|
* @returns true if the pattern is entity-aware
|
|
101385
101385
|
*/
|
|
101386
101386
|
declare function isEntityAwarePattern(patternType: string): boolean;
|
|
101387
|
+
/**
|
|
101388
|
+
* Prop names of `patternType` whose value is a single declared event key
|
|
101389
|
+
* (`kind: "event" | "event-ref" | "callback"`) — `action`, `cancelEvent`,
|
|
101390
|
+
* `retryEvent`, `onRetry`, and every future sibling, straight from the
|
|
101391
|
+
* registry rather than a hand-maintained key list that silently drifts.
|
|
101392
|
+
*
|
|
101393
|
+
* The consumer is the wiring lint: an affordance prop bound to a lifecycle
|
|
101394
|
+
* event key is a control that does nothing when clicked.
|
|
101395
|
+
*
|
|
101396
|
+
* @param patternType - Pattern type to inspect
|
|
101397
|
+
* @returns the declared event-key prop names (empty for an unknown pattern)
|
|
101398
|
+
*/
|
|
101399
|
+
declare function eventKeyPropsOf(patternType: string): ReadonlySet<string>;
|
|
101400
|
+
/**
|
|
101401
|
+
* Prop names of `patternType` carrying `kind: "event-list"` action-descriptor
|
|
101402
|
+
* arrays, each mapped to the field inside an item that holds the event key
|
|
101403
|
+
* (`eventField`, defaulting to `"event"` per {@link PatternPropDef.eventField}).
|
|
101404
|
+
*
|
|
101405
|
+
* @param patternType - Pattern type to inspect
|
|
101406
|
+
* @returns prop name → event field (empty for an unknown pattern)
|
|
101407
|
+
*/
|
|
101408
|
+
declare function eventListPropsOf(patternType: string): ReadonlyMap<string, string>;
|
|
101387
101409
|
/**
|
|
101388
101410
|
* Check if a pattern is a neutral DRAWABLE — a descriptor the canvas draw-host
|
|
101389
101411
|
* paints (draw-sprite / draw-shape / draw-text / draw-sprite-layer /
|
|
@@ -101417,4 +101439,4 @@ declare function isDrawablePattern(patternType: string): boolean;
|
|
|
101417
101439
|
*/
|
|
101418
101440
|
declare function isDrawHostPattern(patternType: string): boolean;
|
|
101419
101441
|
|
|
101420
|
-
export { AnyPatternConfig, COMPONENT_MAPPING, EVENT_CONTRACTS, type EmojiPickPayload, type FormSubmitPayload, INTEGRATORS_REGISTRY, type ItemActionPayload, type LoadMoreRequestPayload, PATTERN_REGISTRY, type PatternCallbackArg, type PatternEntry, type PatternPayloadField, type PatternPropDef, type PatternRecommendation, type PatternSwapGate, PatternType, type PropKind, type RecommendationContext, type RenderUiPayload, type SelectionChangePayload, buildRecommendationContext, collectRenderUiPatternTypes, componentMapping, eventContracts, findCompatiblePatterns, formatRecommendationsForPrompt, generatePatternDescription, getAllPatternTypes, getComponentForPattern, getEmittedEvents, getEntityCardinality, getOrbAllowedPatterns, getOrbAllowedPatternsCompact, getOrbAllowedPatternsFiltered, getOrbAllowedPatternsSlim, getPatternActionsRef, getPatternDefinition, getPatternMetadata, getPatternPropsCompact, getPatternsGroupedByCategory, integratorsRegistry, isContentBodyPattern, isContentBodyPatternType, isDrawHostPattern, isDrawablePattern, isEntityAwarePattern, isMainSlotRenderUi, patternsRegistry, recommendPatterns, registry, renderUiPatternTypesOf };
|
|
101442
|
+
export { AnyPatternConfig, COMPONENT_MAPPING, EVENT_CONTRACTS, type EmojiPickPayload, type FormSubmitPayload, INTEGRATORS_REGISTRY, type ItemActionPayload, type LoadMoreRequestPayload, PATTERN_REGISTRY, type PatternCallbackArg, type PatternEntry, type PatternPayloadField, type PatternPropDef, type PatternRecommendation, type PatternSwapGate, PatternType, type PropKind, type RecommendationContext, type RenderUiPayload, type SelectionChangePayload, buildRecommendationContext, collectRenderUiPatternTypes, componentMapping, eventContracts, eventKeyPropsOf, eventListPropsOf, findCompatiblePatterns, formatRecommendationsForPrompt, generatePatternDescription, getAllPatternTypes, getComponentForPattern, getEmittedEvents, getEntityCardinality, getOrbAllowedPatterns, getOrbAllowedPatternsCompact, getOrbAllowedPatternsFiltered, getOrbAllowedPatternsSlim, getPatternActionsRef, getPatternDefinition, getPatternMetadata, getPatternPropsCompact, getPatternsGroupedByCategory, integratorsRegistry, isContentBodyPattern, isContentBodyPatternType, isDrawHostPattern, isDrawablePattern, isEntityAwarePattern, isMainSlotRenderUi, patternsRegistry, recommendPatterns, registry, renderUiPatternTypesOf };
|
package/dist/patterns/index.js
CHANGED
|
@@ -46651,6 +46651,31 @@ function isEntityAwarePattern(patternType) {
|
|
|
46651
46651
|
if (!propsSchema) return false;
|
|
46652
46652
|
return "entity" in propsSchema;
|
|
46653
46653
|
}
|
|
46654
|
+
var EVENT_OUTLET_KINDS = /* @__PURE__ */ new Set(["event", "event-ref", "callback"]);
|
|
46655
|
+
var eventKeyPropsCache = /* @__PURE__ */ new Map();
|
|
46656
|
+
var eventListPropsCache = /* @__PURE__ */ new Map();
|
|
46657
|
+
function eventKeyPropsOf(patternType) {
|
|
46658
|
+
const cached = eventKeyPropsCache.get(patternType);
|
|
46659
|
+
if (cached) return cached;
|
|
46660
|
+
const propsSchema = getPatternDefinition(patternType)?.propsSchema;
|
|
46661
|
+
const out = /* @__PURE__ */ new Set();
|
|
46662
|
+
for (const [prop, def] of Object.entries(propsSchema ?? {})) {
|
|
46663
|
+
if (def.kind && EVENT_OUTLET_KINDS.has(def.kind)) out.add(prop);
|
|
46664
|
+
}
|
|
46665
|
+
eventKeyPropsCache.set(patternType, out);
|
|
46666
|
+
return out;
|
|
46667
|
+
}
|
|
46668
|
+
function eventListPropsOf(patternType) {
|
|
46669
|
+
const cached = eventListPropsCache.get(patternType);
|
|
46670
|
+
if (cached) return cached;
|
|
46671
|
+
const propsSchema = getPatternDefinition(patternType)?.propsSchema;
|
|
46672
|
+
const out = /* @__PURE__ */ new Map();
|
|
46673
|
+
for (const [prop, def] of Object.entries(propsSchema ?? {})) {
|
|
46674
|
+
if (def.kind === "event-list") out.set(prop, def.eventField ?? "event");
|
|
46675
|
+
}
|
|
46676
|
+
eventListPropsCache.set(patternType, out);
|
|
46677
|
+
return out;
|
|
46678
|
+
}
|
|
46654
46679
|
function isDrawablePattern(patternType) {
|
|
46655
46680
|
const definition = getPatternDefinition(patternType);
|
|
46656
46681
|
if (!definition) return false;
|
|
@@ -46690,6 +46715,6 @@ function propHostsDrawables(schema) {
|
|
|
46690
46715
|
return false;
|
|
46691
46716
|
}
|
|
46692
46717
|
|
|
46693
|
-
export { COMPONENT_MAPPING, EVENT_CONTRACTS, INTEGRATORS_REGISTRY, PATTERN_REGISTRY, PATTERN_TYPES, buildRecommendationContext, collectRenderUiPatternTypes, component_mapping_default as componentMapping, event_contracts_default as eventContracts, findCompatiblePatterns, formatRecommendationsForPrompt, generatePatternDescription, getAllPatternTypes, getComponentForPattern, getEmittedEvents, getEntityCardinality, getOrbAllowedPatterns, getOrbAllowedPatternsCompact, getOrbAllowedPatternsFiltered, getOrbAllowedPatternsSlim, getPatternActionsRef, getPatternDefinition, getPatternMetadata, getPatternPropsCompact, getPatternsGroupedByCategory, integrators_registry_default as integratorsRegistry, isContentBodyPattern, isContentBodyPatternType, isDrawHostPattern, isDrawablePattern, isEntityAwarePattern, isMainSlotRenderUi, isValidPatternType, patterns_registry_default as patternsRegistry, recommendPatterns, registry, renderUiPatternTypesOf };
|
|
46718
|
+
export { COMPONENT_MAPPING, EVENT_CONTRACTS, INTEGRATORS_REGISTRY, PATTERN_REGISTRY, PATTERN_TYPES, buildRecommendationContext, collectRenderUiPatternTypes, component_mapping_default as componentMapping, event_contracts_default as eventContracts, eventKeyPropsOf, eventListPropsOf, findCompatiblePatterns, formatRecommendationsForPrompt, generatePatternDescription, getAllPatternTypes, getComponentForPattern, getEmittedEvents, getEntityCardinality, getOrbAllowedPatterns, getOrbAllowedPatternsCompact, getOrbAllowedPatternsFiltered, getOrbAllowedPatternsSlim, getPatternActionsRef, getPatternDefinition, getPatternMetadata, getPatternPropsCompact, getPatternsGroupedByCategory, integrators_registry_default as integratorsRegistry, isContentBodyPattern, isContentBodyPatternType, isDrawHostPattern, isDrawablePattern, isEntityAwarePattern, isMainSlotRenderUi, isValidPatternType, patterns_registry_default as patternsRegistry, recommendPatterns, registry, renderUiPatternTypesOf };
|
|
46694
46719
|
//# sourceMappingURL=index.js.map
|
|
46695
46720
|
//# sourceMappingURL=index.js.map
|