@arcanejs/toolkit-frontend 0.3.1 → 0.5.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.
- package/dist/{chunk-XEIKOLS2.js → chunk-7VTNOX5O.js} +30 -2
- package/dist/{chunk-6Z2ACPNM.mjs → chunk-BQS6YM6U.mjs} +75 -14
- package/dist/{chunk-35U577MM.mjs → chunk-E7JSREGM.mjs} +29 -1
- package/dist/{chunk-UJVH3PQF.mjs → chunk-MESQQRK3.mjs} +2 -4
- package/dist/{chunk-KNYDA6D6.js → chunk-T3QSZARM.js} +3 -5
- package/dist/{chunk-Y5UYS6EX.js → chunk-WVMAJYGI.js} +73 -12
- package/dist/components/core/index.js +3 -4
- package/dist/components/core/index.mjs +2 -3
- package/dist/components/index.d.mts +5 -3
- package/dist/components/index.d.ts +5 -3
- package/dist/components/index.js +97 -102
- package/dist/components/index.mjs +69 -74
- package/dist/styling.d.mts +23 -3
- package/dist/styling.d.ts +23 -3
- package/dist/styling.js +7 -3
- package/dist/styling.mjs +8 -4
- package/dist/util/index.d.mts +2 -1
- package/dist/util/index.d.ts +2 -1
- package/dist/util/index.js +4 -3
- package/dist/util/index.mjs +3 -2
- package/package.json +5 -5
- package/dist/chunk-7P6ASYW6.mjs +0 -9
- package/dist/chunk-MLKGABMK.js +0 -9
|
@@ -2,9 +2,8 @@ import {
|
|
|
2
2
|
Icon,
|
|
3
3
|
TRANSPARENCY_SVG_URI,
|
|
4
4
|
core_exports
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-MESQQRK3.mjs";
|
|
6
6
|
import {
|
|
7
|
-
THEME,
|
|
8
7
|
buttonPressed,
|
|
9
8
|
buttonStateNormal,
|
|
10
9
|
buttonStateNormalActive,
|
|
@@ -12,13 +11,12 @@ import {
|
|
|
12
11
|
rectButton,
|
|
13
12
|
touchIndicatorNormal,
|
|
14
13
|
touchIndicatorTouching
|
|
15
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-BQS6YM6U.mjs";
|
|
16
15
|
import {
|
|
17
16
|
calculateClass,
|
|
18
17
|
trackTouch,
|
|
19
18
|
usePressable
|
|
20
|
-
} from "../chunk-
|
|
21
|
-
import "../chunk-7P6ASYW6.mjs";
|
|
19
|
+
} from "../chunk-E7JSREGM.mjs";
|
|
22
20
|
|
|
23
21
|
// src/components/index.tsx
|
|
24
22
|
import { isCoreComponent } from "@arcanejs/protocol/core";
|
|
@@ -29,12 +27,13 @@ import { styled } from "styled-components";
|
|
|
29
27
|
|
|
30
28
|
// src/components/context.ts
|
|
31
29
|
import { createContext } from "react";
|
|
32
|
-
var StageContext = createContext(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
})
|
|
30
|
+
var StageContext = createContext(
|
|
31
|
+
new Proxy({}, {
|
|
32
|
+
get: () => {
|
|
33
|
+
throw new Error("Missing StageContext.Provider");
|
|
34
|
+
}
|
|
35
|
+
})
|
|
36
|
+
);
|
|
38
37
|
|
|
39
38
|
// src/components/button.tsx
|
|
40
39
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -97,8 +96,8 @@ var StyledButton = styled(Button)`
|
|
|
97
96
|
}
|
|
98
97
|
|
|
99
98
|
&.${ERROR_CLASS} {
|
|
100
|
-
color: ${
|
|
101
|
-
border-color: ${
|
|
99
|
+
color: ${(p) => p.theme.colorRed};
|
|
100
|
+
border-color: ${(p) => p.theme.colorRed};
|
|
102
101
|
}
|
|
103
102
|
|
|
104
103
|
&.${TOUCHING_CLASS} {
|
|
@@ -138,19 +137,19 @@ var NestedContent = ({ className, children }) => {
|
|
|
138
137
|
};
|
|
139
138
|
NestedContent.displayName = "NestedContent";
|
|
140
139
|
var StyledNestedContent = styled2(NestedContent)`
|
|
141
|
-
padding: ${
|
|
142
|
-
box-shadow:
|
|
140
|
+
padding: ${(p) => p.theme.sizingPx.spacing / 2}px;
|
|
141
|
+
box-shadow: ${(p) => p.theme.shadows.boxShadowInset};
|
|
143
142
|
|
|
144
143
|
&.color-dark {
|
|
145
|
-
background: ${
|
|
144
|
+
background: ${(p) => p.theme.bgDark1};
|
|
146
145
|
}
|
|
147
146
|
|
|
148
147
|
&.color-lighter {
|
|
149
|
-
background: ${
|
|
148
|
+
background: ${(p) => p.theme.bg};
|
|
150
149
|
}
|
|
151
150
|
|
|
152
151
|
&.color-lighterer {
|
|
153
|
-
background: ${
|
|
152
|
+
background: ${(p) => p.theme.bgLight1};
|
|
154
153
|
}
|
|
155
154
|
`;
|
|
156
155
|
|
|
@@ -163,11 +162,11 @@ var Header = styled3.div`
|
|
|
163
162
|
display: flex;
|
|
164
163
|
align-items: center;
|
|
165
164
|
padding: 5px 2px;
|
|
166
|
-
background: ${
|
|
167
|
-
border-bottom: 1px solid ${
|
|
165
|
+
background: ${(p) => p.theme.borderDark};
|
|
166
|
+
border-bottom: 1px solid ${(p) => p.theme.borderDark};
|
|
168
167
|
|
|
169
168
|
&.touching {
|
|
170
|
-
background: ${
|
|
169
|
+
background: ${(p) => p.theme.bgDark1};
|
|
171
170
|
}
|
|
172
171
|
|
|
173
172
|
&.collapsed {
|
|
@@ -181,8 +180,8 @@ var Header = styled3.div`
|
|
|
181
180
|
var Label = styled3.span`
|
|
182
181
|
display: inline-block;
|
|
183
182
|
border-radius: 3px;
|
|
184
|
-
background: ${
|
|
185
|
-
border: 1px solid ${
|
|
183
|
+
background: ${(p) => p.theme.bg};
|
|
184
|
+
border: 1px solid ${(p) => p.theme.bgLight1};
|
|
186
185
|
padding: 3px 4px;
|
|
187
186
|
`;
|
|
188
187
|
var Grow = styled3.span({
|
|
@@ -200,7 +199,7 @@ var GroupChildren = styled3.div`
|
|
|
200
199
|
${(p) => p.info.direction === "vertical" ? "" : "align-items: center;"}
|
|
201
200
|
|
|
202
201
|
> * {
|
|
203
|
-
margin: ${
|
|
202
|
+
margin: ${(p) => p.theme.sizingPx.spacing / 2}px;
|
|
204
203
|
}
|
|
205
204
|
`;
|
|
206
205
|
var EditableTitle = styled3.span`
|
|
@@ -215,14 +214,14 @@ var EditableTitle = styled3.span`
|
|
|
215
214
|
}
|
|
216
215
|
|
|
217
216
|
> .icon {
|
|
218
|
-
color: ${
|
|
217
|
+
color: ${(p) => p.theme.textMuted};
|
|
219
218
|
}
|
|
220
219
|
|
|
221
220
|
&:hover {
|
|
222
|
-
background: ${
|
|
221
|
+
background: ${(p) => p.theme.bg};
|
|
223
222
|
|
|
224
223
|
> .icon {
|
|
225
|
-
color: ${
|
|
224
|
+
color: ${(p) => p.theme.hint};
|
|
226
225
|
}
|
|
227
226
|
}
|
|
228
227
|
`;
|
|
@@ -230,7 +229,7 @@ var TitleInput = styled3.input`
|
|
|
230
229
|
background: none;
|
|
231
230
|
border: none;
|
|
232
231
|
outline: none;
|
|
233
|
-
color: ${
|
|
232
|
+
color: ${(p) => p.theme.textNormal};
|
|
234
233
|
`;
|
|
235
234
|
var GroupStateContext = React3.createContext({
|
|
236
235
|
isCollapsed: () => {
|
|
@@ -334,12 +333,12 @@ var Group = ({ className, info }) => {
|
|
|
334
333
|
};
|
|
335
334
|
Group.displayName = "Group";
|
|
336
335
|
var StyledGroup = styled3(Group)`
|
|
337
|
-
border: 1px solid ${
|
|
336
|
+
border: 1px solid ${(p) => p.theme.borderDark};
|
|
338
337
|
|
|
339
338
|
> .title {
|
|
340
339
|
padding: 5px;
|
|
341
|
-
background: ${
|
|
342
|
-
border-bottom: 1px solid ${
|
|
340
|
+
background: ${(p) => p.theme.borderDark};
|
|
341
|
+
border-bottom: 1px solid ${(p) => p.theme.borderDark};
|
|
343
342
|
}
|
|
344
343
|
|
|
345
344
|
&.no-border {
|
|
@@ -369,7 +368,7 @@ var Wrapper = styled5.div`
|
|
|
369
368
|
background: url('${TRANSPARENCY_SVG_URI}');
|
|
370
369
|
background-repeat: repeat;
|
|
371
370
|
background-size: 10px;
|
|
372
|
-
border: 1px solid ${
|
|
371
|
+
border: 1px solid ${(p) => p.theme.borderDark};
|
|
373
372
|
|
|
374
373
|
&.${CLS_GROW} {
|
|
375
374
|
flex-grow: 1;
|
|
@@ -585,11 +584,11 @@ var StyledSliderButton = styled6(SliderButton)`
|
|
|
585
584
|
cursor: pointer;
|
|
586
585
|
transition: all 200ms;
|
|
587
586
|
border-radius: 3px;
|
|
588
|
-
border: 1px solid ${
|
|
587
|
+
border: 1px solid ${(p) => p.theme.borderDark};
|
|
589
588
|
${buttonStateNormal}
|
|
590
589
|
|
|
591
590
|
> input {
|
|
592
|
-
color: ${
|
|
591
|
+
color: ${(p) => p.theme.textNormal};
|
|
593
592
|
opacity: 0;
|
|
594
593
|
margin: 0 -9px;
|
|
595
594
|
padding: 6px 8px;
|
|
@@ -597,22 +596,22 @@ var StyledSliderButton = styled6(SliderButton)`
|
|
|
597
596
|
pointer-events: none;
|
|
598
597
|
transition: all 200ms;
|
|
599
598
|
border-radius: 3px;
|
|
600
|
-
background: ${
|
|
601
|
-
border: 1px solid ${
|
|
599
|
+
background: ${(p) => p.theme.bgDark1};
|
|
600
|
+
border: 1px solid ${(p) => p.theme.borderDark};
|
|
602
601
|
overflow: hidden;
|
|
603
|
-
box-shadow:
|
|
602
|
+
box-shadow: ${(p) => p.theme.shadows.boxShadowInset};
|
|
604
603
|
}
|
|
605
604
|
|
|
606
605
|
> .${CLASS_SLIDER_DISPLAY} {
|
|
607
606
|
flex-grow: 1;
|
|
608
607
|
margin: 0 ${SLIDER_PADDING / 2}px;
|
|
609
608
|
height: 4px;
|
|
610
|
-
background: ${
|
|
611
|
-
border: 1px solid ${
|
|
609
|
+
background: ${(p) => p.theme.bgDark1};
|
|
610
|
+
border: 1px solid ${(p) => p.theme.borderDark};
|
|
612
611
|
|
|
613
612
|
> .inner {
|
|
614
613
|
height: 100%;
|
|
615
|
-
background: ${
|
|
614
|
+
background: ${(p) => p.theme.hint};
|
|
616
615
|
}
|
|
617
616
|
|
|
618
617
|
&.${CLASS_GRADIENT} {
|
|
@@ -621,7 +620,7 @@ var StyledSliderButton = styled6(SliderButton)`
|
|
|
621
620
|
> .inner {
|
|
622
621
|
position: relative;
|
|
623
622
|
background: none;
|
|
624
|
-
border-right: 2px solid ${
|
|
623
|
+
border-right: 2px solid ${(p) => p.theme.borderDark};
|
|
625
624
|
|
|
626
625
|
&::before {
|
|
627
626
|
content: '';
|
|
@@ -630,7 +629,7 @@ var StyledSliderButton = styled6(SliderButton)`
|
|
|
630
629
|
top: -5px;
|
|
631
630
|
bottom: -5px;
|
|
632
631
|
right: -3px;
|
|
633
|
-
background: ${
|
|
632
|
+
background: ${(p) => p.theme.borderDark};
|
|
634
633
|
}
|
|
635
634
|
|
|
636
635
|
&::after {
|
|
@@ -640,7 +639,7 @@ var StyledSliderButton = styled6(SliderButton)`
|
|
|
640
639
|
top: -4px;
|
|
641
640
|
bottom: -4px;
|
|
642
641
|
right: -2px;
|
|
643
|
-
background: ${
|
|
642
|
+
background: ${(p) => p.theme.textNormal};
|
|
644
643
|
}
|
|
645
644
|
}
|
|
646
645
|
}
|
|
@@ -680,7 +679,7 @@ var StyledSliderButton = styled6(SliderButton)`
|
|
|
680
679
|
z-index: 100;
|
|
681
680
|
|
|
682
681
|
.inner {
|
|
683
|
-
background: ${
|
|
682
|
+
background: ${(p) => p.theme.bgDark1};
|
|
684
683
|
width: ${OPEN_SLIDER_WIDTH}px;
|
|
685
684
|
|
|
686
685
|
> .${CLASS_SLIDER_VALUE} {
|
|
@@ -758,7 +757,7 @@ var StyledSwitch = styled7(Switch)`
|
|
|
758
757
|
min-width: ${BUTTON_WIDTH + TEXT_WIDTH}px;
|
|
759
758
|
height: ${SWITCH_HEIGHT}px;
|
|
760
759
|
border-radius: 3px;
|
|
761
|
-
border: 1px solid ${
|
|
760
|
+
border: 1px solid ${(p) => p.theme.borderDark};
|
|
762
761
|
|
|
763
762
|
> .slider {
|
|
764
763
|
position: absolute;
|
|
@@ -780,7 +779,7 @@ var StyledSwitch = styled7(Switch)`
|
|
|
780
779
|
text-align: center;
|
|
781
780
|
top: 0;
|
|
782
781
|
line-height: ${SWITCH_HEIGHT - 2}px;
|
|
783
|
-
text-shadow:
|
|
782
|
+
text-shadow: ${(p) => p.theme.shadows.textShadowActive};
|
|
784
783
|
box-shadow:
|
|
785
784
|
inset 0 1px 2px rgba(0, 0, 0, 0.2),
|
|
786
785
|
0 1px 0 0 rgba(255, 255, 255, 0.15);
|
|
@@ -788,26 +787,22 @@ var StyledSwitch = styled7(Switch)`
|
|
|
788
787
|
|
|
789
788
|
> .on-text {
|
|
790
789
|
left: -40px;
|
|
791
|
-
background:
|
|
792
|
-
to bottom,
|
|
793
|
-
${THEME.hintDark1},
|
|
794
|
-
${THEME.hint}
|
|
795
|
-
);
|
|
790
|
+
background: ${(p) => p.theme.gradients.hintPressed};
|
|
796
791
|
}
|
|
797
792
|
|
|
798
793
|
> .button {
|
|
799
794
|
top: -1px;
|
|
800
795
|
left: -1px;
|
|
801
796
|
width: ${BUTTON_WIDTH}px;
|
|
802
|
-
background:
|
|
803
|
-
text-shadow:
|
|
797
|
+
background: ${(p) => p.theme.gradients.button};
|
|
798
|
+
text-shadow: ${(p) => p.theme.shadows.textShadow};
|
|
804
799
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
|
|
805
800
|
border-radius: 3px;
|
|
806
|
-
border: 1px solid ${
|
|
801
|
+
border: 1px solid ${(p) => p.theme.borderDark};
|
|
807
802
|
}
|
|
808
803
|
|
|
809
804
|
> .off-text {
|
|
810
|
-
background:
|
|
805
|
+
background: ${(p) => p.theme.gradients.buttonActive};
|
|
811
806
|
left: ${BUTTON_WIDTH - 2}px;
|
|
812
807
|
}
|
|
813
808
|
|
|
@@ -816,7 +811,7 @@ var StyledSwitch = styled7(Switch)`
|
|
|
816
811
|
}
|
|
817
812
|
|
|
818
813
|
&:hover > .button {
|
|
819
|
-
background:
|
|
814
|
+
background: ${(p) => p.theme.gradients.buttonHover};
|
|
820
815
|
}
|
|
821
816
|
}
|
|
822
817
|
}
|
|
@@ -839,37 +834,37 @@ import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
|
839
834
|
var Wrapper2 = styled8.div`
|
|
840
835
|
display: flex;
|
|
841
836
|
flex-direction: column;
|
|
842
|
-
background: ${
|
|
843
|
-
border: 1px solid ${
|
|
837
|
+
background: ${(p) => p.theme.borderDark};
|
|
838
|
+
border: 1px solid ${(p) => p.theme.borderDark};
|
|
844
839
|
`;
|
|
845
840
|
var TabList = styled8.div`
|
|
846
841
|
display: flex;
|
|
847
842
|
flex-direction: row;
|
|
848
|
-
border-bottom: 1px solid ${
|
|
843
|
+
border-bottom: 1px solid ${(p) => p.theme.borderDark};
|
|
849
844
|
`;
|
|
850
845
|
var TabItem = styled8.div`
|
|
851
|
-
height: ${
|
|
846
|
+
height: ${(p) => p.theme.sizingPx.spacing * 3}px;
|
|
852
847
|
display: flex;
|
|
853
848
|
flex-direction: column;
|
|
854
849
|
justify-content: center;
|
|
855
|
-
padding: 0 ${
|
|
850
|
+
padding: 0 ${(p) => p.theme.sizingPx.spacing}px;
|
|
856
851
|
cursor: pointer;
|
|
857
|
-
background: ${
|
|
852
|
+
background: ${(p) => p.theme.bgDark1};
|
|
858
853
|
margin-right: 1px;
|
|
859
854
|
|
|
860
855
|
&:hover,
|
|
861
856
|
&.touching {
|
|
862
|
-
background: ${
|
|
857
|
+
background: ${(p) => p.theme.bgLight1};
|
|
863
858
|
}
|
|
864
859
|
|
|
865
860
|
&.current {
|
|
866
|
-
color: ${
|
|
861
|
+
color: ${(p) => p.theme.hint};
|
|
867
862
|
|
|
868
863
|
&::after {
|
|
869
864
|
content: '';
|
|
870
|
-
border-bottom: 2px solid ${
|
|
865
|
+
border-bottom: 2px solid ${(p) => p.theme.hint};
|
|
871
866
|
display: block;
|
|
872
|
-
margin-top: ${
|
|
867
|
+
margin-top: ${(p) => p.theme.sizingPx.spacing / 2}px;
|
|
873
868
|
}
|
|
874
869
|
}
|
|
875
870
|
`;
|
|
@@ -937,12 +932,12 @@ var StyledTextInput = styled9(TextInput)`
|
|
|
937
932
|
box-sizing: border-box;
|
|
938
933
|
padding: 6px 8px;
|
|
939
934
|
border-radius: 3px;
|
|
940
|
-
background: ${
|
|
941
|
-
border: 1px solid ${
|
|
935
|
+
background: ${(p) => p.theme.bgDark1};
|
|
936
|
+
border: 1px solid ${(p) => p.theme.borderDark};
|
|
942
937
|
overflow: hidden;
|
|
943
|
-
box-shadow:
|
|
944
|
-
color: ${
|
|
945
|
-
text-shadow:
|
|
938
|
+
box-shadow: ${(p) => p.theme.shadows.boxShadowInset};
|
|
939
|
+
color: ${(p) => p.theme.textNormal};
|
|
940
|
+
text-shadow: ${(p) => p.theme.shadows.textShadow};
|
|
946
941
|
|
|
947
942
|
@media (max-width: 500px) {
|
|
948
943
|
flex-basis: 100%;
|
|
@@ -974,12 +969,12 @@ var IndicatorIcon = styled10(Icon)`
|
|
|
974
969
|
var Bar = styled10.div`
|
|
975
970
|
width: 100%;
|
|
976
971
|
height: 10px;
|
|
977
|
-
border: 1px solid ${
|
|
978
|
-
background: ${
|
|
972
|
+
border: 1px solid ${(p) => p.theme.borderDark};
|
|
973
|
+
background: ${(p) => p.theme.borderDark};
|
|
979
974
|
`;
|
|
980
975
|
var Fill = styled10.div`
|
|
981
976
|
height: 100%;
|
|
982
|
-
background: ${
|
|
977
|
+
background: ${(p) => p.theme.hint};
|
|
983
978
|
`;
|
|
984
979
|
var Title = styled10.div`
|
|
985
980
|
font-size: 1.5em;
|
package/dist/styling.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { createGlobalStyle, RuleSet } from 'styled-components';
|
|
2
2
|
|
|
3
3
|
declare const GlobalStyle: ReturnType<typeof createGlobalStyle>;
|
|
4
|
-
declare const
|
|
4
|
+
declare const DARK_THEME: {
|
|
5
|
+
pageBg: string;
|
|
5
6
|
colorGreen: string;
|
|
6
7
|
colorRed: string;
|
|
7
8
|
colorAmber: string;
|
|
@@ -16,13 +17,27 @@ declare const THEME: {
|
|
|
16
17
|
hintRGB: string;
|
|
17
18
|
hintDark1: string;
|
|
18
19
|
textNormal: string;
|
|
20
|
+
textActive: string;
|
|
19
21
|
textMuted: string;
|
|
22
|
+
shadows: {
|
|
23
|
+
boxShadowInset: string;
|
|
24
|
+
textShadow: string;
|
|
25
|
+
textShadowActive: string;
|
|
26
|
+
};
|
|
27
|
+
gradients: {
|
|
28
|
+
button: string;
|
|
29
|
+
buttonHover: string;
|
|
30
|
+
buttonActive: string;
|
|
31
|
+
buttonPressedHover: string;
|
|
32
|
+
hintPressed: string;
|
|
33
|
+
};
|
|
20
34
|
sizingPx: {
|
|
21
35
|
spacing: number;
|
|
22
36
|
unitHeight: number;
|
|
23
37
|
};
|
|
24
38
|
};
|
|
25
|
-
type Theme = typeof
|
|
39
|
+
type Theme = typeof DARK_THEME;
|
|
40
|
+
declare const LIGHT_THEME: Theme;
|
|
26
41
|
declare const BaseStyle: ReturnType<typeof createGlobalStyle>;
|
|
27
42
|
declare const buttonStateNormal: RuleSet<object>;
|
|
28
43
|
declare const buttonStateNormalHover: RuleSet<object>;
|
|
@@ -32,5 +47,10 @@ declare const buttonDisabled: RuleSet<object>;
|
|
|
32
47
|
declare const rectButton: RuleSet<object>;
|
|
33
48
|
declare const touchIndicatorNormal: RuleSet<object>;
|
|
34
49
|
declare const touchIndicatorTouching: RuleSet<object>;
|
|
50
|
+
declare const PreferredThemeProvider: React.FC<{
|
|
51
|
+
dark: Theme;
|
|
52
|
+
light: Theme;
|
|
53
|
+
children: React.ReactNode;
|
|
54
|
+
}>;
|
|
35
55
|
|
|
36
|
-
export { BaseStyle, GlobalStyle,
|
|
56
|
+
export { BaseStyle, DARK_THEME, GlobalStyle, LIGHT_THEME, PreferredThemeProvider, type Theme, buttonDisabled, buttonPressed, buttonStateNormal, buttonStateNormalActive, buttonStateNormalHover, rectButton, touchIndicatorNormal, touchIndicatorTouching };
|
package/dist/styling.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { createGlobalStyle, RuleSet } from 'styled-components';
|
|
2
2
|
|
|
3
3
|
declare const GlobalStyle: ReturnType<typeof createGlobalStyle>;
|
|
4
|
-
declare const
|
|
4
|
+
declare const DARK_THEME: {
|
|
5
|
+
pageBg: string;
|
|
5
6
|
colorGreen: string;
|
|
6
7
|
colorRed: string;
|
|
7
8
|
colorAmber: string;
|
|
@@ -16,13 +17,27 @@ declare const THEME: {
|
|
|
16
17
|
hintRGB: string;
|
|
17
18
|
hintDark1: string;
|
|
18
19
|
textNormal: string;
|
|
20
|
+
textActive: string;
|
|
19
21
|
textMuted: string;
|
|
22
|
+
shadows: {
|
|
23
|
+
boxShadowInset: string;
|
|
24
|
+
textShadow: string;
|
|
25
|
+
textShadowActive: string;
|
|
26
|
+
};
|
|
27
|
+
gradients: {
|
|
28
|
+
button: string;
|
|
29
|
+
buttonHover: string;
|
|
30
|
+
buttonActive: string;
|
|
31
|
+
buttonPressedHover: string;
|
|
32
|
+
hintPressed: string;
|
|
33
|
+
};
|
|
20
34
|
sizingPx: {
|
|
21
35
|
spacing: number;
|
|
22
36
|
unitHeight: number;
|
|
23
37
|
};
|
|
24
38
|
};
|
|
25
|
-
type Theme = typeof
|
|
39
|
+
type Theme = typeof DARK_THEME;
|
|
40
|
+
declare const LIGHT_THEME: Theme;
|
|
26
41
|
declare const BaseStyle: ReturnType<typeof createGlobalStyle>;
|
|
27
42
|
declare const buttonStateNormal: RuleSet<object>;
|
|
28
43
|
declare const buttonStateNormalHover: RuleSet<object>;
|
|
@@ -32,5 +47,10 @@ declare const buttonDisabled: RuleSet<object>;
|
|
|
32
47
|
declare const rectButton: RuleSet<object>;
|
|
33
48
|
declare const touchIndicatorNormal: RuleSet<object>;
|
|
34
49
|
declare const touchIndicatorTouching: RuleSet<object>;
|
|
50
|
+
declare const PreferredThemeProvider: React.FC<{
|
|
51
|
+
dark: Theme;
|
|
52
|
+
light: Theme;
|
|
53
|
+
children: React.ReactNode;
|
|
54
|
+
}>;
|
|
35
55
|
|
|
36
|
-
export { BaseStyle, GlobalStyle,
|
|
56
|
+
export { BaseStyle, DARK_THEME, GlobalStyle, LIGHT_THEME, PreferredThemeProvider, type Theme, buttonDisabled, buttonPressed, buttonStateNormal, buttonStateNormalActive, buttonStateNormalHover, rectButton, touchIndicatorNormal, touchIndicatorTouching };
|
package/dist/styling.js
CHANGED
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var _chunkY5UYS6EXjs = require('./chunk-Y5UYS6EX.js');
|
|
14
|
-
require('./chunk-MLKGABMK.js');
|
|
15
13
|
|
|
16
14
|
|
|
15
|
+
var _chunkWVMAJYGIjs = require('./chunk-WVMAJYGI.js');
|
|
16
|
+
require('./chunk-7VTNOX5O.js');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
@@ -24,4 +24,8 @@ require('./chunk-MLKGABMK.js');
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
exports.BaseStyle = _chunkWVMAJYGIjs.BaseStyle; exports.DARK_THEME = _chunkWVMAJYGIjs.DARK_THEME; exports.GlobalStyle = _chunkWVMAJYGIjs.GlobalStyle; exports.LIGHT_THEME = _chunkWVMAJYGIjs.LIGHT_THEME; exports.PreferredThemeProvider = _chunkWVMAJYGIjs.PreferredThemeProvider; exports.buttonDisabled = _chunkWVMAJYGIjs.buttonDisabled; exports.buttonPressed = _chunkWVMAJYGIjs.buttonPressed; exports.buttonStateNormal = _chunkWVMAJYGIjs.buttonStateNormal; exports.buttonStateNormalActive = _chunkWVMAJYGIjs.buttonStateNormalActive; exports.buttonStateNormalHover = _chunkWVMAJYGIjs.buttonStateNormalHover; exports.rectButton = _chunkWVMAJYGIjs.rectButton; exports.touchIndicatorNormal = _chunkWVMAJYGIjs.touchIndicatorNormal; exports.touchIndicatorTouching = _chunkWVMAJYGIjs.touchIndicatorTouching;
|
package/dist/styling.mjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BaseStyle,
|
|
3
|
+
DARK_THEME,
|
|
3
4
|
GlobalStyle,
|
|
4
|
-
|
|
5
|
+
LIGHT_THEME,
|
|
6
|
+
PreferredThemeProvider,
|
|
5
7
|
buttonDisabled,
|
|
6
8
|
buttonPressed,
|
|
7
9
|
buttonStateNormal,
|
|
@@ -10,12 +12,14 @@ import {
|
|
|
10
12
|
rectButton,
|
|
11
13
|
touchIndicatorNormal,
|
|
12
14
|
touchIndicatorTouching
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-BQS6YM6U.mjs";
|
|
16
|
+
import "./chunk-E7JSREGM.mjs";
|
|
15
17
|
export {
|
|
16
18
|
BaseStyle,
|
|
19
|
+
DARK_THEME,
|
|
17
20
|
GlobalStyle,
|
|
18
|
-
|
|
21
|
+
LIGHT_THEME,
|
|
22
|
+
PreferredThemeProvider,
|
|
19
23
|
buttonDisabled,
|
|
20
24
|
buttonPressed,
|
|
21
25
|
buttonStateNormal,
|
package/dist/util/index.d.mts
CHANGED
|
@@ -19,5 +19,6 @@ declare function trackTouch(touch: React.Touch, move: (pos: {
|
|
|
19
19
|
}) => void): void;
|
|
20
20
|
|
|
21
21
|
declare const calculateClass: (...args: (string | undefined | null | false)[]) => string;
|
|
22
|
+
declare const usePreferredColorScheme: () => 'dark' | 'light';
|
|
22
23
|
|
|
23
|
-
export { calculateClass, initialiseListeners, switchToMouseMode, switchToTouchMode, trackTouch, usePressable };
|
|
24
|
+
export { calculateClass, initialiseListeners, switchToMouseMode, switchToTouchMode, trackTouch, usePreferredColorScheme, usePressable };
|
package/dist/util/index.d.ts
CHANGED
|
@@ -19,5 +19,6 @@ declare function trackTouch(touch: React.Touch, move: (pos: {
|
|
|
19
19
|
}) => void): void;
|
|
20
20
|
|
|
21
21
|
declare const calculateClass: (...args: (string | undefined | null | false)[]) => string;
|
|
22
|
+
declare const usePreferredColorScheme: () => 'dark' | 'light';
|
|
22
23
|
|
|
23
|
-
export { calculateClass, initialiseListeners, switchToMouseMode, switchToTouchMode, trackTouch, usePressable };
|
|
24
|
+
export { calculateClass, initialiseListeners, switchToMouseMode, switchToTouchMode, trackTouch, usePreferredColorScheme, usePressable };
|
package/dist/util/index.js
CHANGED
|
@@ -5,13 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _chunkXEIKOLS2js = require('../chunk-XEIKOLS2.js');
|
|
9
|
-
require('../chunk-MLKGABMK.js');
|
|
10
8
|
|
|
9
|
+
var _chunk7VTNOX5Ojs = require('../chunk-7VTNOX5O.js');
|
|
11
10
|
|
|
12
11
|
|
|
13
12
|
|
|
14
13
|
|
|
15
14
|
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
exports.calculateClass = _chunk7VTNOX5Ojs.calculateClass; exports.initialiseListeners = _chunk7VTNOX5Ojs.initialiseListeners; exports.switchToMouseMode = _chunk7VTNOX5Ojs.switchToMouseMode; exports.switchToTouchMode = _chunk7VTNOX5Ojs.switchToTouchMode; exports.trackTouch = _chunk7VTNOX5Ojs.trackTouch; exports.usePreferredColorScheme = _chunk7VTNOX5Ojs.usePreferredColorScheme; exports.usePressable = _chunk7VTNOX5Ojs.usePressable;
|
package/dist/util/index.mjs
CHANGED
|
@@ -4,14 +4,15 @@ import {
|
|
|
4
4
|
switchToMouseMode,
|
|
5
5
|
switchToTouchMode,
|
|
6
6
|
trackTouch,
|
|
7
|
+
usePreferredColorScheme,
|
|
7
8
|
usePressable
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-7P6ASYW6.mjs";
|
|
9
|
+
} from "../chunk-E7JSREGM.mjs";
|
|
10
10
|
export {
|
|
11
11
|
calculateClass,
|
|
12
12
|
initialiseListeners,
|
|
13
13
|
switchToMouseMode,
|
|
14
14
|
switchToTouchMode,
|
|
15
15
|
trackTouch,
|
|
16
|
+
usePreferredColorScheme,
|
|
16
17
|
usePressable
|
|
17
18
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcanejs/toolkit-frontend",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Library of the frontend react components used to render the @arcanejs Toolkit",
|
|
6
6
|
"keywords": [],
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"require": "./dist/components/core/index.js"
|
|
28
28
|
},
|
|
29
29
|
"./styling": {
|
|
30
|
-
"@arcanejs/source": "./src/styling.
|
|
30
|
+
"@arcanejs/source": "./src/styling.tsx",
|
|
31
31
|
"types": "./dist/styling.d.ts",
|
|
32
32
|
"import": "./dist/styling.mjs",
|
|
33
33
|
"require": "./dist/styling.js"
|
|
@@ -55,14 +55,14 @@
|
|
|
55
55
|
"eslint": "^8.57.0",
|
|
56
56
|
"tsup": "^8.1.0",
|
|
57
57
|
"typescript": "^5.3.3",
|
|
58
|
-
"@arcanejs/
|
|
59
|
-
"@arcanejs/
|
|
58
|
+
"@arcanejs/eslint-config": "^0.0.0",
|
|
59
|
+
"@arcanejs/typescript-config": "^0.0.0"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"react": "^18",
|
|
63
63
|
"react-dom": "18.3.1",
|
|
64
64
|
"styled-components": "^6.1.13",
|
|
65
|
-
"@arcanejs/protocol": "^0.
|
|
65
|
+
"@arcanejs/protocol": "^0.5.0"
|
|
66
66
|
},
|
|
67
67
|
"files": [
|
|
68
68
|
"dist"
|
package/dist/chunk-7P6ASYW6.mjs
DELETED
package/dist/chunk-MLKGABMK.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var __defProp = Object.defineProperty;
|
|
2
|
-
var __export = (target, all) => {
|
|
3
|
-
for (var name in all)
|
|
4
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
exports.__export = __export;
|