@arcanejs/toolkit 0.5.1 → 1.0.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 (75) hide show
  1. package/dist/backend/components/base.d.mts +25 -22
  2. package/dist/backend/components/base.d.ts +25 -22
  3. package/dist/backend/components/base.js +2 -2
  4. package/dist/backend/components/base.mjs +1 -1
  5. package/dist/backend/components/button.d.mts +5 -3
  6. package/dist/backend/components/button.d.ts +5 -3
  7. package/dist/backend/components/button.js +3 -3
  8. package/dist/backend/components/button.mjs +2 -2
  9. package/dist/backend/components/group.d.mts +6 -4
  10. package/dist/backend/components/group.d.ts +6 -4
  11. package/dist/backend/components/group.js +3 -3
  12. package/dist/backend/components/group.mjs +2 -2
  13. package/dist/backend/components/label.d.mts +4 -3
  14. package/dist/backend/components/label.d.ts +4 -3
  15. package/dist/backend/components/label.js +3 -3
  16. package/dist/backend/components/label.mjs +2 -2
  17. package/dist/backend/components/rect.d.mts +4 -3
  18. package/dist/backend/components/rect.d.ts +4 -3
  19. package/dist/backend/components/rect.js +3 -3
  20. package/dist/backend/components/rect.mjs +2 -2
  21. package/dist/backend/components/slider-button.d.mts +6 -4
  22. package/dist/backend/components/slider-button.d.ts +6 -4
  23. package/dist/backend/components/slider-button.js +3 -3
  24. package/dist/backend/components/slider-button.mjs +2 -2
  25. package/dist/backend/components/switch.d.mts +6 -4
  26. package/dist/backend/components/switch.d.ts +6 -4
  27. package/dist/backend/components/switch.js +3 -3
  28. package/dist/backend/components/switch.mjs +2 -2
  29. package/dist/backend/components/tabs.d.mts +9 -8
  30. package/dist/backend/components/tabs.d.ts +9 -8
  31. package/dist/backend/components/tabs.js +3 -3
  32. package/dist/backend/components/tabs.mjs +2 -2
  33. package/dist/backend/components/text-input.d.mts +6 -4
  34. package/dist/backend/components/text-input.d.ts +6 -4
  35. package/dist/backend/components/text-input.js +3 -3
  36. package/dist/backend/components/text-input.mjs +2 -2
  37. package/dist/backend/components/timeline.d.mts +4 -3
  38. package/dist/backend/components/timeline.d.ts +4 -3
  39. package/dist/backend/components/timeline.js +3 -3
  40. package/dist/backend/components/timeline.mjs +2 -2
  41. package/dist/backend/util/index.d.mts +1 -1
  42. package/dist/backend/util/index.d.ts +1 -1
  43. package/dist/{chunk-Q5TEM6MM.js → chunk-25LALCAN.js} +17 -7
  44. package/dist/{chunk-IQ4SDDYP.js → chunk-5JPYL5IU.js} +3 -2
  45. package/dist/{chunk-KBPQZJKE.mjs → chunk-5TGGF5UJ.mjs} +17 -5
  46. package/dist/{chunk-PW7QVLLF.mjs → chunk-7SZA6JUN.mjs} +34 -3
  47. package/dist/{chunk-CFO5PSSK.js → chunk-ADH7RZG5.js} +54 -23
  48. package/dist/{chunk-C2TVGO43.js → chunk-ARRRZPUK.js} +5 -3
  49. package/dist/{chunk-ESMRIWOM.mjs → chunk-BDBRQJSI.mjs} +2 -1
  50. package/dist/{chunk-G5QXW2L3.mjs → chunk-EFNFSHV3.mjs} +16 -4
  51. package/dist/chunk-HNFNG5MD.js +55 -0
  52. package/dist/{chunk-SN2XKRYX.mjs → chunk-IBIEYR3L.mjs} +14 -4
  53. package/dist/{chunk-KR6LSBBX.mjs → chunk-ISHGZXPO.mjs} +14 -3
  54. package/dist/{chunk-DBSYI5Z4.mjs → chunk-LX5IL6WX.mjs} +2 -1
  55. package/dist/{chunk-JOW3XRQI.mjs → chunk-OAPIVG6M.mjs} +2 -1
  56. package/dist/{chunk-H734NV65.mjs → chunk-PXYXUWXE.mjs} +3 -1
  57. package/dist/{chunk-Q3NG5UUN.mjs → chunk-SBHNIFAS.mjs} +14 -4
  58. package/dist/{chunk-53DEDXHG.js → chunk-SIXWXDZW.js} +17 -7
  59. package/dist/{chunk-FUINWM5H.js → chunk-T4TMVBFM.js} +3 -2
  60. package/dist/{chunk-4HHKW7VA.js → chunk-TOPIQUBZ.js} +21 -9
  61. package/dist/{chunk-FLRGYURV.js → chunk-V5T44HCM.js} +3 -2
  62. package/dist/{chunk-4X3QY5EP.js → chunk-ZLJECS4H.js} +19 -7
  63. package/dist/{frontend.js → frontend/entrypoint.js} +20292 -20253
  64. package/dist/frontend/entrypoint.js.map +7 -0
  65. package/dist/frontend/index.d.mts +8 -0
  66. package/dist/frontend/index.d.ts +8 -0
  67. package/dist/frontend/index.js +143 -0
  68. package/dist/frontend/index.mjs +143 -0
  69. package/dist/index.d.mts +16 -3
  70. package/dist/index.d.ts +16 -3
  71. package/dist/index.js +33 -22
  72. package/dist/index.mjs +32 -21
  73. package/package.json +55 -29
  74. package/dist/chunk-DONU33U4.js +0 -44
  75. package/dist/frontend.js.map +0 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcanejs/toolkit",
