@arcanewizards/sigil 0.1.3 → 0.1.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/{chunk-WEKMHSZV.cjs → chunk-CHVABPET.cjs} +28 -28
- package/dist/{chunk-HF7IIHPE.js → chunk-E3VUC3Q4.js} +1 -1
- package/dist/{chunk-5DRI7C4U.cjs → chunk-TZJ4UXR3.cjs} +1 -12
- package/dist/{chunk-H4U4Z4GM.js → chunk-WYUGJOEB.js} +0 -11
- package/dist/frontend/appearance.cjs +6 -6
- package/dist/frontend/appearance.js +2 -2
- package/dist/frontend/controls/index.cjs +3 -3
- package/dist/frontend/controls/index.js +2 -2
- package/dist/frontend/dialogs.cjs +3 -3
- package/dist/frontend/dialogs.js +2 -2
- package/dist/frontend/styling.cjs +2 -4
- package/dist/frontend/styling.d.cts +1 -5
- package/dist/frontend/styling.d.ts +1 -5
- package/dist/frontend/styling.hooks.cjs +18 -0
- package/dist/frontend/styling.hooks.d.cts +10 -0
- package/dist/frontend/styling.hooks.d.ts +10 -0
- package/dist/frontend/styling.hooks.js +18 -0
- package/dist/frontend/styling.js +3 -5
- package/dist/frontend.cjs +8 -8
- package/dist/frontend.js +2 -2
- package/package.json +9 -3
|
@@ -9,7 +9,7 @@ var _chunkRI33QVODcjs = require('./chunk-RI33QVOD.cjs');
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkTZJ4UXR3cjs = require('./chunk-TZJ4UXR3.cjs');
|
|
13
13
|
|
|
14
14
|
// src/frontend/dialogs.tsx
|
|
15
15
|
|
|
@@ -75,7 +75,7 @@ var CONTROL_BUTTON_VAR_SUFFIX = {
|
|
|
75
75
|
borderActive: "border-active"
|
|
76
76
|
};
|
|
77
77
|
var controlButtonColorVariable = (property) => `--sigil-control-button-${CONTROL_BUTTON_VAR_SUFFIX[property]}`;
|
|
78
|
-
var controlButtonColorVariables = (usage) =>
|
|
78
|
+
var controlButtonColorVariables = (usage) => _chunkTZJ4UXR3cjs.cssVariables.call(void 0,
|
|
79
79
|
Object.fromEntries(
|
|
80
80
|
Object.keys(usage).map(
|
|
81
81
|
(key) => [controlButtonColorVariable(key), usage[key]]
|
|
@@ -91,16 +91,16 @@ var clsControlButton = ({
|
|
|
91
91
|
primary
|
|
92
92
|
}) => _util.cn.call(void 0,
|
|
93
93
|
`sigil-control-button`,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
94
|
+
_chunkTZJ4UXR3cjs.cnd.call(void 0, variant === "border", `sigil-control-button-variant-border`),
|
|
95
|
+
_chunkTZJ4UXR3cjs.cnd.call(void 0, variant === "large", `sigil-control-button-variant-large`),
|
|
96
|
+
_chunkTZJ4UXR3cjs.cnd.call(void 0, variant === "properties", `sigil-control-button-variant-properties`),
|
|
97
|
+
_chunkTZJ4UXR3cjs.cnd.call(void 0, variant === "table-row", `sigil-control-button-variant-table-row`),
|
|
98
|
+
_chunkTZJ4UXR3cjs.cnd.call(void 0, variant === "toolbar", `sigil-control-button-variant-toolbar`),
|
|
99
|
+
_chunkTZJ4UXR3cjs.cnd.call(void 0, variant === "titlebar", `sigil-control-button-variant-titlebar`),
|
|
100
|
+
_chunkTZJ4UXR3cjs.cnd.call(void 0, touching, `sigil-control-button-touching`),
|
|
101
|
+
_chunkTZJ4UXR3cjs.cnd.call(void 0, active, `sigil-control-button-active`),
|
|
102
|
+
_chunkTZJ4UXR3cjs.cnd.call(void 0, touching && active, `sigil-control-button-active-touching`),
|
|
103
|
+
_chunkTZJ4UXR3cjs.cnd.call(void 0, primary, `sigil-control-button-primary`),
|
|
104
104
|
clsControlPosition(position),
|
|
105
105
|
className
|
|
106
106
|
);
|
|
@@ -140,7 +140,7 @@ var ControlButtonFrame = _react.forwardRef.call(void 0,
|
|
|
140
140
|
_core.Icon,
|
|
141
141
|
{
|
|
142
142
|
icon,
|
|
143
|
-
className: _util.cn.call(void 0,
|
|
143
|
+
className: _util.cn.call(void 0, _chunkTZJ4UXR3cjs.cnd.call(void 0, children, "text-[120%]", "text-[150%]"))
|
|
144
144
|
}
|
|
145
145
|
),
|
|
146
146
|
children
|
|
@@ -217,14 +217,14 @@ var ControlParagraph = _react.forwardRef.call(void 0, ({ className, mode, positi
|
|
|
217
217
|
className: _util.cn.call(void 0,
|
|
218
218
|
"border border-transparent",
|
|
219
219
|
clsControlPosition(position),
|
|
220
|
-
|
|
220
|
+
_chunkTZJ4UXR3cjs.cnd.call(void 0,
|
|
221
221
|
mode === "success",
|
|
222
222
|
`
|
|
223
223
|
border-sigil-usage-green-dimmed-border
|
|
224
224
|
bg-sigil-usage-green-dimmed-background p-1 text-sigil-usage-green-text
|
|
225
225
|
`
|
|
226
226
|
),
|
|
227
|
-
|
|
227
|
+
_chunkTZJ4UXR3cjs.cnd.call(void 0,
|
|
228
228
|
mode === "warning",
|
|
229
229
|
`
|
|
230
230
|
border-sigil-usage-yellow-dimmed-border
|
|
@@ -232,7 +232,7 @@ var ControlParagraph = _react.forwardRef.call(void 0, ({ className, mode, positi
|
|
|
232
232
|
text-sigil-usage-yellow-text
|
|
233
233
|
`
|
|
234
234
|
),
|
|
235
|
-
|
|
235
|
+
_chunkTZJ4UXR3cjs.cnd.call(void 0,
|
|
236
236
|
mode === "error",
|
|
237
237
|
`
|
|
238
238
|
border-sigil-usage-red-dimmed-border
|
|
@@ -254,8 +254,8 @@ var ControlLabel = _react.forwardRef.call(void 0,
|
|
|
254
254
|
className: _util.cn.call(void 0,
|
|
255
255
|
"flex items-center justify-end gap-0.6 p-0.6",
|
|
256
256
|
clsControlPosition(position),
|
|
257
|
-
|
|
258
|
-
|
|
257
|
+
_chunkTZJ4UXR3cjs.cnd.call(void 0, nonMicro, "max-[550px]:hidden"),
|
|
258
|
+
_chunkTZJ4UXR3cjs.cnd.call(void 0, disabled, "opacity-50"),
|
|
259
259
|
clsControlSubgridPosition(position, subgrid),
|
|
260
260
|
className
|
|
261
261
|
)
|
|
@@ -273,9 +273,9 @@ var ControlDetails = _react.forwardRef.call(void 0,
|
|
|
273
273
|
className: _util.cn.call(void 0,
|
|
274
274
|
"flex items-center px-0.3 text-sigil-foreground-muted",
|
|
275
275
|
clsControlPosition(position),
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
276
|
+
_chunkTZJ4UXR3cjs.cnd.call(void 0, align === "start", "justify-start"),
|
|
277
|
+
_chunkTZJ4UXR3cjs.cnd.call(void 0, align === "center", "justify-center"),
|
|
278
|
+
_chunkTZJ4UXR3cjs.cnd.call(void 0, align === "end", "justify-end"),
|
|
279
279
|
className
|
|
280
280
|
)
|
|
281
281
|
}
|
|
@@ -318,7 +318,7 @@ var ControlDialog = ({
|
|
|
318
318
|
{
|
|
319
319
|
className: _util.cn.call(void 0,
|
|
320
320
|
"gap-1 bg-sigil-bg-dark select-none",
|
|
321
|
-
|
|
321
|
+
_chunkTZJ4UXR3cjs.cnd.call(void 0, large, "control-grid-large", "control-grid")
|
|
322
322
|
),
|
|
323
323
|
children
|
|
324
324
|
}
|
|
@@ -413,7 +413,7 @@ var ControlInput = ({
|
|
|
413
413
|
`,
|
|
414
414
|
clsControlPosition(position),
|
|
415
415
|
clsControlSubgridPosition(position, subgrid),
|
|
416
|
-
|
|
416
|
+
_chunkTZJ4UXR3cjs.cnd.call(void 0, nonMicro, "max-[550px]:hidden"),
|
|
417
417
|
className
|
|
418
418
|
)
|
|
419
419
|
}
|
|
@@ -528,7 +528,7 @@ var ControlColorSelect = ({
|
|
|
528
528
|
...props
|
|
529
529
|
}) => {
|
|
530
530
|
const options = Object.values(COLOR_OPTIONS);
|
|
531
|
-
const selectedColor =
|
|
531
|
+
const selectedColor = _chunkTZJ4UXR3cjs.sigilColorUsage.call(void 0, color || "gray");
|
|
532
532
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
533
533
|
ControlSelect,
|
|
534
534
|
{
|
|
@@ -625,7 +625,7 @@ var DialogTitle = _react.forwardRef.call(void 0,
|
|
|
625
625
|
flex items-center justify-center gap-0.6 border-b border-sigil-border
|
|
626
626
|
p-arcane font-bold
|
|
627
627
|
`,
|
|
628
|
-
|
|
628
|
+
_chunkTZJ4UXR3cjs.cnd.call(void 0, isDarkDialog(variant), "bg-sigil-bg-light", "bg-sigil-bg-dark"),
|
|
629
629
|
className
|
|
630
630
|
)
|
|
631
631
|
}
|
|
@@ -678,7 +678,7 @@ var Dialog = ({
|
|
|
678
678
|
max-w-[80vw] min-w-[10vw] border-none p-0 text-sigil-dialog-foreground
|
|
679
679
|
outline-none backdrop-sigil-dialog
|
|
680
680
|
`,
|
|
681
|
-
|
|
681
|
+
_chunkTZJ4UXR3cjs.cnd.call(void 0, isDarkDialog(variant), "bg-sigil-bg-dark", "bg-sigil-bg-light")
|
|
682
682
|
),
|
|
683
683
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "border border-sigil-border", children: [
|
|
684
684
|
title && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTitle, { variant, children: title }),
|
|
@@ -687,11 +687,11 @@ var Dialog = ({
|
|
|
687
687
|
{
|
|
688
688
|
className: _util.cn.call(void 0,
|
|
689
689
|
"text-sigil-foreground",
|
|
690
|
-
|
|
690
|
+
_chunkTZJ4UXR3cjs.cnd.call(void 0,
|
|
691
691
|
variant === "light-compact" || variant === "dark-compact",
|
|
692
692
|
"p-0"
|
|
693
693
|
),
|
|
694
|
-
|
|
694
|
+
_chunkTZJ4UXR3cjs.cnd.call(void 0,
|
|
695
695
|
variant !== "light-compact" && variant !== "dark-compact",
|
|
696
696
|
"p-arcane"
|
|
697
697
|
)
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/frontend/styling.ts
|
|
2
|
-
var _react = require('react');
|
|
3
2
|
var _zod = require('zod');
|
|
4
3
|
var SIGIL_COLOR = _zod.z.enum([
|
|
5
4
|
"purple",
|
|
@@ -41,15 +40,6 @@ var cssSigilColorUsageVariables = (prefix, usage) => cssVariables({
|
|
|
41
40
|
[`--${prefix}-gradient-dark`]: usage.gradientDark
|
|
42
41
|
});
|
|
43
42
|
var cssHintColorVariables = (color) => cssSigilColorUsageVariables(`sigil-usage-hint`, sigilColorUsage(color));
|
|
44
|
-
var useRootHintVariables = (color) => {
|
|
45
|
-
_react.useEffect.call(void 0, () => {
|
|
46
|
-
const root = document.querySelector(".arcane-theme-root");
|
|
47
|
-
if (!root) return;
|
|
48
|
-
Object.entries(cssHintColorVariables(color)).forEach(([key, value]) => {
|
|
49
|
-
root.style.setProperty(key, value);
|
|
50
|
-
});
|
|
51
|
-
}, [color]);
|
|
52
|
-
};
|
|
53
43
|
var cssVariables = (variables) => variables;
|
|
54
44
|
function cnd(condition, truthyClassName, falseyClassName) {
|
|
55
45
|
return condition ? truthyClassName : falseyClassName;
|
|
@@ -62,5 +52,4 @@ function cnd(condition, truthyClassName, falseyClassName) {
|
|
|
62
52
|
|
|
63
53
|
|
|
64
54
|
|
|
65
|
-
|
|
66
|
-
exports.SIGIL_COLOR = SIGIL_COLOR; exports.sigilColorUsage = sigilColorUsage; exports.cssSigilColorUsageVariables = cssSigilColorUsageVariables; exports.cssHintColorVariables = cssHintColorVariables; exports.useRootHintVariables = useRootHintVariables; exports.cssVariables = cssVariables; exports.cnd = cnd;
|
|
55
|
+
exports.SIGIL_COLOR = SIGIL_COLOR; exports.sigilColorUsage = sigilColorUsage; exports.cssSigilColorUsageVariables = cssSigilColorUsageVariables; exports.cssHintColorVariables = cssHintColorVariables; exports.cssVariables = cssVariables; exports.cnd = cnd;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
// src/frontend/styling.ts
|
|
2
|
-
import { useEffect } from "react";
|
|
3
2
|
import { z } from "zod";
|
|
4
3
|
var SIGIL_COLOR = z.enum([
|
|
5
4
|
"purple",
|
|
@@ -41,15 +40,6 @@ var cssSigilColorUsageVariables = (prefix, usage) => cssVariables({
|
|
|
41
40
|
[`--${prefix}-gradient-dark`]: usage.gradientDark
|
|
42
41
|
});
|
|
43
42
|
var cssHintColorVariables = (color) => cssSigilColorUsageVariables(`sigil-usage-hint`, sigilColorUsage(color));
|
|
44
|
-
var useRootHintVariables = (color) => {
|
|
45
|
-
useEffect(() => {
|
|
46
|
-
const root = document.querySelector(".arcane-theme-root");
|
|
47
|
-
if (!root) return;
|
|
48
|
-
Object.entries(cssHintColorVariables(color)).forEach(([key, value]) => {
|
|
49
|
-
root.style.setProperty(key, value);
|
|
50
|
-
});
|
|
51
|
-
}, [color]);
|
|
52
|
-
};
|
|
53
43
|
var cssVariables = (variables) => variables;
|
|
54
44
|
function cnd(condition, truthyClassName, falseyClassName) {
|
|
55
45
|
return condition ? truthyClassName : falseyClassName;
|
|
@@ -60,7 +50,6 @@ export {
|
|
|
60
50
|
sigilColorUsage,
|
|
61
51
|
cssSigilColorUsageVariables,
|
|
62
52
|
cssHintColorVariables,
|
|
63
|
-
useRootHintVariables,
|
|
64
53
|
cssVariables,
|
|
65
54
|
cnd
|
|
66
55
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkCHVABPETcjs = require('../chunk-CHVABPET.cjs');
|
|
5
5
|
require('../chunk-PEARNJ5G.cjs');
|
|
6
6
|
require('../chunk-RI33QVOD.cjs');
|
|
7
|
-
require('../chunk-
|
|
7
|
+
require('../chunk-TZJ4UXR3.cjs');
|
|
8
8
|
|
|
9
9
|
// src/frontend/appearance.tsx
|
|
10
10
|
var _core = require('@arcanejs/toolkit-frontend/components/core');
|
|
@@ -35,7 +35,7 @@ var AppearanceSwitcher = ({
|
|
|
35
35
|
);
|
|
36
36
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "control-grid-pos-all flex flex-wrap items-stretch gap-2", children: [
|
|
37
37
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
38
|
-
|
|
38
|
+
_chunkCHVABPETcjs.ControlButton,
|
|
39
39
|
{
|
|
40
40
|
onClick: selectDarkMode,
|
|
41
41
|
active: colorSchemePreference === "dark",
|
|
@@ -48,7 +48,7 @@ var AppearanceSwitcher = ({
|
|
|
48
48
|
}
|
|
49
49
|
),
|
|
50
50
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
51
|
-
|
|
51
|
+
_chunkCHVABPETcjs.ControlButton,
|
|
52
52
|
{
|
|
53
53
|
onClick: selectLightMode,
|
|
54
54
|
active: colorSchemePreference === "light",
|
|
@@ -61,7 +61,7 @@ var AppearanceSwitcher = ({
|
|
|
61
61
|
}
|
|
62
62
|
),
|
|
63
63
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
64
|
-
|
|
64
|
+
_chunkCHVABPETcjs.ControlButton,
|
|
65
65
|
{
|
|
66
66
|
onClick: selectSystemMode,
|
|
67
67
|
active: colorSchemePreference === "auto",
|
|
@@ -74,7 +74,7 @@ var AppearanceSwitcher = ({
|
|
|
74
74
|
}
|
|
75
75
|
),
|
|
76
76
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
77
|
-
|
|
77
|
+
_chunkCHVABPETcjs.ControlColorSelect,
|
|
78
78
|
{
|
|
79
79
|
color,
|
|
80
80
|
onChange: updateHintColor,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ControlButton,
|
|
3
3
|
ControlColorSelect
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-E3VUC3Q4.js";
|
|
5
5
|
import "../chunk-BIY5HAXP.js";
|
|
6
6
|
import "../chunk-4PMRDURG.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-WYUGJOEB.js";
|
|
8
8
|
|
|
9
9
|
// src/frontend/appearance.tsx
|
|
10
10
|
import { Icon } from "@arcanejs/toolkit-frontend/components/core";
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkCHVABPETcjs = require('../../chunk-CHVABPET.cjs');
|
|
24
24
|
require('../../chunk-PEARNJ5G.cjs');
|
|
25
25
|
require('../../chunk-RI33QVOD.cjs');
|
|
26
|
-
require('../../chunk-
|
|
26
|
+
require('../../chunk-TZJ4UXR3.cjs');
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
@@ -46,4 +46,4 @@ require('../../chunk-5DRI7C4U.cjs');
|
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
exports.CheckboxControlButton =
|
|
49
|
+
exports.CheckboxControlButton = _chunkCHVABPETcjs.CheckboxControlButton; exports.ControlButton = _chunkCHVABPETcjs.ControlButton; exports.ControlButtonGroup = _chunkCHVABPETcjs.ControlButtonGroup; exports.ControlColorSelect = _chunkCHVABPETcjs.ControlColorSelect; exports.ControlDetails = _chunkCHVABPETcjs.ControlDetails; exports.ControlDialog = _chunkCHVABPETcjs.ControlDialog; exports.ControlDialogButtons = _chunkCHVABPETcjs.ControlDialogButtons; exports.ControlInput = _chunkCHVABPETcjs.ControlInput; exports.ControlLabel = _chunkCHVABPETcjs.ControlLabel; exports.ControlParagraph = _chunkCHVABPETcjs.ControlParagraph; exports.ControlPercent = _chunkCHVABPETcjs.ControlPercent; exports.ControlSelect = _chunkCHVABPETcjs.ControlSelect; exports.InputSpanningTitle = _chunkCHVABPETcjs.InputSpanningTitle; exports.InputWithDelayedPropagation = _chunkCHVABPETcjs.InputWithDelayedPropagation; exports.LongPressableControlButton = _chunkCHVABPETcjs.LongPressableControlButton; exports.clsControlButton = _chunkCHVABPETcjs.clsControlButton; exports.clsControlPosition = _chunkCHVABPETcjs.clsControlPosition; exports.clsControlSubgridPosition = _chunkCHVABPETcjs.clsControlSubgridPosition; exports.controlButtonColorVariable = _chunkCHVABPETcjs.controlButtonColorVariable; exports.controlButtonColorVariables = _chunkCHVABPETcjs.controlButtonColorVariables; exports.controlPositionClass = _chunkCHVABPETcjs.controlPositionClass;
|
|
@@ -20,10 +20,10 @@ import {
|
|
|
20
20
|
controlButtonColorVariable,
|
|
21
21
|
controlButtonColorVariables,
|
|
22
22
|
controlPositionClass
|
|
23
|
-
} from "../../chunk-
|
|
23
|
+
} from "../../chunk-E3VUC3Q4.js";
|
|
24
24
|
import "../../chunk-BIY5HAXP.js";
|
|
25
25
|
import "../../chunk-4PMRDURG.js";
|
|
26
|
-
import "../../chunk-
|
|
26
|
+
import "../../chunk-WYUGJOEB.js";
|
|
27
27
|
export {
|
|
28
28
|
CheckboxControlButton,
|
|
29
29
|
ControlButton,
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkCHVABPETcjs = require('../chunk-CHVABPET.cjs');
|
|
8
8
|
require('../chunk-PEARNJ5G.cjs');
|
|
9
9
|
require('../chunk-RI33QVOD.cjs');
|
|
10
|
-
require('../chunk-
|
|
10
|
+
require('../chunk-TZJ4UXR3.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
exports.Dialog =
|
|
17
|
+
exports.Dialog = _chunkCHVABPETcjs.Dialog; exports.DialogButtons = _chunkCHVABPETcjs.DialogButtons; exports.DialogContext = _chunkCHVABPETcjs.DialogContext; exports.DialogProvider = _chunkCHVABPETcjs.DialogProvider; exports.DialogTitle = _chunkCHVABPETcjs.DialogTitle;
|
package/dist/frontend/dialogs.js
CHANGED
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
DialogContext,
|
|
5
5
|
DialogProvider,
|
|
6
6
|
DialogTitle
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-E3VUC3Q4.js";
|
|
8
8
|
import "../chunk-BIY5HAXP.js";
|
|
9
9
|
import "../chunk-4PMRDURG.js";
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-WYUGJOEB.js";
|
|
11
11
|
export {
|
|
12
12
|
Dialog,
|
|
13
13
|
DialogButtons,
|
|
@@ -5,14 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
var _chunkTZJ4UXR3cjs = require('../chunk-TZJ4UXR3.cjs');
|
|
8
9
|
|
|
9
|
-
var _chunk5DRI7C4Ucjs = require('../chunk-5DRI7C4U.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
exports.SIGIL_COLOR = _chunk5DRI7C4Ucjs.SIGIL_COLOR; exports.cnd = _chunk5DRI7C4Ucjs.cnd; exports.cssHintColorVariables = _chunk5DRI7C4Ucjs.cssHintColorVariables; exports.cssSigilColorUsageVariables = _chunk5DRI7C4Ucjs.cssSigilColorUsageVariables; exports.cssVariables = _chunk5DRI7C4Ucjs.cssVariables; exports.sigilColorUsage = _chunk5DRI7C4Ucjs.sigilColorUsage; exports.useRootHintVariables = _chunk5DRI7C4Ucjs.useRootHintVariables;
|
|
16
|
+
exports.SIGIL_COLOR = _chunkTZJ4UXR3cjs.SIGIL_COLOR; exports.cnd = _chunkTZJ4UXR3cjs.cnd; exports.cssHintColorVariables = _chunkTZJ4UXR3cjs.cssHintColorVariables; exports.cssSigilColorUsageVariables = _chunkTZJ4UXR3cjs.cssSigilColorUsageVariables; exports.cssVariables = _chunkTZJ4UXR3cjs.cssVariables; exports.sigilColorUsage = _chunkTZJ4UXR3cjs.sigilColorUsage;
|
|
@@ -21,12 +21,8 @@ type SigilUsageColorUsage = {
|
|
|
21
21
|
declare const sigilColorUsage: (color: SigilUsageColor) => SigilUsageColorUsage;
|
|
22
22
|
declare const cssSigilColorUsageVariables: (prefix: string, usage: SigilUsageColorUsage) => CSSProperties;
|
|
23
23
|
declare const cssHintColorVariables: (color: SigilColor) => CSSProperties;
|
|
24
|
-
/**
|
|
25
|
-
* Hook that will adjust the root hint color based on the given color.
|
|
26
|
-
*/
|
|
27
|
-
declare const useRootHintVariables: (color: SigilColor) => void;
|
|
28
24
|
declare const cssVariables: (variables: Partial<Record<`--${string}`, string | number>>) => CSSProperties;
|
|
29
25
|
declare function cnd<T extends string>(condition: unknown, truthyClassName: T): T | undefined;
|
|
30
26
|
declare function cnd<T extends string, F extends string>(condition: unknown, truthyClassName: T, falseyClassName: F): T | F;
|
|
31
27
|
|
|
32
|
-
export { SIGIL_COLOR, type SigilColor, type SigilUsageColor, type SigilUsageColorUsage, cnd, cssHintColorVariables, cssSigilColorUsageVariables, cssVariables, sigilColorUsage
|
|
28
|
+
export { SIGIL_COLOR, type SigilColor, type SigilUsageColor, type SigilUsageColorUsage, cnd, cssHintColorVariables, cssSigilColorUsageVariables, cssVariables, sigilColorUsage };
|
|
@@ -21,12 +21,8 @@ type SigilUsageColorUsage = {
|
|
|
21
21
|
declare const sigilColorUsage: (color: SigilUsageColor) => SigilUsageColorUsage;
|
|
22
22
|
declare const cssSigilColorUsageVariables: (prefix: string, usage: SigilUsageColorUsage) => CSSProperties;
|
|
23
23
|
declare const cssHintColorVariables: (color: SigilColor) => CSSProperties;
|
|
24
|
-
/**
|
|
25
|
-
* Hook that will adjust the root hint color based on the given color.
|
|
26
|
-
*/
|
|
27
|
-
declare const useRootHintVariables: (color: SigilColor) => void;
|
|
28
24
|
declare const cssVariables: (variables: Partial<Record<`--${string}`, string | number>>) => CSSProperties;
|
|
29
25
|
declare function cnd<T extends string>(condition: unknown, truthyClassName: T): T | undefined;
|
|
30
26
|
declare function cnd<T extends string, F extends string>(condition: unknown, truthyClassName: T, falseyClassName: F): T | F;
|
|
31
27
|
|
|
32
|
-
export { SIGIL_COLOR, type SigilColor, type SigilUsageColor, type SigilUsageColorUsage, cnd, cssHintColorVariables, cssSigilColorUsageVariables, cssVariables, sigilColorUsage
|
|
28
|
+
export { SIGIL_COLOR, type SigilColor, type SigilUsageColor, type SigilUsageColorUsage, cnd, cssHintColorVariables, cssSigilColorUsageVariables, cssVariables, sigilColorUsage };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkTZJ4UXR3cjs = require('../chunk-TZJ4UXR3.cjs');
|
|
4
|
+
|
|
5
|
+
// src/frontend/styling.hooks.ts
|
|
6
|
+
var _react = require('react');
|
|
7
|
+
var useRootHintVariables = (color) => {
|
|
8
|
+
_react.useEffect.call(void 0, () => {
|
|
9
|
+
const root = document.querySelector(".arcane-theme-root");
|
|
10
|
+
if (!root) return;
|
|
11
|
+
Object.entries(_chunkTZJ4UXR3cjs.cssHintColorVariables.call(void 0, color)).forEach(([key, value]) => {
|
|
12
|
+
root.style.setProperty(key, value);
|
|
13
|
+
});
|
|
14
|
+
}, [color]);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
exports.useRootHintVariables = useRootHintVariables;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SigilColor } from './styling.cjs';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'zod';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Hook that will adjust the root hint color based on the given color.
|
|
7
|
+
*/
|
|
8
|
+
declare const useRootHintVariables: (color: SigilColor) => void;
|
|
9
|
+
|
|
10
|
+
export { useRootHintVariables };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SigilColor } from './styling.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'zod';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Hook that will adjust the root hint color based on the given color.
|
|
7
|
+
*/
|
|
8
|
+
declare const useRootHintVariables: (color: SigilColor) => void;
|
|
9
|
+
|
|
10
|
+
export { useRootHintVariables };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cssHintColorVariables
|
|
3
|
+
} from "../chunk-WYUGJOEB.js";
|
|
4
|
+
|
|
5
|
+
// src/frontend/styling.hooks.ts
|
|
6
|
+
import { useEffect } from "react";
|
|
7
|
+
var useRootHintVariables = (color) => {
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
const root = document.querySelector(".arcane-theme-root");
|
|
10
|
+
if (!root) return;
|
|
11
|
+
Object.entries(cssHintColorVariables(color)).forEach(([key, value]) => {
|
|
12
|
+
root.style.setProperty(key, value);
|
|
13
|
+
});
|
|
14
|
+
}, [color]);
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
useRootHintVariables
|
|
18
|
+
};
|
package/dist/frontend/styling.js
CHANGED
|
@@ -4,15 +4,13 @@ import {
|
|
|
4
4
|
cssHintColorVariables,
|
|
5
5
|
cssSigilColorUsageVariables,
|
|
6
6
|
cssVariables,
|
|
7
|
-
sigilColorUsage
|
|
8
|
-
|
|
9
|
-
} from "../chunk-H4U4Z4GM.js";
|
|
7
|
+
sigilColorUsage
|
|
8
|
+
} from "../chunk-WYUGJOEB.js";
|
|
10
9
|
export {
|
|
11
10
|
SIGIL_COLOR,
|
|
12
11
|
cnd,
|
|
13
12
|
cssHintColorVariables,
|
|
14
13
|
cssSigilColorUsageVariables,
|
|
15
14
|
cssVariables,
|
|
16
|
-
sigilColorUsage
|
|
17
|
-
useRootHintVariables
|
|
15
|
+
sigilColorUsage
|
|
18
16
|
};
|
package/dist/frontend.cjs
CHANGED
|
@@ -16,12 +16,12 @@ var _chunkCAYKPJIXcjs = require('./chunk-CAYKPJIX.cjs');
|
|
|
16
16
|
var _chunkVZ4A6RRTcjs = require('./chunk-VZ4A6RRT.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _chunkCHVABPETcjs = require('./chunk-CHVABPET.cjs');
|
|
20
20
|
require('./chunk-PEARNJ5G.cjs');
|
|
21
21
|
require('./chunk-RI33QVOD.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunkTZJ4UXR3cjs = require('./chunk-TZJ4UXR3.cjs');
|
|
25
25
|
|
|
26
26
|
// src/frontend/app-root.tsx
|
|
27
27
|
var _toolkitfrontend = require('@arcanejs/toolkit-frontend');
|
|
@@ -242,7 +242,7 @@ var Debugger = ({ title, className }) => {
|
|
|
242
242
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "grow px-1", children: title }),
|
|
243
243
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkA5LYYZERcjs.ToolbarDivider, {}),
|
|
244
244
|
openDevTools && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
245
|
-
|
|
245
|
+
_chunkCHVABPETcjs.ControlButton,
|
|
246
246
|
{
|
|
247
247
|
onClick: openDevTools,
|
|
248
248
|
variant: "toolbar",
|
|
@@ -251,7 +251,7 @@ var Debugger = ({ title, className }) => {
|
|
|
251
251
|
}
|
|
252
252
|
),
|
|
253
253
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
254
|
-
|
|
254
|
+
_chunkCHVABPETcjs.ControlButton,
|
|
255
255
|
{
|
|
256
256
|
onClick: handleRequestScrollToBottom,
|
|
257
257
|
variant: "toolbar",
|
|
@@ -259,7 +259,7 @@ var Debugger = ({ title, className }) => {
|
|
|
259
259
|
children: "Scroll to Bottom"
|
|
260
260
|
}
|
|
261
261
|
),
|
|
262
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
262
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCHVABPETcjs.ControlButton, { onClick: exportLogs, variant: "toolbar", icon: "publish", children: "Export Logs" })
|
|
263
263
|
] }) }),
|
|
264
264
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
265
265
|
"pre",
|
|
@@ -286,12 +286,12 @@ Data Directory: ${system.dataDirectory}`
|
|
|
286
286
|
"span",
|
|
287
287
|
{
|
|
288
288
|
className: _util.cn.call(void 0,
|
|
289
|
-
|
|
290
|
-
|
|
289
|
+
_chunkTZJ4UXR3cjs.cnd.call(void 0, log.level === "error", "text-sigil-usage-red-foreground"),
|
|
290
|
+
_chunkTZJ4UXR3cjs.cnd.call(void 0,
|
|
291
291
|
log.level === "warn",
|
|
292
292
|
"text-sigil-usage-yellow-foreground"
|
|
293
293
|
),
|
|
294
|
-
|
|
294
|
+
_chunkTZJ4UXR3cjs.cnd.call(void 0, log.level === "info", "text-sigil-usage-blue-foreground")
|
|
295
295
|
),
|
|
296
296
|
children: log.level
|
|
297
297
|
}
|
package/dist/frontend.js
CHANGED
|
@@ -16,12 +16,12 @@ import {
|
|
|
16
16
|
} from "./chunk-EJNNLQ2S.js";
|
|
17
17
|
import {
|
|
18
18
|
ControlButton
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-E3VUC3Q4.js";
|
|
20
20
|
import "./chunk-BIY5HAXP.js";
|
|
21
21
|
import "./chunk-4PMRDURG.js";
|
|
22
22
|
import {
|
|
23
23
|
cnd
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-WYUGJOEB.js";
|
|
25
25
|
|
|
26
26
|
// src/frontend/app-root.tsx
|
|
27
27
|
import { StageContext } from "@arcanejs/toolkit-frontend";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcanewizards/sigil",
|
|
3
3
|
"description": "Application framework for A/V applications, built on-top of arcanejs",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.4",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
@@ -65,6 +65,12 @@
|
|
|
65
65
|
"import": "./dist/frontend/styling.js",
|
|
66
66
|
"require": "./dist/frontend/styling.cjs"
|
|
67
67
|
},
|
|
68
|
+
"./frontend/styling.hooks": {
|
|
69
|
+
"@arcanewizards/source": "./src/frontend/styling.hooks.ts",
|
|
70
|
+
"types": "./dist/frontend/styling.hooks.d.ts",
|
|
71
|
+
"import": "./dist/frontend/styling.hooks.js",
|
|
72
|
+
"require": "./dist/frontend/styling.hooks.cjs"
|
|
73
|
+
},
|
|
68
74
|
"./frontend/toolbars": {
|
|
69
75
|
"@arcanewizards/source": "./src/frontend/toolbars.tsx",
|
|
70
76
|
"types": "./dist/frontend/toolbars.d.ts",
|
|
@@ -115,8 +121,8 @@
|
|
|
115
121
|
"tailwindcss": "^4.1.13",
|
|
116
122
|
"tsup": "^8.1.0",
|
|
117
123
|
"typescript": "^5.7.3",
|
|
118
|
-
"@arcanewizards/
|
|
119
|
-
"@arcanewizards/
|
|
124
|
+
"@arcanewizards/typescript-config": "^0.0.0",
|
|
125
|
+
"@arcanewizards/eslint-config": "^0.0.0"
|
|
120
126
|
},
|
|
121
127
|
"scripts": {
|
|
122
128
|
"build": "rm -rf dist && tsup && pnpm build:styles && check-export-map",
|