@mobile-reality/mdma-spec 0.3.0 → 0.4.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 CHANGED
@@ -1,10 +1,10 @@
1
1
  export { MDMA_LANG_TAG, MDMA_SPEC_VERSION } from './constants.js';
2
2
  export { ComponentBaseSchema } from './schemas/component-base.js';
3
3
  export { BindingExpressionSchema, bindable } from './schemas/binding.js';
4
- export { MdmaComponentSchema, FormComponentSchema, ButtonComponentSchema, TasklistComponentSchema, TableComponentSchema, CalloutComponentSchema, ApprovalGateComponentSchema, WebhookComponentSchema, ChartComponentSchema, ThinkingComponentSchema, componentSchemaRegistry, COMPONENT_TYPES, } from './schemas/components/index.js';
4
+ export { MdmaComponentSchema, FormComponentSchema, ButtonComponentSchema, TasklistComponentSchema, TableComponentSchema, CalloutComponentSchema, ApprovalGateComponentSchema, WebhookComponentSchema, ChartComponentSchema, ThinkingComponentSchema, CustomComponentSchema, componentSchemaRegistry, COMPONENT_TYPES, } from './schemas/components/index.js';
5
5
  export { EventLogEntrySchema, EventTypeSchema, EventActorSchema } from './schemas/event-log.js';
6
6
  export { PolicySchema, PolicyRuleSchema } from './schemas/policy.js';
7
7
  export { DocumentMetadataSchema } from './schemas/document.js';
8
8
  export { BlueprintManifestSchema, BlueprintMaturitySchema } from './schemas/blueprint-manifest.js';
9
- export type { MdmaBlock, MdmaRoot, StoreAction, AttachableDefinition, ComponentBase, BindingExpression, MdmaComponent, ComponentType, FormComponent, FormField, ButtonComponent, TasklistComponent, TaskItem, TableComponent, TableColumn, CalloutComponent, ApprovalGateComponent, WebhookComponent, ChartComponent, ThinkingComponent, EventLogEntry, EventType, EventActor, Policy, PolicyRule, DocumentMetadata, BlueprintManifest, BlueprintMaturity, } from './types/index.js';
9
+ export type { MdmaBlock, MdmaRoot, StoreAction, AttachableDefinition, ComponentBase, BindingExpression, MdmaComponent, ComponentType, FormComponent, FormField, ButtonComponent, TasklistComponent, TaskItem, TableComponent, TableColumn, CalloutComponent, ApprovalGateComponent, WebhookComponent, ChartComponent, ThinkingComponent, CustomComponent, EventLogEntry, EventType, EventActor, Policy, PolicyRule, DocumentMetadata, BlueprintManifest, BlueprintMaturity, } from './types/index.js';
10
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGlE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,sBAAsB,EACtB,2BAA2B,EAC3B,sBAAsB,EACtB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,eAAe,GAChB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAChG,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAGnG,YAAY,EACV,SAAS,EACT,QAAQ,EACR,WAAW,EACX,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,aAAa,EACb,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,SAAS,EACT,UAAU,EACV,MAAM,EACN,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGlE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,sBAAsB,EACtB,2BAA2B,EAC3B,sBAAsB,EACtB,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACvB,eAAe,GAChB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAChG,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAGnG,YAAY,EACV,SAAS,EACT,QAAQ,EACR,WAAW,EACX,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,aAAa,EACb,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,SAAS,EACT,UAAU,EACV,MAAM,EACN,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,kBAAkB,CAAC"}
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ export { MDMA_LANG_TAG, MDMA_SPEC_VERSION } from './constants.js';
3
3
  // Schemas
4
4
  export { ComponentBaseSchema } from './schemas/component-base.js';
5
5
  export { BindingExpressionSchema, bindable } from './schemas/binding.js';
6
- export { MdmaComponentSchema, FormComponentSchema, ButtonComponentSchema, TasklistComponentSchema, TableComponentSchema, CalloutComponentSchema, ApprovalGateComponentSchema, WebhookComponentSchema, ChartComponentSchema, ThinkingComponentSchema, componentSchemaRegistry, COMPONENT_TYPES, } from './schemas/components/index.js';
6
+ export { MdmaComponentSchema, FormComponentSchema, ButtonComponentSchema, TasklistComponentSchema, TableComponentSchema, CalloutComponentSchema, ApprovalGateComponentSchema, WebhookComponentSchema, ChartComponentSchema, ThinkingComponentSchema, CustomComponentSchema, componentSchemaRegistry, COMPONENT_TYPES, } from './schemas/components/index.js';
7
7
  export { EventLogEntrySchema, EventTypeSchema, EventActorSchema } from './schemas/event-log.js';
