@ai-matrx/content-ir 0.19.28 → 0.20.1
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/CHANGELOG.md +28 -0
- package/dist/convert.cjs.map +1 -1
- package/dist/convert.js.map +1 -1
- package/dist/core.cjs.map +1 -1
- package/dist/core.js.map +1 -1
- package/dist/directives.cjs +14 -3
- package/dist/directives.cjs.map +1 -1
- package/dist/directives.js +14 -3
- package/dist/directives.js.map +1 -1
- package/dist/index.cjs +14 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +14 -3
- package/dist/index.js.map +1 -1
- package/dist/registry.d.cts +26 -2
- package/dist/registry.d.ts +26 -2
- package/dist/text-case.cjs +14 -3
- package/dist/text-case.cjs.map +1 -1
- package/dist/text-case.d.cts +13 -7
- package/dist/text-case.d.ts +13 -7
- package/dist/text-case.js +14 -3
- package/dist/text-case.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -3,7 +3,7 @@ export { I as IrTree, a as IrTreeNode, J as JsonPath, K as KindStreamEvent, b as
|
|
|
3
3
|
export { CompleteValueEnvelopeOptions, CompliantKindSnapshot, ContentRegionInit, Fingerprinter, IR_ENVELOPE_CACHE_VERSION, InboundEnvelopeHooks, InboundEnvelopeVerdict, IrEnvelopeCache, JSON_DISCRIMINATOR, JsonStreamTokenizer, JsonToken, KindResolution, NormalizeJsonRegionOptions, Punct, RegionEndReason, RegionFormat, RegionSourceKind, SchemaLayoutMode, buildCompliantKindSnapshot, classifyInboundEnvelopeMetadata, createFingerprinter, emptyValueForFieldSchema, envelopeCacheFromEnvelopes, envelopeFromCompleteValue, fenceDiscriminator, fingerprintText, formatBlockLabel, isCanonicalBlockIR, isIrEnvelopeCache, mergeResidueIntoValue, normalizeJsonRegion, readEnvelope, reconstructRegionValue, reuseEnvelopeIfCurrent, sanitizeInboundEnvelopeMetadata, schemaLayoutMode, schemaStructureDepth, stripKindDeep, xmlDiscriminator } from './core.cjs';
|
|
4
4
|
export { A as ArrayItemScalarType, F as FieldSchema, K as KIND_KEY, a as KindSchema, R as RecordValueType, S as ScalarFieldType, i as isJsonAnyField, b as isScalarArrayType, r as readObjectKind, s as scalarArrayItemType } from './kind-schema.types-CwncWj9U.cjs';
|
|
5
5
|
export { ParseSession, ParseSessionOptions, disposeParseSession, getParseSession, openParseSession } from './session.cjs';
|
|
6
|
-
export { DualGateDefinition, DualGateInput, DualGateResolvedComponent, DualGateResult, Json, KindBlockProps, KindDefinition, KindEdgeSpec, KindStorageError, KindStorageShape, KindTier, KindValidationResult, KindValidator, KindValidatorOptions, LegResult, ROOT_STORAGE_NAME, SchemaSourcePort, SchemaUnavailableReason, StoredFieldElement, createKindValidator, describeDualGateFailure, kindSchemaToStorage, runKindDualGate, storageToKindSchema, validateStructuralLeg } from './registry.cjs';
|
|
6
|
+
export { DualGateDefinition, DualGateInput, DualGateResolvedComponent, DualGateResult, Json, KindBlockProps, KindDefinition, KindEdgeSpec, KindStorageError, KindStorageShape, KindTier, KindValidationResult, KindValidator, KindValidatorOptions, LegResult, ROOT_STORAGE_NAME, SchemaSourcePort, SchemaUnavailableReason, StoredFieldElement, TableKindFacet, createKindValidator, describeDualGateFailure, kindSchemaToStorage, runKindDualGate, storageToKindSchema, validateStructuralLeg } from './registry.cjs';
|
|
7
7
|
export { ArrayItemKindBinding, BlockSchemaDraft, CONTROL_KEYS, CONTROL_KEY_FIELDS, ControlKey, ControlKeysMode, ConversionProblem, DroppedMetadata, FieldComparison, ItemKindRefCheck, JsonSchemaNode, KindJsonSchemaExport, KindJsonSchemaOptions, KindSchemaFromJsonOptions, KindSchemaFromJsonResult, RECORD_DISPOSITION, SavePlanEntry, SavePlanValidation, SchemaConversionResult, WithControlKeysOptions, buildAgentSchemaWithRenderBlockSupport, collectReferencedKinds, collectSchemaReferencedKinds, compareWithExistingKindSchema, controlKeysApplyTo, convertAiSchemaToBlockFields, fieldsToDbPayload, injectKindIntoObjectSchema, isDuplicateBlockSlug, kindSchemaFromJsonSchema, kindSchemaToJsonSchema, normalizeAiSchemaInput, runSchemaConversion, stripControlKeys, validateBlockSchemaSavePlan, withControlKeyFields, withControlKeys } from './convert.cjs';
|
|
8
8
|
export { AnyPartialKindEvent, IR_PARTIAL_KEY, KindVerdict, NODE_OUTCOME_KIND, NodeOutcomeWrapper, PartialKindEvent, PartialKindNode, PartialKindState, RUN_RESULT_KIND, RetractedKindEvent, RunResultWrapper, SupersededKindEvent, advancePartialKind, emitPayloadFence, emitPayloadJson, isProvisionalKind, isTerminalKindEvent, kindVerdictOf, makePartialKindStalenessGate, readNodeOutcomeValue, readOutputRef, readPartialKindEvent, readRunResultValue, rehydrateNodeOutcome, rehydrateRunResult, sanitizeInboundPartialKindMetadata, withRootKind } from './wire.cjs';
|
|
9
9
|
export { ACTION_BY_CLASS, CAPABILITY_BY_CLASS, CLASSES, DIRECTIVE_VERSION, DecodedDirective, DirectiveCapability, DirectiveClass, DirectiveDecodeError, DirectiveDisplay, DirectiveItemKindLookup, DirectiveItemsEdge, DirectiveNounCatalog, DirectiveNounEntry, DirectiveSlug, IN_CONTENT_CLASSES, ItemFact, KindDirectiveShell, RESERVED_PREFIX, SIDE_EFFECT_CLASSES, SLUG_PREFIX, asKindInstance, buildDirectiveSlug, buildKindDirective, capabilityOf, decodeDirective, directiveDisplay, directiveItemKindFromEdges, directiveSlugOf, executesAtOutputRoot, isDirectiveClass, isKindDirective, isLegacyShell, isReservedDirectiveSlug, itemFacts, itemSubtitle, itemTitle, legacyShellUses, looksLikeDirectiveHead, nounFamily, nounLabel, nounTitleColumn, parseDirectiveSlug, resetLegacyShellUses, resolvesInContent, titleCaseToken, tryDecodeDirective, tryDecodeDirectiveContent } from './directives.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { I as IrTree, a as IrTreeNode, J as JsonPath, K as KindStreamEvent, b as
|
|
|
3
3
|
export { CompleteValueEnvelopeOptions, CompliantKindSnapshot, ContentRegionInit, Fingerprinter, IR_ENVELOPE_CACHE_VERSION, InboundEnvelopeHooks, InboundEnvelopeVerdict, IrEnvelopeCache, JSON_DISCRIMINATOR, JsonStreamTokenizer, JsonToken, KindResolution, NormalizeJsonRegionOptions, Punct, RegionEndReason, RegionFormat, RegionSourceKind, SchemaLayoutMode, buildCompliantKindSnapshot, classifyInboundEnvelopeMetadata, createFingerprinter, emptyValueForFieldSchema, envelopeCacheFromEnvelopes, envelopeFromCompleteValue, fenceDiscriminator, fingerprintText, formatBlockLabel, isCanonicalBlockIR, isIrEnvelopeCache, mergeResidueIntoValue, normalizeJsonRegion, readEnvelope, reconstructRegionValue, reuseEnvelopeIfCurrent, sanitizeInboundEnvelopeMetadata, schemaLayoutMode, schemaStructureDepth, stripKindDeep, xmlDiscriminator } from './core.js';
|
|
4
4
|
export { A as ArrayItemScalarType, F as FieldSchema, K as KIND_KEY, a as KindSchema, R as RecordValueType, S as ScalarFieldType, i as isJsonAnyField, b as isScalarArrayType, r as readObjectKind, s as scalarArrayItemType } from './kind-schema.types-CwncWj9U.js';
|
|
5
5
|
export { ParseSession, ParseSessionOptions, disposeParseSession, getParseSession, openParseSession } from './session.js';
|
|
6
|
-
export { DualGateDefinition, DualGateInput, DualGateResolvedComponent, DualGateResult, Json, KindBlockProps, KindDefinition, KindEdgeSpec, KindStorageError, KindStorageShape, KindTier, KindValidationResult, KindValidator, KindValidatorOptions, LegResult, ROOT_STORAGE_NAME, SchemaSourcePort, SchemaUnavailableReason, StoredFieldElement, createKindValidator, describeDualGateFailure, kindSchemaToStorage, runKindDualGate, storageToKindSchema, validateStructuralLeg } from './registry.js';
|
|
6
|
+
export { DualGateDefinition, DualGateInput, DualGateResolvedComponent, DualGateResult, Json, KindBlockProps, KindDefinition, KindEdgeSpec, KindStorageError, KindStorageShape, KindTier, KindValidationResult, KindValidator, KindValidatorOptions, LegResult, ROOT_STORAGE_NAME, SchemaSourcePort, SchemaUnavailableReason, StoredFieldElement, TableKindFacet, createKindValidator, describeDualGateFailure, kindSchemaToStorage, runKindDualGate, storageToKindSchema, validateStructuralLeg } from './registry.js';
|
|
7
7
|
export { ArrayItemKindBinding, BlockSchemaDraft, CONTROL_KEYS, CONTROL_KEY_FIELDS, ControlKey, ControlKeysMode, ConversionProblem, DroppedMetadata, FieldComparison, ItemKindRefCheck, JsonSchemaNode, KindJsonSchemaExport, KindJsonSchemaOptions, KindSchemaFromJsonOptions, KindSchemaFromJsonResult, RECORD_DISPOSITION, SavePlanEntry, SavePlanValidation, SchemaConversionResult, WithControlKeysOptions, buildAgentSchemaWithRenderBlockSupport, collectReferencedKinds, collectSchemaReferencedKinds, compareWithExistingKindSchema, controlKeysApplyTo, convertAiSchemaToBlockFields, fieldsToDbPayload, injectKindIntoObjectSchema, isDuplicateBlockSlug, kindSchemaFromJsonSchema, kindSchemaToJsonSchema, normalizeAiSchemaInput, runSchemaConversion, stripControlKeys, validateBlockSchemaSavePlan, withControlKeyFields, withControlKeys } from './convert.js';
|
|
8
8
|
export { AnyPartialKindEvent, IR_PARTIAL_KEY, KindVerdict, NODE_OUTCOME_KIND, NodeOutcomeWrapper, PartialKindEvent, PartialKindNode, PartialKindState, RUN_RESULT_KIND, RetractedKindEvent, RunResultWrapper, SupersededKindEvent, advancePartialKind, emitPayloadFence, emitPayloadJson, isProvisionalKind, isTerminalKindEvent, kindVerdictOf, makePartialKindStalenessGate, readNodeOutcomeValue, readOutputRef, readPartialKindEvent, readRunResultValue, rehydrateNodeOutcome, rehydrateRunResult, sanitizeInboundPartialKindMetadata, withRootKind } from './wire.js';
|
|
9
9
|
export { ACTION_BY_CLASS, CAPABILITY_BY_CLASS, CLASSES, DIRECTIVE_VERSION, DecodedDirective, DirectiveCapability, DirectiveClass, DirectiveDecodeError, DirectiveDisplay, DirectiveItemKindLookup, DirectiveItemsEdge, DirectiveNounCatalog, DirectiveNounEntry, DirectiveSlug, IN_CONTENT_CLASSES, ItemFact, KindDirectiveShell, RESERVED_PREFIX, SIDE_EFFECT_CLASSES, SLUG_PREFIX, asKindInstance, buildDirectiveSlug, buildKindDirective, capabilityOf, decodeDirective, directiveDisplay, directiveItemKindFromEdges, directiveSlugOf, executesAtOutputRoot, isDirectiveClass, isKindDirective, isLegacyShell, isReservedDirectiveSlug, itemFacts, itemSubtitle, itemTitle, legacyShellUses, looksLikeDirectiveHead, nounFamily, nounLabel, nounTitleColumn, parseDirectiveSlug, resetLegacyShellUses, resolvesInContent, titleCaseToken, tryDecodeDirective, tryDecodeDirectiveContent } from './directives.js';
|
package/dist/index.js
CHANGED
|
@@ -2409,9 +2409,20 @@ var IDENTIFIER_ACRONYMS = [
|
|
|
2409
2409
|
];
|
|
2410
2410
|
var IDENTIFIER_ACRONYM_SET = new Set(IDENTIFIER_ACRONYMS.map((a) => a.toLowerCase()));
|
|
2411
2411
|
function humanizeIdentifier(identifier) {
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2412
|
+
const text = (identifier ?? "").trim();
|
|
2413
|
+
if (text === "") return "";
|
|
2414
|
+
if (!text.includes("_") && /\s/.test(text)) {
|
|
2415
|
+
return /^\p{Ll}/u.test(text) ? text.charAt(0).toUpperCase() + text.slice(1) : text;
|
|
2416
|
+
}
|
|
2417
|
+
return text.replace(/([a-z\d])([A-Z])/g, "$1 $2").replace(/([A-Z]+)(?![A-Z]s(?![a-z]))([A-Z][a-z])/g, "$1 $2").split(/[_\-.\s]+/).filter((part) => part.length > 0).map(identifierWord).join(" ");
|
|
2418
|
+
}
|
|
2419
|
+
function identifierWord(part) {
|
|
2420
|
+
const lower = part.toLowerCase();
|
|
2421
|
+
if (IDENTIFIER_ACRONYM_SET.has(lower)) return part.toUpperCase();
|
|
2422
|
+
if (lower.length > 1 && lower.endsWith("s") && IDENTIFIER_ACRONYM_SET.has(lower.slice(0, -1))) {
|
|
2423
|
+
return `${lower.slice(0, -1).toUpperCase()}s`;
|
|
2424
|
+
}
|
|
2425
|
+
return part.charAt(0).toUpperCase() + part.slice(1).toLowerCase();
|
|
2415
2426
|
}
|
|
2416
2427
|
|
|
2417
2428
|
// core/schema-structure.ts
|