@mobile-reality/mdma-spec 0.2.0 → 0.2.2

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.
@@ -1,3 +1,3 @@
1
1
  export declare const MDMA_LANG_TAG = "mdma";
2
- export declare const MDMA_SPEC_VERSION = "0.1.0";
2
+ export declare const MDMA_SPEC_VERSION = "0.2.0";
3
3
  //# sourceMappingURL=constants.d.ts.map
package/dist/constants.js CHANGED
@@ -1,3 +1,3 @@
1
1
  export const MDMA_LANG_TAG = 'mdma';
2
- export const MDMA_SPEC_VERSION = '0.1.0';
2
+ export const MDMA_SPEC_VERSION = '0.2.0';
3
3
  //# sourceMappingURL=constants.js.map
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export declare const FormFieldSchema: z.ZodObject<{
3
3
  name: z.ZodString;
4
- type: z.ZodEnum<["text", "number", "email", "date", "select", "checkbox", "textarea"]>;
4
+ type: z.ZodEnum<["text", "number", "email", "date", "select", "checkbox", "textarea", "file"]>;
5
5
  label: z.ZodString;
6
6
  required: z.ZodDefault<z.ZodBoolean>;
7
7
  sensitive: z.ZodDefault<z.ZodBoolean>;
@@ -37,7 +37,7 @@ export declare const FormFieldSchema: z.ZodObject<{
37
37
  }>>;
38
38
  bind: z.ZodOptional<z.ZodString>;
39
39
  }, "strip", z.ZodTypeAny, {
40
- type: "number" | "date" | "text" | "email" | "select" | "checkbox" | "textarea";
40
+ type: "number" | "date" | "text" | "email" | "select" | "checkbox" | "textarea" | "file";
41
41
  label: string;
42
42
  sensitive: boolean;
43
43
  name: string;
@@ -55,7 +55,7 @@ export declare const FormFieldSchema: z.ZodObject<{
55
55
  defaultValue?: unknown;
56
56
  bind?: string | undefined;
57
57
  }, {
58
- type: "number" | "date" | "text" | "email" | "select" | "checkbox" | "textarea";
58
+ type: "number" | "date" | "text" | "email" | "select" | "checkbox" | "textarea" | "file";
59
59
  label: string;
60
60
  name: string;
61
61
  options?: unknown;
@@ -81,7 +81,7 @@ export declare const FormComponentSchema: z.ZodObject<{
81
81
  type: z.ZodLiteral<"form">;
82
82
  fields: z.ZodArray<z.ZodObject<{
83
83
  name: z.ZodString;
84
- type: z.ZodEnum<["text", "number", "email", "date", "select", "checkbox", "textarea"]>;
84
+ type: z.ZodEnum<["text", "number", "email", "date", "select", "checkbox", "textarea", "file"]>;
85
85
  label: z.ZodString;
86
86
  required: z.ZodDefault<z.ZodBoolean>;
87
87
  sensitive: z.ZodDefault<z.ZodBoolean>;
@@ -117,7 +117,7 @@ export declare const FormComponentSchema: z.ZodObject<{
117
117
  }>>;
118
118
  bind: z.ZodOptional<z.ZodString>;
119
119
  }, "strip", z.ZodTypeAny, {
120
- type: "number" | "date" | "text" | "email" | "select" | "checkbox" | "textarea";
120
+ type: "number" | "date" | "text" | "email" | "select" | "checkbox" | "textarea" | "file";
121
121
  label: string;
122
122
  sensitive: boolean;
123
123
  name: string;
@@ -135,7 +135,7 @@ export declare const FormComponentSchema: z.ZodObject<{
135
135
  defaultValue?: unknown;
136
136
  bind?: string | undefined;
137
137
  }, {
138
- type: "number" | "date" | "text" | "email" | "select" | "checkbox" | "textarea";
138
+ type: "number" | "date" | "text" | "email" | "select" | "checkbox" | "textarea" | "file";
139
139
  label: string;
140
140
  name: string;
141
141
  options?: unknown;
@@ -158,7 +158,7 @@ export declare const FormComponentSchema: z.ZodObject<{
158
158
  disabled: string | boolean;
159
159
  visible: string | boolean;
160
160
  fields: {
161
- type: "number" | "date" | "text" | "email" | "select" | "checkbox" | "textarea";
161
+ type: "number" | "date" | "text" | "email" | "select" | "checkbox" | "textarea" | "file";
162
162
  label: string;
163
163
  sensitive: boolean;
164
164
  name: string;
@@ -183,7 +183,7 @@ export declare const FormComponentSchema: z.ZodObject<{
183
183
  type: "form";
184
184
  id: string;
185
185
  fields: {
186
- type: "number" | "date" | "text" | "email" | "select" | "checkbox" | "textarea";
186
+ type: "number" | "date" | "text" | "email" | "select" | "checkbox" | "textarea" | "file";
187
187
  label: string;
188
188
  name: string;
189
189
  options?: unknown;
@@ -3,7 +3,7 @@ import { ComponentBaseSchema } from '../component-base.js';
3
3
  import { BindingExpressionSchema } from '../binding.js';
4
4
  export const FormFieldSchema = z.object({
5
5
  name: z.string().min(1),
6
- type: z.enum(['text', 'number', 'email', 'date', 'select', 'checkbox', 'textarea']),
6
+ type: z.enum(['text', 'number', 'email', 'date', 'select', 'checkbox', 'textarea', 'file']),
7
7
  label: z.string(),
8
8
  required: z.boolean().default(false),
9
9
  sensitive: z.boolean().default(false),
@@ -1 +1 @@
1
- {"version":3,"file":"form.js","sourceRoot":"","sources":["../../../src/schemas/components/form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAExD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;IACnF,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IACpC,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IACrC,YAAY,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACpC,OAAO,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,GAAG,EAAE,EAAE;QAC5B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;YAAE,OAAO,GAAG,C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,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;SACvF,QAAQ,EAAE,CAAC;IACd,UAAU,EAAE,CAAC;SACV,MAAM,CAAC;QACN,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC9B,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC1B,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC1B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAC/B,CAAC;SACD,QAAQ,EAAE;IACb,IAAI,EAAE,uBAAuB,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CAAC,MAAM,CAAC;IAC5D,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IACvB,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACvC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;CAC3E,CAAC,CAAC"}
@@ -19,7 +19,7 @@ export declare const MdmaComponentSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
19
19
  type: z.ZodLiteral<"form">;
20
20
  fields: z.ZodArray<z.ZodObject<{
21
21
  name: z.ZodString;
22
- type: z.ZodEnum<["text", "number", "email", "date", "select", "checkbox", "textarea"]>;
22
+ type: z.ZodEnum<["text", "number", "email", "date", "select", "checkbox", "textarea", "file"]>;
23
23
  label: z.ZodString;
24
24
  required: z.ZodDefault<z.ZodBoolean>;
25
25
  sensitive: z.ZodDefault<z.ZodBoolean>;
@@ -55,7 +55,7 @@ export declare const MdmaComponentSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
55
55
  }>>;
56
56
  bind: z.ZodOptional<z.ZodString>;
57
57
  }, "strip", z.ZodTypeAny, {
58
- type: "number" | "date" | "text" | "email" | "select" | "checkbox" | "textarea";
58
+ type: "number" | "date" | "text" | "email" | "select" | "checkbox" | "textarea" | "file";
59
59
  label: string;
60
60
  sensitive: boolean;
61
61
  name: string;
@@ -73,7 +73,7 @@ export declare const MdmaComponentSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
73
73
  defaultValue?: unknown;
74
74
  bind?: string | undefined;
75
75
  }, {
76
- type: "number" | "date" | "text" | "email" | "select" | "checkbox" | "textarea";
76
+ type: "number" | "date" | "text" | "email" | "select" | "checkbox" | "textarea" | "file";
77
77
  label: string;
78
78
  name: string;
79
79
  options?: unknown;
@@ -96,7 +96,7 @@ export declare const MdmaComponentSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
96
96
  disabled: string | boolean;
97
97
  visible: string | boolean;
98
98
  fields: {
99
- type: "number" | "date" | "text" | "email" | "select" | "checkbox" | "textarea";
99
+ type: "number" | "date" | "text" | "email" | "select" | "checkbox" | "textarea" | "file";
100
100
  label: string;
101
101
  sensitive: boolean;
102
102
  name: string;
@@ -121,7 +121,7 @@ export declare const MdmaComponentSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
121
121
  type: "form";
122
122
  id: string;
123
123
  fields: {
124
- type: "number" | "date" | "text" | "email" | "select" | "checkbox" | "textarea";
124
+ type: "number" | "date" | "text" | "email" | "select" | "checkbox" | "textarea" | "file";
125
125
  label: string;
126
126
  name: string;
127
127
  options?: unknown;
package/package.json CHANGED
@@ -1,6 +1,16 @@
1
1
  {
2
2
  "name": "@mobile-reality/mdma-spec",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
+ "keywords": [
5
+ "mdma",
6
+ "markdown",
7
+ "ai",
8
+ "llm",
9
+ "interactive-document",
10
+ "schema",
11
+ "zod",
12
+ "types"
13
+ ],
4
14
  "type": "module",
5
15
  "exports": {
6
16
  ".": {