@umbraco-cms/mcp-dev 18.1.1 → 18.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-MMATLZNV.js → chunk-66TKBJQ7.js} +51 -11
- package/dist/{chunk-MMATLZNV.js.map → chunk-66TKBJQ7.js.map} +1 -1
- package/dist/{chunk-6QIKDT2P.cjs → chunk-BVWOXDOS.cjs} +51 -11
- package/dist/chunk-BVWOXDOS.cjs.map +1 -0
- package/dist/collections.cjs +2 -2
- package/dist/collections.js +1 -1
- package/dist/index.cjs +90 -90
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/tool-types.d.ts +6 -0
- package/package.json +3 -3
- package/dist/chunk-6QIKDT2P.cjs.map +0 -1
|
@@ -18277,7 +18277,10 @@ var createDocumentTypeSchema = z54.object({
|
|
|
18277
18277
|
alias: z54.string().min(1, "Property alias is required"),
|
|
18278
18278
|
dataTypeId: z54.string().uuid("Must be a valid data type UUID"),
|
|
18279
18279
|
tab: z54.string().optional(),
|
|
18280
|
-
group: z54.string().optional()
|
|
18280
|
+
group: z54.string().optional(),
|
|
18281
|
+
description: z54.string().optional(),
|
|
18282
|
+
mandatory: z54.boolean().optional(),
|
|
18283
|
+
sortOrder: z54.number().int().nonnegative().max(2147483647).optional()
|
|
18281
18284
|
}).refine(
|
|
18282
18285
|
(data) => data.tab || data.group,
|
|
18283
18286
|
{
|
|
@@ -18308,7 +18311,11 @@ IMPORTANT: IMPLEMENTATION REQUIREMENTS
|
|
|
18308
18311
|
- Property with only tab: appears directly in the tab
|
|
18309
18312
|
- Property with only group: appears in the group (group has no parent tab)
|
|
18310
18313
|
- Property with both tab and group: group is nested inside the tab, property appears in the group
|
|
18311
|
-
- The tool will automatically create the container hierarchy
|
|
18314
|
+
- The tool will automatically create the container hierarchy
|
|
18315
|
+
8. Properties optionally accept 'description', 'mandatory' and 'sortOrder':
|
|
18316
|
+
- 'description' sets the property's help text (defaults to none)
|
|
18317
|
+
- 'mandatory' marks the property as required (defaults to false)
|
|
18318
|
+
- 'sortOrder' controls the property's position (defaults to the next position not already claimed by another property's explicit sortOrder)`,
|
|
18312
18319
|
inputSchema: createDocumentTypeSchema.shape,
|
|
18313
18320
|
outputSchema: createDocumentTypeOutputSchema.shape,
|
|
18314
18321
|
slices: ["create"],
|
|
@@ -18318,7 +18325,11 @@ IMPORTANT: IMPLEMENTATION REQUIREMENTS
|
|
|
18318
18325
|
const { containers, containerIds } = createContainerHierarchy(
|
|
18319
18326
|
model.properties
|
|
18320
18327
|
);
|
|
18321
|
-
const
|
|
18328
|
+
const explicitSortOrders = new Set(
|
|
18329
|
+
model.properties.map((prop) => prop.sortOrder).filter((sortOrder) => sortOrder !== void 0)
|
|
18330
|
+
);
|
|
18331
|
+
let nextSortOrder = 0;
|
|
18332
|
+
const properties = model.properties.map((prop) => {
|
|
18322
18333
|
let containerId;
|
|
18323
18334
|
if (prop.group) {
|
|
18324
18335
|
const key = `${prop.tab || "NO_TAB"}::${prop.group}`;
|
|
@@ -18326,20 +18337,29 @@ IMPORTANT: IMPLEMENTATION REQUIREMENTS
|
|
|
18326
18337
|
} else if (prop.tab) {
|
|
18327
18338
|
containerId = containerIds.get(prop.tab);
|
|
18328
18339
|
}
|
|
18340
|
+
let sortOrder = prop.sortOrder;
|
|
18341
|
+
if (sortOrder === void 0) {
|
|
18342
|
+
while (explicitSortOrders.has(nextSortOrder)) {
|
|
18343
|
+
nextSortOrder++;
|
|
18344
|
+
}
|
|
18345
|
+
sortOrder = nextSortOrder;
|
|
18346
|
+
nextSortOrder++;
|
|
18347
|
+
}
|
|
18329
18348
|
return {
|
|
18330
18349
|
id: uuidv45(),
|
|
18331
18350
|
name: prop.name,
|
|
18332
18351
|
alias: prop.alias,
|
|
18352
|
+
description: prop.description ?? null,
|
|
18333
18353
|
dataType: {
|
|
18334
18354
|
id: prop.dataTypeId
|
|
18335
18355
|
},
|
|
18336
|
-
sortOrder
|
|
18356
|
+
sortOrder,
|
|
18337
18357
|
appearance: {
|
|
18338
18358
|
labelOnTop: false
|
|
18339
18359
|
},
|
|
18340
18360
|
validation: {
|
|
18341
18361
|
regEx: null,
|
|
18342
|
-
mandatory: false,
|
|
18362
|
+
mandatory: prop.mandatory ?? false,
|
|
18343
18363
|
regExMessage: null,
|
|
18344
18364
|
mandatoryMessage: null
|
|
18345
18365
|
},
|
|
@@ -19512,7 +19532,10 @@ var createElementTypeSchema = z65.object({
|
|
|
19512
19532
|
alias: z65.string().min(1, "Property alias is required"),
|
|
19513
19533
|
dataTypeId: z65.string().uuid("Must be a valid data type UUID"),
|
|
19514
19534
|
tab: z65.string().optional(),
|
|
19515
|
-
group: z65.string().optional()
|
|
19535
|
+
group: z65.string().optional(),
|
|
19536
|
+
description: z65.string().optional(),
|
|
19537
|
+
mandatory: z65.boolean().optional(),
|
|
19538
|
+
sortOrder: z65.number().int().nonnegative().max(2147483647).optional()
|
|
19516
19539
|
}).refine(
|
|
19517
19540
|
(data) => data.tab || data.group,
|
|
19518
19541
|
{
|
|
@@ -19543,7 +19566,11 @@ IMPORTANT: IMPLEMENTATION REQUIREMENTS
|
|
|
19543
19566
|
- Property with only tab: appears directly in the tab
|
|
19544
19567
|
- Property with only group: appears in the group (group has no parent tab)
|
|
19545
19568
|
- Property with both tab and group: group is nested inside the tab, property appears in the group
|
|
19546
|
-
- The tool will automatically create the container hierarchy
|
|
19569
|
+
- The tool will automatically create the container hierarchy
|
|
19570
|
+
7. Properties optionally accept 'description', 'mandatory' and 'sortOrder':
|
|
19571
|
+
- 'description' sets the property's help text (defaults to none)
|
|
19572
|
+
- 'mandatory' marks the property as required (defaults to false)
|
|
19573
|
+
- 'sortOrder' controls the property's position (defaults to the next position not already claimed by another property's explicit sortOrder)`,
|
|
19547
19574
|
inputSchema: createElementTypeSchema.shape,
|
|
19548
19575
|
outputSchema: createElementTypeOutputSchema.shape,
|
|
19549
19576
|
slices: ["create"],
|
|
@@ -19553,7 +19580,11 @@ IMPORTANT: IMPLEMENTATION REQUIREMENTS
|
|
|
19553
19580
|
const { containers, containerIds } = createContainerHierarchy(
|
|
19554
19581
|
model.properties
|
|
19555
19582
|
);
|
|
19556
|
-
const
|
|
19583
|
+
const explicitSortOrders = new Set(
|
|
19584
|
+
model.properties.map((prop) => prop.sortOrder).filter((sortOrder) => sortOrder !== void 0)
|
|
19585
|
+
);
|
|
19586
|
+
let nextSortOrder = 0;
|
|
19587
|
+
const properties = model.properties.map((prop) => {
|
|
19557
19588
|
let containerId;
|
|
19558
19589
|
if (prop.group) {
|
|
19559
19590
|
const key = `${prop.tab || "NO_TAB"}::${prop.group}`;
|
|
@@ -19561,20 +19592,29 @@ IMPORTANT: IMPLEMENTATION REQUIREMENTS
|
|
|
19561
19592
|
} else if (prop.tab) {
|
|
19562
19593
|
containerId = containerIds.get(prop.tab);
|
|
19563
19594
|
}
|
|
19595
|
+
let sortOrder = prop.sortOrder;
|
|
19596
|
+
if (sortOrder === void 0) {
|
|
19597
|
+
while (explicitSortOrders.has(nextSortOrder)) {
|
|
19598
|
+
nextSortOrder++;
|
|
19599
|
+
}
|
|
19600
|
+
sortOrder = nextSortOrder;
|
|
19601
|
+
nextSortOrder++;
|
|
19602
|
+
}
|
|
19564
19603
|
return {
|
|
19565
19604
|
id: uuidv46(),
|
|
19566
19605
|
name: prop.name,
|
|
19567
19606
|
alias: prop.alias,
|
|
19607
|
+
description: prop.description ?? null,
|
|
19568
19608
|
dataType: {
|
|
19569
19609
|
id: prop.dataTypeId
|
|
19570
19610
|
},
|
|
19571
|
-
sortOrder
|
|
19611
|
+
sortOrder,
|
|
19572
19612
|
appearance: {
|
|
19573
19613
|
labelOnTop: false
|
|
19574
19614
|
},
|
|
19575
19615
|
validation: {
|
|
19576
19616
|
regEx: null,
|
|
19577
|
-
mandatory: false,
|
|
19617
|
+
mandatory: prop.mandatory ?? false,
|
|
19578
19618
|
regExMessage: null,
|
|
19579
19619
|
mandatoryMessage: null
|
|
19580
19620
|
},
|
|
@@ -29742,4 +29782,4 @@ export {
|
|
|
29742
29782
|
allModeNames,
|
|
29743
29783
|
allSliceNames
|
|
29744
29784
|
};
|
|
29745
|
-
//# sourceMappingURL=chunk-
|
|
29785
|
+
//# sourceMappingURL=chunk-66TKBJQ7.js.map
|