@code0-tech/pictor 0.10.3 → 0.10.4
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/components/form/EditorInput.js +22 -21
- package/package.json +14 -16
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { InputWrapper as
|
|
2
|
+
import y from "react";
|
|
3
|
+
import { InputWrapper as C } from "./InputWrapper.js";
|
|
4
4
|
import T from "@uiw/react-codemirror";
|
|
5
5
|
import { createTheme as B } from "@uiw/codemirror-themes";
|
|
6
|
-
import { tags as
|
|
6
|
+
import { tags as e } from "../../node_modules/@lezer/highlight/dist/index.js";
|
|
7
7
|
import "../../utils/contextStore.js";
|
|
8
|
-
import { mergeComponentProps as
|
|
9
|
-
import { hashToColor as
|
|
8
|
+
import { mergeComponentProps as A } from "../../utils/component.js";
|
|
9
|
+
import { hashToColor as t } from "../../utils/color.js";
|
|
10
10
|
import '../../assets/components/form/EditorInput.style.css';/* empty css */
|
|
11
|
-
const
|
|
11
|
+
const V = (i) => {
|
|
12
12
|
const {
|
|
13
13
|
title: g,
|
|
14
14
|
right: s,
|
|
@@ -21,8 +21,9 @@ const N = (i) => {
|
|
|
21
21
|
tokenStyles: r = [],
|
|
22
22
|
formValidation: o,
|
|
23
23
|
onChange: f,
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
wrapperComponent: b,
|
|
25
|
+
...d
|
|
26
|
+
} = i, k = [...h, p], x = y.useMemo(() => B({
|
|
26
27
|
theme: "light",
|
|
27
28
|
settings: {
|
|
28
29
|
background: "transparent",
|
|
@@ -39,25 +40,25 @@ const N = (i) => {
|
|
|
39
40
|
lineHighlight: "rgba(255,255,255, 0.1)"
|
|
40
41
|
},
|
|
41
42
|
styles: [{
|
|
42
|
-
tag:
|
|
43
|
-
color:
|
|
43
|
+
tag: e.squareBracket,
|
|
44
|
+
color: t("squareBracket")
|
|
44
45
|
}, {
|
|
45
|
-
tag:
|
|
46
|
-
color:
|
|
46
|
+
tag: e.bracket,
|
|
47
|
+
color: t("bracket")
|
|
47
48
|
}, {
|
|
48
|
-
tag:
|
|
49
|
-
color:
|
|
49
|
+
tag: e.string,
|
|
50
|
+
color: t("Text")
|
|
50
51
|
}, {
|
|
51
|
-
tag:
|
|
52
|
-
color:
|
|
52
|
+
tag: e.bool,
|
|
53
|
+
color: t("Boolean")
|
|
53
54
|
}, {
|
|
54
|
-
tag:
|
|
55
|
-
color:
|
|
55
|
+
tag: e.number,
|
|
56
|
+
color: t("Number")
|
|
56
57
|
}, ...r]
|
|
57
58
|
}), [r]);
|
|
58
|
-
return /* @__PURE__ */ a(
|
|
59
|
+
return /* @__PURE__ */ a(C, { title: g, description: u, right: s, left: m, rightType: l, leftType: c, formValidation: o, wrapperComponent: b, children: /* @__PURE__ */ a(T, { extensions: k, onChange: (n) => {
|
|
59
60
|
o?.setValue?.(n), f?.(n);
|
|
60
|
-
}, theme:
|
|
61
|
+
}, theme: x, ...A("editor-input", d), basicSetup: {
|
|
61
62
|
lineNumbers: !1,
|
|
62
63
|
foldGutter: !1,
|
|
63
64
|
highlightActiveLine: !1,
|
|
@@ -65,5 +66,5 @@ const N = (i) => {
|
|
|
65
66
|
} }) });
|
|
66
67
|
};
|
|
67
68
|
export {
|
|
68
|
-
|
|
69
|
+
V as EditorInput
|
|
69
70
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code0-tech/pictor",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A simple template for a custom React component library",
|
|
6
6
|
"scripts": {
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"@ark-ui/react": "^5.36.2",
|
|
21
21
|
"@babel/plugin-proposal-decorators": "^7.29.0",
|
|
22
22
|
"@babel/plugin-transform-class-properties": "^7.28.6",
|
|
23
|
-
"@codemirror/autocomplete": "^6.20.
|
|
23
|
+
"@codemirror/autocomplete": "^6.20.3",
|
|
24
24
|
"@codemirror/lang-json": "^6.0.2",
|
|
25
25
|
"@codemirror/language": "^6.12.3",
|
|
26
|
-
"@codemirror/lint": "^6.9.
|
|
26
|
+
"@codemirror/lint": "^6.9.7",
|
|
27
27
|
"@codemirror/state": "^6.6.0",
|
|
28
|
-
"@codemirror/view": "^6.
|
|
28
|
+
"@codemirror/view": "^6.43.1",
|
|
29
29
|
"@dagrejs/dagre": "^2.0.4",
|
|
30
30
|
"@lezer/common": "^1.5.2",
|
|
31
31
|
"@mdx-js/react": "^3.1.1",
|
|
@@ -46,25 +46,24 @@
|
|
|
46
46
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
47
47
|
"@rollup/plugin-terser": "^1.0.0",
|
|
48
48
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
49
|
-
"@storybook/addon-a11y": "^10.
|
|
50
|
-
"@storybook/addon-docs": "^10.
|
|
51
|
-
"@storybook/addon-links": "^10.
|
|
52
|
-
"@storybook/addon-onboarding": "^10.
|
|
53
|
-
"@storybook/addon-vitest": "^10.
|
|
54
|
-
"@storybook/builder-vite": "^10.
|
|
55
|
-
"@storybook/cli": "^10.
|
|
56
|
-
"@storybook/react-vite": "^10.
|
|
49
|
+
"@storybook/addon-a11y": "^10.4.2",
|
|
50
|
+
"@storybook/addon-docs": "^10.4.2",
|
|
51
|
+
"@storybook/addon-links": "^10.4.2",
|
|
52
|
+
"@storybook/addon-onboarding": "^10.4.2",
|
|
53
|
+
"@storybook/addon-vitest": "^10.4.2",
|
|
54
|
+
"@storybook/builder-vite": "^10.4.2",
|
|
55
|
+
"@storybook/cli": "^10.4.2",
|
|
56
|
+
"@storybook/react-vite": "^10.4.2",
|
|
57
57
|
"@tabler/icons-react": "3.41.1",
|
|
58
58
|
"@types/jest-image-snapshot": "^6.4.1",
|
|
59
59
|
"@types/react": "^19.2.14",
|
|
60
60
|
"@types/react-dom": "^19.2.3",
|
|
61
61
|
"@types/react-syntax-highlighter": "^15.5.13",
|
|
62
62
|
"@uiw/codemirror-themes": "^4.25.9",
|
|
63
|
-
"@uiw/react-codemirror": "^4.25.
|
|
63
|
+
"@uiw/react-codemirror": "^4.25.10",
|
|
64
64
|
"@vitejs/plugin-react": "^5.2.0",
|
|
65
65
|
"@vitest/browser-playwright": "^4.1.2",
|
|
66
66
|
"@vitest/coverage-v8": "^4.1.2",
|
|
67
|
-
"@xyflow/react": "^12.10.1",
|
|
68
67
|
"avvvatars-react": "^0.4.2",
|
|
69
68
|
"axe-playwright": "^2.2.2",
|
|
70
69
|
"babel-loader": "^10.1.1",
|
|
@@ -86,7 +85,7 @@
|
|
|
86
85
|
"sass": "^1.99.0",
|
|
87
86
|
"sass-loader": "^16.0.7",
|
|
88
87
|
"sonner": "^2.0.7",
|
|
89
|
-
"storybook": "^10.
|
|
88
|
+
"storybook": "^10.4.2",
|
|
90
89
|
"style-loader": "^4.0.0",
|
|
91
90
|
"ts-jest": "^29.4.9",
|
|
92
91
|
"ts-node": "^10.9.2",
|
|
@@ -131,7 +130,6 @@
|
|
|
131
130
|
"@tabler/icons-react": "3.41.1",
|
|
132
131
|
"@uiw/codemirror-themes": "^4.25.4",
|
|
133
132
|
"@uiw/react-codemirror": "^4.25.4",
|
|
134
|
-
"@xyflow/react": "^12.10.0",
|
|
135
133
|
"avvvatars-react": "^0.4.2",
|
|
136
134
|
"cmdk": "^1.1.1",
|
|
137
135
|
"js-md5": "^0.8.3",
|