@contentful/experience-design-system-cli 2.26.7-dev-build-f5a509c.0 → 2.26.7-dev-build-245a014.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/package.json
CHANGED
|
@@ -37,8 +37,6 @@ type FieldEditorProps = {
|
|
|
37
37
|
kind: 'prop' | 'slot';
|
|
38
38
|
name: string;
|
|
39
39
|
};
|
|
40
|
-
/** Hide non-importable property categories from the form without removing them from its saved state. */
|
|
41
|
-
showHiddenProps?: boolean;
|
|
42
40
|
};
|
|
43
41
|
export declare function simulateGraphWithCandidate(projectSlotGraph: ComponentSlotInfo[], selfName: string, currentSlots: {
|
|
44
42
|
name: string;
|
|
@@ -57,5 +55,5 @@ export declare function computeAllowedComponentReplacementCandidates(projectSlot
|
|
|
57
55
|
name: string;
|
|
58
56
|
allowedComponents: string[];
|
|
59
57
|
}[], targetSlotName: string, replaceIndex: number): string[];
|
|
60
|
-
export declare function FieldEditor({ value, width, height, active, onChange, onSave, onDiscard, onExit, metadata, onTogglePropRationale, propRationaleKey, onToggleComponentRationale, componentRationaleKey, onToggleSourceExternal, onTextEntryActiveChange, projectSlotGraph, currentComponentName, onDirtyChange, discardTrigger, initialFocusTarget,
|
|
58
|
+
export declare function FieldEditor({ value, width, height, active, onChange, onSave, onDiscard, onExit, metadata, onTogglePropRationale, propRationaleKey, onToggleComponentRationale, componentRationaleKey, onToggleSourceExternal, onTextEntryActiveChange, projectSlotGraph, currentComponentName, onDirtyChange, discardTrigger, initialFocusTarget, }: FieldEditorProps): React.ReactElement;
|
|
61
59
|
export {};
|
package/dist/src/index.js
CHANGED
|
@@ -8554,66 +8554,6 @@ function applyDbMigrations(db) {
|
|
|
8554
8554
|
if (!rawPropColNames.has("source_end_line")) {
|
|
8555
8555
|
db.exec("ALTER TABLE raw_props ADD COLUMN source_end_line INTEGER");
|
|
8556
8556
|
}
|
|
8557
|
-
const rawPropsDdl = db.prepare(`SELECT sql FROM sqlite_master WHERE type = 'table' AND name = 'raw_props'`).get();
|
|
8558
|
-
if (rawPropsDdl && !rawPropsDdl.sql.includes(`'unattached'`)) {
|
|
8559
|
-
db.exec("PRAGMA foreign_keys = OFF");
|
|
8560
|
-
try {
|
|
8561
|
-
db.exec("BEGIN");
|
|
8562
|
-
try {
|
|
8563
|
-
db.exec(`
|
|
8564
|
-
CREATE TABLE raw_props__new (
|
|
8565
|
-
session_id TEXT NOT NULL,
|
|
8566
|
-
component_id TEXT NOT NULL,
|
|
8567
|
-
name TEXT NOT NULL,
|
|
8568
|
-
type TEXT NOT NULL,
|
|
8569
|
-
required INTEGER NOT NULL CHECK (required IN (0, 1)),
|
|
8570
|
-
category TEXT CHECK (category IN ('content', 'design', 'state')),
|
|
8571
|
-
default_value TEXT,
|
|
8572
|
-
description TEXT,
|
|
8573
|
-
token_reference TEXT,
|
|
8574
|
-
position INTEGER NOT NULL,
|
|
8575
|
-
cdf_type TEXT,
|
|
8576
|
-
cdf_category TEXT CHECK (cdf_category IN ('content', 'design', 'state', 'unattached')),
|
|
8577
|
-
cdf_token_kind TEXT,
|
|
8578
|
-
rationale TEXT,
|
|
8579
|
-
source_start_line INTEGER,
|
|
8580
|
-
source_end_line INTEGER,
|
|
8581
|
-
PRIMARY KEY (session_id, component_id, name),
|
|
8582
|
-
FOREIGN KEY (session_id, component_id) REFERENCES raw_components(session_id, component_id) ON DELETE CASCADE
|
|
8583
|
-
);
|
|
8584
|
-
|
|
8585
|
-
INSERT INTO raw_props__new
|
|
8586
|
-
(session_id, component_id, name, type, required, category, default_value,
|
|
8587
|
-
description, token_reference, position, cdf_type, cdf_category, cdf_token_kind,
|
|
8588
|
-
rationale, source_start_line, source_end_line)
|
|
8589
|
-
SELECT
|
|
8590
|
-
session_id, component_id, name, type, required, category, default_value,
|
|
8591
|
-
description, token_reference, position, cdf_type, cdf_category, cdf_token_kind,
|
|
8592
|
-
rationale, source_start_line, source_end_line
|
|
8593
|
-
FROM raw_props;
|
|
8594
|
-
|
|
8595
|
-
DROP TABLE raw_props;
|
|
8596
|
-
ALTER TABLE raw_props__new RENAME TO raw_props;
|
|
8597
|
-
CREATE INDEX IF NOT EXISTS idx_raw_props_session ON raw_props(session_id, component_id);
|
|
8598
|
-
|
|
8599
|
-
-- Rows written by a pre-migration exclude_prop still say cdf_type = 'excluded'
|
|
8600
|
-
-- with cdf_category = NULL. Backfill them into the new unattached shape so an
|
|
8601
|
-
-- in-flight local session doesn't end up with an unprintable half-migrated row.
|
|
8602
|
-
UPDATE raw_props
|
|
8603
|
-
SET cdf_category = 'unattached',
|
|
8604
|
-
cdf_type = CASE WHEN type = 'boolean' THEN 'boolean' ELSE 'string' END,
|
|
8605
|
-
required = 0
|
|
8606
|
-
WHERE cdf_type = 'excluded';
|
|
8607
|
-
`);
|
|
8608
|
-
db.exec("COMMIT");
|
|
8609
|
-
} catch (e) {
|
|
8610
|
-
db.exec("ROLLBACK");
|
|
8611
|
-
throw e;
|
|
8612
|
-
}
|
|
8613
|
-
} finally {
|
|
8614
|
-
db.exec("PRAGMA foreign_keys = ON");
|
|
8615
|
-
}
|
|
8616
|
-
}
|
|
8617
8557
|
if (!rawCompColNames.has("reject_reason")) {
|
|
8618
8558
|
db.exec("ALTER TABLE raw_components ADD COLUMN reject_reason TEXT");
|
|
8619
8559
|
}
|
|
@@ -8799,12 +8739,7 @@ function applyToolCalls(db, sessionId2, componentId, componentName, calls, incom
|
|
|
8799
8739
|
WHERE session_id = ? AND component_id = ? AND name = ?`
|
|
8800
8740
|
);
|
|
8801
8741
|
const clearProp = db.prepare(
|
|
8802
|
-
`UPDATE raw_props
|
|
8803
|
-
SET cdf_type = CASE WHEN type = 'boolean' THEN 'boolean' ELSE 'string' END,
|
|
8804
|
-
cdf_category = 'unattached',
|
|
8805
|
-
cdf_token_kind = NULL,
|
|
8806
|
-
required = 0,
|
|
8807
|
-
rationale = ?
|
|
8742
|
+
`UPDATE raw_props SET cdf_type = 'excluded', cdf_category = NULL, cdf_token_kind = NULL, rationale = ?
|
|
8808
8743
|
WHERE session_id = ? AND component_id = ? AND name = ?`
|
|
8809
8744
|
);
|
|
8810
8745
|
const deleteAllowedValues = db.prepare(
|
|
@@ -9403,7 +9338,7 @@ function loadCDFComponents(db, sessionId2) {
|
|
|
9403
9338
|
`SELECT component_id, name, required, default_value, description,
|
|
9404
9339
|
cdf_type, cdf_category, cdf_token_kind, position
|
|
9405
9340
|
FROM raw_props
|
|
9406
|
-
WHERE session_id = ? AND cdf_type IS NOT NULL
|
|
9341
|
+
WHERE session_id = ? AND cdf_type IS NOT NULL AND cdf_type != 'excluded'
|
|
9407
9342
|
ORDER BY component_id, position`
|
|
9408
9343
|
).all(sessionId2);
|
|
9409
9344
|
const allowedValues = db.prepare(
|
|
@@ -21373,27 +21308,6 @@ var init_merge_ai_decisions = __esm({
|
|
|
21373
21308
|
}
|
|
21374
21309
|
});
|
|
21375
21310
|
|
|
21376
|
-
// packages/experience-design-system-cli/src/import/tui/steps/review-json-panel.ts
|
|
21377
|
-
function getReviewJsonPanelValue(selected, showHiddenProps) {
|
|
21378
|
-
if (!selected) return "";
|
|
21379
|
-
const entry = showHiddenProps ? selected.entry : {
|
|
21380
|
-
...selected.entry,
|
|
21381
|
-
$properties: Object.fromEntries(
|
|
21382
|
-
Object.entries(selected.entry.$properties ?? {}).filter(
|
|
21383
|
-
([, definition]) => !HIDDEN_PROP_CATEGORIES.has(definition.$category)
|
|
21384
|
-
)
|
|
21385
|
-
)
|
|
21386
|
-
};
|
|
21387
|
-
return JSON.stringify({ [selected.key]: entry }, null, 2);
|
|
21388
|
-
}
|
|
21389
|
-
var HIDDEN_PROP_CATEGORIES;
|
|
21390
|
-
var init_review_json_panel = __esm({
|
|
21391
|
-
"packages/experience-design-system-cli/src/import/tui/steps/review-json-panel.ts"() {
|
|
21392
|
-
"use strict";
|
|
21393
|
-
HIDDEN_PROP_CATEGORIES = /* @__PURE__ */ new Set(["state", "unattached"]);
|
|
21394
|
-
}
|
|
21395
|
-
});
|
|
21396
|
-
|
|
21397
21311
|
// packages/experience-design-system-cli/src/analyze/cycle-view.ts
|
|
21398
21312
|
function computeCycleView(components) {
|
|
21399
21313
|
const filtered = components.filter((c2) => c2.status !== "rejected");
|
|
@@ -22000,8 +21914,7 @@ function FieldEditor({
|
|
|
22000
21914
|
currentComponentName,
|
|
22001
21915
|
onDirtyChange,
|
|
22002
21916
|
discardTrigger,
|
|
22003
|
-
initialFocusTarget
|
|
22004
|
-
showHiddenProps = true
|
|
21917
|
+
initialFocusTarget
|
|
22005
21918
|
}) {
|
|
22006
21919
|
const { state: initialState, error: parseError } = parseToState(value);
|
|
22007
21920
|
const [editorState, setEditorState] = useState23(initialState);
|
|
@@ -22082,34 +21995,12 @@ function FieldEditor({
|
|
|
22082
21995
|
const [showHelp, setShowHelp] = useState23(false);
|
|
22083
21996
|
const props = editorState.props;
|
|
22084
21997
|
const slots = editorState.slots;
|
|
22085
|
-
const visiblePropIndexes = React23.useMemo(
|
|
22086
|
-
() => props.flatMap(
|
|
22087
|
-
(prop, index) => showHiddenProps || prop.category !== "state" && prop.category !== "unattached" ? [index] : []
|
|
22088
|
-
),
|
|
22089
|
-
[props, showHiddenProps]
|
|
22090
|
-
);
|
|
22091
|
-
const visiblePropPosition = visiblePropIndexes.indexOf(propIdx);
|
|
22092
21998
|
const textEntryActive = focusLevel === "field" && activeField === "description" || focusLevel === "field" && activeField === "default" && (editorState.props[propIdx]?.type === "string" || editorState.props[propIdx]?.type === "token") || editingValue != null;
|
|
22093
21999
|
React23.useEffect(() => {
|
|
22094
22000
|
onTextEntryActiveChange?.(textEntryActive);
|
|
22095
22001
|
}, [textEntryActive, onTextEntryActiveChange]);
|
|
22096
22002
|
const currentProp = props[propIdx] ?? null;
|
|
22097
22003
|
const currentSlot = slots[slotIdx] ?? null;
|
|
22098
|
-
React23.useEffect(() => {
|
|
22099
|
-
if (showHiddenProps || inSlots || inComponentDesc || visiblePropPosition >= 0) return;
|
|
22100
|
-
if (visiblePropIndexes.length > 0) {
|
|
22101
|
-
setPropIdx(visiblePropIndexes[0]);
|
|
22102
|
-
return;
|
|
22103
|
-
}
|
|
22104
|
-
if (slots.length > 0) {
|
|
22105
|
-
setInSlots(true);
|
|
22106
|
-
setSlotIdx(0);
|
|
22107
|
-
setFocusLevel("slot");
|
|
22108
|
-
return;
|
|
22109
|
-
}
|
|
22110
|
-
setInComponentDesc(true);
|
|
22111
|
-
setFocusLevel("componentDescription");
|
|
22112
|
-
}, [inComponentDesc, inSlots, showHiddenProps, slots.length, visiblePropIndexes, visiblePropPosition]);
|
|
22113
22004
|
const commit = (next) => {
|
|
22114
22005
|
setEditorState(next);
|
|
22115
22006
|
onChange(serializeState(next, value));
|
|
@@ -22311,8 +22202,8 @@ function FieldEditor({
|
|
|
22311
22202
|
}
|
|
22312
22203
|
if (focusLevel === "prop") {
|
|
22313
22204
|
if (key.upArrow || input === "k") {
|
|
22314
|
-
if (
|
|
22315
|
-
setPropIdx(
|
|
22205
|
+
if (propIdx > 0) {
|
|
22206
|
+
setPropIdx(propIdx - 1);
|
|
22316
22207
|
} else {
|
|
22317
22208
|
setFocusLevel("componentDescription");
|
|
22318
22209
|
setInSlots(false);
|
|
@@ -22321,8 +22212,8 @@ function FieldEditor({
|
|
|
22321
22212
|
return;
|
|
22322
22213
|
}
|
|
22323
22214
|
if (key.downArrow || input === "j") {
|
|
22324
|
-
if (
|
|
22325
|
-
setPropIdx(
|
|
22215
|
+
if (propIdx < props.length - 1) {
|
|
22216
|
+
setPropIdx(propIdx + 1);
|
|
22326
22217
|
} else if (slots.length > 0) {
|
|
22327
22218
|
setInSlots(true);
|
|
22328
22219
|
setSlotIdx(0);
|
|
@@ -22343,9 +22234,9 @@ function FieldEditor({
|
|
|
22343
22234
|
return;
|
|
22344
22235
|
}
|
|
22345
22236
|
if (key.downArrow || input === "j") {
|
|
22346
|
-
if (
|
|
22237
|
+
if (props.length > 0) {
|
|
22347
22238
|
setFocusLevel("prop");
|
|
22348
|
-
setPropIdx(
|
|
22239
|
+
setPropIdx(0);
|
|
22349
22240
|
setInSlots(false);
|
|
22350
22241
|
setInComponentDesc(false);
|
|
22351
22242
|
} else if (slots.length > 0) {
|
|
@@ -22368,9 +22259,9 @@ function FieldEditor({
|
|
|
22368
22259
|
if (key.upArrow || input === "k") {
|
|
22369
22260
|
if (slotIdx > 0) {
|
|
22370
22261
|
setSlotIdx(slotIdx - 1);
|
|
22371
|
-
} else if (
|
|
22262
|
+
} else if (props.length > 0) {
|
|
22372
22263
|
setInSlots(false);
|
|
22373
|
-
setPropIdx(
|
|
22264
|
+
setPropIdx(props.length - 1);
|
|
22374
22265
|
setFocusLevel("prop");
|
|
22375
22266
|
}
|
|
22376
22267
|
return;
|
|
@@ -22715,9 +22606,9 @@ function FieldEditor({
|
|
|
22715
22606
|
})();
|
|
22716
22607
|
const rows = [];
|
|
22717
22608
|
rows.push({ kind: "component-description" });
|
|
22718
|
-
if (
|
|
22719
|
-
rows.push({ kind: "header", label: `\u2500\u2500 PROPERTIES (${
|
|
22720
|
-
|
|
22609
|
+
if (props.length > 0) {
|
|
22610
|
+
rows.push({ kind: "header", label: `\u2500\u2500 PROPERTIES (${props.length}) `, section: "properties" });
|
|
22611
|
+
props.forEach((_, i) => rows.push({ kind: "prop", idx: i }));
|
|
22721
22612
|
}
|
|
22722
22613
|
if (slots.length > 0) {
|
|
22723
22614
|
rows.push({ kind: "header", label: `\u2500\u2500 SLOTS (${slots.length}) `, section: "slots" });
|
|
@@ -23709,7 +23600,6 @@ function GenerateReviewStep({
|
|
|
23709
23600
|
const [showFinalize, setShowFinalize] = useState26(false);
|
|
23710
23601
|
const [showQuit, setShowQuit] = useState26(false);
|
|
23711
23602
|
const [showJson, setShowJson] = useState26(false);
|
|
23712
|
-
const [showHiddenProps, setShowHiddenProps] = useState26(false);
|
|
23713
23603
|
const [draftValue, setDraftValue] = useState26("");
|
|
23714
23604
|
const [saveError, setSaveError] = useState26(null);
|
|
23715
23605
|
const [finalizeError, setFinalizeError] = useState26(initialFinalizeError);
|
|
@@ -24659,7 +24549,7 @@ function GenerateReviewStep({
|
|
|
24659
24549
|
}
|
|
24660
24550
|
if (!sidebarFocused && showJson) {
|
|
24661
24551
|
const current = components[selectedIdx];
|
|
24662
|
-
const currentJson =
|
|
24552
|
+
const currentJson = current ? JSON.stringify({ [current.key]: current.entry }, null, 2) : "";
|
|
24663
24553
|
const totalLines = currentJson.split("\n").length;
|
|
24664
24554
|
const maxOffset = Math.max(0, totalLines - PANEL_HEIGHT);
|
|
24665
24555
|
if (input === "g" && !key.ctrl) {
|
|
@@ -24796,12 +24686,6 @@ function GenerateReviewStep({
|
|
|
24796
24686
|
pendingGRef.current = false;
|
|
24797
24687
|
return;
|
|
24798
24688
|
}
|
|
24799
|
-
if (input === "H") {
|
|
24800
|
-
setShowHiddenProps((prev) => !prev);
|
|
24801
|
-
setJsonScrollOffset(0);
|
|
24802
|
-
pendingGRef.current = false;
|
|
24803
|
-
return;
|
|
24804
|
-
}
|
|
24805
24689
|
if (key.return) {
|
|
24806
24690
|
const current = components[selectedIdx];
|
|
24807
24691
|
if (!current) return;
|
|
@@ -24902,7 +24786,6 @@ function GenerateReviewStep({
|
|
|
24902
24786
|
}
|
|
24903
24787
|
const selected = components[selectedIdx] ?? null;
|
|
24904
24788
|
const selectedJson = selected ? JSON.stringify({ [selected.key]: selected.entry }, null, 2) : "";
|
|
24905
|
-
const visibleJsonPanelValue = getReviewJsonPanelValue(selected, showHiddenProps);
|
|
24906
24789
|
const isEmpty2 = (c2) => Object.keys(c2.entry.$properties).length === 0 && Object.keys(c2.entry.$slots ?? {}).length === 0;
|
|
24907
24790
|
const emptyCount = components.filter(isEmpty2).length;
|
|
24908
24791
|
const cycleParticipantSet = cycleView.structural;
|
|
@@ -25224,7 +25107,7 @@ function GenerateReviewStep({
|
|
|
25224
25107
|
JsonPanel,
|
|
25225
25108
|
{
|
|
25226
25109
|
label: "GENERATED DEFINITION (read-only)",
|
|
25227
|
-
value:
|
|
25110
|
+
value: selectedJson,
|
|
25228
25111
|
scrollOffset: jsonScrollOffset,
|
|
25229
25112
|
width: panelWidth,
|
|
25230
25113
|
height: PANEL_HEIGHT,
|
|
@@ -25234,7 +25117,6 @@ function GenerateReviewStep({
|
|
|
25234
25117
|
FieldEditor,
|
|
25235
25118
|
{
|
|
25236
25119
|
value: draftValue || selectedJson,
|
|
25237
|
-
showHiddenProps,
|
|
25238
25120
|
width: panelWidth,
|
|
25239
25121
|
height: PANEL_HEIGHT,
|
|
25240
25122
|
active: !sidebarFocused,
|
|
@@ -25318,7 +25200,6 @@ function GenerateReviewStep({
|
|
|
25318
25200
|
legendEntry("[P]", "component rationale", panelOpen === "component-rationale"),
|
|
25319
25201
|
legendEntry("[s]", "source", panelOpen === "source"),
|
|
25320
25202
|
legendEntry("[J]", showJson ? "hide JSON" : "show JSON", showJson),
|
|
25321
|
-
legendEntry("[H]", showHiddenProps ? "hide state/unattached" : "show state/unattached", showHiddenProps),
|
|
25322
25203
|
breakingChanges.length > 0 && legendEntry("[b]", "see breaking changes", breakingPanel.isOpen),
|
|
25323
25204
|
removedComponents.length > 0 && legendEntry("[d]", removedBannerCollapsed ? "show removed" : "hide removed", !removedBannerCollapsed),
|
|
25324
25205
|
legendEntry("[/]", "search", searchOpen || searchQuery.length > 0),
|
|
@@ -25349,7 +25230,6 @@ var init_GenerateReviewStep = __esm({
|
|
|
25349
25230
|
"packages/experience-design-system-cli/src/import/tui/steps/GenerateReviewStep.tsx"() {
|
|
25350
25231
|
"use strict";
|
|
25351
25232
|
init_theme();
|
|
25352
|
-
init_review_json_panel();
|
|
25353
25233
|
init_GroupedSidebar();
|
|
25354
25234
|
init_composite_closure();
|
|
25355
25235
|
init_slot_graph();
|
|
@@ -25500,7 +25380,6 @@ function AtomicGenerateReviewStep({
|
|
|
25500
25380
|
const [showFinalize, setShowFinalize] = useState27(false);
|
|
25501
25381
|
const [showQuit, setShowQuit] = useState27(false);
|
|
25502
25382
|
const [showJson, setShowJson] = useState27(false);
|
|
25503
|
-
const [showHiddenProps, setShowHiddenProps] = useState27(false);
|
|
25504
25383
|
const [draftValue, setDraftValue] = useState27("");
|
|
25505
25384
|
const [saveError, setSaveError] = useState27(null);
|
|
25506
25385
|
const [finalizeError, setFinalizeError] = useState27(initialFinalizeError);
|
|
@@ -25864,7 +25743,7 @@ function AtomicGenerateReviewStep({
|
|
|
25864
25743
|
}
|
|
25865
25744
|
if (!sidebarFocused && showJson) {
|
|
25866
25745
|
const current = components[selectedIdx];
|
|
25867
|
-
const currentJson =
|
|
25746
|
+
const currentJson = current ? JSON.stringify({ [current.key]: current.entry }, null, 2) : "";
|
|
25868
25747
|
const totalLines = currentJson.split("\n").length;
|
|
25869
25748
|
const maxOffset = Math.max(0, totalLines - PANEL_HEIGHT2);
|
|
25870
25749
|
if (input === "g" && !key.ctrl) {
|
|
@@ -25920,12 +25799,6 @@ function AtomicGenerateReviewStep({
|
|
|
25920
25799
|
pendingGRef.current = false;
|
|
25921
25800
|
return;
|
|
25922
25801
|
}
|
|
25923
|
-
if (input === "H") {
|
|
25924
|
-
setShowHiddenProps((prev) => !prev);
|
|
25925
|
-
setJsonScrollOffset(0);
|
|
25926
|
-
pendingGRef.current = false;
|
|
25927
|
-
return;
|
|
25928
|
-
}
|
|
25929
25802
|
if (key.upArrow || input === "k") {
|
|
25930
25803
|
setSelectedIdx((prev) => {
|
|
25931
25804
|
const newIdx = Math.max(0, prev - 1);
|
|
@@ -25958,7 +25831,6 @@ function AtomicGenerateReviewStep({
|
|
|
25958
25831
|
}
|
|
25959
25832
|
const selected = components[selectedIdx] ?? null;
|
|
25960
25833
|
const selectedJson = selected ? JSON.stringify({ [selected.key]: selected.entry }, null, 2) : "";
|
|
25961
|
-
const visibleJsonPanelValue = getReviewJsonPanelValue(selected, showHiddenProps);
|
|
25962
25834
|
const isEmpty2 = (c2) => Object.keys(c2.entry.$properties).length === 0;
|
|
25963
25835
|
const emptyCount = components.filter(isEmpty2).length;
|
|
25964
25836
|
const sidebarItems = components.map((c2) => ({
|
|
@@ -26134,7 +26006,7 @@ function AtomicGenerateReviewStep({
|
|
|
26134
26006
|
JsonPanel,
|
|
26135
26007
|
{
|
|
26136
26008
|
label: "GENERATED DEFINITION (read-only)",
|
|
26137
|
-
value:
|
|
26009
|
+
value: selectedJson,
|
|
26138
26010
|
scrollOffset: jsonScrollOffset,
|
|
26139
26011
|
width: panelWidth,
|
|
26140
26012
|
height: PANEL_HEIGHT2,
|
|
@@ -26144,7 +26016,6 @@ function AtomicGenerateReviewStep({
|
|
|
26144
26016
|
FieldEditor,
|
|
26145
26017
|
{
|
|
26146
26018
|
value: draftValue || selectedJson,
|
|
26147
|
-
showHiddenProps,
|
|
26148
26019
|
width: panelWidth,
|
|
26149
26020
|
height: PANEL_HEIGHT2,
|
|
26150
26021
|
active: !sidebarFocused,
|
|
@@ -26175,7 +26046,7 @@ function AtomicGenerateReviewStep({
|
|
|
26175
26046
|
),
|
|
26176
26047
|
saveError && /* @__PURE__ */ jsx48(Text47, { color: PALETTE.error, children: "\u2717 " + saveError }),
|
|
26177
26048
|
/* @__PURE__ */ jsxs47(Text47, { dimColor: true, children: [
|
|
26178
|
-
sidebarFocused ? " [a] accept [r] reject [A] accept all [i] prop rationale [I] component rationale [s] source [J] " + (showJson ? "hide JSON" : "show JSON") + " [
|
|
26049
|
+
sidebarFocused ? " [a] accept [r] reject [A] accept all [i] prop rationale [I] component rationale [s] source [J] " + (showJson ? "hide JSON" : "show JSON") + " [^z] undo [^y] redo [^r] reload [F] finalize [e/Tab] focus panel" + (livePreview && removedComponents.length > 0 ? " [d] removed list" : "") + " [q] quit" : showJson ? " [j/k] scroll [Ctrl+u/d] half-page [gg/G] top/bottom [Tab] focus list" : " [Tab] focus list (edit fields)",
|
|
26179
26050
|
livePreviewHook.status === "running" && /* @__PURE__ */ jsx48(Text47, { children: ` ${livePreviewSpinner} live preview` }),
|
|
26180
26051
|
livePreviewHook.disabled && /* @__PURE__ */ jsx48(Text47, { children: " \xB7 live preview disabled" })
|
|
26181
26052
|
] })
|
|
@@ -26222,7 +26093,6 @@ var init_AtomicGenerateReviewStep = __esm({
|
|
|
26222
26093
|
init_useFinalizePreview();
|
|
26223
26094
|
init_scroll_offset();
|
|
26224
26095
|
init_theme();
|
|
26225
|
-
init_review_json_panel();
|
|
26226
26096
|
VISIBLE_COUNT3 = 20;
|
|
26227
26097
|
PANEL_HEIGHT2 = 22;
|
|
26228
26098
|
}
|
|
@@ -31477,7 +31347,7 @@ async function runGenerateSkill(skill, opts, verbose = false) {
|
|
|
31477
31347
|
const allOk = failed.length === 0;
|
|
31478
31348
|
const cachedNote = cachedResults.length > 0 ? c.dim(` (${cachedResults.length} cached)`) : "";
|
|
31479
31349
|
process.stderr.write(
|
|
31480
|
-
(allOk ? c.green("\u2713") : c.yellow("\u26A0")) + ` ${generated.length + cachedResults.length}/${componentResults.length} components` + cachedNote + c.dim(` ${totalClassified} classified, ${totalExcluded}
|
|
31350
|
+
(allOk ? c.green("\u2713") : c.yellow("\u26A0")) + ` ${generated.length + cachedResults.length}/${componentResults.length} components` + cachedNote + c.dim(` ${totalClassified} classified, ${totalExcluded} excluded`) + "\n"
|
|
31481
31351
|
);
|
|
31482
31352
|
process.stdout.write(`renamed-slots: ${totalRenamedSlots}
|
|
31483
31353
|
`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-cli",
|
|
3
|
-
"version": "2.26.7-dev-build-
|
|
3
|
+
"version": "2.26.7-dev-build-245a014.0",
|
|
4
4
|
"description": "Contentful Experiences design system import CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"svelte": "^5.56.4",
|
|
40
40
|
"ts-morph": "^27.0.2",
|
|
41
41
|
"typescript": "^5.9.3",
|
|
42
|
-
"@contentful/experience-design-system-types": "2.26.7-dev-build-
|
|
42
|
+
"@contentful/experience-design-system-types": "2.26.7-dev-build-245a014.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@tsconfig/node24": "^24.0.4",
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"ink-testing-library": "^4.0.0",
|
|
52
52
|
"typescript-eslint": "^8.67.0",
|
|
53
53
|
"vitest": "^4.0.16",
|
|
54
|
-
"@contentful/experience-design-system-
|
|
55
|
-
"@contentful/experience-design-system-
|
|
56
|
-
"@contentful/experience-design-system-
|
|
54
|
+
"@contentful/experience-design-system-client": "2.26.7-dev-build-245a014.0",
|
|
55
|
+
"@contentful/experience-design-system-extraction": "2.26.7-dev-build-245a014.0",
|
|
56
|
+
"@contentful/experience-design-system-generation": "2.26.7-dev-build-245a014.0"
|
|
57
57
|
},
|
|
58
58
|
"repository": {
|
|
59
59
|
"type": "git",
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { CDFComponentEntry } from '@contentful/experience-design-system-types';
|
|
2
|
-
type ReviewJsonComponent = {
|
|
3
|
-
key: string;
|
|
4
|
-
entry: CDFComponentEntry;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* Builds the exact JSON string rendered by the read-only review panel.
|
|
8
|
-
*
|
|
9
|
-
* The FieldEditor intentionally continues to use the unfiltered component
|
|
10
|
-
* definition so toggling the panel never changes what an operator can save.
|
|
11
|
-
*/
|
|
12
|
-
export declare function getReviewJsonPanelValue(selected: ReviewJsonComponent | null, showHiddenProps: boolean): string;
|
|
13
|
-
export {};
|