forma-diagrams 0.5.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.
Files changed (109) hide show
  1. package/Dockerfile +16 -0
  2. package/LICENSE +21 -0
  3. package/README.md +113 -0
  4. package/THIRD_PARTY_NOTICES.md +20 -0
  5. package/bin/forma +3 -0
  6. package/deploy/.env.example +11 -0
  7. package/deploy/Caddyfile +4 -0
  8. package/deploy/compose.yml +38 -0
  9. package/dist/assets/IBMPlexSans-Regular-Bl2SjS7V.ttf +0 -0
  10. package/dist/assets/IBMPlexSans-SemiBold-B9auKknr.ttf +0 -0
  11. package/dist/assets/elk.bundled-Y7ymokgr.js +24 -0
  12. package/dist/assets/index-_kg9cdik.css +1 -0
  13. package/dist/assets/index-al0xDdTG.js +452 -0
  14. package/dist/fonts/IBMPlexSans-Regular.ttf +0 -0
  15. package/dist/fonts/IBMPlexSans-SemiBold.ttf +0 -0
  16. package/dist/fonts/OFL.txt +93 -0
  17. package/dist/index.html +14 -0
  18. package/dist/licenses/FORMA_LICENSE.txt +21 -0
  19. package/dist/licenses/THIRD_PARTY_LICENSES.txt +11601 -0
  20. package/docs/api.md +41 -0
  21. package/docs/decisions/001-foundation.md +57 -0
  22. package/docs/decisions/002-composition-and-human-edits.md +47 -0
  23. package/docs/decisions/003-general-composition.md +30 -0
  24. package/docs/decisions/004-library-and-distribution.md +33 -0
  25. package/docs/decisions/005-organizational-hosting.md +33 -0
  26. package/docs/decisions/006-hosted-agent-access.md +25 -0
  27. package/docs/format.md +132 -0
  28. package/docs/gallery.md +73 -0
  29. package/docs/images/architecture.png +0 -0
  30. package/docs/images/editor.png +0 -0
  31. package/docs/images/gallery/architecture.png +0 -0
  32. package/docs/images/gallery/decision.png +0 -0
  33. package/docs/images/gallery/development-signal.png +0 -0
  34. package/docs/images/gallery/development.png +0 -0
  35. package/docs/images/gallery/editor-roundtrip.png +0 -0
  36. package/docs/images/gallery/entities.png +0 -0
  37. package/docs/images/gallery/mindmap.png +0 -0
  38. package/docs/images/gallery/organization.png +0 -0
  39. package/docs/images/gallery/timeline.png +0 -0
  40. package/docs/images/release.png +0 -0
  41. package/docs/install.md +50 -0
  42. package/docs/plans/mvp.md +24 -0
  43. package/docs/self-hosting.md +167 -0
  44. package/docs/verification-v2.md +41 -0
  45. package/docs/verification-v3.md +16 -0
  46. package/docs/verification-v4.1.md +35 -0
  47. package/docs/verification-v4.2.md +20 -0
  48. package/docs/verification-v4.3.md +5 -0
  49. package/docs/verification-v4.md +31 -0
  50. package/docs/verification-v5.1.md +7 -0
  51. package/docs/verification-v5.2.md +7 -0
  52. package/docs/verification-v5.md +7 -0
  53. package/docs/verification.md +91 -0
  54. package/examples/design-systems/atelier.json +53 -0
  55. package/examples/design-systems/signal.json +53 -0
  56. package/examples/gallery/architecture.forma.json +178 -0
  57. package/examples/gallery/decision.forma.json +182 -0
  58. package/examples/gallery/development-signal.forma.json +299 -0
  59. package/examples/gallery/development.forma.json +299 -0
  60. package/examples/gallery/entities.forma.json +123 -0
  61. package/examples/gallery/mindmap.forma.json +158 -0
  62. package/examples/gallery/organization.forma.json +151 -0
  63. package/examples/gallery/timeline.forma.json +138 -0
  64. package/examples/platform.forma.json +116 -0
  65. package/examples/release.forma.json +58 -0
  66. package/examples/roundtrip/agent-continued.forma.json +310 -0
  67. package/examples/roundtrip/agent-patch.json +7 -0
  68. package/examples/roundtrip/human-edited.forma.json +309 -0
  69. package/package.json +81 -0
  70. package/packages/cli/bin.mjs +3 -0
  71. package/packages/cli/src/agent-access.ts +232 -0
  72. package/packages/cli/src/blob-store.ts +241 -0
  73. package/packages/cli/src/file-library.ts +179 -0
  74. package/packages/cli/src/google.ts +51 -0
  75. package/packages/cli/src/hosted.ts +498 -0
  76. package/packages/cli/src/http.ts +67 -0
  77. package/packages/cli/src/index.ts +397 -0
  78. package/packages/cli/src/mcp.ts +114 -0
  79. package/packages/cli/src/remote.ts +228 -0
  80. package/packages/cli/src/server.ts +69 -0
  81. package/packages/cli/src/signed-cookie.ts +42 -0
  82. package/packages/core/src/align.ts +237 -0
  83. package/packages/core/src/document.ts +408 -0
  84. package/packages/core/src/font-metrics.json +1 -0
  85. package/packages/core/src/geometry.ts +463 -0
  86. package/packages/core/src/index.ts +12 -0
  87. package/packages/core/src/inspect.ts +230 -0
  88. package/packages/core/src/layout.ts +450 -0
  89. package/packages/core/src/render.ts +182 -0
  90. package/packages/core/src/resolve-style.ts +29 -0
  91. package/packages/core/src/scene.ts +40 -0
  92. package/packages/core/src/styles.ts +122 -0
  93. package/packages/core/src/text.ts +81 -0
  94. package/packages/core/src/theme.ts +33 -0
  95. package/public/fonts/IBMPlexSans-Regular.ttf +0 -0
  96. package/public/fonts/IBMPlexSans-SemiBold.ttf +0 -0
  97. package/public/fonts/OFL.txt +93 -0
  98. package/schema/design-system.v1.schema.json +734 -0
  99. package/schema/forma.v1.schema.json +273 -0
  100. package/schema/forma.v2.schema.json +1756 -0
  101. package/skills/forma/SKILL.md +20 -0
  102. package/skills/forma/references/composition.md +11 -0
  103. package/skills/forma/references/hosted.md +28 -0
  104. package/skills/forma-architecture/SKILL.md +14 -0
  105. package/skills/forma-entities/SKILL.md +14 -0
  106. package/skills/forma-flow/SKILL.md +14 -0
  107. package/skills/forma-mindmap/SKILL.md +14 -0
  108. package/skills/forma-organization/SKILL.md +14 -0
  109. package/skills/forma-timeline/SKILL.md +14 -0
