@arcanejs/react-toolkit 0.8.0 → 0.8.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.
- package/dist/{chunk-4MWL22HM.mjs → chunk-CAHNLXTY.mjs} +1 -0
- package/dist/{chunk-HM5MCE4Y.js → chunk-Q54JXYCV.js} +2 -1
- package/dist/colors.js +7 -7
- package/dist/colors.mjs +1 -1
- package/dist/data.d.mts +5 -5
- package/dist/data.d.ts +5 -5
- package/dist/index.d.mts +16 -1
- package/dist/index.d.ts +16 -1
- package/dist/index.js +4 -2
- package/dist/index.mjs +3 -1
- package/package.json +3 -3
|
@@ -242,4 +242,5 @@ var Timeline2 = CoreComponents.Timeline;
|
|
|
242
242
|
|
|
243
243
|
|
|
244
244
|
|
|
245
|
-
|
|
245
|
+
|
|
246
|
+
exports.prepareComponents = prepareComponents; exports.CoreComponents = CoreComponents; exports.ToolkitRenderer = ToolkitRenderer; exports.Button = Button2; exports.Group = Group3; exports.GroupHeader = GroupHeader2; exports.Label = Label3; exports.Rect = Rect2; exports.SliderButton = SliderButton2; exports.Switch = Switch2; exports.Tab = Tab2; exports.Tabs = Tabs2; exports.TextInput = TextInput2; exports.Timeline = Timeline2;
|
package/dist/colors.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkQ54JXYCVjs = require('./chunk-Q54JXYCV.js');
|
|
6
6
|
require('./chunk-RT2VSMJL.js');
|
|
7
7
|
|
|
8
8
|
// src/colors.tsx
|
|
@@ -56,10 +56,10 @@ var HslColorPicker = ({
|
|
|
56
56
|
},
|
|
57
57
|
[onChange]
|
|
58
58
|
);
|
|
59
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
60
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
59
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQ54JXYCVjs.Group, { ...DEFAULT_GROUP_PROPS, ...groupProps, children: [
|
|
60
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQ54JXYCVjs.Rect, { color: `hsl(${hue}deg ${saturation}% ${lightness}% / ${alpha})` }),
|
|
61
61
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
62
|
-
|
|
62
|
+
_chunkQ54JXYCVjs.SliderButton,
|
|
63
63
|
{
|
|
64
64
|
value: hue,
|
|
65
65
|
onChange: setHue,
|
|
@@ -71,7 +71,7 @@ var HslColorPicker = ({
|
|
|
71
71
|
}
|
|
72
72
|
),
|
|
73
73
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
74
|
-
|
|
74
|
+
_chunkQ54JXYCVjs.SliderButton,
|
|
75
75
|
{
|
|
76
76
|
value: saturation,
|
|
77
77
|
onChange: setSat,
|
|
@@ -87,7 +87,7 @@ var HslColorPicker = ({
|
|
|
87
87
|
}
|
|
88
88
|
),
|
|
89
89
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
90
|
-
|
|
90
|
+
_chunkQ54JXYCVjs.SliderButton,
|
|
91
91
|
{
|
|
92
92
|
value: lightness,
|
|
93
93
|
onChange: setLightness,
|
|
@@ -103,7 +103,7 @@ var HslColorPicker = ({
|
|
|
103
103
|
}
|
|
104
104
|
),
|
|
105
105
|
showAlpha && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
106
|
-
|
|
106
|
+
_chunkQ54JXYCVjs.SliderButton,
|
|
107
107
|
{
|
|
108
108
|
value: alpha,
|
|
109
109
|
onChange: setAlpha,
|
package/dist/colors.mjs
CHANGED
package/dist/data.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode, FC, Context } from 'react';
|
|
2
|
-
import { ZodType } from 'zod';
|
|
2
|
+
import z, { ZodType } from 'zod';
|
|
3
3
|
|
|
4
4
|
type WithPathChange = {
|
|
5
5
|
/**
|
|
@@ -103,10 +103,10 @@ type DataFileCore<T> = {
|
|
|
103
103
|
* Primary hook for & logic for using data files.
|
|
104
104
|
*/
|
|
105
105
|
declare function useDataFileCore<T>({ schema, defaultValue, path, onPathChange, }: UseDataFileCoreProps<T>): DataFileCore<T>;
|
|
106
|
-
type CreateDataFileDefinitionProps<T> = {
|
|
107
|
-
schema:
|
|
108
|
-
defaultValue: T
|
|
106
|
+
type CreateDataFileDefinitionProps<T extends ZodType> = {
|
|
107
|
+
schema: T;
|
|
108
|
+
defaultValue: z.infer<T>;
|
|
109
109
|
};
|
|
110
|
-
declare function createDataFileDefinition<T>({ schema, defaultValue, }: CreateDataFileDefinitionProps<T>): DataFileDefinition<T
|
|
110
|
+
declare function createDataFileDefinition<T extends ZodType>({ schema, defaultValue, }: CreateDataFileDefinitionProps<T>): DataFileDefinition<z.infer<T>>;
|
|
111
111
|
|
|
112
112
|
export { type CreateDataFileDefinitionProps, type DataFileContext, type DataFileCore, type DataFileDefinition, type DataFileUpdater, type DataState, type ProviderProps, type UseDataFileCoreProps, createDataFileDefinition, useDataFile, useDataFileContext, useDataFileCore, useDataFileData, useDataFileUpdater };
|
package/dist/data.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode, FC, Context } from 'react';
|
|
2
|
-
import { ZodType } from 'zod';
|
|
2
|
+
import z, { ZodType } from 'zod';
|
|
3
3
|
|
|
4
4
|
type WithPathChange = {
|
|
5
5
|
/**
|
|
@@ -103,10 +103,10 @@ type DataFileCore<T> = {
|
|
|
103
103
|
* Primary hook for & logic for using data files.
|
|
104
104
|
*/
|
|
105
105
|
declare function useDataFileCore<T>({ schema, defaultValue, path, onPathChange, }: UseDataFileCoreProps<T>): DataFileCore<T>;
|
|
106
|
-
type CreateDataFileDefinitionProps<T> = {
|
|
107
|
-
schema:
|
|
108
|
-
defaultValue: T
|
|
106
|
+
type CreateDataFileDefinitionProps<T extends ZodType> = {
|
|
107
|
+
schema: T;
|
|
108
|
+
defaultValue: z.infer<T>;
|
|
109
109
|
};
|
|
110
|
-
declare function createDataFileDefinition<T>({ schema, defaultValue, }: CreateDataFileDefinitionProps<T>): DataFileDefinition<T
|
|
110
|
+
declare function createDataFileDefinition<T extends ZodType>({ schema, defaultValue, }: CreateDataFileDefinitionProps<T>): DataFileDefinition<z.infer<T>>;
|
|
111
111
|
|
|
112
112
|
export { type CreateDataFileDefinitionProps, type DataFileContext, type DataFileCore, type DataFileDefinition, type DataFileUpdater, type DataState, type ProviderProps, type UseDataFileCoreProps, createDataFileDefinition, useDataFile, useDataFileContext, useDataFileCore, useDataFileData, useDataFileUpdater };
|
package/dist/index.d.mts
CHANGED
|
@@ -5,6 +5,7 @@ import { Props } from '@arcanejs/toolkit/components/group';
|
|
|
5
5
|
import * as _arcanejs_toolkit_components_button from '@arcanejs/toolkit/components/button';
|
|
6
6
|
import React__default from 'react';
|
|
7
7
|
import * as ld from '@arcanejs/toolkit';
|
|
8
|
+
import { Button as Button$1, Group as Group$1, GroupHeader as GroupHeader$1, Label as Label$1, Rect as Rect$1, SliderButton as SliderButton$1, Switch as Switch$1, Tab as Tab$1, Tabs as Tabs$1, TextInput as TextInput$1, Timeline as Timeline$1 } from '@arcanejs/toolkit';
|
|
8
9
|
import { AnyComponent, BaseParent, Base } from '@arcanejs/toolkit/components/base';
|
|
9
10
|
|
|
10
11
|
type ComponentClass = new (...args: any[]) => AnyComponent;
|
|
@@ -34,6 +35,20 @@ type PreparedComponents<D extends ComponentsDefinition> = {
|
|
|
34
35
|
} & ComponentFunctions<D>;
|
|
35
36
|
declare const prepareComponents: <D extends ComponentsDefinition>(namespace: string, defn: D) => PreparedComponents<D>;
|
|
36
37
|
|
|
38
|
+
declare const CoreComponents: PreparedComponents<{
|
|
39
|
+
Button: typeof Button$1;
|
|
40
|
+
Group: typeof Group$1;
|
|
41
|
+
GroupHeader: typeof GroupHeader$1;
|
|
42
|
+
Label: typeof Label$1;
|
|
43
|
+
Rect: typeof Rect$1;
|
|
44
|
+
SliderButton: typeof SliderButton$1;
|
|
45
|
+
Switch: typeof Switch$1;
|
|
46
|
+
Tab: typeof Tab$1;
|
|
47
|
+
Tabs: typeof Tabs$1;
|
|
48
|
+
TextInput: typeof TextInput$1;
|
|
49
|
+
Timeline: typeof Timeline$1;
|
|
50
|
+
}>;
|
|
51
|
+
|
|
37
52
|
type ReactToolkitConfig = {
|
|
38
53
|
componentNamespaces: Array<PreparedComponents<any>>;
|
|
39
54
|
};
|
|
@@ -91,4 +106,4 @@ declare const Timeline: React__default.ForwardRefExoticComponent<Partial<Partial
|
|
|
91
106
|
} | null | undefined;
|
|
92
107
|
}>> & React__default.RefAttributes<ld.Timeline>>;
|
|
93
108
|
|
|
94
|
-
export { Button, Group, GroupHeader, Label, Rect, SliderButton, Switch, Tab, Tabs, TextInput, Timeline, ToolkitRenderer, prepareComponents };
|
|
109
|
+
export { Button, CoreComponents, Group, GroupHeader, Label, Rect, SliderButton, Switch, Tab, Tabs, TextInput, Timeline, ToolkitRenderer, prepareComponents };
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { Props } from '@arcanejs/toolkit/components/group';
|
|
|
5
5
|
import * as _arcanejs_toolkit_components_button from '@arcanejs/toolkit/components/button';
|
|
6
6
|
import React__default from 'react';
|
|
7
7
|
import * as ld from '@arcanejs/toolkit';
|
|
8
|
+
import { Button as Button$1, Group as Group$1, GroupHeader as GroupHeader$1, Label as Label$1, Rect as Rect$1, SliderButton as SliderButton$1, Switch as Switch$1, Tab as Tab$1, Tabs as Tabs$1, TextInput as TextInput$1, Timeline as Timeline$1 } from '@arcanejs/toolkit';
|
|
8
9
|
import { AnyComponent, BaseParent, Base } from '@arcanejs/toolkit/components/base';
|
|
9
10
|
|
|
10
11
|
type ComponentClass = new (...args: any[]) => AnyComponent;
|
|
@@ -34,6 +35,20 @@ type PreparedComponents<D extends ComponentsDefinition> = {
|
|
|
34
35
|
} & ComponentFunctions<D>;
|
|
35
36
|
declare const prepareComponents: <D extends ComponentsDefinition>(namespace: string, defn: D) => PreparedComponents<D>;
|
|
36
37
|
|
|
38
|
+
declare const CoreComponents: PreparedComponents<{
|
|
39
|
+
Button: typeof Button$1;
|
|
40
|
+
Group: typeof Group$1;
|
|
41
|
+
GroupHeader: typeof GroupHeader$1;
|
|
42
|
+
Label: typeof Label$1;
|
|
43
|
+
Rect: typeof Rect$1;
|
|
44
|
+
SliderButton: typeof SliderButton$1;
|
|
45
|
+
Switch: typeof Switch$1;
|
|
46
|
+
Tab: typeof Tab$1;
|
|
47
|
+
Tabs: typeof Tabs$1;
|
|
48
|
+
TextInput: typeof TextInput$1;
|
|
49
|
+
Timeline: typeof Timeline$1;
|
|
50
|
+
}>;
|
|
51
|
+
|
|
37
52
|
type ReactToolkitConfig = {
|
|
38
53
|
componentNamespaces: Array<PreparedComponents<any>>;
|
|
39
54
|
};
|
|
@@ -91,4 +106,4 @@ declare const Timeline: React__default.ForwardRefExoticComponent<Partial<Partial
|
|
|
91
106
|
} | null | undefined;
|
|
92
107
|
}>> & React__default.RefAttributes<ld.Timeline>>;
|
|
93
108
|
|
|
94
|
-
export { Button, Group, GroupHeader, Label, Rect, SliderButton, Switch, Tab, Tabs, TextInput, Timeline, ToolkitRenderer, prepareComponents };
|
|
109
|
+
export { Button, CoreComponents, Group, GroupHeader, Label, Rect, SliderButton, Switch, Tab, Tabs, TextInput, Timeline, ToolkitRenderer, prepareComponents };
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
|
|
16
|
+
var _chunkQ54JXYCVjs = require('./chunk-Q54JXYCV.js');
|
|
16
17
|
require('./chunk-RT2VSMJL.js');
|
|
17
18
|
|
|
18
19
|
|
|
@@ -28,4 +29,5 @@ require('./chunk-RT2VSMJL.js');
|
|
|
28
29
|
|
|
29
30
|
|
|
30
31
|
|
|
31
|
-
|
|
32
|
+
|
|
33
|
+
exports.Button = _chunkQ54JXYCVjs.Button; exports.CoreComponents = _chunkQ54JXYCVjs.CoreComponents; exports.Group = _chunkQ54JXYCVjs.Group; exports.GroupHeader = _chunkQ54JXYCVjs.GroupHeader; exports.Label = _chunkQ54JXYCVjs.Label; exports.Rect = _chunkQ54JXYCVjs.Rect; exports.SliderButton = _chunkQ54JXYCVjs.SliderButton; exports.Switch = _chunkQ54JXYCVjs.Switch; exports.Tab = _chunkQ54JXYCVjs.Tab; exports.Tabs = _chunkQ54JXYCVjs.Tabs; exports.TextInput = _chunkQ54JXYCVjs.TextInput; exports.Timeline = _chunkQ54JXYCVjs.Timeline; exports.ToolkitRenderer = _chunkQ54JXYCVjs.ToolkitRenderer; exports.prepareComponents = _chunkQ54JXYCVjs.prepareComponents;
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Button,
|
|
3
|
+
CoreComponents,
|
|
3
4
|
Group,
|
|
4
5
|
GroupHeader,
|
|
5
6
|
Label,
|
|
@@ -12,10 +13,11 @@ import {
|
|
|
12
13
|
Timeline,
|
|
13
14
|
ToolkitRenderer,
|
|
14
15
|
prepareComponents
|
|
15
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-CAHNLXTY.mjs";
|
|
16
17
|
import "./chunk-TOGR56FN.mjs";
|
|
17
18
|
export {
|
|
18
19
|
Button,
|
|
20
|
+
CoreComponents,
|
|
19
21
|
Group,
|
|
20
22
|
GroupHeader,
|
|
21
23
|
Label,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcanejs/react-toolkit",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Build web-accessible control interfaces for your long-running Node.js processes",
|
|
6
6
|
"keywords": [
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"lodash": "^4.17.21",
|
|
64
64
|
"react": "^18",
|
|
65
65
|
"react-reconciler": "0.28.0",
|
|
66
|
-
"@arcanejs/
|
|
67
|
-
"@arcanejs/
|
|
66
|
+
"@arcanejs/toolkit": "^1.0.0",
|
|
67
|
+
"@arcanejs/protocol": "^0.4.0"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"zod": "^3.23.8"
|