blueprintsjs 0.0.0-stage → 0.2.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 (85) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/LICENSE +21 -0
  3. package/README.md +165 -2
  4. package/dist/blueprintsjs.umd.cjs +325 -0
  5. package/dist/blueprintsjs.umd.cjs.map +1 -0
  6. package/dist/chunks/validate-DHOIGyop.js +860 -0
  7. package/dist/chunks/validate-DHOIGyop.js.map +1 -0
  8. package/dist/chunks/validate-Ddbqd8bD.cjs +859 -0
  9. package/dist/chunks/validate-Ddbqd8bD.cjs.map +1 -0
  10. package/dist/core/build.d.cts +33 -0
  11. package/dist/core/build.d.ts +33 -0
  12. package/dist/core/compile.d.cts +27 -0
  13. package/dist/core/compile.d.ts +27 -0
  14. package/dist/core/helpers.d.cts +13 -0
  15. package/dist/core/helpers.d.ts +13 -0
  16. package/dist/core/layout.d.cts +19 -0
  17. package/dist/core/layout.d.ts +19 -0
  18. package/dist/core/registry.d.cts +23 -0
  19. package/dist/core/registry.d.ts +23 -0
  20. package/dist/core/schema.d.cts +14 -0
  21. package/dist/core/schema.d.ts +14 -0
  22. package/dist/core/types.d.cts +215 -0
  23. package/dist/core/types.d.ts +215 -0
  24. package/dist/core/validate.d.cts +9 -0
  25. package/dist/core/validate.d.ts +9 -0
  26. package/dist/editor/GraphEditor.d.cts +181 -0
  27. package/dist/editor/GraphEditor.d.ts +181 -0
  28. package/dist/editor/details.d.cts +23 -0
  29. package/dist/editor/details.d.ts +23 -0
  30. package/dist/editor/dom.d.cts +20 -0
  31. package/dist/editor/dom.d.ts +20 -0
  32. package/dist/editor/highlight.d.cts +7 -0
  33. package/dist/editor/highlight.d.ts +7 -0
  34. package/dist/editor/index.d.cts +13 -0
  35. package/dist/editor/index.d.ts +13 -0
  36. package/dist/editor/state.d.cts +113 -0
  37. package/dist/editor/state.d.ts +113 -0
  38. package/dist/editor/styles.d.cts +7 -0
  39. package/dist/editor/styles.d.ts +7 -0
  40. package/dist/editor.cjs +2196 -0
  41. package/dist/editor.cjs.map +1 -0
  42. package/dist/editor.js +2196 -0
  43. package/dist/editor.js.map +1 -0
  44. package/dist/index.cjs +1251 -0
  45. package/dist/index.cjs.map +1 -0
  46. package/dist/index.d.cts +21 -0
  47. package/dist/index.d.ts +21 -0
  48. package/dist/index.js +1252 -0
  49. package/dist/index.js.map +1 -0
  50. package/dist/locales/index.d.cts +15 -0
  51. package/dist/locales/index.d.ts +15 -0
  52. package/dist/locales/ru.d.cts +3 -0
  53. package/dist/locales/ru.d.ts +3 -0
  54. package/dist/locales/uk.d.cts +3 -0
  55. package/dist/locales/uk.d.ts +3 -0
  56. package/dist/locales.cjs +579 -0
  57. package/dist/locales.cjs.map +1 -0
  58. package/dist/locales.js +579 -0
  59. package/dist/locales.js.map +1 -0
  60. package/dist/nodes/data.d.cts +26 -0
  61. package/dist/nodes/data.d.ts +26 -0
  62. package/dist/nodes/dom.d.cts +27 -0
  63. package/dist/nodes/dom.d.ts +27 -0
  64. package/dist/nodes/events.d.cts +11 -0
  65. package/dist/nodes/events.d.ts +11 -0
  66. package/dist/nodes/flow.d.cts +10 -0
  67. package/dist/nodes/flow.d.ts +10 -0
  68. package/dist/nodes/index.d.cts +11 -0
  69. package/dist/nodes/index.d.ts +11 -0
  70. package/dist/nodes/lib.d.cts +7 -0
  71. package/dist/nodes/lib.d.ts +7 -0
  72. package/dist/umd.d.cts +5 -0
  73. package/dist/umd.d.ts +5 -0
  74. package/dist/version.d.cts +2 -0
  75. package/dist/version.d.ts +2 -0
  76. package/docs/compiler.md +149 -0
  77. package/docs/custom-nodes.md +119 -0
  78. package/docs/editor.md +166 -0
  79. package/docs/guide.md +79 -0
  80. package/docs/nodes.md +494 -0
  81. package/docs/nodes.ru.md +494 -0
  82. package/docs/schema.md +64 -0
  83. package/examples/index.html +110 -0
  84. package/package.json +107 -4
  85. package/schema/blueprint.schema.json +102 -0
