@openfairygui/cli 0.2.0-alpha.35 → 0.2.0-alpha.36
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/cli.mjs +88 -7
- package/package.json +4 -4
package/dist/cli.mjs
CHANGED
|
@@ -2304,6 +2304,7 @@ var Component = class extends ExtensibleProperty {
|
|
|
2304
2304
|
wholeNumbers: false,
|
|
2305
2305
|
changeOnClick: true,
|
|
2306
2306
|
fixedGripSize: false,
|
|
2307
|
+
autoClearItems: false,
|
|
2307
2308
|
opaque: true,
|
|
2308
2309
|
customProperties: [],
|
|
2309
2310
|
childrenRenderOrder: ChildrenRenderOrder.Ascent,
|
|
@@ -2687,6 +2688,12 @@ var Component = class extends ExtensibleProperty {
|
|
|
2687
2688
|
setFixedGripSize(v) {
|
|
2688
2689
|
return this.set("fixedGripSize", v);
|
|
2689
2690
|
}
|
|
2691
|
+
getAutoClearItems() {
|
|
2692
|
+
return this.get("autoClearItems");
|
|
2693
|
+
}
|
|
2694
|
+
setAutoClearItems(v) {
|
|
2695
|
+
return this.set("autoClearItems", v);
|
|
2696
|
+
}
|
|
2690
2697
|
getOpaque() {
|
|
2691
2698
|
return this.get("opaque");
|
|
2692
2699
|
}
|
|
@@ -4937,10 +4944,12 @@ var GComponent = class extends GObject {
|
|
|
4937
4944
|
instancePromptText: "",
|
|
4938
4945
|
instanceSelectionController: "",
|
|
4939
4946
|
instanceVisibleItemCount: 0,
|
|
4947
|
+
instanceAutoClearItems: false,
|
|
4940
4948
|
instanceValue: 0,
|
|
4941
4949
|
instanceMax: 0,
|
|
4942
4950
|
instanceMin: 0,
|
|
4943
|
-
instanceComboItems: []
|
|
4951
|
+
instanceComboItems: [],
|
|
4952
|
+
propertyOverrides: []
|
|
4944
4953
|
});
|
|
4945
4954
|
}
|
|
4946
4955
|
getComponentProp(key) {
|
|
@@ -5236,6 +5245,12 @@ var GComponent = class extends GObject {
|
|
|
5236
5245
|
setInstanceVisibleItemCount(v) {
|
|
5237
5246
|
return this.setComponentProp("instanceVisibleItemCount", v);
|
|
5238
5247
|
}
|
|
5248
|
+
getInstanceAutoClearItems() {
|
|
5249
|
+
return this.getComponentProp("instanceAutoClearItems");
|
|
5250
|
+
}
|
|
5251
|
+
setInstanceAutoClearItems(v) {
|
|
5252
|
+
return this.setComponentProp("instanceAutoClearItems", v);
|
|
5253
|
+
}
|
|
5239
5254
|
getInstanceValue() {
|
|
5240
5255
|
return this.getComponentProp("instanceValue");
|
|
5241
5256
|
}
|
|
@@ -5260,6 +5275,12 @@ var GComponent = class extends GObject {
|
|
|
5260
5275
|
setInstanceComboItems(v) {
|
|
5261
5276
|
return this.set("instanceComboItems", v);
|
|
5262
5277
|
}
|
|
5278
|
+
getPropertyOverrides() {
|
|
5279
|
+
return this.getComponentProp("propertyOverrides").map((property) => ({ ...property }));
|
|
5280
|
+
}
|
|
5281
|
+
setPropertyOverrides(v) {
|
|
5282
|
+
return this.setComponentProp("propertyOverrides", v.map((property) => ({ ...property })));
|
|
5283
|
+
}
|
|
5263
5284
|
getMargin() {
|
|
5264
5285
|
return this.getComponentProp("margin");
|
|
5265
5286
|
}
|
|
@@ -5327,6 +5348,7 @@ var GListBase = class extends GObject {
|
|
|
5327
5348
|
clipSoftness: [0, 0],
|
|
5328
5349
|
scrollItemToViewOnClick: true,
|
|
5329
5350
|
foldInvisibleItems: false,
|
|
5351
|
+
autoClearItems: false,
|
|
5330
5352
|
listItems: [],
|
|
5331
5353
|
pageController: "",
|
|
5332
5354
|
controllerOverrides: "",
|
|
@@ -5619,6 +5641,12 @@ var GListBase = class extends GObject {
|
|
|
5619
5641
|
setFoldInvisibleItems(v) {
|
|
5620
5642
|
return this.setListProp("foldInvisibleItems", v);
|
|
5621
5643
|
}
|
|
5644
|
+
getAutoClearItems() {
|
|
5645
|
+
return this.getListProp("autoClearItems");
|
|
5646
|
+
}
|
|
5647
|
+
setAutoClearItems(v) {
|
|
5648
|
+
return this.setListProp("autoClearItems", v);
|
|
5649
|
+
}
|
|
5622
5650
|
getListItems() {
|
|
5623
5651
|
return this.get("listItems");
|
|
5624
5652
|
}
|
|
@@ -16553,7 +16581,8 @@ const COMBOBOX_EXTENSION_ATTRS = {
|
|
|
16553
16581
|
title: { canonical: "title" },
|
|
16554
16582
|
icon: { canonical: "icon" },
|
|
16555
16583
|
visibleItemCount: { canonical: "visibleItemCount" },
|
|
16556
|
-
selectionController: { canonical: "selectionController" }
|
|
16584
|
+
selectionController: { canonical: "selectionController" },
|
|
16585
|
+
autoClearItems: { canonical: "autoClearItems" }
|
|
16557
16586
|
};
|
|
16558
16587
|
const PROGRESSBAR_EXTENSION_ATTRS = {
|
|
16559
16588
|
titleType: { canonical: "titleType" },
|
|
@@ -16581,6 +16610,11 @@ const CUSTOM_PROPERTY_ATTRS = {
|
|
|
16581
16610
|
propertyId: { canonical: "propertyId" },
|
|
16582
16611
|
label: { canonical: "label" }
|
|
16583
16612
|
};
|
|
16613
|
+
const PROPERTY_OVERRIDE_ATTRS = {
|
|
16614
|
+
target: { canonical: "target" },
|
|
16615
|
+
propertyId: { canonical: "propertyId" },
|
|
16616
|
+
value: { canonical: "value" }
|
|
16617
|
+
};
|
|
16584
16618
|
const GEAR_ATTRS = {
|
|
16585
16619
|
controller: { canonical: "controller" },
|
|
16586
16620
|
pages: { canonical: "pages" },
|
|
@@ -16671,10 +16705,11 @@ const SLIDER_EXTENSION_NODE = defineNode(SLIDER_EXTENSION_ATTRS);
|
|
|
16671
16705
|
const SCROLLBAR_EXTENSION_NODE = defineNode(SCROLLBAR_EXTENSION_ATTRS);
|
|
16672
16706
|
const RELATION_NODE = defineNode(RELATION_ATTRS);
|
|
16673
16707
|
const CUSTOM_PROPERTY_NODE = defineNode(CUSTOM_PROPERTY_ATTRS);
|
|
16708
|
+
const PROPERTY_OVERRIDE_NODE = defineNode(PROPERTY_OVERRIDE_ATTRS);
|
|
16674
16709
|
const GEAR_NODE = defineNode(GEAR_ATTRS);
|
|
16675
16710
|
const CONTROLLER_ACTION_NODE = defineNode(CONTROLLER_ACTION_ATTRS);
|
|
16676
16711
|
const TRANSITION_ITEM_NODE = defineNode(TRANSITION_ITEM_ATTRS);
|
|
16677
|
-
const LIST_ITEM_NODE = defineNode(LIST_ITEM_ATTRS);
|
|
16712
|
+
const LIST_ITEM_NODE = defineNode(LIST_ITEM_ATTRS, { property: PROPERTY_OVERRIDE_NODE });
|
|
16678
16713
|
const COMBOBOX_ITEM_NODE = defineNode(COMBOBOX_ITEM_ATTRS);
|
|
16679
16714
|
const WITH_RELATION_CHILDREN = { relation: RELATION_NODE };
|
|
16680
16715
|
const WITH_GEAR_CHILDREN = {
|
|
@@ -16722,7 +16757,7 @@ const TRANSITION_NODE = defineNode(mergeAttrs(TRANSITION_ATTRS), mergeChildren(W
|
|
|
16722
16757
|
const IMAGE_NODE = defineNode(mergeAttrs(COMMON_DISPLAY_OBJECT_ATTRS, IMAGE_PANEL_ATTRS, XY_SIZE_ATTRS, LOCKED_ATTRS, ASPECT_ATTRS, PIVOT_ATTRS, ANCHOR_ATTRS, SCALE_ATTRS, SKEW_ATTRS, GROUP_REF_ATTRS, COMMON_DISPLAY_STATE_ATTRS, RESOURCE_LINK_ATTRS, FILTER_ATTRS), mergeChildren(WITH_RELATION_CHILDREN, WITH_GEAR_CHILDREN));
|
|
16723
16758
|
const GRAPH_NODE = defineNode(mergeAttrs(COMMON_DISPLAY_OBJECT_ATTRS, XY_SIZE_ATTRS, LOCKED_ATTRS, RESTRICT_SIZE_ATTRS, PIVOT_ATTRS, ANCHOR_ATTRS, SKEW_ATTRS, GROUP_REF_ATTRS, COMMON_DISPLAY_STATE_ATTRS, GRAPH_PANEL_ATTRS), mergeChildren(WITH_RELATION_CHILDREN, WITH_GEAR_CHILDREN));
|
|
16724
16759
|
const MOVIE_CLIP_NODE = defineNode(mergeAttrs(COMMON_DISPLAY_OBJECT_ATTRS, MOVIE_CLIP_PANEL_ATTRS, XY_SIZE_ATTRS, PIVOT_ATTRS, ANCHOR_ATTRS, GROUP_REF_ATTRS, COMMON_DISPLAY_STATE_ATTRS, RESOURCE_LINK_ATTRS, FILTER_ATTRS), mergeChildren(WITH_RELATION_CHILDREN, WITH_GEAR_CHILDREN));
|
|
16725
|
-
const COMPONENT_INSTANCE_NODE = defineNode(mergeAttrs(COMMON_DISPLAY_OBJECT_ATTRS, COMPONENT_INSTANCE_PANEL_ATTRS, XY_SIZE_ATTRS, LOCKED_ATTRS, RESTRICT_SIZE_ATTRS, ASPECT_ATTRS, PIVOT_ATTRS, ANCHOR_ATTRS, SCALE_ATTRS, GROUP_REF_ATTRS, COMMON_DISPLAY_STATE_ATTRS, INSTANCE_MISC_PANEL_ATTRS, RESOURCE_LINK_ATTRS, FILTER_ATTRS), mergeChildren(WITH_RELATION_CHILDREN, WITH_GEAR_CHILDREN, WITH_INSTANCE_EXTENSION_CHILDREN));
|
|
16760
|
+
const COMPONENT_INSTANCE_NODE = defineNode(mergeAttrs(COMMON_DISPLAY_OBJECT_ATTRS, COMPONENT_INSTANCE_PANEL_ATTRS, XY_SIZE_ATTRS, LOCKED_ATTRS, RESTRICT_SIZE_ATTRS, ASPECT_ATTRS, PIVOT_ATTRS, ANCHOR_ATTRS, SCALE_ATTRS, GROUP_REF_ATTRS, COMMON_DISPLAY_STATE_ATTRS, INSTANCE_MISC_PANEL_ATTRS, RESOURCE_LINK_ATTRS, FILTER_ATTRS), mergeChildren(WITH_RELATION_CHILDREN, WITH_GEAR_CHILDREN, WITH_INSTANCE_EXTENSION_CHILDREN, { property: PROPERTY_OVERRIDE_NODE }));
|
|
16726
16761
|
const LOADER_NODE = defineNode(mergeAttrs(COMMON_DISPLAY_OBJECT_ATTRS, XY_SIZE_ATTRS, PIVOT_ATTRS, ANCHOR_ATTRS, SCALE_ATTRS, COMMON_DISPLAY_STATE_ATTRS, LOADER_PANEL_ATTRS, FILTER_ATTRS), mergeChildren(WITH_RELATION_CHILDREN, WITH_GEAR_CHILDREN));
|
|
16727
16762
|
const LOADER3D_NODE = defineNode(mergeAttrs(COMMON_DISPLAY_OBJECT_ATTRS, LOADER3D_PANEL_ATTRS), mergeChildren(WITH_RELATION_CHILDREN, WITH_GEAR_CHILDREN));
|
|
16728
16763
|
const TEXT_NODE = defineNode(mergeAttrs(COMMON_DISPLAY_OBJECT_ATTRS, XY_SIZE_ATTRS, RESTRICT_SIZE_ATTRS, PIVOT_ATTRS, ANCHOR_ATTRS, { customData: { canonical: "customData" } }, GROUP_REF_ATTRS, COMMON_DISPLAY_STATE_ATTRS, TEXT_PANEL_ATTRS, TEXT_INPUT_PANEL_ATTRS), mergeChildren(WITH_RELATION_CHILDREN, WITH_GEAR_CHILDREN));
|
|
@@ -16786,6 +16821,7 @@ const PROJECT_XML_PROTOCOL = {
|
|
|
16786
16821
|
group: GROUP_NODE,
|
|
16787
16822
|
list: LIST_NODE,
|
|
16788
16823
|
listItem: LIST_ITEM_NODE,
|
|
16824
|
+
propertyOverride: PROPERTY_OVERRIDE_NODE,
|
|
16789
16825
|
comboBoxItem: COMBOBOX_ITEM_NODE
|
|
16790
16826
|
};
|
|
16791
16827
|
function readXmlAttr(source, spec) {
|
|
@@ -16944,6 +16980,24 @@ function getXmlNode$2(value) {
|
|
|
16944
16980
|
function getProtocolChildName$2(protocol, childName) {
|
|
16945
16981
|
return protocol.children?.[childName] ? childName : null;
|
|
16946
16982
|
}
|
|
16983
|
+
function parsePropertyOverrides(source, protocol) {
|
|
16984
|
+
const childName = getProtocolChildName$2(protocol, "property");
|
|
16985
|
+
if (!childName) return [];
|
|
16986
|
+
return ensureArray(source[childName]).map((raw, index) => {
|
|
16987
|
+
const property = getXmlNode$2(raw);
|
|
16988
|
+
const specs = PROJECT_XML_PROTOCOL.propertyOverride.attrs;
|
|
16989
|
+
const target = property ? readXmlAttr(property, specs.target) : void 0;
|
|
16990
|
+
const rawPropertyId = property ? readXmlAttr(property, specs.propertyId) : void 0;
|
|
16991
|
+
const propertyId = typeof rawPropertyId === "number" ? rawPropertyId : typeof rawPropertyId === "string" && /^\d+$/.test(rawPropertyId) ? Number(rawPropertyId) : NaN;
|
|
16992
|
+
const value = property ? readXmlAttr(property, specs.value) : void 0;
|
|
16993
|
+
if (!target || !Number.isSafeInteger(propertyId) || propertyId < 0 || value === void 0) throw new Error(`Invalid property override at ${childName}[${index}].`);
|
|
16994
|
+
return {
|
|
16995
|
+
target,
|
|
16996
|
+
propertyId,
|
|
16997
|
+
value: String(value)
|
|
16998
|
+
};
|
|
16999
|
+
});
|
|
17000
|
+
}
|
|
16947
17001
|
function getProtocolGearChildNames(protocol) {
|
|
16948
17002
|
return Object.keys(protocol.children ?? {}).filter((name) => name in GEAR_TAG_MAP);
|
|
16949
17003
|
}
|
|
@@ -16978,6 +17032,7 @@ function parseListItemXmlNode(item) {
|
|
|
16978
17032
|
const specs = PROJECT_XML_PROTOCOL.listItem.attrs;
|
|
16979
17033
|
const isFolder = readXmlAttr(item, specs.isFolder);
|
|
16980
17034
|
const controllers = readXmlAttr(item, specs.controllers);
|
|
17035
|
+
const propertyOverrides = parsePropertyOverrides(item, PROJECT_XML_PROTOCOL.listItem);
|
|
16981
17036
|
return {
|
|
16982
17037
|
title: readXmlAttr(item, specs.title) ?? null,
|
|
16983
17038
|
icon: readXmlAttr(item, specs.icon) ?? null,
|
|
@@ -16987,7 +17042,8 @@ function parseListItemXmlNode(item) {
|
|
|
16987
17042
|
selectedIcon: readXmlAttr(item, specs.selectedIcon) ?? null,
|
|
16988
17043
|
level: parseInt2(readXmlAttr(item, specs.level)),
|
|
16989
17044
|
isFolder: isFolder !== void 0 ? parseBool(isFolder) : null,
|
|
16990
|
-
...controllers !== void 0 ? { controllers } : {}
|
|
17045
|
+
...controllers !== void 0 ? { controllers } : {},
|
|
17046
|
+
...propertyOverrides.length > 0 ? { propertyOverrides } : {}
|
|
16991
17047
|
};
|
|
16992
17048
|
}
|
|
16993
17049
|
function parseComboBoxItemXmlNode(item) {
|
|
@@ -18054,6 +18110,8 @@ function createDisplayObject$1(ctx, doc, tagName, attrs, localControllers) {
|
|
|
18054
18110
|
if (scrollItemToViewOnClick !== void 0) g.setScrollItemToViewOnClick?.(parseBool(scrollItemToViewOnClick));
|
|
18055
18111
|
const foldInvisibleItems = readXmlAttr(attrs, PROJECT_XML_PROTOCOL.list.attrs.foldInvisibleItems);
|
|
18056
18112
|
if (foldInvisibleItems !== void 0) g.setFoldInvisibleItems?.(parseBool(foldInvisibleItems));
|
|
18113
|
+
const autoClearItems = readXmlAttr(attrs, PROJECT_XML_PROTOCOL.list.attrs.autoClearItems);
|
|
18114
|
+
if (autoClearItems !== void 0) g.setAutoClearItems?.(parseBool(autoClearItems));
|
|
18057
18115
|
const listItemChildName = getProtocolChildName$2(PROJECT_XML_PROTOCOL.list, "item");
|
|
18058
18116
|
const items = listItemChildName ? ensureArray(attrs[listItemChildName]) : [];
|
|
18059
18117
|
if (items.length > 0) {
|
|
@@ -18092,6 +18150,7 @@ function createDisplayObject$1(ctx, doc, tagName, attrs, localControllers) {
|
|
|
18092
18150
|
obj.addRelation(rel);
|
|
18093
18151
|
}
|
|
18094
18152
|
}
|
|
18153
|
+
if (obj.propertyType === "GComponent") obj.setPropertyOverrides(parsePropertyOverrides(attrs, PROJECT_XML_PROTOCOL.componentInstance));
|
|
18095
18154
|
for (const extTypeName of getProtocolExtensionChildNames(PROJECT_XML_PROTOCOL.componentInstance)) {
|
|
18096
18155
|
const extElement = attrs[extTypeName];
|
|
18097
18156
|
if (extElement) {
|
|
@@ -18128,6 +18187,8 @@ function createDisplayObject$1(ctx, doc, tagName, attrs, localControllers) {
|
|
|
18128
18187
|
if (selectionController !== void 0) componentObj.setInstanceSelectionController?.(selectionController);
|
|
18129
18188
|
const visibleItemCount = extSpecs.visibleItemCount ? readXmlAttr(extAttrs, extSpecs.visibleItemCount) : void 0;
|
|
18130
18189
|
if (visibleItemCount !== void 0) componentObj.setInstanceVisibleItemCount?.(parseInt2(visibleItemCount));
|
|
18190
|
+
const autoClearItems = extSpecs.autoClearItems ? readXmlAttr(extAttrs, extSpecs.autoClearItems) : void 0;
|
|
18191
|
+
if (autoClearItems !== void 0) componentObj.setInstanceAutoClearItems?.(parseBool(autoClearItems));
|
|
18131
18192
|
const value = extSpecs.value ? readXmlAttr(extAttrs, extSpecs.value) : void 0;
|
|
18132
18193
|
if (value !== void 0) componentObj.setInstanceValue?.(parseInt2(value));
|
|
18133
18194
|
const max = extSpecs.max ? readXmlAttr(extAttrs, extSpecs.max) : void 0;
|
|
@@ -18470,6 +18531,7 @@ function readComponentXml(ctx, comp, xmlContent) {
|
|
|
18470
18531
|
case "ComboBox":
|
|
18471
18532
|
if (readXmlAttr(extAttrs, EXTENSION_PROTOCOL_MAP$1.ComboBox.attrs.dropdown) !== void 0) comp.setDropdown?.(String(readXmlAttr(extAttrs, EXTENSION_PROTOCOL_MAP$1.ComboBox.attrs.dropdown)));
|
|
18472
18533
|
if (readXmlAttr(extAttrs, EXTENSION_PROTOCOL_MAP$1.ComboBox.attrs.selectionController) !== void 0) comp.setSelectionController?.(String(readXmlAttr(extAttrs, EXTENSION_PROTOCOL_MAP$1.ComboBox.attrs.selectionController)));
|
|
18534
|
+
if (readXmlAttr(extAttrs, EXTENSION_PROTOCOL_MAP$1.ComboBox.attrs.autoClearItems) !== void 0) comp.setAutoClearItems?.(parseBool(readXmlAttr(extAttrs, EXTENSION_PROTOCOL_MAP$1.ComboBox.attrs.autoClearItems)));
|
|
18473
18535
|
break;
|
|
18474
18536
|
case "Label":
|
|
18475
18537
|
if (readXmlAttr(extAttrs, EXTENSION_PROTOCOL_MAP$1.Label.attrs.prompt) !== void 0) comp.setPromptText?.(String(readXmlAttr(extAttrs, EXTENSION_PROTOCOL_MAP$1.Label.attrs.prompt)));
|
|
@@ -19552,6 +19614,16 @@ function serializeListItemXmlNode(item, options) {
|
|
|
19552
19614
|
if (item.level !== void 0 && item.level !== null && ((options?.forceLevel ?? false) || item.level !== 0 || item.isFolder === true)) writeXmlAttr(attrs, specs.level, String(item.level));
|
|
19553
19615
|
if (item.isFolder !== void 0 && item.isFolder !== null) writeXmlAttr(attrs, specs.isFolder, item.isFolder ? "true" : "false");
|
|
19554
19616
|
if (item.controllers !== void 0 && item.controllers !== null) writeXmlAttr(attrs, specs.controllers, item.controllers);
|
|
19617
|
+
const propertyChildName = getProtocolChildName(PROJECT_XML_PROTOCOL.listItem, "property");
|
|
19618
|
+
if (propertyChildName && item.propertyOverrides?.length) attrs[propertyChildName] = item.propertyOverrides.map(serializePropertyOverrideXmlNode);
|
|
19619
|
+
return attrs;
|
|
19620
|
+
}
|
|
19621
|
+
function serializePropertyOverrideXmlNode(property) {
|
|
19622
|
+
const attrs = {};
|
|
19623
|
+
const specs = PROJECT_XML_PROTOCOL.propertyOverride.attrs;
|
|
19624
|
+
writeXmlAttr(attrs, specs.target, property.target);
|
|
19625
|
+
writeXmlAttr(attrs, specs.propertyId, String(property.propertyId));
|
|
19626
|
+
writeXmlAttr(attrs, specs.value, property.value);
|
|
19555
19627
|
return attrs;
|
|
19556
19628
|
}
|
|
19557
19629
|
function serializeComboBoxItemXmlNode(item) {
|
|
@@ -20034,6 +20106,7 @@ function serializeChild(obj) {
|
|
|
20034
20106
|
if (clipSoftness && ((clipSoftness.x ?? 0) !== 0 || (clipSoftness.y ?? 0) !== 0)) writeXmlAttr(attrs, PROJECT_XML_PROTOCOL.list.attrs.clipSoftness, `${clipSoftness.x ?? 0},${clipSoftness.y ?? 0}`);
|
|
20035
20107
|
if (typedObj.getScrollItemToViewOnClick?.() === false) writeXmlAttr(attrs, PROJECT_XML_PROTOCOL.list.attrs.scrollItemToViewOnClick, "false");
|
|
20036
20108
|
if (typedObj.getFoldInvisibleItems?.() === true) writeXmlAttr(attrs, PROJECT_XML_PROTOCOL.list.attrs.foldInvisibleItems, "true");
|
|
20109
|
+
if (typedObj.getAutoClearItems?.() === true) writeXmlAttr(attrs, PROJECT_XML_PROTOCOL.list.attrs.autoClearItems, "true");
|
|
20037
20110
|
const listItems = typedObj.getListItems?.() ?? [];
|
|
20038
20111
|
const listItemChildName = getProtocolChildName(PROJECT_XML_PROTOCOL.list, "item");
|
|
20039
20112
|
if (listItems.length > 0 && listItemChildName) attrs[listItemChildName] = listItems.map((item) => serializeListItemXmlNode(item, { forceLevel: isTree }));
|
|
@@ -20101,6 +20174,9 @@ function serializeChild(obj) {
|
|
|
20101
20174
|
}
|
|
20102
20175
|
}
|
|
20103
20176
|
if (type === "GComponent") {
|
|
20177
|
+
const propertyOverrides = typedObj.getPropertyOverrides?.() ?? [];
|
|
20178
|
+
const propertyChildName = getProtocolChildName(PROJECT_XML_PROTOCOL.componentInstance, "property");
|
|
20179
|
+
if (propertyChildName && propertyOverrides.length > 0) attrs[propertyChildName] = propertyOverrides.map(serializePropertyOverrideXmlNode);
|
|
20104
20180
|
const instanceExtType = typedObj.getInstanceExtType?.() ?? "";
|
|
20105
20181
|
if (instanceExtType) {
|
|
20106
20182
|
const extSpecs = EXTENSION_PROTOCOL_MAP[instanceExtType].attrs;
|
|
@@ -20119,6 +20195,7 @@ function serializeChild(obj) {
|
|
|
20119
20195
|
if (typedObj.getInstancePromptText?.() && extSpecs.prompt) writeXmlAttr(extAttrs, extSpecs.prompt, typedObj.getInstancePromptText?.());
|
|
20120
20196
|
if (typedObj.getInstanceSelectionController?.() && extSpecs.selectionController) writeXmlAttr(extAttrs, extSpecs.selectionController, typedObj.getInstanceSelectionController?.());
|
|
20121
20197
|
if ((typedObj.getInstanceVisibleItemCount?.() ?? 0) > 0 && extSpecs.visibleItemCount) writeXmlAttr(extAttrs, extSpecs.visibleItemCount, String(typedObj.getInstanceVisibleItemCount?.() ?? 0));
|
|
20198
|
+
if (typedObj.getInstanceAutoClearItems?.() && extSpecs.autoClearItems) writeXmlAttr(extAttrs, extSpecs.autoClearItems, "true");
|
|
20122
20199
|
const instanceValue = typedObj.getInstanceValue?.() ?? 0;
|
|
20123
20200
|
const instanceMax = typedObj.getInstanceMax?.() ?? 0;
|
|
20124
20201
|
const instanceMin = typedObj.getInstanceMin?.() ?? 0;
|
|
@@ -20388,6 +20465,7 @@ async function writeComponent(fs, comp, pkgDir, sourceRelativePath) {
|
|
|
20388
20465
|
case "ComboBox":
|
|
20389
20466
|
if (typedComp.getDropdown?.()) writeXmlAttr(extAttrs, extSpecs.dropdown, typedComp.getDropdown?.());
|
|
20390
20467
|
if (typedComp.getSelectionController?.()) writeXmlAttr(extAttrs, extSpecs.selectionController, typedComp.getSelectionController?.());
|
|
20468
|
+
if (typedComp.getAutoClearItems?.()) writeXmlAttr(extAttrs, extSpecs.autoClearItems, "true");
|
|
20391
20469
|
break;
|
|
20392
20470
|
case "Label":
|
|
20393
20471
|
if (typedComp.getPromptText?.()) writeXmlAttr(extAttrs, extSpecs.prompt, typedComp.getPromptText?.());
|
|
@@ -25577,8 +25655,11 @@ async function collectImage(resource, pkg, inputs, encoder, options, doTrim, log
|
|
|
25577
25655
|
}).png().toBuffer();
|
|
25578
25656
|
sourceHasAlpha = true;
|
|
25579
25657
|
}
|
|
25580
|
-
} catch {
|
|
25581
|
-
if (options.strictOutput)
|
|
25658
|
+
} catch (error) {
|
|
25659
|
+
if (options.strictOutput) {
|
|
25660
|
+
const detail = error instanceof Error && error.message.startsWith("publishBrowser:") ? ` ${error.message}` : "";
|
|
25661
|
+
throw new Error(`atlas: Could not read image "${filePath}".${detail}`);
|
|
25662
|
+
}
|
|
25582
25663
|
if (origW === 0 || origH === 0) {
|
|
25583
25664
|
logger.warn(`atlas: Could not read image "${filePath}", skipping.`);
|
|
25584
25665
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfairygui/cli",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.36",
|
|
4
4
|
"description": "FairyGUI Headless Authoring SDK — command-line interface.",
|
|
5
5
|
"author": "OpenFairyGUI Contributors",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"restore"
|
|
34
34
|
],
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@openfairygui/
|
|
37
|
-
"@openfairygui/
|
|
36
|
+
"@openfairygui/functions": "0.2.0-alpha.36",
|
|
37
|
+
"@openfairygui/core": "0.2.0-alpha.36"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"commander": "^14.0.2",
|
|
41
41
|
"jiti": "^2.7.0",
|
|
42
|
-
"@openfairygui/backend": "0.2.0-alpha.
|
|
42
|
+
"@openfairygui/backend": "0.2.0-alpha.36"
|
|
43
43
|
},
|
|
44
44
|
"optionalDependencies": {
|
|
45
45
|
"sharp": ">=0.33.0"
|