@number10/phaserjsx 0.1.0 → 0.2.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/{TransformOriginView-BYPbRH8N.cjs → TransformOriginView-BDM6GE2F.cjs} +618 -441
- package/dist/{TransformOriginView-BYPbRH8N.cjs.map → TransformOriginView-BDM6GE2F.cjs.map} +1 -1
- package/dist/{TransformOriginView-CO-tJCmV.js → TransformOriginView-CiFiQcku.js} +676 -499
- package/dist/{TransformOriginView-CO-tJCmV.js.map → TransformOriginView-CiFiQcku.js.map} +1 -1
- package/dist/colors/index.d.ts +1 -1
- package/dist/colors/index.d.ts.map +1 -1
- package/dist/colors/preset-manager.d.ts +11 -7
- package/dist/colors/preset-manager.d.ts.map +1 -1
- package/dist/components/custom/Sidebar.d.ts.map +1 -1
- package/dist/components/custom/index.cjs +29 -29
- package/dist/components/custom/index.js +1 -1
- package/dist/index.cjs +230 -226
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +81 -77
- package/dist/index.js.map +1 -1
- package/dist/theme-defaults.d.ts +7 -1
- package/dist/theme-defaults.d.ts.map +1 -1
- package/dist/theme.d.ts +6 -4
- package/dist/theme.d.ts.map +1 -1
- package/dist/vdom.d.ts +6 -0
- package/dist/vdom.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1443,7 +1443,7 @@ function requireLodash() {
|
|
|
1443
1443
|
var reIsNative = RegExp2(
|
|
1444
1444
|
"^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
1445
1445
|
);
|
|
1446
|
-
var Buffer = moduleExports ? context.Buffer : undefined$1,
|
|
1446
|
+
var Buffer = moduleExports ? context.Buffer : undefined$1, Symbol2 = context.Symbol, Uint8Array = context.Uint8Array, allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined$1, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : undefined$1, symIterator = Symbol2 ? Symbol2.iterator : undefined$1, symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined$1;
|
|
1447
1447
|
var defineProperty = (function() {
|
|
1448
1448
|
try {
|
|
1449
1449
|
var func = getNative(Object2, "defineProperty");
|
|
@@ -1458,7 +1458,7 @@ function requireLodash() {
|
|
|
1458
1458
|
var metaMap = WeakMap2 && new WeakMap2();
|
|
1459
1459
|
var realNames = {};
|
|
1460
1460
|
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap2);
|
|
1461
|
-
var symbolProto =
|
|
1461
|
+
var symbolProto = Symbol2 ? Symbol2.prototype : undefined$1, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1, symbolToString = symbolProto ? symbolProto.toString : undefined$1;
|
|
1462
1462
|
function lodash2(value) {
|
|
1463
1463
|
if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
|
|
1464
1464
|
if (value instanceof LodashWrapper) {
|
|
@@ -9695,6 +9695,18 @@ function getPresetWithMode(name, mode) {
|
|
|
9695
9695
|
const preset2 = getPreset(name);
|
|
9696
9696
|
return mode === "light" ? applyLightMode(preset2) : applyDarkMode(preset2);
|
|
9697
9697
|
}
|
|
9698
|
+
const colorPresets = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
9699
|
+
__proto__: null,
|
|
9700
|
+
applyDarkMode,
|
|
9701
|
+
applyLightMode,
|
|
9702
|
+
forestGreenPreset,
|
|
9703
|
+
generateColorScale,
|
|
9704
|
+
getPreset,
|
|
9705
|
+
getPresetWithMode,
|
|
9706
|
+
midnightPreset,
|
|
9707
|
+
oceanBluePreset,
|
|
9708
|
+
presets
|
|
9709
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
9698
9710
|
const defaultSpacingTokens = {
|
|
9699
9711
|
xs: 4,
|
|
9700
9712
|
sm: 8,
|
|
@@ -9768,460 +9780,466 @@ function createTextStyleTokens(textColor) {
|
|
|
9768
9780
|
};
|
|
9769
9781
|
}
|
|
9770
9782
|
const defaultTextStyleTokens = createTextStyleTokens("#ffffff");
|
|
9771
|
-
|
|
9772
|
-
const
|
|
9773
|
-
|
|
9774
|
-
|
|
9775
|
-
|
|
9776
|
-
|
|
9777
|
-
|
|
9778
|
-
visible: true
|
|
9779
|
-
},
|
|
9780
|
-
Icon: {
|
|
9781
|
-
size: 24,
|
|
9782
|
-
tint: colors.border.dark.toNumber()
|
|
9783
|
-
},
|
|
9784
|
-
text: {
|
|
9785
|
-
text: "",
|
|
9786
|
-
alpha: 1,
|
|
9787
|
-
visible: true,
|
|
9788
|
-
style: textStyles.DEFAULT
|
|
9789
|
-
},
|
|
9790
|
-
nineslice: {
|
|
9791
|
-
alpha: 1,
|
|
9792
|
-
visible: true
|
|
9793
|
-
},
|
|
9794
|
-
sprite: {
|
|
9795
|
-
alpha: 1,
|
|
9796
|
-
visible: true
|
|
9797
|
-
},
|
|
9798
|
-
image: {
|
|
9799
|
-
alpha: 1,
|
|
9800
|
-
visible: true
|
|
9801
|
-
},
|
|
9802
|
-
graphics: {
|
|
9803
|
-
alpha: 1,
|
|
9804
|
-
visible: true
|
|
9805
|
-
},
|
|
9806
|
-
tilesprite: {
|
|
9807
|
-
alpha: 1,
|
|
9808
|
-
visible: true
|
|
9809
|
-
},
|
|
9810
|
-
// Public API (uppercase)
|
|
9811
|
-
View: {
|
|
9812
|
-
alpha: 1,
|
|
9813
|
-
visible: true
|
|
9814
|
-
},
|
|
9815
|
-
Text: {
|
|
9816
|
-
text: "",
|
|
9817
|
-
alpha: 1,
|
|
9818
|
-
visible: true,
|
|
9819
|
-
style: textStyles.DEFAULT
|
|
9820
|
-
},
|
|
9821
|
-
NineSlice: {
|
|
9822
|
-
alpha: 1,
|
|
9823
|
-
visible: true
|
|
9824
|
-
},
|
|
9825
|
-
Sprite: {
|
|
9826
|
-
alpha: 1,
|
|
9827
|
-
visible: true
|
|
9828
|
-
},
|
|
9829
|
-
Image: {
|
|
9830
|
-
alpha: 1,
|
|
9831
|
-
visible: true
|
|
9832
|
-
},
|
|
9833
|
-
Graphics: {
|
|
9834
|
-
alpha: 1,
|
|
9835
|
-
visible: true
|
|
9836
|
-
},
|
|
9837
|
-
TileSprite: {
|
|
9838
|
-
alpha: 1,
|
|
9839
|
-
visible: true
|
|
9840
|
-
},
|
|
9841
|
-
RadioButton: {
|
|
9842
|
-
selectedColor: colors.primary.DEFAULT.toNumber(),
|
|
9843
|
-
color: colors.border.medium.toNumber(),
|
|
9844
|
-
gap: 8,
|
|
9845
|
-
size: 16,
|
|
9846
|
-
innerSize: 12,
|
|
9847
|
-
labelStyle: {
|
|
9848
|
-
color: colors.text.DEFAULT.toString(),
|
|
9849
|
-
fontSize: "14px"
|
|
9850
|
-
}
|
|
9851
|
-
},
|
|
9852
|
-
ScrollSlider: {
|
|
9853
|
-
borderColor: colors.border.medium.toNumber(),
|
|
9854
|
-
trackColor: colors.surface.dark.toNumber(),
|
|
9855
|
-
thumbColor: colors.primary.light.toNumber(),
|
|
9856
|
-
borderWidth: 1,
|
|
9857
|
-
size: 12,
|
|
9858
|
-
minThumbSize: 20
|
|
9859
|
-
},
|
|
9860
|
-
Button: {
|
|
9861
|
-
disabledColor: colors.background.DEFAULT.toNumber(),
|
|
9862
|
-
iconSize: 24,
|
|
9863
|
-
backgroundColor: colors.primary.DEFAULT.toNumber(),
|
|
9864
|
-
backgroundAlpha: 1,
|
|
9865
|
-
borderColor: colors.primary.dark.toNumber(),
|
|
9866
|
-
borderWidth: 1,
|
|
9867
|
-
cornerRadius: 6,
|
|
9868
|
-
padding: 8,
|
|
9869
|
-
gap: 8,
|
|
9870
|
-
justifyContent: "center",
|
|
9871
|
-
alignItems: "center",
|
|
9872
|
-
primary: {
|
|
9873
|
-
backgroundColor: colors.primary.medium.toNumber(),
|
|
9874
|
-
borderColor: colors.primary.dark.toNumber()
|
|
9783
|
+
function buildDefaultTheme(colors) {
|
|
9784
|
+
const textStyles = createTextStyleTokens(colors.text.DEFAULT.toString());
|
|
9785
|
+
return {
|
|
9786
|
+
// Primitives (lowercase) - share same defaults as uppercase
|
|
9787
|
+
view: {
|
|
9788
|
+
alpha: 1,
|
|
9789
|
+
visible: true
|
|
9875
9790
|
},
|
|
9876
|
-
|
|
9877
|
-
|
|
9878
|
-
|
|
9879
|
-
effect: "press",
|
|
9880
|
-
effectConfig: { intensity: 0.9, time: 200 }
|
|
9791
|
+
Icon: {
|
|
9792
|
+
size: 24,
|
|
9793
|
+
tint: colors.border.dark.toNumber()
|
|
9881
9794
|
},
|
|
9882
|
-
|
|
9883
|
-
|
|
9884
|
-
|
|
9885
|
-
|
|
9886
|
-
|
|
9887
|
-
effect: "flash",
|
|
9888
|
-
effectConfig: { intensity: 1.15, time: 200 }
|
|
9795
|
+
text: {
|
|
9796
|
+
text: "",
|
|
9797
|
+
alpha: 1,
|
|
9798
|
+
visible: true,
|
|
9799
|
+
style: textStyles.DEFAULT
|
|
9889
9800
|
},
|
|
9890
|
-
|
|
9891
|
-
|
|
9892
|
-
|
|
9801
|
+
nineslice: {
|
|
9802
|
+
alpha: 1,
|
|
9803
|
+
visible: true
|
|
9893
9804
|
},
|
|
9894
|
-
|
|
9895
|
-
|
|
9896
|
-
|
|
9805
|
+
sprite: {
|
|
9806
|
+
alpha: 1,
|
|
9807
|
+
visible: true
|
|
9897
9808
|
},
|
|
9898
|
-
|
|
9899
|
-
|
|
9900
|
-
|
|
9901
|
-
}
|
|
9902
|
-
},
|
|
9903
|
-
Sidebar: {
|
|
9904
|
-
variant: "solid",
|
|
9905
|
-
size: "md",
|
|
9906
|
-
backgroundColor: colors.surface.light.toNumber(),
|
|
9907
|
-
backgroundAlpha: 1,
|
|
9908
|
-
padding: 16,
|
|
9909
|
-
gap: 8,
|
|
9910
|
-
dividerColor: colors.border.light.toNumber(),
|
|
9911
|
-
itemGap: 8,
|
|
9912
|
-
sectionGap: 10,
|
|
9913
|
-
headerStyle: {
|
|
9914
|
-
gap: 10,
|
|
9915
|
-
padding: { bottom: 6 },
|
|
9916
|
-
width: "fill"
|
|
9809
|
+
image: {
|
|
9810
|
+
alpha: 1,
|
|
9811
|
+
visible: true
|
|
9917
9812
|
},
|
|
9918
|
-
|
|
9919
|
-
|
|
9920
|
-
|
|
9921
|
-
width: "fill"
|
|
9813
|
+
graphics: {
|
|
9814
|
+
alpha: 1,
|
|
9815
|
+
visible: true
|
|
9922
9816
|
},
|
|
9923
|
-
|
|
9924
|
-
|
|
9925
|
-
|
|
9926
|
-
|
|
9927
|
-
|
|
9928
|
-
|
|
9929
|
-
|
|
9930
|
-
|
|
9817
|
+
tilesprite: {
|
|
9818
|
+
alpha: 1,
|
|
9819
|
+
visible: true
|
|
9820
|
+
},
|
|
9821
|
+
// Public API (uppercase)
|
|
9822
|
+
View: {
|
|
9823
|
+
alpha: 1,
|
|
9824
|
+
visible: true
|
|
9825
|
+
},
|
|
9826
|
+
Text: {
|
|
9827
|
+
text: "",
|
|
9828
|
+
alpha: 1,
|
|
9829
|
+
visible: true,
|
|
9830
|
+
style: textStyles.DEFAULT
|
|
9831
|
+
},
|
|
9832
|
+
NineSlice: {
|
|
9833
|
+
alpha: 1,
|
|
9834
|
+
visible: true
|
|
9835
|
+
},
|
|
9836
|
+
Sprite: {
|
|
9837
|
+
alpha: 1,
|
|
9838
|
+
visible: true
|
|
9839
|
+
},
|
|
9840
|
+
Image: {
|
|
9841
|
+
alpha: 1,
|
|
9842
|
+
visible: true
|
|
9843
|
+
},
|
|
9844
|
+
Graphics: {
|
|
9845
|
+
alpha: 1,
|
|
9846
|
+
visible: true
|
|
9847
|
+
},
|
|
9848
|
+
TileSprite: {
|
|
9849
|
+
alpha: 1,
|
|
9850
|
+
visible: true
|
|
9851
|
+
},
|
|
9852
|
+
RadioButton: {
|
|
9853
|
+
selectedColor: colors.primary.DEFAULT.toNumber(),
|
|
9854
|
+
color: colors.border.medium.toNumber(),
|
|
9855
|
+
gap: 10,
|
|
9856
|
+
size: 16,
|
|
9857
|
+
innerSize: 16,
|
|
9858
|
+
labelStyle: {
|
|
9859
|
+
color: colors.text.DEFAULT.toString(),
|
|
9860
|
+
fontSize: "14px"
|
|
9931
9861
|
}
|
|
9932
9862
|
},
|
|
9933
|
-
|
|
9863
|
+
ScrollSlider: {
|
|
9864
|
+
borderColor: colors.border.dark.toNumber(),
|
|
9865
|
+
trackColor: colors.surface.dark.toNumber(),
|
|
9866
|
+
thumbColor: colors.primary.dark.toNumber(),
|
|
9867
|
+
borderWidth: 2,
|
|
9868
|
+
minThumbSize: 30,
|
|
9869
|
+
size: 24
|
|
9870
|
+
},
|
|
9871
|
+
Button: {
|
|
9872
|
+
disabledColor: colors.background.DEFAULT.toNumber(),
|
|
9873
|
+
iconSize: 24,
|
|
9874
|
+
backgroundColor: colors.primary.DEFAULT.toNumber(),
|
|
9875
|
+
backgroundAlpha: 1,
|
|
9876
|
+
borderColor: colors.primary.dark.toNumber(),
|
|
9877
|
+
borderWidth: 1,
|
|
9878
|
+
cornerRadius: 6,
|
|
9879
|
+
padding: 8,
|
|
9934
9880
|
gap: 8,
|
|
9935
|
-
|
|
9936
|
-
|
|
9937
|
-
|
|
9938
|
-
|
|
9939
|
-
|
|
9940
|
-
...textStyles.medium,
|
|
9941
|
-
color: colors.text.dark.toString()
|
|
9881
|
+
justifyContent: "center",
|
|
9882
|
+
alignItems: "center",
|
|
9883
|
+
primary: {
|
|
9884
|
+
backgroundColor: colors.primary.medium.toNumber(),
|
|
9885
|
+
borderColor: colors.primary.dark.toNumber()
|
|
9942
9886
|
},
|
|
9943
|
-
|
|
9944
|
-
backgroundColor: colors.
|
|
9945
|
-
borderColor: colors.
|
|
9946
|
-
|
|
9947
|
-
|
|
9887
|
+
secondary: {
|
|
9888
|
+
backgroundColor: colors.secondary.DEFAULT.toNumber(),
|
|
9889
|
+
borderColor: colors.secondary.dark.toNumber(),
|
|
9890
|
+
effect: "press",
|
|
9891
|
+
effectConfig: { intensity: 0.9, time: 200 }
|
|
9948
9892
|
},
|
|
9949
|
-
|
|
9950
|
-
|
|
9951
|
-
|
|
9952
|
-
|
|
9953
|
-
|
|
9954
|
-
|
|
9955
|
-
|
|
9956
|
-
|
|
9957
|
-
|
|
9958
|
-
|
|
9959
|
-
|
|
9893
|
+
outline: {
|
|
9894
|
+
backgroundColor: 0,
|
|
9895
|
+
backgroundAlpha: 0,
|
|
9896
|
+
borderColor: colors.accent.DEFAULT.toNumber(),
|
|
9897
|
+
borderWidth: 2,
|
|
9898
|
+
effect: "flash",
|
|
9899
|
+
effectConfig: { intensity: 1.15, time: 200 }
|
|
9900
|
+
},
|
|
9901
|
+
small: {
|
|
9902
|
+
padding: 6,
|
|
9903
|
+
cornerRadius: 4
|
|
9904
|
+
},
|
|
9905
|
+
medium: {
|
|
9906
|
+
padding: 8,
|
|
9907
|
+
cornerRadius: 6
|
|
9908
|
+
},
|
|
9909
|
+
large: {
|
|
9910
|
+
padding: { top: 12, bottom: 12, left: 8, right: 8 },
|
|
9911
|
+
cornerRadius: 8
|
|
9960
9912
|
}
|
|
9961
9913
|
},
|
|
9962
|
-
|
|
9963
|
-
|
|
9964
|
-
|
|
9965
|
-
|
|
9966
|
-
|
|
9914
|
+
Sidebar: {
|
|
9915
|
+
variant: "solid",
|
|
9916
|
+
size: "md",
|
|
9917
|
+
backgroundColor: colors.surface.light.toNumber(),
|
|
9918
|
+
backgroundAlpha: 1,
|
|
9919
|
+
padding: 16,
|
|
9920
|
+
gap: 8,
|
|
9921
|
+
dividerColor: colors.border.light.toNumber(),
|
|
9922
|
+
itemGap: 8,
|
|
9923
|
+
sectionGap: 10,
|
|
9924
|
+
headerStyle: {
|
|
9925
|
+
gap: 10,
|
|
9926
|
+
padding: { bottom: 6 },
|
|
9927
|
+
width: "fill"
|
|
9967
9928
|
},
|
|
9968
|
-
|
|
9969
|
-
|
|
9970
|
-
|
|
9971
|
-
|
|
9972
|
-
|
|
9929
|
+
footerStyle: {
|
|
9930
|
+
gap: 8,
|
|
9931
|
+
padding: { top: 6 },
|
|
9932
|
+
width: "fill"
|
|
9933
|
+
},
|
|
9934
|
+
sectionStyle: {
|
|
9935
|
+
gap: 8,
|
|
9936
|
+
padding: { top: 4, bottom: 8 },
|
|
9937
|
+
width: "fill",
|
|
9938
|
+
titleStyle: {
|
|
9939
|
+
...textStyles.medium,
|
|
9940
|
+
color: colors.text.dark.toString(),
|
|
9941
|
+
fontStyle: "bold"
|
|
9942
|
+
}
|
|
9973
9943
|
},
|
|
9974
|
-
|
|
9975
|
-
|
|
9976
|
-
|
|
9977
|
-
|
|
9944
|
+
itemStyle: {
|
|
9945
|
+
gap: 8,
|
|
9946
|
+
padding: { top: 8, bottom: 8, left: 10, right: 10 },
|
|
9947
|
+
width: "fill",
|
|
9948
|
+
cornerRadius: 8,
|
|
9949
|
+
backgroundColor: colors.surface.lightest.toNumber(),
|
|
9950
|
+
textStyle: {
|
|
9951
|
+
...textStyles.medium,
|
|
9952
|
+
color: colors.text.dark.toString()
|
|
9953
|
+
},
|
|
9954
|
+
active: {
|
|
9955
|
+
backgroundColor: colors.primary.lightest.toNumber(),
|
|
9956
|
+
borderColor: colors.primary.light.toNumber(),
|
|
9957
|
+
borderWidth: 1,
|
|
9958
|
+
backgroundAlpha: 0.9
|
|
9959
|
+
},
|
|
9960
|
+
disabledAlpha: 0.5
|
|
9978
9961
|
},
|
|
9979
|
-
|
|
9980
|
-
backgroundColor: colors.
|
|
9981
|
-
backgroundAlpha:
|
|
9982
|
-
|
|
9983
|
-
|
|
9962
|
+
badgeStyle: {
|
|
9963
|
+
backgroundColor: colors.primary.light.toNumber(),
|
|
9964
|
+
backgroundAlpha: 0.15,
|
|
9965
|
+
cornerRadius: 6,
|
|
9966
|
+
padding: { top: 4, bottom: 4, left: 8, right: 8 },
|
|
9967
|
+
textStyle: {
|
|
9968
|
+
...textStyles.small,
|
|
9969
|
+
color: colors.primary.dark.toString(),
|
|
9970
|
+
fontStyle: "bold"
|
|
9971
|
+
}
|
|
9972
|
+
},
|
|
9973
|
+
variants: {
|
|
9974
|
+
solid: {
|
|
9975
|
+
backgroundColor: colors.surface.light.toNumber(),
|
|
9976
|
+
borderColor: colors.border.light.toNumber(),
|
|
9977
|
+
borderWidth: 1
|
|
9978
|
+
},
|
|
9979
|
+
muted: {
|
|
9980
|
+
backgroundColor: colors.surface.medium.toNumber(),
|
|
9981
|
+
backgroundAlpha: 0.85,
|
|
9982
|
+
borderColor: colors.border.light.toNumber(),
|
|
9983
|
+
borderWidth: 1
|
|
9984
|
+
},
|
|
9985
|
+
ghost: {
|
|
9986
|
+
backgroundColor: colors.background.lightest.toNumber(),
|
|
9987
|
+
backgroundAlpha: 0.6,
|
|
9988
|
+
borderWidth: 0
|
|
9989
|
+
},
|
|
9990
|
+
inset: {
|
|
9991
|
+
backgroundColor: colors.surface.dark.toNumber(),
|
|
9992
|
+
backgroundAlpha: 1,
|
|
9993
|
+
borderColor: colors.border.medium.toNumber(),
|
|
9994
|
+
borderWidth: 1
|
|
9995
|
+
}
|
|
9996
|
+
},
|
|
9997
|
+
sizes: {
|
|
9998
|
+
sm: {
|
|
9999
|
+
padding: 10,
|
|
10000
|
+
gap: 6
|
|
10001
|
+
},
|
|
10002
|
+
md: {
|
|
10003
|
+
padding: 16,
|
|
10004
|
+
gap: 8
|
|
10005
|
+
},
|
|
10006
|
+
lg: {
|
|
10007
|
+
padding: { top: 20, bottom: 20, left: 16, right: 16 },
|
|
10008
|
+
gap: 12
|
|
10009
|
+
}
|
|
9984
10010
|
}
|
|
9985
10011
|
},
|
|
9986
|
-
|
|
9987
|
-
|
|
10012
|
+
Accordion: {
|
|
10013
|
+
effect: "none",
|
|
10014
|
+
effectConfig: { magnitude: 0.02, time: 150 },
|
|
10015
|
+
headerStyle: {
|
|
10016
|
+
backgroundColor: colors.surface.dark.toNumber(),
|
|
9988
10017
|
padding: 10,
|
|
9989
|
-
gap:
|
|
10018
|
+
gap: 10,
|
|
10019
|
+
cornerRadius: 5,
|
|
10020
|
+
width: "fill"
|
|
9990
10021
|
},
|
|
9991
|
-
|
|
9992
|
-
|
|
9993
|
-
|
|
10022
|
+
contentStyle: {
|
|
10023
|
+
backgroundColor: colors.surface.light.toNumber(),
|
|
10024
|
+
padding: 10,
|
|
10025
|
+
cornerRadius: 5,
|
|
10026
|
+
width: "fill"
|
|
9994
10027
|
},
|
|
9995
|
-
|
|
9996
|
-
|
|
9997
|
-
|
|
10028
|
+
Icon: {
|
|
10029
|
+
size: 24
|
|
10030
|
+
},
|
|
10031
|
+
textStyle: {
|
|
10032
|
+
color: colors.text.DEFAULT.toString(),
|
|
10033
|
+
fontSize: "18px"
|
|
9998
10034
|
}
|
|
9999
|
-
}
|
|
10000
|
-
},
|
|
10001
|
-
Accordion: {
|
|
10002
|
-
effect: "none",
|
|
10003
|
-
effectConfig: { magnitude: 0.02, time: 150 },
|
|
10004
|
-
headerStyle: {
|
|
10005
|
-
backgroundColor: colors.surface.dark.toNumber(),
|
|
10006
|
-
padding: 10,
|
|
10007
|
-
gap: 10,
|
|
10008
|
-
cornerRadius: 5,
|
|
10009
|
-
width: "fill"
|
|
10010
10035
|
},
|
|
10011
|
-
|
|
10012
|
-
|
|
10013
|
-
|
|
10014
|
-
|
|
10015
|
-
|
|
10016
|
-
|
|
10017
|
-
|
|
10018
|
-
|
|
10036
|
+
NineSliceButton: {},
|
|
10037
|
+
CharText: {
|
|
10038
|
+
charSpacing: 0,
|
|
10039
|
+
cursorColor: colors.secondary.DEFAULT.toNumber(),
|
|
10040
|
+
cursorWidth: 3,
|
|
10041
|
+
cursorBlinkSpeed: 200,
|
|
10042
|
+
selectionAlpha: 0.3,
|
|
10043
|
+
lineHeight: 1.2,
|
|
10044
|
+
wordWrap: true,
|
|
10045
|
+
textStyle: textStyles.DEFAULT,
|
|
10046
|
+
borderColor: colors.border.medium.toNumber(),
|
|
10047
|
+
borderWidth: 2,
|
|
10048
|
+
cornerRadius: 6,
|
|
10049
|
+
padding: 10
|
|
10019
10050
|
},
|
|
10020
|
-
|
|
10021
|
-
|
|
10022
|
-
|
|
10023
|
-
|
|
10024
|
-
|
|
10025
|
-
|
|
10026
|
-
|
|
10027
|
-
|
|
10028
|
-
|
|
10029
|
-
|
|
10030
|
-
|
|
10031
|
-
selectionAlpha: 0.3,
|
|
10032
|
-
lineHeight: 1.2,
|
|
10033
|
-
wordWrap: true,
|
|
10034
|
-
textStyle: textStyles.DEFAULT,
|
|
10035
|
-
borderColor: colors.border.medium.toNumber(),
|
|
10036
|
-
borderWidth: 2,
|
|
10037
|
-
cornerRadius: 6,
|
|
10038
|
-
padding: 10
|
|
10039
|
-
},
|
|
10040
|
-
CharTextInput: {
|
|
10041
|
-
charSpacing: 2,
|
|
10042
|
-
cursorColor: colors.accent.DEFAULT.toNumber(),
|
|
10043
|
-
cursorWidth: 3,
|
|
10044
|
-
cursorBlinkSpeed: 200,
|
|
10045
|
-
selectionColor: colors.accent.light.toNumber(),
|
|
10046
|
-
selectionAlpha: 0.5,
|
|
10047
|
-
lineHeight: 1.2,
|
|
10048
|
-
wordWrap: false,
|
|
10049
|
-
disabledColor: colors.border.dark.toNumber(),
|
|
10050
|
-
focusedBorderColor: colors.accent.lightest.toNumber(),
|
|
10051
|
-
backgroundColor: colors.surface.medium.toNumber(),
|
|
10052
|
-
borderColor: colors.border.medium.toNumber(),
|
|
10053
|
-
borderWidth: 1,
|
|
10054
|
-
padding: 8,
|
|
10055
|
-
textStyle: textStyles.DEFAULT
|
|
10056
|
-
},
|
|
10057
|
-
Dropdown: {
|
|
10058
|
-
trigger: {
|
|
10051
|
+
CharTextInput: {
|
|
10052
|
+
charSpacing: 2,
|
|
10053
|
+
cursorColor: colors.secondary.DEFAULT.toNumber(),
|
|
10054
|
+
cursorWidth: 3,
|
|
10055
|
+
cursorBlinkSpeed: 200,
|
|
10056
|
+
selectionColor: colors.accent.light.toNumber(),
|
|
10057
|
+
selectionAlpha: 0.5,
|
|
10058
|
+
lineHeight: 1.2,
|
|
10059
|
+
wordWrap: false,
|
|
10060
|
+
disabledColor: colors.border.dark.toNumber(),
|
|
10061
|
+
focusedBorderColor: colors.accent.lightest.toNumber(),
|
|
10059
10062
|
backgroundColor: colors.surface.medium.toNumber(),
|
|
10060
10063
|
borderColor: colors.border.medium.toNumber(),
|
|
10061
10064
|
borderWidth: 1,
|
|
10062
|
-
|
|
10063
|
-
|
|
10064
|
-
width: "fill"
|
|
10065
|
+
padding: 8,
|
|
10066
|
+
textStyle: textStyles.DEFAULT
|
|
10065
10067
|
},
|
|
10066
|
-
|
|
10067
|
-
|
|
10068
|
+
Dropdown: {
|
|
10069
|
+
trigger: {
|
|
10070
|
+
backgroundColor: colors.surface.medium.toNumber(),
|
|
10071
|
+
borderColor: colors.border.medium.toNumber(),
|
|
10072
|
+
borderWidth: 1,
|
|
10073
|
+
cornerRadius: 4,
|
|
10074
|
+
padding: { left: 12, right: 12, top: 8, bottom: 8 },
|
|
10075
|
+
width: "fill"
|
|
10076
|
+
},
|
|
10077
|
+
triggerHover: {
|
|
10078
|
+
borderColor: colors.primary.DEFAULT.toNumber()
|
|
10079
|
+
},
|
|
10080
|
+
triggerOpen: {
|
|
10081
|
+
borderColor: colors.primary.DEFAULT.toNumber(),
|
|
10082
|
+
backgroundColor: colors.surface.dark.toNumber()
|
|
10083
|
+
},
|
|
10084
|
+
triggerDisabled: {
|
|
10085
|
+
backgroundColor: colors.surface.light.toNumber(),
|
|
10086
|
+
alpha: 0.5
|
|
10087
|
+
},
|
|
10088
|
+
arrow: {
|
|
10089
|
+
color: colors.text.DEFAULT.toNumber(),
|
|
10090
|
+
size: 12
|
|
10091
|
+
},
|
|
10092
|
+
overlay: {
|
|
10093
|
+
backgroundColor: colors.surface.medium.toNumber(),
|
|
10094
|
+
borderColor: colors.border.medium.toNumber(),
|
|
10095
|
+
borderWidth: 1,
|
|
10096
|
+
cornerRadius: 4,
|
|
10097
|
+
maxHeight: 300,
|
|
10098
|
+
padding: 4
|
|
10099
|
+
},
|
|
10100
|
+
option: {
|
|
10101
|
+
padding: { left: 12, right: 12, top: 8, bottom: 8 }
|
|
10102
|
+
},
|
|
10103
|
+
optionSelected: {
|
|
10104
|
+
backgroundColor: colors.primary.light.toNumber(),
|
|
10105
|
+
Text: {
|
|
10106
|
+
style: textStyles.DEFAULT
|
|
10107
|
+
}
|
|
10108
|
+
},
|
|
10109
|
+
optionDisabled: {
|
|
10110
|
+
alpha: 0.3
|
|
10111
|
+
},
|
|
10112
|
+
textStyle: textStyles.DEFAULT,
|
|
10113
|
+
placeholderStyle: textStyles.DEFAULT,
|
|
10114
|
+
filterInput: {
|
|
10115
|
+
backgroundColor: colors.surface.lightest.toNumber(),
|
|
10116
|
+
borderColor: colors.border.medium.toNumber()
|
|
10117
|
+
//height: 32,
|
|
10118
|
+
},
|
|
10119
|
+
animationConfig: "stiff",
|
|
10120
|
+
optionGap: 2
|
|
10068
10121
|
},
|
|
10069
|
-
|
|
10070
|
-
|
|
10071
|
-
|
|
10122
|
+
Slider: {
|
|
10123
|
+
// Track styling
|
|
10124
|
+
trackColor: colors.surface.dark.toNumber(),
|
|
10125
|
+
trackFilledColor: colors.primary.dark.toNumber(),
|
|
10126
|
+
trackHeight: 6,
|
|
10127
|
+
trackBorderRadius: 3,
|
|
10128
|
+
trackLength: 200,
|
|
10129
|
+
trackHoverColor: colors.surface.dark.toNumber(),
|
|
10130
|
+
// Thumb styling
|
|
10131
|
+
thumbColor: colors.primary.light.toNumber(),
|
|
10132
|
+
thumbSize: 20,
|
|
10133
|
+
thumbBorderColor: colors.border.light.toNumber(),
|
|
10134
|
+
thumbBorderWidth: 2,
|
|
10135
|
+
thumbHoverColor: colors.primary.light.toNumber(),
|
|
10136
|
+
thumbActiveColor: colors.primary.dark.toNumber(),
|
|
10137
|
+
thumbDragScale: 1.1,
|
|
10138
|
+
// Marks/Ticks
|
|
10139
|
+
markColor: colors.border.medium.toNumber(),
|
|
10140
|
+
markHeight: 8,
|
|
10141
|
+
markWidth: 2,
|
|
10142
|
+
// Value label
|
|
10143
|
+
labelStyle: textStyles.small,
|
|
10144
|
+
labelOffset: 10,
|
|
10145
|
+
valueLabel: {
|
|
10146
|
+
backgroundColor: colors.background.dark.toNumber(),
|
|
10147
|
+
textStyle: { ...textStyles.small, color: colors.text.light.toString() },
|
|
10148
|
+
padding: { left: 6, right: 6, top: 4, bottom: 4 },
|
|
10149
|
+
cornerRadius: 4,
|
|
10150
|
+
offset: 8
|
|
10151
|
+
},
|
|
10152
|
+
// RangeSlider specific
|
|
10153
|
+
minDistance: 0,
|
|
10154
|
+
// States
|
|
10155
|
+
disabledAlpha: 0.4,
|
|
10156
|
+
// Animation & Effects
|
|
10157
|
+
animationConfig: { tension: 300, friction: 30 }
|
|
10072
10158
|
},
|
|
10073
|
-
|
|
10074
|
-
|
|
10075
|
-
|
|
10159
|
+
Toggle: {
|
|
10160
|
+
width: 50,
|
|
10161
|
+
height: 28,
|
|
10162
|
+
thumbSize: 24,
|
|
10163
|
+
trackColorOff: colors.surface.dark.toNumber(),
|
|
10164
|
+
trackColorOn: colors.success.DEFAULT.toNumber(),
|
|
10165
|
+
thumbColor: colors.surface.lightest.toNumber(),
|
|
10166
|
+
disabledColor: colors.border.medium.toNumber(),
|
|
10167
|
+
padding: 2,
|
|
10168
|
+
duration: 200,
|
|
10169
|
+
gap: 8,
|
|
10170
|
+
labelStyle: textStyles.DEFAULT,
|
|
10171
|
+
labelPosition: "right"
|
|
10076
10172
|
},
|
|
10077
|
-
|
|
10078
|
-
|
|
10079
|
-
|
|
10173
|
+
Modal: {
|
|
10174
|
+
backdropColor: 0,
|
|
10175
|
+
backdropOpacity: 0.5
|
|
10080
10176
|
},
|
|
10081
|
-
|
|
10082
|
-
backgroundColor: colors.surface.
|
|
10083
|
-
borderColor: colors.border.
|
|
10177
|
+
Dialog: {
|
|
10178
|
+
backgroundColor: colors.surface.DEFAULT.toNumber(),
|
|
10179
|
+
borderColor: colors.border.light.toNumber(),
|
|
10084
10180
|
borderWidth: 1,
|
|
10085
|
-
cornerRadius:
|
|
10086
|
-
|
|
10087
|
-
|
|
10088
|
-
|
|
10089
|
-
|
|
10090
|
-
|
|
10091
|
-
|
|
10092
|
-
|
|
10093
|
-
|
|
10094
|
-
|
|
10095
|
-
|
|
10181
|
+
cornerRadius: 8,
|
|
10182
|
+
padding: 0,
|
|
10183
|
+
maxWidth: 600,
|
|
10184
|
+
showClose: true,
|
|
10185
|
+
Header: {
|
|
10186
|
+
padding: { left: 24, right: 24, top: 20, bottom: 16 },
|
|
10187
|
+
gap: 12,
|
|
10188
|
+
textStyle: textStyles.heading,
|
|
10189
|
+
closeButton: {
|
|
10190
|
+
size: 32,
|
|
10191
|
+
cornerRadius: 4,
|
|
10192
|
+
backgroundColor: colors.surface.dark.toNumber(),
|
|
10193
|
+
borderColor: colors.border.light.toNumber(),
|
|
10194
|
+
borderWidth: 1
|
|
10195
|
+
}
|
|
10196
|
+
},
|
|
10197
|
+
Content: {
|
|
10198
|
+
padding: { left: 24, right: 24, top: 16, bottom: 16 },
|
|
10199
|
+
gap: 12
|
|
10200
|
+
},
|
|
10201
|
+
Actions: {
|
|
10202
|
+
padding: { left: 24, right: 24, top: 16, bottom: 20 },
|
|
10203
|
+
gap: 12,
|
|
10204
|
+
justifyContent: "end"
|
|
10096
10205
|
}
|
|
10097
10206
|
},
|
|
10098
|
-
|
|
10099
|
-
|
|
10207
|
+
AlertDialog: {
|
|
10208
|
+
maxWidth: 500
|
|
10100
10209
|
},
|
|
10101
|
-
|
|
10102
|
-
|
|
10103
|
-
|
|
10104
|
-
|
|
10105
|
-
borderColor: colors.border.medium.toNumber()
|
|
10106
|
-
//height: 32,
|
|
10107
|
-
},
|
|
10108
|
-
animationConfig: "stiff",
|
|
10109
|
-
optionGap: 2
|
|
10110
|
-
},
|
|
10111
|
-
Slider: {
|
|
10112
|
-
// Track styling
|
|
10113
|
-
trackColor: colors.surface.dark.toNumber(),
|
|
10114
|
-
trackFilledColor: colors.primary.DEFAULT.toNumber(),
|
|
10115
|
-
trackHeight: 6,
|
|
10116
|
-
trackBorderRadius: 3,
|
|
10117
|
-
trackLength: 200,
|
|
10118
|
-
trackHoverColor: colors.surface.medium.toNumber(),
|
|
10119
|
-
// Thumb styling
|
|
10120
|
-
thumbColor: colors.primary.DEFAULT.toNumber(),
|
|
10121
|
-
thumbSize: 20,
|
|
10122
|
-
thumbBorderColor: colors.border.light.toNumber(),
|
|
10123
|
-
thumbBorderWidth: 2,
|
|
10124
|
-
thumbHoverColor: colors.primary.light.toNumber(),
|
|
10125
|
-
thumbActiveColor: colors.primary.dark.toNumber(),
|
|
10126
|
-
thumbDragScale: 1.1,
|
|
10127
|
-
// Marks/Ticks
|
|
10128
|
-
markColor: colors.border.medium.toNumber(),
|
|
10129
|
-
markHeight: 8,
|
|
10130
|
-
markWidth: 2,
|
|
10131
|
-
// Value label
|
|
10132
|
-
labelStyle: textStyles.small,
|
|
10133
|
-
labelOffset: 10,
|
|
10134
|
-
valueLabel: {
|
|
10135
|
-
backgroundColor: colors.surface.darkest.toNumber(),
|
|
10136
|
-
textStyle: { ...textStyles.small, color: colors.text.light.toString() },
|
|
10137
|
-
padding: { left: 6, right: 6, top: 4, bottom: 4 },
|
|
10138
|
-
cornerRadius: 4,
|
|
10139
|
-
offset: 8
|
|
10210
|
+
WrapText: {
|
|
10211
|
+
wrap: true,
|
|
10212
|
+
paddingOffset: 0,
|
|
10213
|
+
textStyle: textStyles.DEFAULT
|
|
10140
10214
|
},
|
|
10141
|
-
|
|
10142
|
-
|
|
10143
|
-
|
|
10144
|
-
|
|
10145
|
-
|
|
10146
|
-
|
|
10147
|
-
|
|
10148
|
-
|
|
10149
|
-
|
|
10150
|
-
|
|
10151
|
-
|
|
10152
|
-
|
|
10153
|
-
|
|
10154
|
-
|
|
10155
|
-
|
|
10156
|
-
|
|
10157
|
-
|
|
10158
|
-
|
|
10159
|
-
labelStyle: textStyles.DEFAULT,
|
|
10160
|
-
labelPosition: "right"
|
|
10161
|
-
},
|
|
10162
|
-
Modal: {
|
|
10163
|
-
backdropColor: 0,
|
|
10164
|
-
backdropOpacity: 0.5
|
|
10165
|
-
},
|
|
10166
|
-
Dialog: {
|
|
10167
|
-
backgroundColor: colors.surface.DEFAULT.toNumber(),
|
|
10168
|
-
borderColor: colors.border.light.toNumber(),
|
|
10169
|
-
borderWidth: 1,
|
|
10170
|
-
cornerRadius: 8,
|
|
10171
|
-
padding: 0,
|
|
10172
|
-
maxWidth: 600,
|
|
10173
|
-
showClose: true,
|
|
10174
|
-
Header: {
|
|
10175
|
-
padding: { left: 24, right: 24, top: 20, bottom: 16 },
|
|
10176
|
-
gap: 12,
|
|
10177
|
-
textStyle: textStyles.heading,
|
|
10178
|
-
closeButton: {
|
|
10179
|
-
size: 32,
|
|
10180
|
-
cornerRadius: 4,
|
|
10181
|
-
backgroundColor: colors.surface.dark.toNumber(),
|
|
10182
|
-
borderColor: colors.border.light.toNumber(),
|
|
10183
|
-
borderWidth: 1
|
|
10215
|
+
Tooltip: {
|
|
10216
|
+
position: "top",
|
|
10217
|
+
showDelay: 1e3,
|
|
10218
|
+
hideDelay: 500,
|
|
10219
|
+
offset: 8,
|
|
10220
|
+
textStyle: {
|
|
10221
|
+
fontSize: "12px",
|
|
10222
|
+
fontFamily: "Arial",
|
|
10223
|
+
color: colors.text.dark.toString(),
|
|
10224
|
+
backgroundColor: colors.warning.medium.toString(),
|
|
10225
|
+
padding: { x: 2, y: 2 }
|
|
10226
|
+
},
|
|
10227
|
+
cornerRadius: 8,
|
|
10228
|
+
animation: {
|
|
10229
|
+
fadeIn: 200,
|
|
10230
|
+
fadeOut: 200,
|
|
10231
|
+
move: { dx: 0, dy: -20 },
|
|
10232
|
+
pulse: false
|
|
10184
10233
|
}
|
|
10185
|
-
},
|
|
10186
|
-
Content: {
|
|
10187
|
-
padding: { left: 24, right: 24, top: 16, bottom: 16 },
|
|
10188
|
-
gap: 12
|
|
10189
|
-
},
|
|
10190
|
-
Actions: {
|
|
10191
|
-
padding: { left: 24, right: 24, top: 16, bottom: 20 },
|
|
10192
|
-
gap: 12,
|
|
10193
|
-
justifyContent: "end"
|
|
10194
|
-
}
|
|
10195
|
-
},
|
|
10196
|
-
AlertDialog: {
|
|
10197
|
-
maxWidth: 500
|
|
10198
|
-
},
|
|
10199
|
-
WrapText: {
|
|
10200
|
-
wrap: true,
|
|
10201
|
-
paddingOffset: 0,
|
|
10202
|
-
textStyle: textStyles.DEFAULT
|
|
10203
|
-
},
|
|
10204
|
-
Tooltip: {
|
|
10205
|
-
position: "top",
|
|
10206
|
-
showDelay: 1e3,
|
|
10207
|
-
hideDelay: 500,
|
|
10208
|
-
offset: 8,
|
|
10209
|
-
textStyle: {
|
|
10210
|
-
fontSize: "12px",
|
|
10211
|
-
fontFamily: "Arial",
|
|
10212
|
-
color: colors.text.dark.toString(),
|
|
10213
|
-
backgroundColor: colors.warning.medium.toString(),
|
|
10214
|
-
padding: { x: 2, y: 2 }
|
|
10215
|
-
},
|
|
10216
|
-
cornerRadius: 8,
|
|
10217
|
-
animation: {
|
|
10218
|
-
fadeIn: 200,
|
|
10219
|
-
fadeOut: 200,
|
|
10220
|
-
move: { dx: 0, dy: -20 },
|
|
10221
|
-
pulse: false
|
|
10222
10234
|
}
|
|
10223
|
-
}
|
|
10224
|
-
}
|
|
10235
|
+
};
|
|
10236
|
+
}
|
|
10237
|
+
const preset = getPresetWithMode("oceanBlue", "light");
|
|
10238
|
+
const defaultTheme = buildDefaultTheme(preset.colors);
|
|
10239
|
+
function createDefaultTheme(presetName = "oceanBlue", mode = "light") {
|
|
10240
|
+
const presetForMode = getPresetWithMode(presetName, mode);
|
|
10241
|
+
return buildDefaultTheme(presetForMode.colors);
|
|
10242
|
+
}
|
|
10225
10243
|
class ThemeRegistry {
|
|
10226
10244
|
globalTheme = { ...defaultTheme };
|
|
10227
10245
|
customThemes = /* @__PURE__ */ new Map();
|
|
@@ -10302,8 +10320,8 @@ class ThemeRegistry {
|
|
|
10302
10320
|
* Set color tokens for the global theme
|
|
10303
10321
|
* @param colors - ColorTokens to use globally
|
|
10304
10322
|
*/
|
|
10305
|
-
setColorTokens(
|
|
10306
|
-
this.colorTokens =
|
|
10323
|
+
setColorTokens(colors) {
|
|
10324
|
+
this.colorTokens = colors;
|
|
10307
10325
|
}
|
|
10308
10326
|
/**
|
|
10309
10327
|
* Get current color tokens
|
|
@@ -10320,15 +10338,28 @@ class ThemeRegistry {
|
|
|
10320
10338
|
return this.colorMode;
|
|
10321
10339
|
}
|
|
10322
10340
|
/**
|
|
10323
|
-
* Set color mode and
|
|
10341
|
+
* Set color mode and trigger complete remount
|
|
10324
10342
|
* Updates color tokens if a preset is active
|
|
10343
|
+
* Triggers complete remount of all active mountJSX instances
|
|
10325
10344
|
* @param mode - Color mode to set
|
|
10326
10345
|
*/
|
|
10327
10346
|
setColorMode(mode) {
|
|
10328
10347
|
if (this.colorMode !== mode) {
|
|
10329
10348
|
this.colorMode = mode;
|
|
10330
|
-
if (this.currentPresetName
|
|
10331
|
-
|
|
10349
|
+
if (this.currentPresetName) {
|
|
10350
|
+
Promise.resolve().then(() => colorPresets).then(({ getPresetWithMode: getPresetWithMode2 }) => {
|
|
10351
|
+
const preset2 = getPresetWithMode2(
|
|
10352
|
+
this.currentPresetName,
|
|
10353
|
+
mode
|
|
10354
|
+
);
|
|
10355
|
+
this.colorTokens = preset2.colors;
|
|
10356
|
+
});
|
|
10357
|
+
}
|
|
10358
|
+
setTimeout(() => {
|
|
10359
|
+
Promise.resolve().then(() => vdom).then(({ remountAll: remountAll2 }) => {
|
|
10360
|
+
remountAll2();
|
|
10361
|
+
});
|
|
10362
|
+
}, 0);
|
|
10332
10363
|
}
|
|
10333
10364
|
}
|
|
10334
10365
|
/**
|
|
@@ -10341,11 +10372,14 @@ class ThemeRegistry {
|
|
|
10341
10372
|
/**
|
|
10342
10373
|
* Set current preset name
|
|
10343
10374
|
* @param name - Preset name
|
|
10375
|
+
* @param skipNotify - If true, skip notifying listeners (used during remount)
|
|
10344
10376
|
*/
|
|
10345
|
-
setCurrentPresetName(name) {
|
|
10377
|
+
setCurrentPresetName(name, skipNotify = false) {
|
|
10346
10378
|
if (this.currentPresetName !== name) {
|
|
10347
10379
|
this.currentPresetName = name;
|
|
10348
|
-
|
|
10380
|
+
if (!skipNotify) {
|
|
10381
|
+
this.notifyListeners();
|
|
10382
|
+
}
|
|
10349
10383
|
}
|
|
10350
10384
|
}
|
|
10351
10385
|
/**
|
|
@@ -11204,6 +11238,119 @@ class PortalRegistry {
|
|
|
11204
11238
|
}
|
|
11205
11239
|
}
|
|
11206
11240
|
const portalRegistry = new PortalRegistry();
|
|
11241
|
+
class MountRegistry {
|
|
11242
|
+
entries = /* @__PURE__ */ new Map();
|
|
11243
|
+
nextId = 1;
|
|
11244
|
+
/**
|
|
11245
|
+
* Register a new mountJSX instance
|
|
11246
|
+
* @param parent - Parent container or scene
|
|
11247
|
+
* @param type - Component type or node type
|
|
11248
|
+
* @param props - Mount props
|
|
11249
|
+
* @param rootNode - Root game object
|
|
11250
|
+
* @returns Registry ID for this mount
|
|
11251
|
+
*/
|
|
11252
|
+
register(parent, type, props, rootNode) {
|
|
11253
|
+
const id = this.nextId++;
|
|
11254
|
+
this.entries.set(id, { id, parent, type, props, rootNode });
|
|
11255
|
+
DebugLogger.log("vdom", `Registered mount ${id}`);
|
|
11256
|
+
return id;
|
|
11257
|
+
}
|
|
11258
|
+
/**
|
|
11259
|
+
* Unregister a mountJSX instance
|
|
11260
|
+
* @param id - Registry ID
|
|
11261
|
+
*/
|
|
11262
|
+
unregister(id) {
|
|
11263
|
+
const entry = this.entries.get(id);
|
|
11264
|
+
if (entry) {
|
|
11265
|
+
DebugLogger.log("vdom", `Unregistered mount ${id}`);
|
|
11266
|
+
this.entries.delete(id);
|
|
11267
|
+
}
|
|
11268
|
+
}
|
|
11269
|
+
/**
|
|
11270
|
+
* Get all active mount entries
|
|
11271
|
+
* @returns Array of mount entries
|
|
11272
|
+
*/
|
|
11273
|
+
getAllEntries() {
|
|
11274
|
+
return Array.from(this.entries.values());
|
|
11275
|
+
}
|
|
11276
|
+
/**
|
|
11277
|
+
* Clear all entries (for testing)
|
|
11278
|
+
*/
|
|
11279
|
+
clear() {
|
|
11280
|
+
this.entries.clear();
|
|
11281
|
+
this.nextId = 1;
|
|
11282
|
+
}
|
|
11283
|
+
}
|
|
11284
|
+
const mountRegistry = new MountRegistry();
|
|
11285
|
+
function remountAll() {
|
|
11286
|
+
const entries = mountRegistry.getAllEntries();
|
|
11287
|
+
if (entries.length === 0) {
|
|
11288
|
+
DebugLogger.log("vdom", "No mounts to remount");
|
|
11289
|
+
return;
|
|
11290
|
+
}
|
|
11291
|
+
console.log(`[REMOUNT] Starting remount of ${entries.length} root(s)`);
|
|
11292
|
+
entries.forEach((entry) => {
|
|
11293
|
+
try {
|
|
11294
|
+
const scene = entry.parent instanceof Phaser$1.Scene ? entry.parent : entry.parent.scene;
|
|
11295
|
+
if (!scene || !scene.sys) {
|
|
11296
|
+
console.warn("[REMOUNT] Scene is invalid, skipping remount");
|
|
11297
|
+
return;
|
|
11298
|
+
}
|
|
11299
|
+
const currentVNode = scene.__rootVNode;
|
|
11300
|
+
if (entry.rootNode instanceof Phaser$1.GameObjects.Container) {
|
|
11301
|
+
const children = entry.rootNode.getAll();
|
|
11302
|
+
children.forEach((child) => {
|
|
11303
|
+
;
|
|
11304
|
+
entry.rootNode.remove(child, true);
|
|
11305
|
+
});
|
|
11306
|
+
}
|
|
11307
|
+
if (currentVNode) {
|
|
11308
|
+
const flatChildren = flattenChildren(currentVNode.children);
|
|
11309
|
+
flatChildren.forEach(unmount);
|
|
11310
|
+
if (currentVNode.__ctx) {
|
|
11311
|
+
disposeCtx(currentVNode.__ctx);
|
|
11312
|
+
delete currentVNode.__ctx;
|
|
11313
|
+
}
|
|
11314
|
+
}
|
|
11315
|
+
const { width, height, disableAutoSize = false, ...componentProps } = entry.props;
|
|
11316
|
+
const renderContext = getRenderContext(entry.parent);
|
|
11317
|
+
renderContext.setViewport(width, height, scene);
|
|
11318
|
+
portalRegistry.setViewportSize(scene, width, height);
|
|
11319
|
+
let vnode;
|
|
11320
|
+
if (disableAutoSize) {
|
|
11321
|
+
vnode = { type: entry.type, props: { ...componentProps, width, height }, children: [] };
|
|
11322
|
+
} else {
|
|
11323
|
+
const componentVNode = {
|
|
11324
|
+
type: entry.type,
|
|
11325
|
+
props: componentProps,
|
|
11326
|
+
children: []
|
|
11327
|
+
};
|
|
11328
|
+
vnode = {
|
|
11329
|
+
type: SceneWrapper,
|
|
11330
|
+
props: {
|
|
11331
|
+
width,
|
|
11332
|
+
height,
|
|
11333
|
+
children: componentVNode
|
|
11334
|
+
},
|
|
11335
|
+
children: []
|
|
11336
|
+
};
|
|
11337
|
+
}
|
|
11338
|
+
;
|
|
11339
|
+
scene.__rootVNode = vnode;
|
|
11340
|
+
const rootNode = mount(entry.parent, vnode);
|
|
11341
|
+
if (rootNode instanceof Phaser$1.GameObjects.Container) {
|
|
11342
|
+
;
|
|
11343
|
+
rootNode.__mountRootId = generateMountRootId();
|
|
11344
|
+
}
|
|
11345
|
+
entry.rootNode = rootNode;
|
|
11346
|
+
rootNode.__registryId = entry.id;
|
|
11347
|
+
console.log("[REMOUNT] Successfully remounted entry", entry.id);
|
|
11348
|
+
} catch (error) {
|
|
11349
|
+
console.error("[REMOUNT] Failed to remount entry", entry.id, error);
|
|
11350
|
+
}
|
|
11351
|
+
});
|
|
11352
|
+
console.log("[REMOUNT] Remount complete");
|
|
11353
|
+
}
|
|
11207
11354
|
function flattenChildren(children) {
|
|
11208
11355
|
if (!children) return [];
|
|
11209
11356
|
return children.flat(Infinity);
|
|
@@ -11596,6 +11743,11 @@ function unmount(vnode) {
|
|
|
11596
11743
|
attachRef(ref, null);
|
|
11597
11744
|
const flatChildren = flattenChildren(vnode.children);
|
|
11598
11745
|
flatChildren.forEach(unmount);
|
|
11746
|
+
const node = vnode.__node;
|
|
11747
|
+
if (node?.__registryId !== void 0) {
|
|
11748
|
+
mountRegistry.unregister(node.__registryId);
|
|
11749
|
+
delete node.__registryId;
|
|
11750
|
+
}
|
|
11599
11751
|
const parent = vnode.__parent;
|
|
11600
11752
|
if (parent) host.remove(parent, vnode.__node);
|
|
11601
11753
|
}
|
|
@@ -11871,8 +12023,19 @@ function mountJSX(parentOrScene, type, props = { width: 0, height: 0 }) {
|
|
|
11871
12023
|
if (rootNode instanceof Phaser$1.GameObjects.Container) {
|
|
11872
12024
|
rootNode.__mountRootId = generateMountRootId();
|
|
11873
12025
|
}
|
|
12026
|
+
const registryId = mountRegistry.register(parentOrScene, type, props, rootNode);
|
|
12027
|
+
rootNode.__registryId = registryId;
|
|
11874
12028
|
return rootNode;
|
|
11875
12029
|
}
|
|
12030
|
+
const vdom = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
12031
|
+
__proto__: null,
|
|
12032
|
+
createElement,
|
|
12033
|
+
mount,
|
|
12034
|
+
mountJSX,
|
|
12035
|
+
patchVNode,
|
|
12036
|
+
remountAll,
|
|
12037
|
+
unmount
|
|
12038
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
11876
12039
|
function getCurrent() {
|
|
11877
12040
|
return _currentCtx;
|
|
11878
12041
|
}
|
|
@@ -16202,23 +16365,34 @@ function Sidebar(props) {
|
|
|
16202
16365
|
const primaryContent = sectionsContent ?? (!hasSections ? props.children : null) ?? null;
|
|
16203
16366
|
const extraContent = hasSections ? props.children ?? null : null;
|
|
16204
16367
|
const contentNodes = [...normalizeChildren(primaryContent), ...normalizeChildren(extraContent)];
|
|
16205
|
-
return /* @__PURE__ */ jsxs(
|
|
16206
|
-
|
|
16207
|
-
|
|
16208
|
-
|
|
16209
|
-
|
|
16210
|
-
|
|
16211
|
-
|
|
16212
|
-
|
|
16213
|
-
|
|
16214
|
-
|
|
16215
|
-
|
|
16216
|
-
|
|
16217
|
-
|
|
16218
|
-
|
|
16219
|
-
|
|
16220
|
-
|
|
16221
|
-
|
|
16368
|
+
return /* @__PURE__ */ jsxs(
|
|
16369
|
+
View,
|
|
16370
|
+
{
|
|
16371
|
+
...combinedProps,
|
|
16372
|
+
theme: nestedTheme,
|
|
16373
|
+
backgroundColor: themed.backgroundColor,
|
|
16374
|
+
backgroundAlpha: themed.backgroundAlpha,
|
|
16375
|
+
padding: themed.padding,
|
|
16376
|
+
gap: themed.gap,
|
|
16377
|
+
children: [
|
|
16378
|
+
props.header ? /* @__PURE__ */ jsx(View, { ...headerStyle, children: props.header }) : null,
|
|
16379
|
+
scrollable ? /* @__PURE__ */ jsx(
|
|
16380
|
+
ScrollView,
|
|
16381
|
+
{
|
|
16382
|
+
flex: 1,
|
|
16383
|
+
width: "fill",
|
|
16384
|
+
height: "fill",
|
|
16385
|
+
showVerticalSlider: "auto",
|
|
16386
|
+
showHorizontalSlider: false,
|
|
16387
|
+
sliderSize: "tiny",
|
|
16388
|
+
theme: nestedTheme,
|
|
16389
|
+
children: /* @__PURE__ */ jsx(View, { direction: "column", gap: effectiveGap, width: "fill", children: contentNodes })
|
|
16390
|
+
}
|
|
16391
|
+
) : contentNodes,
|
|
16392
|
+
props.footer ? /* @__PURE__ */ jsx(View, { ...footerStyle, children: props.footer }) : null
|
|
16393
|
+
]
|
|
16394
|
+
}
|
|
16395
|
+
);
|
|
16222
16396
|
}
|
|
16223
16397
|
function DefaultThumb(props) {
|
|
16224
16398
|
const { size, color, borderColor, borderWidth = 0, isDragging, dragScale = 1.1 } = props;
|
|
@@ -16917,7 +17091,7 @@ export {
|
|
|
16917
17091
|
svgToTexture as Z,
|
|
16918
17092
|
useGameObjectEffect as _,
|
|
16919
17093
|
AlertDialog as a,
|
|
16920
|
-
|
|
17094
|
+
spriteCreator as a$,
|
|
16921
17095
|
EFFECT_REGISTRY as a0,
|
|
16922
17096
|
applyEffectByName as a1,
|
|
16923
17097
|
resolveEffect as a2,
|
|
@@ -16934,27 +17108,27 @@ export {
|
|
|
16934
17108
|
nodeRegistry as aD,
|
|
16935
17109
|
register as aE,
|
|
16936
17110
|
host as aF,
|
|
16937
|
-
|
|
16938
|
-
|
|
16939
|
-
|
|
16940
|
-
|
|
16941
|
-
|
|
16942
|
-
|
|
16943
|
-
|
|
16944
|
-
|
|
16945
|
-
|
|
16946
|
-
|
|
16947
|
-
|
|
16948
|
-
|
|
16949
|
-
|
|
16950
|
-
|
|
16951
|
-
|
|
16952
|
-
|
|
16953
|
-
|
|
16954
|
-
|
|
16955
|
-
|
|
16956
|
-
|
|
16957
|
-
|
|
17111
|
+
createDefaultTheme as aG,
|
|
17112
|
+
defaultTheme as aH,
|
|
17113
|
+
mergeThemes as aI,
|
|
17114
|
+
createTheme as aJ,
|
|
17115
|
+
getThemedProps as aK,
|
|
17116
|
+
remountAll as aL,
|
|
17117
|
+
createElement as aM,
|
|
17118
|
+
mount as aN,
|
|
17119
|
+
unmount as aO,
|
|
17120
|
+
patchVNode as aP,
|
|
17121
|
+
Sprite as aQ,
|
|
17122
|
+
Graphics as aR,
|
|
17123
|
+
TileSprite as aS,
|
|
17124
|
+
Text as aT,
|
|
17125
|
+
View as aU,
|
|
17126
|
+
textCreator as aV,
|
|
17127
|
+
textPatcher as aW,
|
|
17128
|
+
viewCreator as aX,
|
|
17129
|
+
viewPatcher as aY,
|
|
17130
|
+
nineSliceCreator as aZ,
|
|
17131
|
+
nineSlicePatcher as a_,
|
|
16958
17132
|
createJelloEffect as aa,
|
|
16959
17133
|
createNoneEffect as ab,
|
|
16960
17134
|
createPressEffect as ac,
|
|
@@ -16982,42 +17156,45 @@ export {
|
|
|
16982
17156
|
releaseSVGTexture as ay,
|
|
16983
17157
|
releaseSVGTextures as az,
|
|
16984
17158
|
CharTextInput as b,
|
|
16985
|
-
|
|
16986
|
-
|
|
16987
|
-
|
|
16988
|
-
|
|
16989
|
-
|
|
16990
|
-
|
|
16991
|
-
|
|
16992
|
-
|
|
16993
|
-
|
|
16994
|
-
|
|
16995
|
-
|
|
16996
|
-
|
|
16997
|
-
|
|
16998
|
-
|
|
16999
|
-
|
|
17000
|
-
|
|
17001
|
-
|
|
17002
|
-
|
|
17003
|
-
|
|
17004
|
-
|
|
17005
|
-
|
|
17006
|
-
|
|
17007
|
-
|
|
17008
|
-
|
|
17009
|
-
|
|
17010
|
-
|
|
17011
|
-
|
|
17012
|
-
|
|
17013
|
-
|
|
17014
|
-
|
|
17015
|
-
|
|
17016
|
-
|
|
17017
|
-
|
|
17018
|
-
|
|
17019
|
-
|
|
17020
|
-
|
|
17159
|
+
spritePatcher as b0,
|
|
17160
|
+
imageCreator as b1,
|
|
17161
|
+
imagePatcher as b2,
|
|
17162
|
+
graphicsCreator as b3,
|
|
17163
|
+
graphicsPatcher as b4,
|
|
17164
|
+
tileSpriteCreator as b5,
|
|
17165
|
+
tileSpritePatcher as b6,
|
|
17166
|
+
portalRegistry as b7,
|
|
17167
|
+
animatedSignal as b8,
|
|
17168
|
+
isAnimatedSignal as b9,
|
|
17169
|
+
presets as bA,
|
|
17170
|
+
defaultTextStyleTokens as bB,
|
|
17171
|
+
vdom as bC,
|
|
17172
|
+
unwrapSignal as ba,
|
|
17173
|
+
DEFAULT_SPRING_CONFIG as bb,
|
|
17174
|
+
SPRING_PRESETS as bc,
|
|
17175
|
+
SpringPhysics as bd,
|
|
17176
|
+
useSpring as be,
|
|
17177
|
+
useSprings as bf,
|
|
17178
|
+
HexColor as bg,
|
|
17179
|
+
hexToNumber as bh,
|
|
17180
|
+
numberToHex as bi,
|
|
17181
|
+
numberToRgb as bj,
|
|
17182
|
+
rgbToNumber as bk,
|
|
17183
|
+
darken as bl,
|
|
17184
|
+
darkenHex as bm,
|
|
17185
|
+
hex as bn,
|
|
17186
|
+
lighten as bo,
|
|
17187
|
+
lightenHex as bp,
|
|
17188
|
+
createTextStyle as bq,
|
|
17189
|
+
ensureContrast as br,
|
|
17190
|
+
getContrastRatio as bs,
|
|
17191
|
+
applyDarkMode as bt,
|
|
17192
|
+
applyLightMode as bu,
|
|
17193
|
+
forestGreenPreset as bv,
|
|
17194
|
+
generateColorScale as bw,
|
|
17195
|
+
getPreset as bx,
|
|
17196
|
+
midnightPreset as by,
|
|
17197
|
+
oceanBluePreset as bz,
|
|
17021
17198
|
Divider as c,
|
|
17022
17199
|
Dropdown as d,
|
|
17023
17200
|
createIconComponent as e,
|
|
@@ -17043,4 +17220,4 @@ export {
|
|
|
17043
17220
|
defaultSizeTokens as y,
|
|
17044
17221
|
defaultSpacingTokens as z
|
|
17045
17222
|
};
|
|
17046
|
-
//# sourceMappingURL=TransformOriginView-
|
|
17223
|
+
//# sourceMappingURL=TransformOriginView-CiFiQcku.js.map
|