3
- "version": "0.5.1",
3
+ "version": "1.0.0",
4
4
  "private": false,
5
5
  "description": "Build web-accessible control interfaces for your long-running Node.js processes",
6
6
  "keywords": [
@@ -19,75 +19,81 @@
19
19
  "exports": {
20
20
  ".": {
21
21
  "@arcanejs/source": "./src/index.ts",
22
+ "types": "./dist/index.d.ts",
22
23
  "import": "./dist/index.mjs",
23
- "require": "./dist/index.js",
24
- "types": "./dist/index.d.ts"
24
+ "require": "./dist/index.js"
25
25
  },
26
26
  "./components/base": {
27
27
  "@arcanejs/source": "./src/backend/components/base.ts",
28
+ "types": "./dist/backend/components/base.d.ts",
28
29
  "import": "./dist/backend/components/base.mjs",
29
- "require": "./dist/backend/components/base.js",
30
- "types": "./dist/backend/components/base.d.ts"
30
+ "require": "./dist/backend/components/base.js"
31
31
  },
32
32
  "./components/button": {
33
33
  "@arcanejs/source": "./src/backend/components/button.ts",
34
+ "types": "./dist/backend/components/button.d.ts",
34
35
  "import": "./dist/backend/components/button.mjs",
35
- "require": "./dist/backend/components/button.js",
36
- "types": "./dist/backend/components/button.d.ts"
36
+ "require": "./dist/backend/components/button.js"
37
37
  },
38
38
  "./components/group": {
39
39
  "@arcanejs/source": "./src/backend/components/group.ts",
40
+ "types": "./dist/backend/components/group.d.ts",
40
41
  "import": "./dist/backend/components/group.mjs",
41
- "require": "./dist/backend/components/group.js",
42
- "types": "./dist/backend/components/group.d.ts"
42
+ "require": "./dist/backend/components/group.js"
43
43
  },
44
44
  "./components/label": {
45
45
  "@arcanejs/source": "./src/backend/components/label.ts",
46
+ "types": "./dist/backend/components/label.d.ts",
46
47
  "import": "./dist/backend/components/label.mjs",
47
- "require": "./dist/backend/components/label.js",
48
- "types": "./dist/backend/components/label.d.ts"
48
+ "require": "./dist/backend/components/label.js"
49
49
  },
50
50
  "./components/rect": {
51
51
  "@arcanejs/source": "./src/backend/components/rect.ts",
52
+ "types": "./dist/backend/components/rect.d.ts",
52
53
  "import": "./dist/backend/components/rect.mjs",
53
- "require": "./dist/backend/components/rect.js",
54
- "types": "./dist/backend/components/rect.d.ts"
54
+ "require": "./dist/backend/components/rect.js"
55
55
  },
56
56
  "./components/slider-button": {
57
57
  "@arcanejs/source": "./src/backend/components/slider-button.ts",
58
+ "types": "./dist/backend/components/slider-button.d.ts",
58
59
  "import": "./dist/backend/components/slider-button.mjs",
59
- "require": "./dist/backend/components/slider-button.js",
60
- "types": "./dist/backend/components/slider-button.d.ts"
60
+ "require": "./dist/backend/components/slider-button.js"
61
61
  },
62
62
  "./components/switch": {
63
63
  "@arcanejs/source": "./src/backend/components/switch.ts",
64
+ "types": "./dist/backend/components/switch.d.ts",
64
65
  "import": "./dist/backend/components/switch.mjs",
65
- "require": "./dist/backend/components/switch.js",
66
- "types": "./dist/backend/components/switch.d.ts"
66
+ "require": "./dist/backend/components/switch.js"
67
67
  },
68
68
  "./components/tabs": {
69
69
  "@arcanejs/source": "./src/backend/components/tabs.ts",
70
+ "types": "./dist/backend/components/tabs.d.ts",
70
71
  "import": "./dist/backend/components/tabs.mjs",
71
- "require": "./dist/backend/components/tabs.js",
72
- "types": "./dist/backend/components/tabs.d.ts"
72
+ "require": "./dist/backend/components/tabs.js"
73
73
  },
74
74
  "./components/text-input": {
75
75
  "@arcanejs/source": "./src/backend/components/text-input.ts",
76
+ "types": "./dist/backend/components/text-input.d.ts",
76
77
  "import": "./dist/backend/components/text-input.mjs",
77
- "require": "./dist/backend/components/text-input.js",
78
- "types": "./dist/backend/components/text-input.d.ts"
78
+ "require": "./dist/backend/components/text-input.js"
79
79
  },
80
80
  "./components/timeline": {
81
81
  "@arcanejs/source": "./src/backend/components/timeline.ts",
82
+ "types": "./dist/backend/components/timeline.d.ts",
82
83
  "import": "./dist/backend/components/timeline.mjs",
83
- "require": "./dist/backend/components/timeline.js",
84
- "types": "./dist/backend/components/timeline.d.ts"
84
+ "require": "./dist/backend/components/timeline.js"
85
+ },
86
+ "./frontend": {
87
+ "@arcanejs/source": "./src/frontend/index.ts",
88
+ "types": "./dist/frontend/index.d.ts",
89
+ "import": "./dist/frontend/index.mjs",
90
+ "require": "./dist/frontend/index.js"
85
91
  },
86
92
  "./util": {
87
93
  "@arcanejs/source": "./src/backend/util/index.ts",
94
+ "types": "./dist/backend/util/index.d.ts",
88
95
  "import": "./dist/backend/util/index.mjs",
89
- "require": "./dist/backend/util/index.js",
90
- "types": "./dist/backend/util/index.d.ts"
96
+ "require": "./dist/backend/util/index.js"
91
97
  },
92
98
  "./package.json": "./package.json"
93
99
  },
@@ -108,7 +114,7 @@
108
114
  "tsup": "^8.1.0",
109
115
  "typescript": "^5.3.3",
110
116
  "@arcanejs/eslint-config": "^0.0.0",
111
- "@arcanejs/toolkit-frontend": "^0.2.0",
117
+ "@arcanejs/toolkit-frontend": "^0.3.0",
112
118
  "@arcanejs/typescript-config": "^0.0.0"
113
119
  },
