@abraca/schema 2.3.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.
Files changed (92) hide show
  1. package/dist/abracadabra-schema.cjs +853 -0
  2. package/dist/abracadabra-schema.cjs.map +1 -0
  3. package/dist/abracadabra-schema.esm.js +781 -0
  4. package/dist/abracadabra-schema.esm.js.map +1 -0
  5. package/dist/index.d.ts +2538 -0
  6. package/package.json +41 -0
  7. package/src/crdt.ts +63 -0
  8. package/src/generated/calendar.ts +35 -0
  9. package/src/generated/chart.ts +35 -0
  10. package/src/generated/checklist.ts +35 -0
  11. package/src/generated/dashboard.ts +35 -0
  12. package/src/generated/doc.ts +35 -0
  13. package/src/generated/gallery.ts +35 -0
  14. package/src/generated/graph.ts +35 -0
  15. package/src/generated/json-schema/calendar.json +140 -0
  16. package/src/generated/json-schema/chart.json +164 -0
  17. package/src/generated/json-schema/checklist.json +138 -0
  18. package/src/generated/json-schema/dashboard.json +122 -0
  19. package/src/generated/json-schema/doc.json +122 -0
  20. package/src/generated/json-schema/gallery.json +157 -0
  21. package/src/generated/json-schema/graph.json +125 -0
  22. package/src/generated/json-schema/kanban.json +145 -0
  23. package/src/generated/json-schema/map.json +125 -0
  24. package/src/generated/json-schema/outline.json +122 -0
  25. package/src/generated/json-schema/overview.json +122 -0
  26. package/src/generated/json-schema/plugin-manifest.json +221 -0
  27. package/src/generated/json-schema/prose.json +122 -0
  28. package/src/generated/json-schema/sheets.json +135 -0
  29. package/src/generated/json-schema/slides.json +129 -0
  30. package/src/generated/json-schema/table.json +136 -0
  31. package/src/generated/json-schema/timeline.json +122 -0
  32. package/src/generated/kanban.ts +35 -0
  33. package/src/generated/map.ts +35 -0
  34. package/src/generated/markdown/calendar.md +59 -0
  35. package/src/generated/markdown/chart.md +62 -0
  36. package/src/generated/markdown/checklist.md +58 -0
  37. package/src/generated/markdown/dashboard.md +56 -0
  38. package/src/generated/markdown/doc.md +56 -0
  39. package/src/generated/markdown/gallery.md +61 -0
  40. package/src/generated/markdown/graph.md +57 -0
  41. package/src/generated/markdown/kanban.md +62 -0
  42. package/src/generated/markdown/map.md +57 -0
  43. package/src/generated/markdown/outline.md +56 -0
  44. package/src/generated/markdown/overview.md +56 -0
  45. package/src/generated/markdown/prose.md +56 -0
  46. package/src/generated/markdown/sheets.md +59 -0
  47. package/src/generated/markdown/slides.md +57 -0
  48. package/src/generated/markdown/table.md +58 -0
  49. package/src/generated/markdown/timeline.md +56 -0
  50. package/src/generated/outline.ts +35 -0
  51. package/src/generated/overview.ts +35 -0
  52. package/src/generated/prose.ts +35 -0
  53. package/src/generated/rust/calendar.rs +125 -0
  54. package/src/generated/rust/chart.rs +151 -0
  55. package/src/generated/rust/checklist.rs +123 -0
  56. package/src/generated/rust/dashboard.rs +101 -0
  57. package/src/generated/rust/doc.rs +101 -0
  58. package/src/generated/rust/gallery.rs +146 -0
  59. package/src/generated/rust/graph.rs +104 -0
  60. package/src/generated/rust/kanban.rs +127 -0
  61. package/src/generated/rust/map.rs +104 -0
  62. package/src/generated/rust/outline.rs +101 -0
  63. package/src/generated/rust/overview.rs +101 -0
  64. package/src/generated/rust/prose.rs +101 -0
  65. package/src/generated/rust/sheets.rs +110 -0
  66. package/src/generated/rust/slides.rs +111 -0
  67. package/src/generated/rust/table.rs +121 -0
  68. package/src/generated/rust/timeline.rs +101 -0
  69. package/src/generated/sheets.ts +35 -0
  70. package/src/generated/slides.ts +35 -0
  71. package/src/generated/table.ts +35 -0
  72. package/src/generated/timeline.ts +35 -0
  73. package/src/index.ts +389 -0
  74. package/src/manifest/plugin-manifest.ts +212 -0
  75. package/src/query.ts +150 -0
  76. package/src/types/calendar.ts +23 -0
  77. package/src/types/chart.ts +36 -0
  78. package/src/types/checklist.ts +22 -0
  79. package/src/types/dashboard.ts +18 -0
  80. package/src/types/doc.ts +19 -0
  81. package/src/types/gallery.ts +24 -0
  82. package/src/types/graph.ts +21 -0
  83. package/src/types/kanban.ts +27 -0
  84. package/src/types/map.ts +21 -0
  85. package/src/types/outline.ts +17 -0
  86. package/src/types/overview.ts +17 -0
  87. package/src/types/prose.ts +19 -0
  88. package/src/types/sheets.ts +24 -0
  89. package/src/types/slides.ts +22 -0
  90. package/src/types/table.ts +22 -0
  91. package/src/types/timeline.ts +18 -0
  92. package/src/types/universal.ts +59 -0
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "@abraca/schema",
3
+ "version": "2.3.0",
4
+ "description": "One declaration of doc-types — generates TypeScript, JSON Schema, Rust, MCP tool, and Markdown reference output.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "dist/abracadabra-schema.cjs",
8
+ "module": "dist/abracadabra-schema.esm.js",
9
+ "types": "dist/index.d.ts",
10
+ "publishConfig": {
11
+ "access": "public"
12
+ },
13
+ "exports": {
14
+ "source": {
15
+ "import": "./src/index.ts"
16
+ },
17
+ "default": {
18
+ "import": "./dist/abracadabra-schema.esm.js",
19
+ "require": "./dist/abracadabra-schema.cjs",
20
+ "types": "./dist/index.d.ts"
21
+ }
22
+ },
23
+ "files": [
24
+ "src",
25
+ "dist"
26
+ ],
27
+ "peerDependencies": {
28
+ "yjs": "^13.6.8",
29
+ "zod": "^4.0.0"
30
+ },
31
+ "devDependencies": {
32
+ "yjs": "^13.6.8",
33
+ "zod": "^4.3.6",
34
+ "@abraca/plugin": "2.3.0"
35
+ },
36
+ "scripts": {
37
+ "test": "node --no-warnings --conditions=source --experimental-transform-types --test 'tests/*.test.ts'",
38
+ "schema:gen": "node --no-warnings --conditions=source --experimental-transform-types scripts/codegen-ts.ts && node --no-warnings --conditions=source --experimental-transform-types scripts/codegen-json-schema.ts && node --no-warnings --conditions=source --experimental-transform-types scripts/codegen-plugin-manifest-json-schema.ts && node --no-warnings --conditions=source --experimental-transform-types scripts/codegen-rust.ts && node --no-warnings --conditions=source --experimental-transform-types scripts/codegen-swift.ts && node --no-warnings --conditions=source --experimental-transform-types scripts/codegen-md.ts",
39
+ "schema:gen:check": "node --no-warnings --conditions=source --experimental-transform-types scripts/codegen-ts.ts --check && node --no-warnings --conditions=source --experimental-transform-types scripts/codegen-json-schema.ts --check && node --no-warnings --conditions=source --experimental-transform-types scripts/codegen-plugin-manifest-json-schema.ts --check && node --no-warnings --conditions=source --experimental-transform-types scripts/codegen-rust.ts --check && node --no-warnings --conditions=source --experimental-transform-types scripts/codegen-swift.ts --check && node --no-warnings --conditions=source --experimental-transform-types scripts/codegen-md.ts --check"
40
+ }
41
+ }
package/src/crdt.ts ADDED
@@ -0,0 +1,63 @@
1
+ /**
2
+ * CRDT primitive shims for the schema DSL.
3
+ *
4
+ * Y.Text / Y.Array / Y.Map cannot be expressed as plain JSON, so the
5
+ * markers below serve two roles:
6
+ *
7
+ * 1. **Type inference** — consumers writing `body: ytext()` get the
8
+ * compile-time signal that the field is a `Y.Text` instance.
9
+ * 2. **Codegen markers** — generators (TS, Rust, JSON Schema, MCP)
10
+ * read the `crdt: "ytext" | "yarray" | "ymap"` metadata to emit
11
+ * the right output (e.g. JSON Schema gets `string` for ytext;
12
+ * Rust codegen emits `yrs::TextRef`).
13
+ *
14
+ * Runtime validation against meta values is a no-op — meta is read as
15
+ * POJOs from a Y.Map, and CRDT-typed slots live in `body` / `children`,
16
+ * not in `meta`.
17
+ *
18
+ * yjs is a *peer* dep — the type-only import is erased at runtime.
19
+ */
20
+
21
+ import type * as Y from "yjs";
22
+ import { z } from "zod";
23
+
24
+ export type CrdtKind = "ytext" | "yarray" | "ymap";
25
+
26
+ export interface CrdtMeta {
27
+ readonly crdt: CrdtKind;
28
+ readonly element?: z.ZodType;
29
+ }
30
+
31
+ /** Y.Text marker. Reads as opaque CRDT — schema does not validate the contents. */
32
+ export function ytext(): z.ZodType<Y.Text> {
33
+ return z
34
+ .custom<Y.Text>(() => true)
35
+ .meta({ crdt: "ytext" } satisfies CrdtMeta);
36
+ }
37
+
38
+ /** Y.Array<T> marker. Element schema is preserved in metadata for codegen. */
39
+ export function yarray<T extends z.ZodType>(
40
+ element: T,
41
+ ): z.ZodType<Y.Array<z.infer<T>>> {
42
+ return z
43
+ .custom<Y.Array<z.infer<T>>>(() => true)
44
+ .meta({ crdt: "yarray", element } satisfies CrdtMeta);
45
+ }
46
+
47
+ /** Y.Map<T> marker. Value schema is preserved in metadata for codegen. */
48
+ export function ymap<T extends z.ZodType>(
49
+ value: T,
50
+ ): z.ZodType<Y.Map<z.infer<T>>> {
51
+ return z
52
+ .custom<Y.Map<z.infer<T>>>(() => true)
53
+ .meta({ crdt: "ymap", element: value } satisfies CrdtMeta);
54
+ }
55
+
56
+ /** Inspect a Zod schema for a CRDT marker. Returns undefined for non-CRDT schemas. */
57
+ export function crdtMetaOf(schema: z.ZodType): CrdtMeta | undefined {
58
+ const meta = schema.meta() as Partial<CrdtMeta> | undefined;
59
+ if (meta && typeof meta.crdt === "string") {
60
+ return meta as CrdtMeta;
61
+ }
62
+ return undefined;
63
+ }
@@ -0,0 +1,35 @@
1
+ /**
2
+ * AUTO-GENERATED by @abraca/schema (calendar).
3
+ *
4
+ * Source: ../types/calendar.ts
5
+ * Run `pnpm schema:gen` to regenerate. Do not edit by hand —
6
+ * CI verifies that this file matches the generator output.
7
+ */
8
+
9
+ import type * as Y from "yjs";
10
+ import type { z } from "zod";
11
+ import type { CalendarMeta } from "../types/calendar.ts";
12
+
13
+ export type DocTypeName = "calendar";
14
+
15
+ export type DocMetaMap = {
16
+ "calendar": z.infer<typeof CalendarMeta>;
17
+ };
18
+
19
+ export type DocBodyMap = {
20
+ "calendar": never;
21
+ };
22
+
23
+ export type DocChildrenMap = {
24
+ "calendar": never;
25
+ };
26
+
27
+ export interface DocOf<N extends DocTypeName> {
28
+ readonly id: string;
29
+ readonly type: N;
30
+ readonly meta: DocMetaMap[N];
31
+ readonly body: DocBodyMap[N];
32
+ readonly children: ReadonlyArray<DocOf<DocChildrenMap[N]>>;
33
+ }
34
+
35
+ export type Doc = { [N in DocTypeName]: DocOf<N> }[DocTypeName];
@@ -0,0 +1,35 @@
1
+ /**
2
+ * AUTO-GENERATED by @abraca/schema (chart).
3
+ *
4
+ * Source: ../types/chart.ts
5
+ * Run `pnpm schema:gen` to regenerate. Do not edit by hand —
6
+ * CI verifies that this file matches the generator output.
7
+ */
8
+
9
+ import type * as Y from "yjs";
10
+ import type { z } from "zod";
11
+ import type { ChartMeta } from "../types/chart.ts";
12
+
13
+ export type DocTypeName = "chart";
14
+
15
+ export type DocMetaMap = {
16
+ "chart": z.infer<typeof ChartMeta>;
17
+ };
18
+
19
+ export type DocBodyMap = {
20
+ "chart": never;
21
+ };
22
+
23
+ export type DocChildrenMap = {
24
+ "chart": never;
25
+ };
26
+
27
+ export interface DocOf<N extends DocTypeName> {
28
+ readonly id: string;
29
+ readonly type: N;
30
+ readonly meta: DocMetaMap[N];
31
+ readonly body: DocBodyMap[N];
32
+ readonly children: ReadonlyArray<DocOf<DocChildrenMap[N]>>;
33
+ }
34
+
35
+ export type Doc = { [N in DocTypeName]: DocOf<N> }[DocTypeName];
@@ -0,0 +1,35 @@
1
+ /**
2
+ * AUTO-GENERATED by @abraca/schema (checklist).
3
+ *
4
+ * Source: ../types/checklist.ts
5
+ * Run `pnpm schema:gen` to regenerate. Do not edit by hand —
6
+ * CI verifies that this file matches the generator output.
7
+ */
8
+
9
+ import type * as Y from "yjs";
10
+ import type { z } from "zod";
11
+ import type { ChecklistMeta } from "../types/checklist.ts";
12
+
13
+ export type DocTypeName = "checklist";
14
+
15
+ export type DocMetaMap = {
16
+ "checklist": z.infer<typeof ChecklistMeta>;
17
+ };
18
+
19
+ export type DocBodyMap = {
20
+ "checklist": never;
21
+ };
22
+
23
+ export type DocChildrenMap = {
24
+ "checklist": never;
25
+ };
26
+
27
+ export interface DocOf<N extends DocTypeName> {
28
+ readonly id: string;
29
+ readonly type: N;
30
+ readonly meta: DocMetaMap[N];
31
+ readonly body: DocBodyMap[N];
32
+ readonly children: ReadonlyArray<DocOf<DocChildrenMap[N]>>;
33
+ }
34
+
35
+ export type Doc = { [N in DocTypeName]: DocOf<N> }[DocTypeName];
@@ -0,0 +1,35 @@
1
+ /**
2
+ * AUTO-GENERATED by @abraca/schema (dashboard).
3
+ *
4
+ * Source: ../types/dashboard.ts
5
+ * Run `pnpm schema:gen` to regenerate. Do not edit by hand —
6
+ * CI verifies that this file matches the generator output.
7
+ */
8
+
9
+ import type * as Y from "yjs";
10
+ import type { z } from "zod";
11
+ import type { DashboardMeta } from "../types/dashboard.ts";
12
+
13
+ export type DocTypeName = "dashboard";
14
+
15
+ export type DocMetaMap = {
16
+ "dashboard": z.infer<typeof DashboardMeta>;
17
+ };
18
+
19
+ export type DocBodyMap = {
20
+ "dashboard": never;
21
+ };
22
+
23
+ export type DocChildrenMap = {
24
+ "dashboard": never;
25
+ };
26
+
27
+ export interface DocOf<N extends DocTypeName> {
28
+ readonly id: string;
29
+ readonly type: N;
30
+ readonly meta: DocMetaMap[N];
31
+ readonly body: DocBodyMap[N];
32
+ readonly children: ReadonlyArray<DocOf<DocChildrenMap[N]>>;
33
+ }
34
+
35
+ export type Doc = { [N in DocTypeName]: DocOf<N> }[DocTypeName];
@@ -0,0 +1,35 @@
1
+ /**
2
+ * AUTO-GENERATED by @abraca/schema (doc).
3
+ *
4
+ * Source: ../types/doc.ts
5
+ * Run `pnpm schema:gen` to regenerate. Do not edit by hand —
6
+ * CI verifies that this file matches the generator output.
7
+ */
8
+
9
+ import type * as Y from "yjs";
10
+ import type { z } from "zod";
11
+ import type { DocMeta } from "../types/doc.ts";
12
+
13
+ export type DocTypeName = "doc";
14
+
15
+ export type DocMetaMap = {
16
+ "doc": z.infer<typeof DocMeta>;
17
+ };
18
+
19
+ export type DocBodyMap = {
20
+ "doc": Y.Text;
21
+ };
22
+
23
+ export type DocChildrenMap = {
24
+ "doc": never;
25
+ };
26
+
27
+ export interface DocOf<N extends DocTypeName> {
28
+ readonly id: string;
29
+ readonly type: N;
30
+ readonly meta: DocMetaMap[N];
31
+ readonly body: DocBodyMap[N];
32
+ readonly children: ReadonlyArray<DocOf<DocChildrenMap[N]>>;
33
+ }
34
+
35
+ export type Doc = { [N in DocTypeName]: DocOf<N> }[DocTypeName];
@@ -0,0 +1,35 @@
1
+ /**
2
+ * AUTO-GENERATED by @abraca/schema (gallery).
3
+ *
4
+ * Source: ../types/gallery.ts
5
+ * Run `pnpm schema:gen` to regenerate. Do not edit by hand —
6
+ * CI verifies that this file matches the generator output.
7
+ */
8
+
9
+ import type * as Y from "yjs";
10
+ import type { z } from "zod";
11
+ import type { GalleryMeta } from "../types/gallery.ts";
12
+
13
+ export type DocTypeName = "gallery";
14
+
15
+ export type DocMetaMap = {
16
+ "gallery": z.infer<typeof GalleryMeta>;
17
+ };
18
+
19
+ export type DocBodyMap = {
20
+ "gallery": never;
21
+ };
22
+
23
+ export type DocChildrenMap = {
24
+ "gallery": never;
25
+ };
26
+
27
+ export interface DocOf<N extends DocTypeName> {
28
+ readonly id: string;
29
+ readonly type: N;
30
+ readonly meta: DocMetaMap[N];
31
+ readonly body: DocBodyMap[N];
32
+ readonly children: ReadonlyArray<DocOf<DocChildrenMap[N]>>;
33
+ }
34
+
35
+ export type Doc = { [N in DocTypeName]: DocOf<N> }[DocTypeName];
@@ -0,0 +1,35 @@
1
+ /**
2
+ * AUTO-GENERATED by @abraca/schema (graph).
3
+ *
4
+ * Source: ../types/graph.ts
5
+ * Run `pnpm schema:gen` to regenerate. Do not edit by hand —
6
+ * CI verifies that this file matches the generator output.
7
+ */
8
+
9
+ import type * as Y from "yjs";
10
+ import type { z } from "zod";
11
+ import type { GraphMeta } from "../types/graph.ts";
12
+
13
+ export type DocTypeName = "graph";
14
+
15
+ export type DocMetaMap = {
16
+ "graph": z.infer<typeof GraphMeta>;
17
+ };
18
+
19
+ export type DocBodyMap = {
20
+ "graph": never;
21
+ };
22
+
23
+ export type DocChildrenMap = {
24
+ "graph": never;
25
+ };
26
+
27
+ export interface DocOf<N extends DocTypeName> {
28
+ readonly id: string;
29
+ readonly type: N;
30
+ readonly meta: DocMetaMap[N];
31
+ readonly body: DocBodyMap[N];
32
+ readonly children: ReadonlyArray<DocOf<DocChildrenMap[N]>>;
33
+ }
34
+
35
+ export type Doc = { [N in DocTypeName]: DocOf<N> }[DocTypeName];
@@ -0,0 +1,140 @@
1
+ {
2
+ "$schema": "https://abraca.dev/schema/registry/v1.json",
3
+ "schemaVersion": 1,
4
+ "label": "calendar",
5
+ "types": {
6
+ "calendar": {
7
+ "version": 1,
8
+ "meta": {
9
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
10
+ "type": "object",
11
+ "properties": {
12
+ "color": {
13
+ "type": "string",
14
+ "pattern": "^#[0-9a-fA-F]{6}$"
15
+ },
16
+ "icon": {
17
+ "type": "string"
18
+ },
19
+ "datetimeStart": {
20
+ "type": "string",
21
+ "format": "date-time",
22
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
23
+ },
24
+ "datetimeEnd": {
25
+ "type": "string",
26
+ "format": "date-time",
27
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
28
+ },
29
+ "allDay": {
30
+ "type": "boolean"
31
+ },
32
+ "dateStart": {
33
+ "type": "string",
34
+ "format": "date",
35
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
36
+ },
37
+ "dateEnd": {
38
+ "type": "string",
39
+ "format": "date",
40
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
41
+ },
42
+ "timeStart": {
43
+ "type": "string",
44
+ "pattern": "^[0-2]\\d:[0-5]\\d$"
45
+ },
46
+ "timeEnd": {
47
+ "type": "string",
48
+ "pattern": "^[0-2]\\d:[0-5]\\d$"
49
+ },
50
+ "tags": {
51
+ "type": "array",
52
+ "items": {
53
+ "type": "string"
54
+ }
55
+ },
56
+ "checked": {
57
+ "type": "boolean"
58
+ },
59
+ "priority": {
60
+ "type": "integer",
61
+ "minimum": 0,
62
+ "maximum": 4
63
+ },
64
+ "status": {
65
+ "type": "string"
66
+ },
67
+ "rating": {
68
+ "type": "number",
69
+ "minimum": 0,
70
+ "maximum": 5
71
+ },
72
+ "url": {
73
+ "type": "string"
74
+ },
75
+ "email": {
76
+ "type": "string"
77
+ },
78
+ "phone": {
79
+ "type": "string"
80
+ },
81
+ "number": {
82
+ "type": "number"
83
+ },
84
+ "unit": {
85
+ "type": "string"
86
+ },
87
+ "subtitle": {
88
+ "type": "string"
89
+ },
90
+ "note": {
91
+ "type": "string"
92
+ },
93
+ "taskProgress": {
94
+ "type": "number",
95
+ "minimum": 0,
96
+ "maximum": 100
97
+ },
98
+ "assignedTo": {
99
+ "type": "string"
100
+ },
101
+ "coverUploadId": {
102
+ "type": "string"
103
+ },
104
+ "coverDocId": {
105
+ "type": "string"
106
+ },
107
+ "coverMimeType": {
108
+ "type": "string"
109
+ },
110
+ "__schemaVersion": {
111
+ "type": "integer",
112
+ "minimum": 1,
113
+ "maximum": 9007199254740991
114
+ },
115
+ "calendarWeekStart": {
116
+ "type": "string",
117
+ "enum": [
118
+ "sun",
119
+ "mon"
120
+ ]
121
+ },
122
+ "calendarView": {
123
+ "type": "string",
124
+ "enum": [
125
+ "month",
126
+ "week",
127
+ "day"
128
+ ]
129
+ },
130
+ "calendarShowWeekNumbers": {
131
+ "type": "boolean"
132
+ }
133
+ },
134
+ "additionalProperties": false
135
+ },
136
+ "body": "none",
137
+ "children": []
138
+ }
139
+ }
140
+ }
@@ -0,0 +1,164 @@
1
+ {
2
+ "$schema": "https://abraca.dev/schema/registry/v1.json",
3
+ "schemaVersion": 1,
4
+ "label": "chart",
5
+ "types": {
6
+ "chart": {
7
+ "version": 1,
8
+ "meta": {
9
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
10
+ "type": "object",
11
+ "properties": {
12
+ "color": {
13
+ "type": "string",
14
+ "pattern": "^#[0-9a-fA-F]{6}$"
15
+ },
16
+ "icon": {
17
+ "type": "string"
18
+ },
19
+ "datetimeStart": {
20
+ "type": "string",
21
+ "format": "date-time",
22
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
23
+ },
24
+ "datetimeEnd": {
25
+ "type": "string",
26
+ "format": "date-time",
27
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
28
+ },
29
+ "allDay": {
30
+ "type": "boolean"
31
+ },
32
+ "dateStart": {
33
+ "type": "string",
34
+ "format": "date",
35
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
36
+ },
37
+ "dateEnd": {
38
+ "type": "string",
39
+ "format": "date",
40
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
41
+ },
42
+ "timeStart": {
43
+ "type": "string",
44
+ "pattern": "^[0-2]\\d:[0-5]\\d$"
45
+ },
46
+ "timeEnd": {
47
+ "type": "string",
48
+ "pattern": "^[0-2]\\d:[0-5]\\d$"
49
+ },
50
+ "tags": {
51
+ "type": "array",
52
+ "items": {
53
+ "type": "string"
54
+ }
55
+ },
56
+ "checked": {
57
+ "type": "boolean"
58
+ },
59
+ "priority": {
60
+ "type": "integer",
61
+ "minimum": 0,
62
+ "maximum": 4
63
+ },
64
+ "status": {
65
+ "type": "string"
66
+ },
67
+ "rating": {
68
+ "type": "number",
69
+ "minimum": 0,
70
+ "maximum": 5
71
+ },
72
+ "url": {
73
+ "type": "string"
74
+ },
75
+ "email": {
76
+ "type": "string"
77
+ },
78
+ "phone": {
79
+ "type": "string"
80
+ },
81
+ "number": {
82
+ "type": "number"
83
+ },
84
+ "unit": {
85
+ "type": "string"
86
+ },
87
+ "subtitle": {
88
+ "type": "string"
89
+ },
90
+ "note": {
91
+ "type": "string"
92
+ },
93
+ "taskProgress": {
94
+ "type": "number",
95
+ "minimum": 0,
96
+ "maximum": 100
97
+ },
98
+ "assignedTo": {
99
+ "type": "string"
100
+ },
101
+ "coverUploadId": {
102
+ "type": "string"
103
+ },
104
+ "coverDocId": {
105
+ "type": "string"
106
+ },
107
+ "coverMimeType": {
108
+ "type": "string"
109
+ },
110
+ "__schemaVersion": {
111
+ "type": "integer",
112
+ "minimum": 1,
113
+ "maximum": 9007199254740991
114
+ },
115
+ "chartType": {
116
+ "type": "string",
117
+ "enum": [
118
+ "bar",
119
+ "stacked bar",
120
+ "line",
121
+ "donut",
122
+ "treemap"
123
+ ]
124
+ },
125
+ "chartMetric": {
126
+ "type": "string",
127
+ "enum": [
128
+ "value",
129
+ "type",
130
+ "tag",
131
+ "status",
132
+ "priority",
133
+ "activity",
134
+ "completion"
135
+ ]
136
+ },
137
+ "chartColorScheme": {
138
+ "type": "string",
139
+ "enum": [
140
+ "default",
141
+ "warm",
142
+ "cool",
143
+ "mono"
144
+ ]
145
+ },
146
+ "chartLimit": {
147
+ "type": "integer",
148
+ "minimum": 3,
149
+ "maximum": 30
150
+ },
151
+ "chartShowLegend": {
152
+ "type": "boolean"
153
+ },
154
+ "chartShowValues": {
155
+ "type": "boolean"
156
+ }
157
+ },
158
+ "additionalProperties": false
159
+ },
160
+ "body": "none",
161
+ "children": []
162
+ }
163
+ }
164
+ }