@vectoriox/iox-builder 1.2.8 → 1.3.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.
|
@@ -3826,6 +3826,7 @@ var TraitInputType;
|
|
|
3826
3826
|
TraitInputType["Icon"] = "icon";
|
|
3827
3827
|
TraitInputType["Media"] = "media";
|
|
3828
3828
|
TraitInputType["FontFamily"] = "fontFamily";
|
|
3829
|
+
TraitInputType["GridTemplate"] = "gridTemplate";
|
|
3829
3830
|
})(TraitInputType || (TraitInputType = {}));
|
|
3830
3831
|
function generateNodeId() {
|
|
3831
3832
|
return Math.random().toString(36).substr(2, 9);
|
|
@@ -3888,6 +3889,7 @@ function resolveTraitControllerType(type) {
|
|
|
3888
3889
|
case TraitInputType.Icon: return 'icon';
|
|
3889
3890
|
case TraitInputType.Media: return 'media';
|
|
3890
3891
|
case TraitInputType.FontFamily: return 'select';
|
|
3892
|
+
case TraitInputType.GridTemplate: return 'gridTemplate';
|
|
3891
3893
|
default: return 'text';
|
|
3892
3894
|
}
|
|
3893
3895
|
}
|
|
@@ -3932,13 +3934,20 @@ class PositionGroupStyleConfig extends GroupStyleConfig {
|
|
|
3932
3934
|
class LayoutGroupStyleConfig extends GroupStyleConfig {
|
|
3933
3935
|
constructor() {
|
|
3934
3936
|
super(StyleCategory.Layout, [
|
|
3935
|
-
new TraitConfig('display', 'Display', TraitInputType.Select, ['block', 'inline', 'inline-block', 'flex'], 'block'),
|
|
3937
|
+
new TraitConfig('display', 'Display', TraitInputType.Select, ['block', 'inline', 'inline-block', 'flex', 'grid'], 'block'),
|
|
3938
|
+
// ── Flex-only ─────────────────────────────────────────────────────
|
|
3936
3939
|
new TraitConfig('flexDirection', 'Direction', TraitInputType.SelectButton, [
|
|
3937
3940
|
{ value: 'row', label: 'Horizontal', icon: 'ph-thin ph-arrow-right' },
|
|
3938
3941
|
{ value: 'row-reverse', label: 'Horizontal Reversed', icon: 'ph-thin ph-arrow-left' },
|
|
3939
3942
|
{ value: 'column', label: 'Vertical', icon: 'ph-thin ph-arrow-down' },
|
|
3940
3943
|
{ value: 'column-reverse', label: 'Vertical Reversed', icon: 'ph-thin ph-arrow-up' },
|
|
3941
3944
|
], 'row', false, { trait: 'display', values: 'flex' }),
|
|
3945
|
+
new TraitConfig('flexWrap', 'Flex Wrap', TraitInputType.SelectButton, [
|
|
3946
|
+
{ value: 'nowrap', label: 'No Wrap', icon: 'ph-thin ph-minus' },
|
|
3947
|
+
{ value: 'wrap', label: 'Wrap', icon: 'ph-thin ph-arrow-elbow-down-right' },
|
|
3948
|
+
{ value: 'wrap-reverse', label: 'Wrap Reversed', icon: 'ph-thin ph-arrow-elbow-up-right' },
|
|
3949
|
+
], 'nowrap', false, { trait: 'display', values: 'flex' }),
|
|
3950
|
+
// ── Shared flex + grid ────────────────────────────────────────────
|
|
3942
3951
|
new TraitConfig('justifyContent', 'Justify', TraitInputType.SelectButton, [
|
|
3943
3952
|
{ value: 'flex-start', label: 'Start', icon: 'ph-thin ph-align-left' },
|
|
3944
3953
|
{ value: 'center', label: 'Center', icon: 'ph-thin ph-align-center-horizontal' },
|
|
@@ -3946,19 +3955,32 @@ class LayoutGroupStyleConfig extends GroupStyleConfig {
|
|
|
3946
3955
|
{ value: 'space-between', label: 'Space Between', icon: 'ph-thin ph-distribute-horizontal' },
|
|
3947
3956
|
{ value: 'space-around', label: 'Space Around', icon: 'ph-thin ph-dots-three' },
|
|
3948
3957
|
{ value: 'space-evenly', label: 'Space Evenly', icon: 'ph-thin ph-dots-six' },
|
|
3949
|
-
], 'flex-start', false, { trait: 'display', values: 'flex' }),
|
|
3950
|
-
new TraitConfig('alignItems', 'Align', TraitInputType.SelectButton, [
|
|
3958
|
+
], 'flex-start', false, { trait: 'display', values: ['flex', 'grid'] }),
|
|
3959
|
+
new TraitConfig('alignItems', 'Align Items', TraitInputType.SelectButton, [
|
|
3951
3960
|
{ value: 'stretch', label: 'Stretch', icon: 'ph-thin ph-arrows-vertical' },
|
|
3952
|
-
{ value: '
|
|
3961
|
+
{ value: 'start', label: 'Start', icon: 'ph-thin ph-align-top' },
|
|
3953
3962
|
{ value: 'center', label: 'Center', icon: 'ph-thin ph-align-center-vertical' },
|
|
3954
|
-
{ value: '
|
|
3955
|
-
], 'stretch', false, { trait: 'display', values: 'flex' }),
|
|
3956
|
-
new TraitConfig('
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3963
|
+
{ value: 'end', label: 'End', icon: 'ph-thin ph-align-bottom' },
|
|
3964
|
+
], 'stretch', false, { trait: 'display', values: ['flex', 'grid'] }),
|
|
3965
|
+
new TraitConfig('gap', 'Gap', TraitInputType.Scrub, { min: 0, max: 200, step: 1, units: UNITS_FIXED }, '0px', false, { trait: 'display', values: ['flex', 'grid'] }),
|
|
3966
|
+
// ── Grid-only ─────────────────────────────────────────────────────
|
|
3967
|
+
new TraitConfig('gridTemplateColumns', 'Columns', TraitInputType.GridTemplate, undefined, '1fr', false, { trait: 'display', values: 'grid' }),
|
|
3968
|
+
new TraitConfig('gridTemplateRows', 'Rows', TraitInputType.GridTemplate, undefined, 'auto', false, { trait: 'display', values: 'grid' }),
|
|
3969
|
+
new TraitConfig('justifyItems', 'Justify Items', TraitInputType.SelectButton, [
|
|
3970
|
+
{ value: 'stretch', label: 'Stretch', icon: 'ph-thin ph-arrows-horizontal' },
|
|
3971
|
+
{ value: 'start', label: 'Start', icon: 'ph-thin ph-align-left' },
|
|
3972
|
+
{ value: 'center', label: 'Center', icon: 'ph-thin ph-align-center-horizontal' },
|
|
3973
|
+
{ value: 'end', label: 'End', icon: 'ph-thin ph-align-right' },
|
|
3974
|
+
], 'stretch', false, { trait: 'display', values: 'grid' }),
|
|
3975
|
+
new TraitConfig('alignContent', 'Align Content', TraitInputType.SelectButton, [
|
|
3976
|
+
{ value: 'start', label: 'Start', icon: 'ph-thin ph-align-top' },
|
|
3977
|
+
{ value: 'center', label: 'Center', icon: 'ph-thin ph-align-center-vertical' },
|
|
3978
|
+
{ value: 'end', label: 'End', icon: 'ph-thin ph-align-bottom' },
|
|
3979
|
+
{ value: 'space-between', label: 'Space Between', icon: 'ph-thin ph-distribute-vertical' },
|
|
3980
|
+
{ value: 'space-around', label: 'Space Around', icon: 'ph-thin ph-dots-three' },
|
|
3981
|
+
{ value: 'stretch', label: 'Stretch', icon: 'ph-thin ph-arrows-vertical' },
|
|
3982
|
+
], 'stretch', false, { trait: 'display', values: 'grid' }),
|
|
3983
|
+
// ── Direction (always visible) ────────────────────────────────────
|
|
3962
3984
|
new TraitConfig('direction', 'Text Direction', TraitInputType.SelectButton, [
|
|
3963
3985
|
{ value: 'ltr', label: 'LTR' },
|
|
3964
3986
|
{ value: 'rtl', label: 'RTL' },
|
|
@@ -3976,7 +3998,7 @@ class SizeGroupStyleConfig extends GroupStyleConfig {
|
|
|
3976
3998
|
new TraitConfig('minHeight', 'Min H', TraitInputType.Scrub, { min: 0, max: 9999, step: 1, units: UNITS_ALL, allowAuto: true }, 'auto', true),
|
|
3977
3999
|
new TraitConfig('maxWidth', 'Max W', TraitInputType.Scrub, { min: 0, max: 9999, step: 1, units: UNITS_ALL, allowAuto: true }, 'auto', true),
|
|
3978
4000
|
new TraitConfig('maxHeight', 'Max H', TraitInputType.Scrub, { min: 0, max: 9999, step: 1, units: UNITS_ALL, allowAuto: true }, 'auto', true),
|
|
3979
|
-
new TraitConfig('aspectRatio', 'Aspect Ratio', TraitInputType.
|
|
4001
|
+
new TraitConfig('aspectRatio', 'Aspect Ratio', TraitInputType.Text, undefined, 'auto'),
|
|
3980
4002
|
]);
|
|
3981
4003
|
}
|
|
3982
4004
|
}
|