8
8
  export { PolicySchema, PolicyRuleSchema } from './schemas/policy.js';
9
9
  export { DocumentMetadataSchema } from './schemas/document.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY;AACZ,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAElE,UAAU;AACV,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,sBAAsB,EACtB,2BAA2B,EAC3B,sBAAsB,EACtB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,eAAe,GAChB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAChG,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY;AACZ,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAElE,UAAU;AACV,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,sBAAsB,EACtB,2BAA2B,EAC3B,sBAAsB,EACtB,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACvB,eAAe,GAChB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAChG,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC"}
@@ -0,0 +1,46 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * A host-extensible component. `custom` is a stable envelope that core always
4
+ * understands; the `name` selects which host-registered variant to render and
5
+ * validate. `props` is intentionally open so the schema stays maximally
6
+ * flexible — a host tightens it per `name` by registering a props schema (see
7
+ * the parser's `customSchemas`), and describes it to the model via the prompt
8
+ * catalog. Presentation lives entirely in the host renderer, never here.
9
+ */
10
+ export declare const CustomComponentSchema: z.ZodObject<{
11
+ id: z.ZodString;
12
+ label: z.ZodOptional<z.ZodString>;
13
+ sensitive: z.ZodDefault<z.ZodBoolean>;
14
+ disabled: z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodString]>>;
15
+ visible: z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodString]>>;
16
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
17
+ } & {
18
+ type: z.ZodLiteral<"custom">;
19
+ name: z.ZodString;
20
+ props: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
21
+ actions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
22
+ }, "strip", z.ZodTypeAny, {
23
+ type: "custom";
24
+ id: string;
25
+ sensitive: boolean;
26
+ disabled: string | boolean;
27
+ visible: string | boolean;
28
+ name: string;
29
+ props: Record<string, unknown>;
30
+ label?: string | undefined;
31
+ meta?: Record<string, unknown> | undefined;
32
+ actions?: Record<string, string> | undefined;
33
+ }, {
34
+ type: "custom";
35
+ id: string;
36
+ name: string;
37
+ label?: string | undefined;
38
+ sensitive?: boolean | undefined;
39
+ disabled?: string | boolean | undefined;
40
+ visible?: string | boolean | undefined;
41
+ meta?: Record<string, unknown> | undefined;
42
+ props?: Record<string, unknown> | undefined;
43
+ actions?: Record<string, string> | undefined;
44
+ }>;
45
+ export type CustomComponent = z.infer<typeof CustomComponentSchema>;
46
+ //# sourceMappingURL=custom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom.d.ts","sourceRoot":"","sources":["../../../src/schemas/components/custom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod';
2
+ import { ComponentBaseSchema } from '../component-base.js';
3
+ /**
4
+ * A host-extensible component. `custom` is a stable envelope that core always
5
+ * understands; the `name` selects which host-registered variant to render and
6
+ * validate. `props` is intentionally open so the schema stays maximally
7
+ * flexible — a host tightens it per `name` by registering a props schema (see
8
+ * the parser's `customSchemas`), and describes it to the model via the prompt
9
+ * catalog. Presentation lives entirely in the host renderer, never here.
10
+ */
11
+ export const CustomComponentSchema = ComponentBaseSchema.extend({
12
+ type: z.literal('custom'),
13
+ name: z.string().min(1).describe('Registered custom component variant, e.g. "signature-pad"'),
14
+ props: z
15
+ .record(z.unknown())
16
+ .default({})
17
+ .describe('Intent payload for the variant; validated per `name` by the host'),
18
+ actions: z
19
+ .record(z.string())
20
+ .optional()
21
+ .describe('Maps a variant event (e.g. "onCapture") to an action label'),
22
+ });
23
+ //# sourceMappingURL=custom.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom.js","sourceRoot":"","sources":["../../../src/schemas/components/custom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,mBAAmB,CAAC,MAAM,CAAC;IAC9D,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;IACzB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,2DAA2D,CAAC;IAC7F,KAAK,EAAE,CAAC;SACL,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;SACnB,OAAO,CAAC,EAAE,CAAC;SACX,QAAQ,CAAC,kEAAkE,CAAC;IAC/E,OAAO,EAAE,CAAC;SACP,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;SAClB,QAAQ,EAAE;SACV,QAAQ,CAAC,4DAA4D,CAAC;CAC1E,CAAC,CAAC"}
@@ -8,6 +8,7 @@ export { ApprovalGateComponentSchema, type ApprovalGateComponent, } from './appr
8
8
  export { WebhookComponentSchema, type WebhookComponent } from './webhook.js';
