@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
|
@@ -1444,7 +1444,7 @@ function requireLodash() {
|
|
|
1444
1444
|
var reIsNative = RegExp2(
|
|
1445
1445
|
"^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
1446
1446
|
);
|
|
1447
|
-
var Buffer = moduleExports ? context.Buffer : undefined$1,
|
|
1447
|
+
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;
|
|
1448
1448
|
var defineProperty = (function() {
|
|
1449
1449
|
try {
|
|
1450
1450
|
var func = getNative(Object2, "defineProperty");
|
|
@@ -1459,7 +1459,7 @@ function requireLodash() {
|
|
|
1459
1459
|
var metaMap = WeakMap2 && new WeakMap2();
|
|
1460
1460
|
var realNames = {};
|
|
1461
1461
|
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap2);
|
|
1462
|
-
var symbolProto =
|
|
1462
|
+
var symbolProto = Symbol2 ? Symbol2.prototype : undefined$1, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1, symbolToString = symbolProto ? symbolProto.toString : undefined$1;
|
|
1463
1463
|
function lodash2(value) {
|
|
1464
1464
|
if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
|
|
1465
1465
|
if (value instanceof LodashWrapper) {
|
|
@@ -9696,6 +9696,18 @@ function getPresetWithMode(name, mode) {
|
|
|
9696
9696
|
const preset2 = getPreset(name);
|
|
9697
9697
|
return mode === "light" ? applyLightMode(preset2) : applyDarkMode(preset2);
|
|
9698
9698
|
}
|
|
9699
|
+
const colorPresets = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
9700
|
+
__proto__: null,
|
|
9701
|
+
applyDarkMode,
|
|
9702
|
+
applyLightMode,
|
|
9703
|
+
forestGreenPreset,
|
|
9704
|
+
generateColorScale,
|
|
9705
|
+
getPreset,
|
|
9706
|
+
getPresetWithMode,
|
|
9707
|
+
midnightPreset,
|
|
9708
|
+
oceanBluePreset,
|
|
9709
|
+
presets
|
|
9710
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
9699
9711
|
const defaultSpacingTokens = {
|
|
9700
9712
|
xs: 4,
|
|
9701
9713
|
sm: 8,
|
|
@@ -9769,460 +9781,466 @@ function createTextStyleTokens(textColor) {
|
|
|
9769
9781
|
};
|
|
9770
9782
|
}
|
|
9771
9783
|
const defaultTextStyleTokens = createTextStyleTokens("#ffffff");
|
|
9772
|
-
|
|
9773
|
-
const
|
|
9774
|
-
|
|
9775
|
-
|
|
9776
|
-
|
|
9777
|
-
|
|
9778
|
-
|
|
9779
|
-
visible: true
|
|
9780
|
-
},
|
|
9781
|
-
Icon: {
|
|
9782
|
-
size: 24,
|
|
9783
|
-
tint: colors.border.dark.toNumber()
|
|
9784
|
-
},
|
|
9785
|
-
text: {
|
|
9786
|
-
text: "",
|
|
9787
|
-
alpha: 1,
|
|
9788
|
-
visible: true,
|
|
9789
|
-
style: textStyles.DEFAULT
|
|
9790
|
-
},
|
|
9791
|
-
nineslice: {
|
|
9792
|
-
alpha: 1,
|
|
9793
|
-
visible: true
|
|
9794
|
-
},
|
|
9795
|
-
sprite: {
|
|
9796
|
-
alpha: 1,
|
|
9797
|
-
visible: true
|
|
9798
|
-
},
|
|
9799
|
-
image: {
|
|
9800
|
-
alpha: 1,
|
|
9801
|
-
visible: true
|
|
9802
|
-
},
|
|
9803
|
-
graphics: {
|
|
9804
|
-
alpha: 1,
|
|
9805
|
-
visible: true
|
|
9806
|
-
},
|
|
9807
|
-
tilesprite: {
|
|
9808
|
-
alpha: 1,
|
|
9809
|
-
visible: true
|
|
9810
|
-
},
|
|
9811
|
-
// Public API (uppercase)
|
|
9812
|
-
View: {
|
|
9813
|
-
alpha: 1,
|
|
9814
|
-
visible: true
|
|
9815
|
-
},
|
|
9816
|
-
Text: {
|
|
9817
|
-
text: "",
|
|
9818
|
-
alpha: 1,
|
|
9819
|
-
visible: true,
|
|
9820
|
-
style: textStyles.DEFAULT
|
|
9821
|
-
},
|
|
9822
|
-
NineSlice: {
|
|
9823
|
-
alpha: 1,
|
|
9824
|
-
visible: true
|
|
9825
|
-
},
|
|
9826
|
-
Sprite: {
|
|
9827
|
-
alpha: 1,
|
|
9828
|
-
visible: true
|
|
9829
|
-
},
|
|
9830
|
-
Image: {
|
|
9831
|
-
alpha: 1,
|
|
9832
|
-
visible: true
|
|
9833
|
-
},
|
|
9834
|
-
Graphics: {
|
|
9835
|
-
alpha: 1,
|
|
9836
|
-
visible: true
|
|
9837
|
-
},
|
|
9838
|
-
TileSprite: {
|
|
9839
|
-
alpha: 1,
|
|
9840
|
-
visible: true
|
|
9841
|
-
},
|
|
9842
|
-
RadioButton: {
|
|
9843
|
-
selectedColor: colors.primary.DEFAULT.toNumber(),
|
|
9844
|
-
color: colors.border.medium.toNumber(),
|
|
9845
|
-
gap: 8,
|
|
9846
|
-
size: 16,
|
|
9847
|
-
innerSize: 12,
|
|
9848
|
-
labelStyle: {
|
|
9849
|
-
color: colors.text.DEFAULT.toString(),
|
|
9850
|
-
fontSize: "14px"
|
|
9851
|
-
}
|
|
9852
|
-
},
|
|
9853
|
-
ScrollSlider: {
|
|
9854
|
-
borderColor: colors.border.medium.toNumber(),
|
|
9855
|
-
trackColor: colors.surface.dark.toNumber(),
|
|
9856
|
-
thumbColor: colors.primary.light.toNumber(),
|
|
9857
|
-
borderWidth: 1,
|
|
9858
|
-
size: 12,
|
|
9859
|
-
minThumbSize: 20
|
|
9860
|
-
},
|
|
9861
|
-
Button: {
|
|
9862
|
-
disabledColor: colors.background.DEFAULT.toNumber(),
|
|
9863
|
-
iconSize: 24,
|
|
9864
|
-
backgroundColor: colors.primary.DEFAULT.toNumber(),
|
|
9865
|
-
backgroundAlpha: 1,
|
|
9866
|
-
borderColor: colors.primary.dark.toNumber(),
|
|
9867
|
-
borderWidth: 1,
|
|
9868
|
-
cornerRadius: 6,
|
|
9869
|
-
padding: 8,
|
|
9870
|
-
gap: 8,
|
|
9871
|
-
justifyContent: "center",
|
|
9872
|
-
alignItems: "center",
|
|
9873
|
-
primary: {
|
|
9874
|
-
backgroundColor: colors.primary.medium.toNumber(),
|
|
9875
|
-
borderColor: colors.primary.dark.toNumber()
|
|
9784
|
+
function buildDefaultTheme(colors) {
|
|
9785
|
+
const textStyles = createTextStyleTokens(colors.text.DEFAULT.toString());
|
|
9786
|
+
return {
|
|
9787
|
+
// Primitives (lowercase) - share same defaults as uppercase
|
|
9788
|
+
view: {
|
|
9789
|
+
alpha: 1,
|
|
9790
|
+
visible: true
|
|
9876
9791
|
},
|
|
9877
|
-
|
|
9878
|
-
|
|
9879
|
-
|
|
9880
|
-
effect: "press",
|
|
9881
|
-
effectConfig: { intensity: 0.9, time: 200 }
|
|
9792
|
+
Icon: {
|
|
9793
|
+
size: 24,
|
|
9794
|
+
tint: colors.border.dark.toNumber()
|
|
9882
9795
|
},
|
|
9883
|
-
|
|
9884
|
-
|
|
9885
|
-
|
|
9886
|
-
|
|
9887
|
-
|
|
9888
|
-
effect: "flash",
|
|
9889
|
-
effectConfig: { intensity: 1.15, time: 200 }
|
|
9796
|
+
text: {
|
|
9797
|
+
text: "",
|
|
9798
|
+
alpha: 1,
|
|
9799
|
+
visible: true,
|
|
9800
|
+
style: textStyles.DEFAULT
|
|
9890
9801
|
},
|
|
9891
|
-
|
|
9892
|
-
|
|
9893
|
-
|
|
9802
|
+
nineslice: {
|
|
9803
|
+
alpha: 1,
|
|
9804
|
+
visible: true
|
|
9894
9805
|
},
|
|
9895
|
-
|
|
9896
|
-
|
|
9897
|
-
|
|
9806
|
+
sprite: {
|
|
9807
|
+
alpha: 1,
|
|
9808
|
+
visible: true
|
|
9898
9809
|
},
|
|
9899
|
-
|
|
9900
|
-
|
|
9901
|
-
|
|
9902
|
-
}
|
|
9903
|
-
},
|
|
9904
|
-
Sidebar: {
|
|
9905
|
-
variant: "solid",
|
|
9906
|
-
size: "md",
|
|
9907
|
-
backgroundColor: colors.surface.light.toNumber(),
|
|
9908
|
-
backgroundAlpha: 1,
|
|
9909
|
-
padding: 16,
|
|
9910
|
-
gap: 8,
|
|
9911
|
-
dividerColor: colors.border.light.toNumber(),
|
|
9912
|
-
itemGap: 8,
|
|
9913
|
-
sectionGap: 10,
|
|
9914
|
-
headerStyle: {
|
|
9915
|
-
gap: 10,
|
|
9916
|
-
padding: { bottom: 6 },
|
|
9917
|
-
width: "fill"
|
|
9810
|
+
image: {
|
|
9811
|
+
alpha: 1,
|
|
9812
|
+
visible: true
|
|
9918
9813
|
},
|
|
9919
|
-
|
|
9920
|
-
|
|
9921
|
-
|
|
9922
|
-
width: "fill"
|
|
9814
|
+
graphics: {
|
|
9815
|
+
alpha: 1,
|
|
9816
|
+
visible: true
|
|
9923
9817
|
},
|
|
9924
|
-
|
|
9925
|
-
|
|
9926
|
-
|
|
9927
|
-
|
|
9928
|
-
|
|
9929
|
-
|
|
9930
|
-
|
|
9931
|
-
|
|
9818
|
+
tilesprite: {
|
|
9819
|
+
alpha: 1,
|
|
9820
|
+
visible: true
|
|
9821
|
+
},
|
|
9822
|
+
// Public API (uppercase)
|
|
9823
|
+
View: {
|
|
9824
|
+
alpha: 1,
|
|
9825
|
+
visible: true
|
|
9826
|
+
},
|
|
9827
|
+
Text: {
|
|
9828
|
+
text: "",
|
|
9829
|
+
alpha: 1,
|
|
9830
|
+
visible: true,
|
|
9831
|
+
style: textStyles.DEFAULT
|
|
9832
|
+
},
|
|
9833
|
+
NineSlice: {
|
|
9834
|
+
alpha: 1,
|
|
9835
|
+
visible: true
|
|
9836
|
+
},
|
|
9837
|
+
Sprite: {
|
|
9838
|
+
alpha: 1,
|
|
9839
|
+
visible: true
|
|
9840
|
+
},
|
|
9841
|
+
Image: {
|
|
9842
|
+
alpha: 1,
|
|
9843
|
+
visible: true
|
|
9844
|
+
},
|
|
9845
|
+
Graphics: {
|
|
9846
|
+
alpha: 1,
|
|
9847
|
+
visible: true
|
|
9848
|
+
},
|
|
9849
|
+
TileSprite: {
|
|
9850
|
+
alpha: 1,
|
|
9851
|
+
visible: true
|
|
9852
|
+
},
|
|
9853
|
+
RadioButton: {
|
|
9854
|
+
selectedColor: colors.primary.DEFAULT.toNumber(),
|
|
9855
|
+
color: colors.border.medium.toNumber(),
|
|
9856
|
+
gap: 10,
|
|
9857
|
+
size: 16,
|
|
9858
|
+
innerSize: 16,
|
|
9859
|
+
labelStyle: {
|
|
9860
|
+
color: colors.text.DEFAULT.toString(),
|
|
9861
|
+
fontSize: "14px"
|
|
9932
9862
|
}
|
|
9933
9863
|
},
|
|
9934
|
-
|
|
9864
|
+
ScrollSlider: {
|
|
9865
|
+
borderColor: colors.border.dark.toNumber(),
|
|
9866
|
+
trackColor: colors.surface.dark.toNumber(),
|
|
9867
|
+
thumbColor: colors.primary.dark.toNumber(),
|
|
9868
|
+
borderWidth: 2,
|
|
9869
|
+
minThumbSize: 30,
|
|
9870
|
+
size: 24
|
|
9871
|
+
},
|
|
9872
|
+
Button: {
|
|
9873
|
+
disabledColor: colors.background.DEFAULT.toNumber(),
|
|
9874
|
+
iconSize: 24,
|
|
9875
|
+
backgroundColor: colors.primary.DEFAULT.toNumber(),
|
|
9876
|
+
backgroundAlpha: 1,
|
|
9877
|
+
borderColor: colors.primary.dark.toNumber(),
|
|
9878
|
+
borderWidth: 1,
|
|
9879
|
+
cornerRadius: 6,
|
|
9880
|
+
padding: 8,
|
|
9935
9881
|
gap: 8,
|
|
9936
|
-
|
|
9937
|
-
|
|
9938
|
-
|
|
9939
|
-
|
|
9940
|
-
|
|
9941
|
-
...textStyles.medium,
|
|
9942
|
-
color: colors.text.dark.toString()
|
|
9882
|
+
justifyContent: "center",
|
|
9883
|
+
alignItems: "center",
|
|
9884
|
+
primary: {
|
|
9885
|
+
backgroundColor: colors.primary.medium.toNumber(),
|
|
9886
|
+
borderColor: colors.primary.dark.toNumber()
|
|
9943
9887
|
},
|
|
9944
|
-
|
|
9945
|
-
backgroundColor: colors.
|
|
9946
|
-
borderColor: colors.
|
|
9947
|
-
|
|
9948
|
-
|
|
9888
|
+
secondary: {
|
|
9889
|
+
backgroundColor: colors.secondary.DEFAULT.toNumber(),
|
|
9890
|
+
borderColor: colors.secondary.dark.toNumber(),
|
|
9891
|
+
effect: "press",
|
|
9892
|
+
effectConfig: { intensity: 0.9, time: 200 }
|
|
9949
9893
|
},
|
|
9950
|
-
|
|
9951
|
-
|
|
9952
|
-
|
|
9953
|
-
|
|
9954
|
-
|
|
9955
|
-
|
|
9956
|
-
|
|
9957
|
-
|
|
9958
|
-
|
|
9959
|
-
|
|
9960
|
-
|
|
9894
|
+
outline: {
|
|
9895
|
+
backgroundColor: 0,
|
|
9896
|
+
backgroundAlpha: 0,
|
|
9897
|
+
borderColor: colors.accent.DEFAULT.toNumber(),
|
|
9898
|
+
borderWidth: 2,
|
|
9899
|
+
effect: "flash",
|
|
9900
|
+
effectConfig: { intensity: 1.15, time: 200 }
|
|
9901
|
+
},
|
|
9902
|
+
small: {
|
|
9903
|
+
padding: 6,
|
|
9904
|
+
cornerRadius: 4
|
|
9905
|
+
},
|
|
9906
|
+
medium: {
|
|
9907
|
+
padding: 8,
|
|
9908
|
+
cornerRadius: 6
|
|
9909
|
+
},
|
|
9910
|
+
large: {
|
|
9911
|
+
padding: { top: 12, bottom: 12, left: 8, right: 8 },
|
|
9912
|
+
cornerRadius: 8
|
|
9961
9913
|
}
|
|
9962
9914
|
},
|
|
9963
|
-
|
|
9964
|
-
|
|
9965
|
-
|
|
9966
|
-
|
|
9967
|
-
|
|
9915
|
+
Sidebar: {
|
|
9916
|
+
variant: "solid",
|
|
9917
|
+
size: "md",
|
|
9918
|
+
backgroundColor: colors.surface.light.toNumber(),
|
|
9919
|
+
backgroundAlpha: 1,
|
|
9920
|
+
padding: 16,
|
|
9921
|
+
gap: 8,
|
|
9922
|
+
dividerColor: colors.border.light.toNumber(),
|
|
9923
|
+
itemGap: 8,
|
|
9924
|
+
sectionGap: 10,
|
|
9925
|
+
headerStyle: {
|
|
9926
|
+
gap: 10,
|
|
9927
|
+
padding: { bottom: 6 },
|
|
9928
|
+
width: "fill"
|
|
9968
9929
|
},
|
|
9969
|
-
|
|
9970
|
-
|
|
9971
|
-
|
|
9972
|
-
|
|
9973
|
-
|
|
9930
|
+
footerStyle: {
|
|
9931
|
+
gap: 8,
|
|
9932
|
+
padding: { top: 6 },
|
|
9933
|
+
width: "fill"
|
|
9934
|
+
},
|
|
9935
|
+
sectionStyle: {
|
|
9936
|
+
gap: 8,
|
|
9937
|
+
padding: { top: 4, bottom: 8 },
|
|
9938
|
+
width: "fill",
|
|
9939
|
+
titleStyle: {
|
|
9940
|
+
...textStyles.medium,
|
|
9941
|
+
color: colors.text.dark.toString(),
|
|
9942
|
+
fontStyle: "bold"
|
|
9943
|
+
}
|
|
9974
9944
|
},
|
|
9975
|
-
|
|
9976
|
-
|
|
9977
|
-
|
|
9978
|
-
|
|
9945
|
+
itemStyle: {
|
|
9946
|
+
gap: 8,
|
|
9947
|
+
padding: { top: 8, bottom: 8, left: 10, right: 10 },
|
|
9948
|
+
width: "fill",
|
|
9949
|
+
cornerRadius: 8,
|
|
9950
|
+
backgroundColor: colors.surface.lightest.toNumber(),
|
|
9951
|
+
textStyle: {
|
|
9952
|
+
...textStyles.medium,
|
|
9953
|
+
color: colors.text.dark.toString()
|
|
9954
|
+
},
|
|
9955
|
+
active: {
|
|
9956
|
+
backgroundColor: colors.primary.lightest.toNumber(),
|
|
9957
|
+
borderColor: colors.primary.light.toNumber(),
|
|
9958
|
+
borderWidth: 1,
|
|
9959
|
+
backgroundAlpha: 0.9
|
|
9960
|
+
},
|
|
9961
|
+
disabledAlpha: 0.5
|
|
9979
9962
|
},
|
|
9980
|
-
|
|
9981
|
-
backgroundColor: colors.
|
|
9982
|
-
backgroundAlpha:
|
|
9983
|
-
|
|
9984
|
-
|
|
9963
|
+
badgeStyle: {
|
|
9964
|
+
backgroundColor: colors.primary.light.toNumber(),
|
|
9965
|
+
backgroundAlpha: 0.15,
|
|
9966
|
+
cornerRadius: 6,
|
|
9967
|
+
padding: { top: 4, bottom: 4, left: 8, right: 8 },
|
|
9968
|
+
textStyle: {
|
|
9969
|
+
...textStyles.small,
|
|
9970
|
+
color: colors.primary.dark.toString(),
|
|
9971
|
+
fontStyle: "bold"
|
|
9972
|
+
}
|
|
9973
|
+
},
|
|
9974
|
+
variants: {
|
|
9975
|
+
solid: {
|
|
9976
|
+
backgroundColor: colors.surface.light.toNumber(),
|
|
9977
|
+
borderColor: colors.border.light.toNumber(),
|
|
9978
|
+
borderWidth: 1
|
|
9979
|
+
},
|
|
9980
|
+
muted: {
|
|
9981
|
+
backgroundColor: colors.surface.medium.toNumber(),
|
|
9982
|
+
backgroundAlpha: 0.85,
|
|
9983
|
+
borderColor: colors.border.light.toNumber(),
|
|
9984
|
+
borderWidth: 1
|
|
9985
|
+
},
|
|
9986
|
+
ghost: {
|
|
9987
|
+
backgroundColor: colors.background.lightest.toNumber(),
|
|
9988
|
+
backgroundAlpha: 0.6,
|
|
9989
|
+
borderWidth: 0
|
|
9990
|
+
},
|
|
9991
|
+
inset: {
|
|
9992
|
+
backgroundColor: colors.surface.dark.toNumber(),
|
|
9993
|
+
backgroundAlpha: 1,
|
|
9994
|
+
borderColor: colors.border.medium.toNumber(),
|
|
9995
|
+
borderWidth: 1
|
|
9996
|
+
}
|
|
9997
|
+
},
|
|
9998
|
+
sizes: {
|
|
9999
|
+
sm: {
|
|
10000
|
+
padding: 10,
|
|
10001
|
+
gap: 6
|
|
10002
|
+
},
|
|
10003
|
+
md: {
|
|
10004
|
+
padding: 16,
|
|
10005
|
+
gap: 8
|
|
10006
|
+
},
|
|
10007
|
+
lg: {
|
|
10008
|
+
padding: { top: 20, bottom: 20, left: 16, right: 16 },
|
|
10009
|
+
gap: 12
|
|
10010
|
+
}
|
|
9985
10011
|
}
|
|
9986
10012
|
},
|
|
9987
|
-
|
|
9988
|
-
|
|
10013
|
+
Accordion: {
|
|
10014
|
+
effect: "none",
|
|
10015
|
+
effectConfig: { magnitude: 0.02, time: 150 },
|
|
10016
|
+
headerStyle: {
|
|
10017
|
+
backgroundColor: colors.surface.dark.toNumber(),
|
|
9989
10018
|
padding: 10,
|
|
9990
|
-
gap:
|
|
10019
|
+
gap: 10,
|
|
10020
|
+
cornerRadius: 5,
|
|
10021
|
+
width: "fill"
|
|
9991
10022
|
},
|
|
9992
|
-
|
|
9993
|
-
|
|
9994
|
-
|
|
10023
|
+
contentStyle: {
|
|
10024
|
+
backgroundColor: colors.surface.light.toNumber(),
|
|
10025
|
+
padding: 10,
|
|
10026
|
+
cornerRadius: 5,
|
|
10027
|
+
width: "fill"
|
|
9995
10028
|
},
|
|
9996
|
-
|
|
9997
|
-
|
|
9998
|
-
|
|
10029
|
+
Icon: {
|
|
10030
|
+
size: 24
|
|
10031
|
+
},
|
|
10032
|
+
textStyle: {
|
|
10033
|
+
color: colors.text.DEFAULT.toString(),
|
|
10034
|
+
fontSize: "18px"
|
|
9999
10035
|
}
|
|
10000
|
-
}
|
|
10001
|
-
},
|
|
10002
|
-
Accordion: {
|
|
10003
|
-
effect: "none",
|
|
10004
|
-
effectConfig: { magnitude: 0.02, time: 150 },
|
|
10005
|
-
headerStyle: {
|
|
10006
|
-
backgroundColor: colors.surface.dark.toNumber(),
|
|
10007
|
-
padding: 10,
|
|
10008
|
-
gap: 10,
|
|
10009
|
-
cornerRadius: 5,
|
|
10010
|
-
width: "fill"
|
|
10011
10036
|
},
|
|
10012
|
-
|
|
10013
|
-
|
|
10014
|
-
|
|
10015
|
-
|
|
10016
|
-
|
|
10017
|
-
|
|
10018
|
-
|
|
10019
|
-
|
|
10037
|
+
NineSliceButton: {},
|
|
10038
|
+
CharText: {
|
|
10039
|
+
charSpacing: 0,
|
|
10040
|
+
cursorColor: colors.secondary.DEFAULT.toNumber(),
|
|
10041
|
+
cursorWidth: 3,
|
|
10042
|
+
cursorBlinkSpeed: 200,
|
|
10043
|
+
selectionAlpha: 0.3,
|
|
10044
|
+
lineHeight: 1.2,
|
|
10045
|
+
wordWrap: true,
|
|
10046
|
+
textStyle: textStyles.DEFAULT,
|
|
10047
|
+
borderColor: colors.border.medium.toNumber(),
|
|
10048
|
+
borderWidth: 2,
|
|
10049
|
+
cornerRadius: 6,
|
|
10050
|
+
padding: 10
|
|
10020
10051
|
},
|
|
10021
|
-
|
|
10022
|
-
|
|
10023
|
-
|
|
10024
|
-
|
|
10025
|
-
|
|
10026
|
-
|
|
10027
|
-
|
|
10028
|
-
|
|
10029
|
-
|
|
10030
|
-
|
|
10031
|
-
|
|
10032
|
-
selectionAlpha: 0.3,
|
|
10033
|
-
lineHeight: 1.2,
|
|
10034
|
-
wordWrap: true,
|
|
10035
|
-
textStyle: textStyles.DEFAULT,
|
|
10036
|
-
borderColor: colors.border.medium.toNumber(),
|
|
10037
|
-
borderWidth: 2,
|
|
10038
|
-
cornerRadius: 6,
|
|
10039
|
-
padding: 10
|
|
10040
|
-
},
|
|
10041
|
-
CharTextInput: {
|
|
10042
|
-
charSpacing: 2,
|
|
10043
|
-
cursorColor: colors.accent.DEFAULT.toNumber(),
|
|
10044
|
-
cursorWidth: 3,
|
|
10045
|
-
cursorBlinkSpeed: 200,
|
|
10046
|
-
selectionColor: colors.accent.light.toNumber(),
|
|
10047
|
-
selectionAlpha: 0.5,
|
|
10048
|
-
lineHeight: 1.2,
|
|
10049
|
-
wordWrap: false,
|
|
10050
|
-
disabledColor: colors.border.dark.toNumber(),
|
|
10051
|
-
focusedBorderColor: colors.accent.lightest.toNumber(),
|
|
10052
|
-
backgroundColor: colors.surface.medium.toNumber(),
|
|
10053
|
-
borderColor: colors.border.medium.toNumber(),
|
|
10054
|
-
borderWidth: 1,
|
|
10055
|
-
padding: 8,
|
|
10056
|
-
textStyle: textStyles.DEFAULT
|
|
10057
|
-
},
|
|
10058
|
-
Dropdown: {
|
|
10059
|
-
trigger: {
|
|
10052
|
+
CharTextInput: {
|
|
10053
|
+
charSpacing: 2,
|
|
10054
|
+
cursorColor: colors.secondary.DEFAULT.toNumber(),
|
|
10055
|
+
cursorWidth: 3,
|
|
10056
|
+
cursorBlinkSpeed: 200,
|
|
10057
|
+
selectionColor: colors.accent.light.toNumber(),
|
|
10058
|
+
selectionAlpha: 0.5,
|
|
10059
|
+
lineHeight: 1.2,
|
|
10060
|
+
wordWrap: false,
|
|
10061
|
+
disabledColor: colors.border.dark.toNumber(),
|
|
10062
|
+
focusedBorderColor: colors.accent.lightest.toNumber(),
|
|
10060
10063
|
backgroundColor: colors.surface.medium.toNumber(),
|
|
10061
10064
|
borderColor: colors.border.medium.toNumber(),
|
|
10062
10065
|
borderWidth: 1,
|
|
10063
|
-
|
|
10064
|
-
|
|
10065
|
-
width: "fill"
|
|
10066
|
+
padding: 8,
|
|
10067
|
+
textStyle: textStyles.DEFAULT
|
|
10066
10068
|
},
|
|
10067
|
-
|
|
10068
|
-
|
|
10069
|
+
Dropdown: {
|
|
10070
|
+
trigger: {
|
|
10071
|
+
backgroundColor: colors.surface.medium.toNumber(),
|
|
10072
|
+
borderColor: colors.border.medium.toNumber(),
|
|
10073
|
+
borderWidth: 1,
|
|
10074
|
+
cornerRadius: 4,
|
|
10075
|
+
padding: { left: 12, right: 12, top: 8, bottom: 8 },
|
|
10076
|
+
width: "fill"
|
|
10077
|
+
},
|
|
10078
|
+
triggerHover: {
|
|
10079
|
+
borderColor: colors.primary.DEFAULT.toNumber()
|
|
10080
|
+
},
|
|
10081
|
+
triggerOpen: {
|
|
10082
|
+
borderColor: colors.primary.DEFAULT.toNumber(),
|
|
10083
|
+
backgroundColor: colors.surface.dark.toNumber()
|
|
10084
|
+
},
|
|
10085
|
+
triggerDisabled: {
|
|
10086
|
+
backgroundColor: colors.surface.light.toNumber(),
|
|
10087
|
+
alpha: 0.5
|
|
10088
|
+
},
|
|
10089
|
+
arrow: {
|
|
10090
|
+
color: colors.text.DEFAULT.toNumber(),
|
|
10091
|
+
size: 12
|
|
10092
|
+
},
|
|
10093
|
+
overlay: {
|
|
10094
|
+
backgroundColor: colors.surface.medium.toNumber(),
|
|
10095
|
+
borderColor: colors.border.medium.toNumber(),
|
|
10096
|
+
borderWidth: 1,
|
|
10097
|
+
cornerRadius: 4,
|
|
10098
|
+
maxHeight: 300,
|
|
10099
|
+
padding: 4
|
|
10100
|
+
},
|
|
10101
|
+
option: {
|
|
10102
|
+
padding: { left: 12, right: 12, top: 8, bottom: 8 }
|
|
10103
|
+
},
|
|
10104
|
+
optionSelected: {
|
|
10105
|
+
backgroundColor: colors.primary.light.toNumber(),
|
|
10106
|
+
Text: {
|
|
10107
|
+
style: textStyles.DEFAULT
|
|
10108
|
+
}
|
|
10109
|
+
},
|
|
10110
|
+
optionDisabled: {
|
|
10111
|
+
alpha: 0.3
|
|
10112
|
+
},
|
|
10113
|
+
textStyle: textStyles.DEFAULT,
|
|
10114
|
+
placeholderStyle: textStyles.DEFAULT,
|
|
10115
|
+
filterInput: {
|
|
10116
|
+
backgroundColor: colors.surface.lightest.toNumber(),
|
|
10117
|
+
borderColor: colors.border.medium.toNumber()
|
|
10118
|
+
//height: 32,
|
|
10119
|
+
},
|
|
10120
|
+
animationConfig: "stiff",
|
|
10121
|
+
optionGap: 2
|
|
10069
10122
|
},
|
|
10070
|
-
|
|
10071
|
-
|
|
10072
|
-
|
|
10123
|
+
Slider: {
|
|
10124
|
+
// Track styling
|
|
10125
|
+
trackColor: colors.surface.dark.toNumber(),
|
|
10126
|
+
trackFilledColor: colors.primary.dark.toNumber(),
|
|
10127
|
+
trackHeight: 6,
|
|
10128
|
+
trackBorderRadius: 3,
|
|
10129
|
+
trackLength: 200,
|
|
10130
|
+
trackHoverColor: colors.surface.dark.toNumber(),
|
|
10131
|
+
// Thumb styling
|
|
10132
|
+
thumbColor: colors.primary.light.toNumber(),
|
|
10133
|
+
thumbSize: 20,
|
|
10134
|
+
thumbBorderColor: colors.border.light.toNumber(),
|
|
10135
|
+
thumbBorderWidth: 2,
|
|
10136
|
+
thumbHoverColor: colors.primary.light.toNumber(),
|
|
10137
|
+
thumbActiveColor: colors.primary.dark.toNumber(),
|
|
10138
|
+
thumbDragScale: 1.1,
|
|
10139
|
+
// Marks/Ticks
|
|
10140
|
+
markColor: colors.border.medium.toNumber(),
|
|
10141
|
+
markHeight: 8,
|
|
10142
|
+
markWidth: 2,
|
|
10143
|
+
// Value label
|
|
10144
|
+
labelStyle: textStyles.small,
|
|
10145
|
+
labelOffset: 10,
|
|
10146
|
+
valueLabel: {
|
|
10147
|
+
backgroundColor: colors.background.dark.toNumber(),
|
|
10148
|
+
textStyle: { ...textStyles.small, color: colors.text.light.toString() },
|
|
10149
|
+
padding: { left: 6, right: 6, top: 4, bottom: 4 },
|
|
10150
|
+
cornerRadius: 4,
|
|
10151
|
+
offset: 8
|
|
10152
|
+
},
|
|
10153
|
+
// RangeSlider specific
|
|
10154
|
+
minDistance: 0,
|
|
10155
|
+
// States
|
|
10156
|
+
disabledAlpha: 0.4,
|
|
10157
|
+
// Animation & Effects
|
|
10158
|
+
animationConfig: { tension: 300, friction: 30 }
|
|
10073
10159
|
},
|
|
10074
|
-
|
|
10075
|
-
|
|
10076
|
-
|
|
10160
|
+
Toggle: {
|
|
10161
|
+
width: 50,
|
|
10162
|
+
height: 28,
|
|
10163
|
+
thumbSize: 24,
|
|
10164
|
+
trackColorOff: colors.surface.dark.toNumber(),
|
|
10165
|
+
trackColorOn: colors.success.DEFAULT.toNumber(),
|
|
10166
|
+
thumbColor: colors.surface.lightest.toNumber(),
|
|
10167
|
+
disabledColor: colors.border.medium.toNumber(),
|
|
10168
|
+
padding: 2,
|
|
10169
|
+
duration: 200,
|
|
10170
|
+
gap: 8,
|
|
10171
|
+
labelStyle: textStyles.DEFAULT,
|
|
10172
|
+
labelPosition: "right"
|
|
10077
10173
|
},
|
|
10078
|
-
|
|
10079
|
-
|
|
10080
|
-
|
|
10174
|
+
Modal: {
|
|
10175
|
+
backdropColor: 0,
|
|
10176
|
+
backdropOpacity: 0.5
|
|
10081
10177
|
},
|
|
10082
|
-
|
|
10083
|
-
backgroundColor: colors.surface.
|
|
10084
|
-
borderColor: colors.border.
|
|
10178
|
+
Dialog: {
|
|
10179
|
+
backgroundColor: colors.surface.DEFAULT.toNumber(),
|
|
10180
|
+
borderColor: colors.border.light.toNumber(),
|
|
10085
10181
|
borderWidth: 1,
|
|
10086
|
-
cornerRadius:
|
|
10087
|
-
|
|
10088
|
-
|
|
10089
|
-
|
|
10090
|
-
|
|
10091
|
-
|
|
10092
|
-
|
|
10093
|
-
|
|
10094
|
-
|
|
10095
|
-
|
|
10096
|
-
|
|
10182
|
+
cornerRadius: 8,
|
|
10183
|
+
padding: 0,
|
|
10184
|
+
maxWidth: 600,
|
|
10185
|
+
showClose: true,
|
|
10186
|
+
Header: {
|
|
10187
|
+
padding: { left: 24, right: 24, top: 20, bottom: 16 },
|
|
10188
|
+
gap: 12,
|
|
10189
|
+
textStyle: textStyles.heading,
|
|
10190
|
+
closeButton: {
|
|
10191
|
+
size: 32,
|
|
10192
|
+
cornerRadius: 4,
|
|
10193
|
+
backgroundColor: colors.surface.dark.toNumber(),
|
|
10194
|
+
borderColor: colors.border.light.toNumber(),
|
|
10195
|
+
borderWidth: 1
|
|
10196
|
+
}
|
|
10197
|
+
},
|
|
10198
|
+
Content: {
|
|
10199
|
+
padding: { left: 24, right: 24, top: 16, bottom: 16 },
|
|
10200
|
+
gap: 12
|
|
10201
|
+
},
|
|
10202
|
+
Actions: {
|
|
10203
|
+
padding: { left: 24, right: 24, top: 16, bottom: 20 },
|
|
10204
|
+
gap: 12,
|
|
10205
|
+
justifyContent: "end"
|
|
10097
10206
|
}
|
|
10098
10207
|
},
|
|
10099
|
-
|
|
10100
|
-
|
|
10208
|
+
AlertDialog: {
|
|
10209
|
+
maxWidth: 500
|
|
10101
10210
|
},
|
|
10102
|
-
|
|
10103
|
-
|
|
10104
|
-
|
|
10105
|
-
|
|
10106
|
-
borderColor: colors.border.medium.toNumber()
|
|
10107
|
-
//height: 32,
|
|
10108
|
-
},
|
|
10109
|
-
animationConfig: "stiff",
|
|
10110
|
-
optionGap: 2
|
|
10111
|
-
},
|
|
10112
|
-
Slider: {
|
|
10113
|
-
// Track styling
|
|
10114
|
-
trackColor: colors.surface.dark.toNumber(),
|
|
10115
|
-
trackFilledColor: colors.primary.DEFAULT.toNumber(),
|
|
10116
|
-
trackHeight: 6,
|
|
10117
|
-
trackBorderRadius: 3,
|
|
10118
|
-
trackLength: 200,
|
|
10119
|
-
trackHoverColor: colors.surface.medium.toNumber(),
|
|
10120
|
-
// Thumb styling
|
|
10121
|
-
thumbColor: colors.primary.DEFAULT.toNumber(),
|
|
10122
|
-
thumbSize: 20,
|
|
10123
|
-
thumbBorderColor: colors.border.light.toNumber(),
|
|
10124
|
-
thumbBorderWidth: 2,
|
|
10125
|
-
thumbHoverColor: colors.primary.light.toNumber(),
|
|
10126
|
-
thumbActiveColor: colors.primary.dark.toNumber(),
|
|
10127
|
-
thumbDragScale: 1.1,
|
|
10128
|
-
// Marks/Ticks
|
|
10129
|
-
markColor: colors.border.medium.toNumber(),
|
|
10130
|
-
markHeight: 8,
|
|
10131
|
-
markWidth: 2,
|
|
10132
|
-
// Value label
|
|
10133
|
-
labelStyle: textStyles.small,
|
|
10134
|
-
labelOffset: 10,
|
|
10135
|
-
valueLabel: {
|
|
10136
|
-
backgroundColor: colors.surface.darkest.toNumber(),
|
|
10137
|
-
textStyle: { ...textStyles.small, color: colors.text.light.toString() },
|
|
10138
|
-
padding: { left: 6, right: 6, top: 4, bottom: 4 },
|
|
10139
|
-
cornerRadius: 4,
|
|
10140
|
-
offset: 8
|
|
10211
|
+
WrapText: {
|
|
10212
|
+
wrap: true,
|
|
10213
|
+
paddingOffset: 0,
|
|
10214
|
+
textStyle: textStyles.DEFAULT
|
|
10141
10215
|
},
|
|
10142
|
-
|
|
10143
|
-
|
|
10144
|
-
|
|
10145
|
-
|
|
10146
|
-
|
|
10147
|
-
|
|
10148
|
-
|
|
10149
|
-
|
|
10150
|
-
|
|
10151
|
-
|
|
10152
|
-
|
|
10153
|
-
|
|
10154
|
-
|
|
10155
|
-
|
|
10156
|
-
|
|
10157
|
-
|
|
10158
|
-
|
|
10159
|
-
|
|
10160
|
-
labelStyle: textStyles.DEFAULT,
|
|
10161
|
-
labelPosition: "right"
|
|
10162
|
-
},
|
|
10163
|
-
Modal: {
|
|
10164
|
-
backdropColor: 0,
|
|
10165
|
-
backdropOpacity: 0.5
|
|
10166
|
-
},
|
|
10167
|
-
Dialog: {
|
|
10168
|
-
backgroundColor: colors.surface.DEFAULT.toNumber(),
|
|
10169
|
-
borderColor: colors.border.light.toNumber(),
|
|
10170
|
-
borderWidth: 1,
|
|
10171
|
-
cornerRadius: 8,
|
|
10172
|
-
padding: 0,
|
|
10173
|
-
maxWidth: 600,
|
|
10174
|
-
showClose: true,
|
|
10175
|
-
Header: {
|
|
10176
|
-
padding: { left: 24, right: 24, top: 20, bottom: 16 },
|
|
10177
|
-
gap: 12,
|
|
10178
|
-
textStyle: textStyles.heading,
|
|
10179
|
-
closeButton: {
|
|
10180
|
-
size: 32,
|
|
10181
|
-
cornerRadius: 4,
|
|
10182
|
-
backgroundColor: colors.surface.dark.toNumber(),
|
|
10183
|
-
borderColor: colors.border.light.toNumber(),
|
|
10184
|
-
borderWidth: 1
|
|
10216
|
+
Tooltip: {
|
|
10217
|
+
position: "top",
|
|
10218
|
+
showDelay: 1e3,
|
|
10219
|
+
hideDelay: 500,
|
|
10220
|
+
offset: 8,
|
|
10221
|
+
textStyle: {
|
|
10222
|
+
fontSize: "12px",
|
|
10223
|
+
fontFamily: "Arial",
|
|
10224
|
+
color: colors.text.dark.toString(),
|
|
10225
|
+
backgroundColor: colors.warning.medium.toString(),
|
|
10226
|
+
padding: { x: 2, y: 2 }
|
|
10227
|
+
},
|
|
10228
|
+
cornerRadius: 8,
|
|
10229
|
+
animation: {
|
|
10230
|
+
fadeIn: 200,
|
|
10231
|
+
fadeOut: 200,
|
|
10232
|
+
move: { dx: 0, dy: -20 },
|
|
10233
|
+
pulse: false
|
|
10185
10234
|
}
|
|
10186
|
-
},
|
|
10187
|
-
Content: {
|
|
10188
|
-
padding: { left: 24, right: 24, top: 16, bottom: 16 },
|
|
10189
|
-
gap: 12
|
|
10190
|
-
},
|
|
10191
|
-
Actions: {
|
|
10192
|
-
padding: { left: 24, right: 24, top: 16, bottom: 20 },
|
|
10193
|
-
gap: 12,
|
|
10194
|
-
justifyContent: "end"
|
|
10195
|
-
}
|
|
10196
|
-
},
|
|
10197
|
-
AlertDialog: {
|
|
10198
|
-
maxWidth: 500
|
|
10199
|
-
},
|
|
10200
|
-
WrapText: {
|
|
10201
|
-
wrap: true,
|
|
10202
|
-
paddingOffset: 0,
|
|
10203
|
-
textStyle: textStyles.DEFAULT
|
|
10204
|
-
},
|
|
10205
|
-
Tooltip: {
|
|
10206
|
-
position: "top",
|
|
10207
|
-
showDelay: 1e3,
|
|
10208
|
-
hideDelay: 500,
|
|
10209
|
-
offset: 8,
|
|
10210
|
-
textStyle: {
|
|
10211
|
-
fontSize: "12px",
|
|
10212
|
-
fontFamily: "Arial",
|
|
10213
|
-
color: colors.text.dark.toString(),
|
|
10214
|
-
backgroundColor: colors.warning.medium.toString(),
|
|
10215
|
-
padding: { x: 2, y: 2 }
|
|
10216
|
-
},
|
|
10217
|
-
cornerRadius: 8,
|
|
10218
|
-
animation: {
|
|
10219
|
-
fadeIn: 200,
|
|
10220
|
-
fadeOut: 200,
|
|
10221
|
-
move: { dx: 0, dy: -20 },
|
|
10222
|
-
pulse: false
|
|
10223
10235
|
}
|
|
10224
|
-
}
|
|
10225
|
-
}
|
|
10236
|
+
};
|
|
10237
|
+
}
|
|
10238
|
+
const preset = getPresetWithMode("oceanBlue", "light");
|
|
10239
|
+
const defaultTheme = buildDefaultTheme(preset.colors);
|
|
10240
|
+
function createDefaultTheme(presetName = "oceanBlue", mode = "light") {
|
|
10241
|
+
const presetForMode = getPresetWithMode(presetName, mode);
|
|
10242
|
+
return buildDefaultTheme(presetForMode.colors);
|
|
10243
|
+
}
|
|
10226
10244
|
class ThemeRegistry {
|
|
10227
10245
|
globalTheme = { ...defaultTheme };
|
|
10228
10246
|
customThemes = /* @__PURE__ */ new Map();
|
|
@@ -10303,8 +10321,8 @@ class ThemeRegistry {
|
|
|
10303
10321
|
* Set color tokens for the global theme
|
|
10304
10322
|
* @param colors - ColorTokens to use globally
|
|
10305
10323
|
*/
|
|
10306
|
-
setColorTokens(
|
|
10307
|
-
this.colorTokens =
|
|
10324
|
+
setColorTokens(colors) {
|
|
10325
|
+
this.colorTokens = colors;
|
|
10308
10326
|
}
|
|
10309
10327
|
/**
|
|
10310
10328
|
* Get current color tokens
|
|
@@ -10321,15 +10339,28 @@ class ThemeRegistry {
|
|
|
10321
10339
|
return this.colorMode;
|
|
10322
10340
|
}
|
|
10323
10341
|
/**
|
|
10324
|
-
* Set color mode and
|
|
10342
|
+
* Set color mode and trigger complete remount
|
|
10325
10343
|
* Updates color tokens if a preset is active
|
|
10344
|
+
* Triggers complete remount of all active mountJSX instances
|
|
10326
10345
|
* @param mode - Color mode to set
|
|
10327
10346
|
*/
|
|
10328
10347
|
setColorMode(mode) {
|
|
10329
10348
|
if (this.colorMode !== mode) {
|
|
10330
10349
|
this.colorMode = mode;
|
|
10331
|
-
if (this.currentPresetName
|
|
10332
|
-
|
|
10350
|
+
if (this.currentPresetName) {
|
|
10351
|
+
Promise.resolve().then(() => colorPresets).then(({ getPresetWithMode: getPresetWithMode2 }) => {
|
|
10352
|
+
const preset2 = getPresetWithMode2(
|
|
10353
|
+
this.currentPresetName,
|
|
10354
|
+
mode
|
|
10355
|
+
);
|
|
10356
|
+
this.colorTokens = preset2.colors;
|
|
10357
|
+
});
|
|
10358
|
+
}
|
|
10359
|
+
setTimeout(() => {
|
|
10360
|
+
Promise.resolve().then(() => vdom).then(({ remountAll: remountAll2 }) => {
|
|
10361
|
+
remountAll2();
|
|
10362
|
+
});
|
|
10363
|
+
}, 0);
|
|
10333
10364
|
}
|
|
10334
10365
|
}
|
|
10335
10366
|
/**
|
|
@@ -10342,11 +10373,14 @@ class ThemeRegistry {
|
|
|
10342
10373
|
/**
|
|
10343
10374
|
* Set current preset name
|
|
10344
10375
|
* @param name - Preset name
|
|
10376
|
+
* @param skipNotify - If true, skip notifying listeners (used during remount)
|
|
10345
10377
|
*/
|
|
10346
|
-
setCurrentPresetName(name) {
|
|
10378
|
+
setCurrentPresetName(name, skipNotify = false) {
|
|
10347
10379
|
if (this.currentPresetName !== name) {
|
|
10348
10380
|
this.currentPresetName = name;
|
|
10349
|
-
|
|
10381
|
+
if (!skipNotify) {
|
|
10382
|
+
this.notifyListeners();
|
|
10383
|
+
}
|
|
10350
10384
|
}
|
|
10351
10385
|
}
|
|
10352
10386
|
/**
|
|
@@ -11205,6 +11239,119 @@ class PortalRegistry {
|
|
|
11205
11239
|
}
|
|
11206
11240
|
}
|
|
11207
11241
|
const portalRegistry = new PortalRegistry();
|
|
11242
|
+
class MountRegistry {
|
|
11243
|
+
entries = /* @__PURE__ */ new Map();
|
|
11244
|
+
nextId = 1;
|
|
11245
|
+
/**
|
|
11246
|
+
* Register a new mountJSX instance
|
|
11247
|
+
* @param parent - Parent container or scene
|
|
11248
|
+
* @param type - Component type or node type
|
|
11249
|
+
* @param props - Mount props
|
|
11250
|
+
* @param rootNode - Root game object
|
|
11251
|
+
* @returns Registry ID for this mount
|
|
11252
|
+
*/
|
|
11253
|
+
register(parent, type, props, rootNode) {
|
|
11254
|
+
const id = this.nextId++;
|
|
11255
|
+
this.entries.set(id, { id, parent, type, props, rootNode });
|
|
11256
|
+
DebugLogger.log("vdom", `Registered mount ${id}`);
|
|
11257
|
+
return id;
|
|
11258
|
+
}
|
|
11259
|
+
/**
|
|
11260
|
+
* Unregister a mountJSX instance
|
|
11261
|
+
* @param id - Registry ID
|
|
11262
|
+
*/
|
|
11263
|
+
unregister(id) {
|
|
11264
|
+
const entry = this.entries.get(id);
|
|
11265
|
+
if (entry) {
|
|
11266
|
+
DebugLogger.log("vdom", `Unregistered mount ${id}`);
|
|
11267
|
+
this.entries.delete(id);
|
|
11268
|
+
}
|
|
11269
|
+
}
|
|
11270
|
+
/**
|
|
11271
|
+
* Get all active mount entries
|
|
11272
|
+
* @returns Array of mount entries
|
|
11273
|
+
*/
|
|
11274
|
+
getAllEntries() {
|
|
11275
|
+
return Array.from(this.entries.values());
|
|
11276
|
+
}
|
|
11277
|
+
/**
|
|
11278
|
+
* Clear all entries (for testing)
|
|
11279
|
+
*/
|
|
11280
|
+
clear() {
|
|
11281
|
+
this.entries.clear();
|
|
11282
|
+
this.nextId = 1;
|
|
11283
|
+
}
|
|
11284
|
+
}
|
|
11285
|
+
const mountRegistry = new MountRegistry();
|
|
11286
|
+
function remountAll() {
|
|
11287
|
+
const entries = mountRegistry.getAllEntries();
|
|
11288
|
+
if (entries.length === 0) {
|
|
11289
|
+
DebugLogger.log("vdom", "No mounts to remount");
|
|
11290
|
+
return;
|
|
11291
|
+
}
|
|
11292
|
+
console.log(`[REMOUNT] Starting remount of ${entries.length} root(s)`);
|
|
11293
|
+
entries.forEach((entry) => {
|
|
11294
|
+
try {
|
|
11295
|
+
const scene = entry.parent instanceof Phaser$1.Scene ? entry.parent : entry.parent.scene;
|
|
11296
|
+
if (!scene || !scene.sys) {
|
|
11297
|
+
console.warn("[REMOUNT] Scene is invalid, skipping remount");
|
|
11298
|
+
return;
|
|
11299
|
+
}
|
|
11300
|
+
const currentVNode = scene.__rootVNode;
|
|
11301
|
+
if (entry.rootNode instanceof Phaser$1.GameObjects.Container) {
|
|
11302
|
+
const children = entry.rootNode.getAll();
|
|
11303
|
+
children.forEach((child) => {
|
|
11304
|
+
;
|
|
11305
|
+
entry.rootNode.remove(child, true);
|
|
11306
|
+
});
|
|
11307
|
+
}
|
|
11308
|
+
if (currentVNode) {
|
|
11309
|
+
const flatChildren = flattenChildren(currentVNode.children);
|
|
11310
|
+
flatChildren.forEach(unmount);
|
|
11311
|
+
if (currentVNode.__ctx) {
|
|
11312
|
+
disposeCtx(currentVNode.__ctx);
|
|
11313
|
+
delete currentVNode.__ctx;
|
|
11314
|
+
}
|
|
11315
|
+
}
|
|
11316
|
+
const { width, height, disableAutoSize = false, ...componentProps } = entry.props;
|
|
11317
|
+
const renderContext = getRenderContext(entry.parent);
|
|
11318
|
+
renderContext.setViewport(width, height, scene);
|
|
11319
|
+
portalRegistry.setViewportSize(scene, width, height);
|
|
11320
|
+
let vnode;
|
|
11321
|
+
if (disableAutoSize) {
|
|
11322
|
+
vnode = { type: entry.type, props: { ...componentProps, width, height }, children: [] };
|
|
11323
|
+
} else {
|
|
11324
|
+
const componentVNode = {
|
|
11325
|
+
type: entry.type,
|
|
11326
|
+
props: componentProps,
|
|
11327
|
+
children: []
|
|
11328
|
+
};
|
|
11329
|
+
vnode = {
|
|
11330
|
+
type: SceneWrapper,
|
|
11331
|
+
props: {
|
|
11332
|
+
width,
|
|
11333
|
+
height,
|
|
11334
|
+
children: componentVNode
|
|
11335
|
+
},
|
|
11336
|
+
children: []
|
|
11337
|
+
};
|
|
11338
|
+
}
|
|
11339
|
+
;
|
|
11340
|
+
scene.__rootVNode = vnode;
|
|
11341
|
+
const rootNode = mount(entry.parent, vnode);
|
|
11342
|
+
if (rootNode instanceof Phaser$1.GameObjects.Container) {
|
|
11343
|
+
;
|
|
11344
|
+
rootNode.__mountRootId = generateMountRootId();
|
|
11345
|
+
}
|
|
11346
|
+
entry.rootNode = rootNode;
|
|
11347
|
+
rootNode.__registryId = entry.id;
|
|
11348
|
+
console.log("[REMOUNT] Successfully remounted entry", entry.id);
|
|
11349
|
+
} catch (error) {
|
|
11350
|
+
console.error("[REMOUNT] Failed to remount entry", entry.id, error);
|
|
11351
|
+
}
|
|
11352
|
+
});
|
|
11353
|
+
console.log("[REMOUNT] Remount complete");
|
|
11354
|
+
}
|
|
11208
11355
|
function flattenChildren(children) {
|
|
11209
11356
|
if (!children) return [];
|
|
11210
11357
|
return children.flat(Infinity);
|
|
@@ -11597,6 +11744,11 @@ function unmount(vnode) {
|
|
|
11597
11744
|
attachRef(ref, null);
|
|
11598
11745
|
const flatChildren = flattenChildren(vnode.children);
|
|
11599
11746
|
flatChildren.forEach(unmount);
|
|
11747
|
+
const node = vnode.__node;
|
|
11748
|
+
if (node?.__registryId !== void 0) {
|
|
11749
|
+
mountRegistry.unregister(node.__registryId);
|
|
11750
|
+
delete node.__registryId;
|
|
11751
|
+
}
|
|
11600
11752
|
const parent = vnode.__parent;
|
|
11601
11753
|
if (parent) host.remove(parent, vnode.__node);
|
|
11602
11754
|
}
|
|
@@ -11872,8 +12024,19 @@ function mountJSX(parentOrScene, type, props = { width: 0, height: 0 }) {
|
|
|
11872
12024
|
if (rootNode instanceof Phaser$1.GameObjects.Container) {
|
|
11873
12025
|
rootNode.__mountRootId = generateMountRootId();
|
|
11874
12026
|
}
|
|
12027
|
+
const registryId = mountRegistry.register(parentOrScene, type, props, rootNode);
|
|
12028
|
+
rootNode.__registryId = registryId;
|
|
11875
12029
|
return rootNode;
|
|
11876
12030
|
}
|
|
12031
|
+
const vdom = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
12032
|
+
__proto__: null,
|
|
12033
|
+
createElement,
|
|
12034
|
+
mount,
|
|
12035
|
+
mountJSX,
|
|
12036
|
+
patchVNode,
|
|
12037
|
+
remountAll,
|
|
12038
|
+
unmount
|
|
12039
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
11877
12040
|
function getCurrent() {
|
|
11878
12041
|
return _currentCtx;
|
|
11879
12042
|
}
|
|
@@ -16203,23 +16366,34 @@ function Sidebar(props) {
|
|
|
16203
16366
|
const primaryContent = sectionsContent ?? (!hasSections ? props.children : null) ?? null;
|
|
16204
16367
|
const extraContent = hasSections ? props.children ?? null : null;
|
|
16205
16368
|
const contentNodes = [...normalizeChildren(primaryContent), ...normalizeChildren(extraContent)];
|
|
16206
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16207
|
-
|
|
16208
|
-
|
|
16209
|
-
|
|
16210
|
-
|
|
16211
|
-
|
|
16212
|
-
|
|
16213
|
-
|
|
16214
|
-
|
|
16215
|
-
|
|
16216
|
-
|
|
16217
|
-
|
|
16218
|
-
|
|
16219
|
-
|
|
16220
|
-
|
|
16221
|
-
|
|
16222
|
-
|
|
16369
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16370
|
+
View,
|
|
16371
|
+
{
|
|
16372
|
+
...combinedProps,
|
|
16373
|
+
theme: nestedTheme,
|
|
16374
|
+
backgroundColor: themed.backgroundColor,
|
|
16375
|
+
backgroundAlpha: themed.backgroundAlpha,
|
|
16376
|
+
padding: themed.padding,
|
|
16377
|
+
gap: themed.gap,
|
|
16378
|
+
children: [
|
|
16379
|
+
props.header ? /* @__PURE__ */ jsxRuntime.jsx(View, { ...headerStyle, children: props.header }) : null,
|
|
16380
|
+
scrollable ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
16381
|
+
ScrollView,
|
|
16382
|
+
{
|
|
16383
|
+
flex: 1,
|
|
16384
|
+
width: "fill",
|
|
16385
|
+
height: "fill",
|
|
16386
|
+
showVerticalSlider: "auto",
|
|
16387
|
+
showHorizontalSlider: false,
|
|
16388
|
+
sliderSize: "tiny",
|
|
16389
|
+
theme: nestedTheme,
|
|
16390
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(View, { direction: "column", gap: effectiveGap, width: "fill", children: contentNodes })
|
|
16391
|
+
}
|
|
16392
|
+
) : contentNodes,
|
|
16393
|
+
props.footer ? /* @__PURE__ */ jsxRuntime.jsx(View, { ...footerStyle, children: props.footer }) : null
|
|
16394
|
+
]
|
|
16395
|
+
}
|
|
16396
|
+
);
|
|
16223
16397
|
}
|
|
16224
16398
|
function DefaultThumb(props) {
|
|
16225
16399
|
const { size, color, borderColor, borderWidth = 0, isDragging, dragScale = 1.1 } = props;
|
|
@@ -16937,6 +17111,7 @@ exports.applyLightMode = applyLightMode;
|
|
|
16937
17111
|
exports.calculateSliderSize = calculateSliderSize;
|
|
16938
17112
|
exports.createBounceEffect = createBounceEffect;
|
|
16939
17113
|
exports.createBreatheEffect = createBreatheEffect;
|
|
17114
|
+
exports.createDefaultTheme = createDefaultTheme;
|
|
16940
17115
|
exports.createElement = createElement;
|
|
16941
17116
|
exports.createFadeEffect = createFadeEffect;
|
|
16942
17117
|
exports.createFlashEffect = createFlashEffect;
|
|
@@ -17009,6 +17184,7 @@ exports.registerBuiltins = registerBuiltins;
|
|
|
17009
17184
|
exports.releaseAllSVGTextures = releaseAllSVGTextures;
|
|
17010
17185
|
exports.releaseSVGTexture = releaseSVGTexture;
|
|
17011
17186
|
exports.releaseSVGTextures = releaseSVGTextures;
|
|
17187
|
+
exports.remountAll = remountAll;
|
|
17012
17188
|
exports.resolveEffect = resolveEffect;
|
|
17013
17189
|
exports.rgbToNumber = rgbToNumber;
|
|
17014
17190
|
exports.shallowEqual = shallowEqual;
|
|
@@ -17038,8 +17214,9 @@ exports.useSpring = useSpring;
|
|
|
17038
17214
|
exports.useSprings = useSprings;
|
|
17039
17215
|
exports.useState = useState;
|
|
17040
17216
|
exports.useTheme = useTheme;
|
|
17217
|
+
exports.vdom = vdom;
|
|
17041
17218
|
exports.viewCreator = viewCreator;
|
|
17042
17219
|
exports.viewPatcher = viewPatcher;
|
|
17043
17220
|
exports.viewportRegistry = viewportRegistry;
|
|
17044
17221
|
exports.withHooks = withHooks;
|
|
17045
|
-
//# sourceMappingURL=TransformOriginView-
|
|
17222
|
+
//# sourceMappingURL=TransformOriginView-BDM6GE2F.cjs.map
|