@@ -0,0 +1,273 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "version": {
6
+ "type": "number",
7
+ "const": 1
8
+ },
9
+ "title": {
10
+ "type": "string",
11
+ "minLength": 1,
12
+ "maxLength": 200
13
+ },
14
+ "description": {
15
+ "type": "string",
16
+ "maxLength": 2000
17
+ },
18
+ "type": {
19
+ "default": "architecture",
20
+ "type": "string",
21
+ "enum": [
22
+ "architecture",
23
+ "flow"
24
+ ]
25
+ },
26
+ "nodes": {
27
+ "maxItems": 200,
28
+ "type": "array",
29
+ "items": {
30
+ "type": "object",
31
+ "properties": {
32
+ "id": {
33
+ "type": "string",
34
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_-]{0,79}$"
35
+ },
36
+ "label": {
37
+ "type": "string",
38
+ "minLength": 1,
39
+ "maxLength": 240
40
+ },
41
+ "description": {
42
+ "type": "string",
43
+ "maxLength": 2000
44
+ },
45
+ "kind": {
46
+ "default": "service",
47
+ "type": "string",
48
+ "enum": [
49
+ "service",
50
+ "database",
51
+ "queue",
52
+ "person",
53
+ "process",
54
+ "decision",
55
+ "client"
56
+ ]
57
+ },
58
+ "group": {
59
+ "type": "string",
60
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_-]{0,79}$"
61
+ },
62
+ "emphasis": {
63
+ "default": "normal",
64
+ "type": "string",
65
+ "enum": [
66
+ "normal",
67
+ "primary",
68
+ "muted"
69
+ ]
70
+ }
71
+ },
72
+ "required": [
73
+ "id",
74
+ "label",
75
+ "kind",
76
+ "emphasis"
77
+ ],
78
+ "additionalProperties": false
79
+ }
80
+ },
81
+ "edges": {
82
+ "maxItems": 600,
83
+ "type": "array",
84
+ "items": {
85
+ "type": "object",
86
+ "properties": {
87
+ "id": {
88
+ "type": "string",
89
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_-]{0,79}$"
90
+ },
91
+ "source": {
92
+ "type": "string",
93
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_-]{0,79}$"
94
+ },
95
+ "target": {
96
+ "type": "string",
97
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_-]{0,79}$"
98
+ },
99
+ "label": {
100
+ "type": "string",
101
+ "maxLength": 120
102
+ },
103
+ "style": {
104
+ "default": "solid",
105
+ "type": "string",
106
+ "enum": [
107
+ "solid",
108
+ "dashed"
109
+ ]
110
+ }
111
+ },
112
+ "required": [
113
+ "id",
114
+ "source",
115
+ "target",
116
+ "style"
117
+ ],
118
+ "additionalProperties": false
119
+ }
120
+ },
121
+ "groups": {
122
+ "default": [],
123
+ "maxItems": 40,
124
+ "type": "array",
125
+ "items": {
126
+ "type": "object",
127
+ "properties": {
128
+ "id": {
129
+ "type": "string",
130
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_-]{0,79}$"
131
+ },
132
+ "label": {
133
+ "type": "string",
134
+ "minLength": 1,
135
+ "maxLength": 120
136
+ },
137
+ "parent": {
138
+ "type": "string",
139
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_-]{0,79}$"
140
+ },
141
+ "description": {
142
+ "type": "string",
143
+ "maxLength": 2000
144
+ },
145
+ "color": {
146
+ "default": "slate",
147
+ "type": "string",
148
+ "enum": [
149
+ "slate",
150
+ "blue",
151
+ "teal",
152
+ "amber",
153
+ "violet"
154
+ ]
155
+ }
156
+ },
157
+ "required": [
158
+ "id",
159
+ "label",
160
+ "color"
161
+ ],
162
+ "additionalProperties": false
163
+ }
164
+ },
165
+ "layout": {
166
+ "default": {
167
+ "direction": "RIGHT",
168
+ "spacing": "comfortable"
169
+ },
170
+ "type": "object",
171
+ "properties": {
172
+ "direction": {
173
+ "default": "RIGHT",
174
+ "type": "string",
175
+ "enum": [
176
+ "RIGHT",
177
+ "DOWN"
178
+ ]
179
+ },
180
+ "spacing": {
181
+ "default": "comfortable",
182
+ "type": "string",
183
+ "enum": [
184
+ "comfortable",
185
+ "compact"
186
+ ]
187
+ }
188
+ },
189
+ "required": [
190
+ "direction",
191
+ "spacing"
192
+ ],
193
+ "additionalProperties": false
194
+ },
195
+ "presentation": {
196
+ "default": {
197
+ "theme": "paper",
198
+ "nodes": {}
199
+ },
200
+ "type": "object",
201
+ "properties": {
202
+ "theme": {
203
+ "default": "paper",
204
+ "type": "string",
205
+ "enum": [
206
+ "paper",
207
+ "midnight"
208
+ ]
209
+ },
210
+ "nodes": {
211
+ "default": {},
212
+ "type": "object",
213
+ "propertyNames": {
214
+ "type": "string",
215
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_-]{0,79}$"
216
+ },
217
+ "additionalProperties": {
218
+ "type": "object",
219
+ "properties": {
220
+ "position": {
221
+ "type": "object",
222
+ "properties": {
223
+ "x": {
224
+ "type": "number",
225
+ "minimum": -10000,
226
+ "maximum": 10000
227
+ },
228
+ "y": {
229
+ "type": "number",
230
+ "minimum": -10000,
231
+ "maximum": 10000
232
+ }
233
+ },
234
+ "required": [
235
+ "x",
236
+ "y"
237
+ ],
238
+ "additionalProperties": false
239
+ },
240
+ "color": {
241
+ "type": "string",
242
+ "enum": [
243
+ "slate",
244
+ "blue",
245
+ "teal",
246
+ "amber",
247
+ "violet"
248
+ ]
249
+ }
250
+ },
251
+ "additionalProperties": false
252
+ }
253
+ }
254
+ },
255
+ "required": [
256
+ "theme",
257
+ "nodes"
258
+ ],
259
+ "additionalProperties": false
260
+ }
261
+ },
262
+ "required": [
263
+ "version",
264
+ "title",
265
+ "type",
266
+ "nodes",
267
+ "edges",
268
+ "groups",
269
+ "layout",
270
+ "presentation"
271
+ ],
272
+ "additionalProperties": false
273
+ }