package/package.json CHANGED
@@ -1,6 +1,109 @@
1
1
  {
2
2
  "name": "blueprintsjs",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.0",
4
+ "description": "Visual scripting for the web: UE5/n8n-style node graphs (blueprints) compiled to plain, dependency-free JavaScript, with an embeddable graph editor.",
5
+ "keywords": [
6
+ "blueprints",
7
+ "visual-scripting",
8
+ "node-editor",
9
+ "node-graph",
10
+ "flow-based-programming",
11
+ "low-code",
12
+ "no-code",
13
+ "compiler",
14
+ "graph-editor"
15
+ ],
16
+ "license": "MIT",
17
+ "type": "module",
18
+ "main": "./dist/index.cjs",
19
+ "module": "./dist/index.js",
20
+ "types": "./dist/index.d.ts",
21
+ "unpkg": "./dist/blueprintsjs.umd.cjs",
22
+ "jsdelivr": "./dist/blueprintsjs.umd.cjs",
23
+ "exports": {
24
+ ".": {
25
+ "import": {
26
+ "types": "./dist/index.d.ts",
27
+ "default": "./dist/index.js"
28
+ },
29
+ "require": {
30
+ "types": "./dist/index.d.cts",
31
+ "default": "./dist/index.cjs"
32
+ }
33
+ },
34
+ "./editor": {
35
+ "import": {
36
+ "types": "./dist/editor/index.d.ts",
37
+ "default": "./dist/editor.js"
38
+ },
39
+ "require": {
40
+ "types": "./dist/editor/index.d.cts",
41
+ "default": "./dist/editor.cjs"
42
+ }
43
+ },
44
+ "./locales": {
45
+ "import": {
46
+ "types": "./dist/locales/index.d.ts",
47
+ "default": "./dist/locales.js"
48
+ },
49
+ "require": {
50
+ "types": "./dist/locales/index.d.cts",
51
+ "default": "./dist/locales.cjs"
52
+ }
53
+ },
54
+ "./umd": {
55
+ "types": "./dist/umd.d.cts",
56
+ "default": "./dist/blueprintsjs.umd.cjs"
57
+ },
58
+ "./schema.json": "./schema/blueprint.schema.json",
59
+ "./package.json": "./package.json"
60
+ },
61
+ "typesVersions": {
62
+ "*": {
63
+ "editor": [
64
+ "./dist/editor/index.d.ts"
65
+ ],
66
+ "locales": [
67
+ "./dist/locales/index.d.ts"
68
+ ],
69
+ "umd": [
70
+ "./dist/umd.d.ts"
71
+ ]
72
+ }
73
+ },
74
+ "files": [
75
+ "dist",
76
+ "schema",
77
+ "docs/*.md",
78
+ "examples",
79
+ "README.md",
80
+ "CHANGELOG.md",
81
+ "LICENSE"
82
+ ],
83
+ "sideEffects": false,
84
+ "engines": {
85
+ "node": ">=18"
86
+ },
87
+ "scripts": {
88
+ "build": "vite build --mode es && vite build --mode cjs && vite build --mode umd && tsc -p tsconfig.build.json && node scripts/cts.mjs",
89
+ "typecheck": "tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.test.json",
90
+ "test": "vitest run",
91
+ "test:watch": "vitest",
92
+ "docs:nodes": "node scripts/gen-nodes.mjs",
93
+ "check:pack": "publint && attw --pack . --exclude-entrypoints schema.json umd",
94
+ "prepublishOnly": "npm run typecheck && npm test && npm run build && npm run docs:nodes",
95
+ "e2e": "node e2e/demo.mjs"
96
+ },
97
+ "devDependencies": {
98
+ "@arethetypeswrong/cli": "^0.18.5",
99
+ "@types/node": "^22.20.5",
100
+ "acorn": "^8.19.0",
101
+ "ajv": "^8.20.0",
102
+ "jsdom": "^25.0.1",
103
+ "playwright-core": "1.63",
104
+ "publint": "^0.3.12",
105
+ "typescript": "5.9",
106
+ "vite": "^5.4.21",
107
+ "vitest": "^2.1.9"
108
+ }
109
+ }
@@ -0,0 +1,102 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://unpkg.com/blueprintsjs/schema/blueprint.schema.json",
4
+ "title": "Blueprint",
5
+ "type": "object",
6
+ "required": ["schema", "id", "name", "kind", "enabled", "variables", "nodes", "links"],
7
+ "properties": {
8
+ "schema": { "const": 1 },
9
+ "id": { "type": "string", "minLength": 1 },
10
+ "name": { "type": "string" },
11
+ "kind": { "enum": ["global", "template", "component"] },
12
+ "enabled": { "type": "boolean" },
13
+ "description": { "type": "string" },
14
+ "target": {
15
+ "type": "object",
16
+ "properties": {
17
+ "pages": { "type": "array", "items": { "type": "string" } },
18
+ "when": { "type": "string", "description": "CSS selector; the script runs only when the page has a match" }
19
+ },
20
+ "additionalProperties": false
21
+ },
22
+ "component": {
23
+ "type": ["object", "null"],
24
+ "required": ["type"],
25
+ "properties": {
26
+ "type": { "type": "string", "pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)+$" },
27
+ "label": { "type": "string" },
28
+ "html": { "type": "string" },
29
+ "css": { "type": "string" },
30
+ "params": {
31
+ "type": "array",
32
+ "items": {
33
+ "type": "object",
34
+ "required": ["id", "type"],
35
+ "properties": {
36
+ "id": { "type": "string", "pattern": "^[A-Za-z_$][\\w$]*$" },
37
+ "label": { "type": "string" },
38
+ "type": { "enum": ["string", "number", "boolean", "select"] },
39
+ "default": {},
40
+ "options": { "type": "array", "items": { "type": "string" } }
41
+ }
42
+ }
43
+ }
44
+ }
45
+ },
46
+ "libraries": { "type": "array", "items": { "type": "string" } },
47
+ "variables": {
48
+ "type": "array",
49
+ "items": {
50
+ "type": "object",
51
+ "required": ["id", "name", "type"],
52
+ "properties": {
53
+ "id": { "type": "string" },
54
+ "name": { "type": "string" },
55
+ "type": { "enum": ["any", "string", "number", "boolean", "element", "elements", "event", "object"] },
56
+ "default": {}
57
+ }
58
+ }
59
+ },
60
+ "nodes": {
61
+ "type": "array",
62
+ "items": {
63
+ "type": "object",
64
+ "required": ["id", "type", "pos"],
65
+ "properties": {
66
+ "id": { "type": "string", "minLength": 1 },
67
+ "type": { "type": "string", "description": "Node type, e.g. dom.addClass" },
68
+ "pos": { "type": "array", "items": { "type": "number" }, "minItems": 2, "maxItems": 2 },
69
+ "props": { "type": "object", "description": "Settings and literal values of unconnected inputs, by id" },
70
+ "collapsed": { "type": "boolean" },
71
+ "disabled": { "type": "boolean" }
72
+ }
73
+ }
74
+ },
75
+ "links": {
76
+ "type": "array",
77
+ "items": {
78
+ "type": "object",
79
+ "required": ["from", "to"],
80
+ "properties": {
81
+ "from": { "type": "array", "items": { "type": "string" }, "minItems": 2, "maxItems": 2, "description": "[nodeId, outputPinId]" },
82
+ "to": { "type": "array", "items": { "type": "string" }, "minItems": 2, "maxItems": 2, "description": "[nodeId, inputPinId]" }
83
+ }
84
+ }
85
+ },
86
+ "comments": {
87
+ "type": "array",
88
+ "items": {
89
+ "type": "object",
90
+ "required": ["id", "text", "pos", "size"],
91
+ "properties": {
92
+ "id": { "type": "string" },
93
+ "text": { "type": "string" },
94
+ "pos": { "type": "array", "items": { "type": "number" } },
95
+ "size": { "type": "array", "items": { "type": "number" } },
96
+ "color": { "type": "string" }
97
+ }
98
+ }
99
+ },
100
+ "editor": { "type": "object", "description": "Viewport of the editor (pan, zoom)" }
101
+ }
102
+ }