114
120
  "dependencies": {
@@ -116,8 +122,28 @@
116
122
  "lodash": "^4.17.21",
117
123
  "material-symbols": "^0.25.0",
118
124
  "ws": "^8.18.0",
119
- "@arcanejs/diff": "^0.5.0",
120
- "@arcanejs/protocol": "^0.3.0"
125
+ "@arcanejs/diff": "^0.5.1",
126
+ "@arcanejs/protocol": "^0.4.0"
127
+ },
128
+ "peerDependencies": {
129
+ "react": "^18",
130
+ "react-dom": "18.3.1",
131
+ "styled-components": "^6.1.13",
132
+ "@arcanejs/toolkit-frontend": "^0.3.0"
133
+ },
134
+ "peerDependenciesMeta": {
135
+ "@arcanejs/toolkit-frontend": {
136
+ "optional": true
137
+ },
138
+ "react": {
139
+ "optional": true
140
+ },
141
+ "react-dom": {
142
+ "optional": true
143
+ },
144
+ "styled-components": {
145
+ "optional": true
146
+ }
121
147
  },
122
148
  "files": [
123
149
  "dist"
@@ -129,7 +155,7 @@
129
155
  "lint": "eslint . --max-warnings 0",
130
156
  "build": "rm -rf dist && pnpm build:backend && pnpm type-check:frontend && pnpm build:frontend && check-export-map",
131
157
  "build:backend": "tsup",
132
- "build:frontend": "esbuild src/frontend/frontend.ts --bundle --sourcemap --outfile=dist/frontend.js",
158
+ "build:frontend": "esbuild src/frontend/entrypoint-core.ts --bundle --sourcemap --outfile=dist/frontend/entrypoint.js",
133
159
  "dev": "pnpm dev:backend & pnpm dev:frontend",
134
160
  "dev:backend": "pnpm build:backend --watch",
135
161
  "dev:frontend": "pnpm type-check:frontend:watch & pnpm build:frontend --watch",
@@ -1,44 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } var _class;
2
-
3
-
4
- var _chunkCFO5PSSKjs = require('./chunk-CFO5PSSK.js');
5
-
6
- // src/backend/components/text-input.ts
7
- var DEFAULT_PROPS = {
8
- value: null
9
- };
10
- var TextInput = (_class = class extends _chunkCFO5PSSKjs.Base {
11
- /** @hidden */
12
- __init() {this.events = new (0, _chunkCFO5PSSKjs.EventEmitter)()}
13
- constructor(props) {
14
- super(DEFAULT_PROPS, props);_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);_class.prototype.__init4.call(this);_class.prototype.__init5.call(this);_class.prototype.__init6.call(this);_class.prototype.__init7.call(this);_class.prototype.__init8.call(this);;
15
- }
16
- __init2() {this.addListener = this.events.addListener}
17
- __init3() {this.removeListener = this.events.removeListener}
18
- /** @hidden */
19
- __init4() {this.getProtoInfo = (idMap) => {
20
- return {
21
- component: "text-input",
22
- key: idMap.getId(this),
23
- value: _nullishCoalesce(this.props.value, () => ( ""))
24
- };
25
- }}
26
- /** @hidden */
27
- __init5() {this.handleMessage = (message) => {
28
- if (message.component === "text-input") {
29
- if (this.props.value !== message.value) {
30
- this.updateProps({ value: message.value });
31
- this.events.emit("change", message.value);
32
- }
33
- }
34
- }}
35
- __init6() {this.getValue = () => this.props.value}
36
- __init7() {this.getValidatedValue = (validator) => this.props.value === "" ? null : validator(this.props.value || "")}
37
- __init8() {this.setValue = (value) => {
38
- this.updateProps({ value });
39
- }}
40
- }, _class);
41
-
42
-
43
-
44
- exports.TextInput = TextInput;