9
9
  export { ChartComponentSchema, type ChartComponent } from './chart.js';
10
10
  export { ThinkingComponentSchema, type ThinkingComponent } from './thinking.js';
11
+ export { CustomComponentSchema, type CustomComponent } from './custom.js';
11
12
  export declare const MdmaComponentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
12
13
  id: z.ZodString;
13
14
  label: z.ZodOptional<z.ZodString>;
@@ -550,9 +551,43 @@ export declare const MdmaComponentSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
550
551
  visible?: string | boolean | undefined;
551
552
  meta?: Record<string, unknown> | undefined;
552
553
  collapsed?: boolean | undefined;
554
+ }>, z.ZodObject<{
555
+ id: z.ZodString;
556
+ label: z.ZodOptional<z.ZodString>;
557
+ sensitive: z.ZodDefault<z.ZodBoolean>;
558
+ disabled: z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodString]>>;
559
+ visible: z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodString]>>;
560
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
561
+ } & {
562
+ type: z.ZodLiteral<"custom">;
563
+ name: z.ZodString;
564
+ props: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
565
+ actions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
566
+ }, "strip", z.ZodTypeAny, {
567
+ type: "custom";
568
+ id: string;
569
+ sensitive: boolean;
570
+ disabled: string | boolean;
571
+ visible: string | boolean;
572
+ name: string;
573
+ props: Record<string, unknown>;
574
+ label?: string | undefined;
575
+ meta?: Record<string, unknown> | undefined;
576
+ actions?: Record<string, string> | undefined;
577
+ }, {
578
+ type: "custom";
579
+ id: string;
580
+ name: string;
581
+ label?: string | undefined;
582
+ sensitive?: boolean | undefined;
583
+ disabled?: string | boolean | undefined;
584
+ visible?: string | boolean | undefined;
585
+ meta?: Record<string, unknown> | undefined;
586
+ props?: Record<string, unknown> | undefined;
587
+ actions?: Record<string, string> | undefined;
553
588
  }>]>;
554
589
  export type MdmaComponent = z.infer<typeof MdmaComponentSchema>;
555
- export declare const COMPONENT_TYPES: readonly ["form", "button", "tasklist", "table", "callout", "approval-gate", "webhook", "chart", "thinking"];
590
+ export declare const COMPONENT_TYPES: readonly ["form", "button", "tasklist", "table", "callout", "approval-gate", "webhook", "chart", "thinking", "custom"];
556
591
  export type ComponentType = (typeof COMPONENT_TYPES)[number];
557
592
  /** Registry mapping component type names to their Zod schemas */
558
593
  export declare const componentSchemaRegistry: Map<string, z.ZodType<any, z.ZodTypeDef, any>>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/schemas/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,OAAO,EAAE,mBAAmB,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EACL,uBAAuB,EACvB,KAAK,iBAAiB,EACtB,KAAK,QAAQ,GACd,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,oBAAoB,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AACzF,OAAO,EAAE,sBAAsB,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EACL,2BAA2B,EAC3B,KAAK,qBAAqB,GAC3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,E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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAW9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,eAAe,wHAWlB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D,iEAAiE;AACjE,eAAO,MAAM,uBAAuB,gDAWlC,CAAC"}
@@ -8,6 +8,7 @@ import { ApprovalGateComponentSchema } from './approval-gate.js';
8
8
  import { WebhookComponentSchema } from './webhook.js';
9
9
  import { ChartComponentSchema } from './chart.js';
10
10
  import { ThinkingComponentSchema } from './thinking.js';
11
+ import { CustomComponentSchema } from './custom.js';
11
12
  export { FormComponentSchema } from './form.js';
12
13
  export { ButtonComponentSchema } from './button.js';
13
14
  export { TasklistComponentSchema, } from './tasklist.js';
@@ -17,6 +18,7 @@ export { ApprovalGateComponentSchema, } from './approval-gate.js';
17
18
  export { WebhookComponentSchema } from './webhook.js';
18
19
  export { ChartComponentSchema } from './chart.js';
19
20
  export { ThinkingComponentSchema } from './thinking.js';
21
+ export { CustomComponentSchema } from './custom.js';
20
22
  export const MdmaComponentSchema = z.discriminatedUnion('type', [
21
23
  FormComponentSchema,
22
24
  ButtonComponentSchema,
@@ -27,6 +29,7 @@ export const MdmaComponentSchema = z.discriminatedUnion('type', [
27
29
  WebhookComponentSchema,
28
30
  ChartComponentSchema,
29
31
  ThinkingComponentSchema,
32
+ CustomComponentSchema,
30
33
  ]);
31
34
  export const COMPONENT_TYPES = [
32
35
  'form',
@@ -38,6 +41,7 @@ export const COMPONENT_TYPES = [
38
41
  'webhook',
39
42
  'chart',
40
43
  'thinking',
44
+ 'custom',
41
45
  ];
42
46
  /** Registry mapping component type names to their Zod schemas */
43
47
  export const componentSchemaRegistry = new Map([
@@ -50,5 +54,6 @@ export const componentSchemaRegistry = new Map([
50
54
  ['webhook', WebhookComponentSchema],
51
55
  ['chart', ChartComponentSchema],
52
56
  ['thinking', ThinkingComponentSchema],
57
+ ['custom', CustomComponentSchema],
53
58
  ]);
54
59
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schemas/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAExD,OAAO,EAAE,mBAAmB,EAAsC,MAAM,WAAW,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAwB,MAAM,aAAa,CAAC;AAC1E,OAAO,EACL,uBAAuB,GAGxB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,oBAAoB,EAAyC,MAAM,YAAY,CAAC;AACzF,OAAO,EAAE,sBAAsB,EAAyB,MAAM,cAAc,CAAC;AAC7E,OAAO,EACL,2BAA2B,GAE5B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EA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AAO;IACP,UAAU;IACV,QAAQ;CACA,CAAC;AAIX,iEAAiE;AACjE,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,GAAG,CAAoB;IAChE,CAAC,MAAM,EAAE,mBAAmB,CAAC;IAC7B,CAAC,QAAQ,EAAE,qBAAqB,CAAC;IACjC,CAAC,UAAU,EAAE,uBAAuB,CAAC;IACrC,CAAC,OAAO,EAAE,oBAAoB,CAAC;IAC/B,CAAC,SAAS,EAAE,sBAAsB,CAAC;IACnC,CAAC,eAAe,EAAE,2BAA2B,CAAC;IAC9C,CAAC,SAAS,EAAE,sBAAsB,CAAC;IACnC,CAAC,OAAO,EAAE,oBAAoB,CAAC;IAC/B,CAAC,UAAU,EAAE,uBAAuB,CAAC;IACrC,CAAC,QAAQ,EAAE,qBAAqB,CAAC;CAClC,CAAC,CAAC"}
@@ -3,7 +3,7 @@ export type { StoreAction } from './events.js';
3
3
  export type { AttachableDefinition } from './attachable.js';
4
4
  export type { ComponentBase } from '../schemas/component-base.js';
5
5
  export type { BindingExpression } from '../schemas/binding.js';
6
- export type { MdmaComponent, ComponentType, FormComponent, FormField, ButtonComponent, TasklistComponent, TaskItem, TableComponent, TableColumn, CalloutComponent, ApprovalGateComponent, WebhookComponent, ChartComponent, ThinkingComponent, } from '../schemas/components/index.js';
6
+ export type { MdmaComponent, ComponentType, FormComponent, FormField, ButtonComponent, TasklistComponent, TaskItem, TableComponent, TableColumn, CalloutComponent, ApprovalGateComponent, WebhookComponent, ChartComponent, ThinkingComponent, CustomComponent, } from '../schemas/components/index.js';
7
7
  export type { EventLogEntry, EventType, EventActor } from '../schemas/event-log.js';
8
8
  export type { Policy, PolicyRule } from '../schemas/policy.js';
9
9
  export type { DocumentMetadata } from '../schemas/document.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACp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AACxC,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACpF,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC/D,YAAY,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,YAAY,EACV,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,kCAAkC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mobile-reality/mdma-spec",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "keywords": [
5
5
  "mdma",
6
6
  "markdown",
@@ -12,10 +12,14 @@
12
12
  "types"
13
13
  ],
14
14
  "type": "module",
15
+ "main": "./dist/index.js",
16
+ "module": "./dist/index.js",
17
+ "react-native": "./dist/index.js",
18
+ "types": "./dist/index.d.ts",
15
19
  "exports": {
16
20
  ".": {
17
- "import": "./dist/index.js",
18
21
  "types": "./dist/index.d.ts",
22
+ "import": "./dist/index.js",
19
23
  "default": "./dist/index.js"
20
24
  },
21
25
  "./schemas/*": {