@contentful/experience-design-system-cli 2.37.1-dev-build-daf63213.0 → 2.37.1-dev-build-f22bf3b7.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/app.d.ts +1 -1
- package/dist/app.js +1148 -591
- package/dist/index.js +1984 -480
- package/dist/package.json +1 -1
- package/dist/src/tui/settings/configuration/agents/AgentDetail.d.ts +3 -1
- package/dist/src/tui/settings/configuration/agents/agent-debug.d.ts +25 -0
- package/dist/src/tui/settings/shared/debug-trail.d.ts +35 -0
- package/package.json +3 -3
- package/dist/src/tui/upgrade/PageContainer.d.ts +0 -4
- /package/dist/src/tui/{upgrade → home}/version.d.ts +0 -0
package/dist/index.js
CHANGED
|
@@ -9164,8 +9164,8 @@ function extractAccessorProperties(classDecl, applyRuntimeFieldDenylist = false)
|
|
|
9164
9164
|
accessors.set(name, entry);
|
|
9165
9165
|
}
|
|
9166
9166
|
for (const [name, { getter, setter }] of accessors) {
|
|
9167
|
-
const
|
|
9168
|
-
if (!
|
|
9167
|
+
const hasPropertyDecorator2 = getter?.getDecorators().some((decorator) => decorator.getName() === "property") || setter?.getDecorators().some((decorator) => decorator.getName() === "property");
|
|
9168
|
+
if (!hasPropertyDecorator2 && !(getter && setter))
|
|
9169
9169
|
continue;
|
|
9170
9170
|
const type = getter?.getReturnTypeNode()?.getText() ?? setter?.getParameters()[0]?.getTypeNode()?.getText() ?? "any";
|
|
9171
9171
|
const accessorNode = getter ?? setter;
|
|
@@ -12979,9 +12979,9 @@ function generateUlid(now = Date.now()) {
|
|
|
12979
12979
|
tsBytes[i] = n & 255;
|
|
12980
12980
|
n = Math.floor(n / 256);
|
|
12981
12981
|
}
|
|
12982
|
-
const
|
|
12982
|
+
const ts6 = encodeBase32(tsBytes, 10);
|
|
12983
12983
|
const rand = encodeBase32(randomBytes2(10), 16);
|
|
12984
|
-
return (
|
|
12984
|
+
return (ts6 + rand).toUpperCase();
|
|
12985
12985
|
}
|
|
12986
12986
|
var CROCKFORD;
|
|
12987
12987
|
var init_generate_ulid = __esm({
|
|
@@ -16475,7 +16475,1506 @@ var init_component = __esm({
|
|
|
16475
16475
|
}
|
|
16476
16476
|
});
|
|
16477
16477
|
|
|
16478
|
-
// packages/experience-design-system-
|
|
16478
|
+
// packages/experience-design-system-extraction/dist/src/extract/types/display.js
|
|
16479
|
+
var init_display = __esm({
|
|
16480
|
+
"packages/experience-design-system-extraction/dist/src/extract/types/display.js"() {
|
|
16481
|
+
"use strict";
|
|
16482
|
+
}
|
|
16483
|
+
});
|
|
16484
|
+
|
|
16485
|
+
// packages/experience-design-system-extraction/dist/src/extract/services/deduplication/helpers/component-path-analysis.js
|
|
16486
|
+
var init_component_path_analysis = __esm({
|
|
16487
|
+
"packages/experience-design-system-extraction/dist/src/extract/services/deduplication/helpers/component-path-analysis.js"() {
|
|
16488
|
+
"use strict";
|
|
16489
|
+
}
|
|
16490
|
+
});
|
|
16491
|
+
|
|
16492
|
+
// packages/experience-design-system-extraction/dist/src/extract/services/deduplication/helpers/component-path-scoring.js
|
|
16493
|
+
var init_component_path_scoring = __esm({
|
|
16494
|
+
"packages/experience-design-system-extraction/dist/src/extract/services/deduplication/helpers/component-path-scoring.js"() {
|
|
16495
|
+
"use strict";
|
|
16496
|
+
init_component_path_analysis();
|
|
16497
|
+
}
|
|
16498
|
+
});
|
|
16499
|
+
|
|
16500
|
+
// packages/experience-design-system-extraction/dist/src/extract/services/deduplication/deduplicate-components.js
|
|
16501
|
+
var init_deduplicate_components = __esm({
|
|
16502
|
+
"packages/experience-design-system-extraction/dist/src/extract/services/deduplication/deduplicate-components.js"() {
|
|
16503
|
+
"use strict";
|
|
16504
|
+
init_component_path_scoring();
|
|
16505
|
+
}
|
|
16506
|
+
});
|
|
16507
|
+
|
|
16508
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/shared/helpers/file-processing/file-workers.js
|
|
16509
|
+
var init_file_workers = __esm({
|
|
16510
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/shared/helpers/file-processing/file-workers.js"() {
|
|
16511
|
+
"use strict";
|
|
16512
|
+
}
|
|
16513
|
+
});
|
|
16514
|
+
|
|
16515
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/shared/helpers/file-processing/result-normalizer.js
|
|
16516
|
+
var init_result_normalizer = __esm({
|
|
16517
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/shared/helpers/file-processing/result-normalizer.js"() {
|
|
16518
|
+
"use strict";
|
|
16519
|
+
}
|
|
16520
|
+
});
|
|
16521
|
+
|
|
16522
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/shared/helpers/resolve-type-symbol.js
|
|
16523
|
+
var init_resolve_type_symbol = __esm({
|
|
16524
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/shared/helpers/resolve-type-symbol.js"() {
|
|
16525
|
+
"use strict";
|
|
16526
|
+
}
|
|
16527
|
+
});
|
|
16528
|
+
|
|
16529
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/shared/helpers/get-node-source-lines.js
|
|
16530
|
+
var init_get_node_source_lines = __esm({
|
|
16531
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/shared/helpers/get-node-source-lines.js"() {
|
|
16532
|
+
"use strict";
|
|
16533
|
+
}
|
|
16534
|
+
});
|
|
16535
|
+
|
|
16536
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/astro/helpers/collect-astro-props-bindings.js
|
|
16537
|
+
import { Node as Node10, Project as Project7 } from "ts-morph";
|
|
16538
|
+
var init_collect_astro_props_bindings = __esm({
|
|
16539
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/astro/helpers/collect-astro-props-bindings.js"() {
|
|
16540
|
+
"use strict";
|
|
16541
|
+
}
|
|
16542
|
+
});
|
|
16543
|
+
|
|
16544
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/astro/frontmatter.js
|
|
16545
|
+
var init_frontmatter = __esm({
|
|
16546
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/astro/frontmatter.js"() {
|
|
16547
|
+
"use strict";
|
|
16548
|
+
init_resolve_type_symbol();
|
|
16549
|
+
init_get_node_source_lines();
|
|
16550
|
+
init_collect_astro_props_bindings();
|
|
16551
|
+
}
|
|
16552
|
+
});
|
|
16553
|
+
|
|
16554
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/astro/slots.js
|
|
16555
|
+
var init_slots = __esm({
|
|
16556
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/astro/slots.js"() {
|
|
16557
|
+
"use strict";
|
|
16558
|
+
}
|
|
16559
|
+
});
|
|
16560
|
+
|
|
16561
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/astro/extractor.js
|
|
16562
|
+
var init_extractor = __esm({
|
|
16563
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/astro/extractor.js"() {
|
|
16564
|
+
"use strict";
|
|
16565
|
+
init_file_workers();
|
|
16566
|
+
init_result_normalizer();
|
|
16567
|
+
init_frontmatter();
|
|
16568
|
+
init_slots();
|
|
16569
|
+
}
|
|
16570
|
+
});
|
|
16571
|
+
|
|
16572
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/shared/helpers/resolve-tsx-tsconfig-path.js
|
|
16573
|
+
import ts3 from "typescript";
|
|
16574
|
+
var init_resolve_tsx_tsconfig_path = __esm({
|
|
16575
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/shared/helpers/resolve-tsx-tsconfig-path.js"() {
|
|
16576
|
+
"use strict";
|
|
16577
|
+
}
|
|
16578
|
+
});
|
|
16579
|
+
|
|
16580
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/shared/helpers/find-tsx-workspace-package.js
|
|
16581
|
+
var init_find_tsx_workspace_package = __esm({
|
|
16582
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/shared/helpers/find-tsx-workspace-package.js"() {
|
|
16583
|
+
"use strict";
|
|
16584
|
+
}
|
|
16585
|
+
});
|
|
16586
|
+
|
|
16587
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/shared/helpers/resolve-tsx-workspace-imports.js
|
|
16588
|
+
import { Node as Node11 } from "ts-morph";
|
|
16589
|
+
var init_resolve_tsx_workspace_imports = __esm({
|
|
16590
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/shared/helpers/resolve-tsx-workspace-imports.js"() {
|
|
16591
|
+
"use strict";
|
|
16592
|
+
init_resolve_tsx_tsconfig_path();
|
|
16593
|
+
init_find_tsx_workspace_package();
|
|
16594
|
+
}
|
|
16595
|
+
});
|
|
16596
|
+
|
|
16597
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/shared/helpers/tsx-node-utils.js
|
|
16598
|
+
import { Node as Node12, SyntaxKind as SyntaxKind7 } from "ts-morph";
|
|
16599
|
+
var init_tsx_node_utils = __esm({
|
|
16600
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/shared/helpers/tsx-node-utils.js"() {
|
|
16601
|
+
"use strict";
|
|
16602
|
+
init_resolve_tsx_workspace_imports();
|
|
16603
|
+
}
|
|
16604
|
+
});
|
|
16605
|
+
|
|
16606
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/shared/helpers/tsx-renderable-exports.js
|
|
16607
|
+
import { Node as Node13 } from "ts-morph";
|
|
16608
|
+
var init_tsx_renderable_exports = __esm({
|
|
16609
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/shared/helpers/tsx-renderable-exports.js"() {
|
|
16610
|
+
"use strict";
|
|
16611
|
+
}
|
|
16612
|
+
});
|
|
16613
|
+
|
|
16614
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/shared/helpers/tsx-shared.js
|
|
16615
|
+
import { Project as Project8 } from "ts-morph";
|
|
16616
|
+
var init_tsx_shared = __esm({
|
|
16617
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/shared/helpers/tsx-shared.js"() {
|
|
16618
|
+
"use strict";
|
|
16619
|
+
init_tsx_node_utils();
|
|
16620
|
+
init_tsx_renderable_exports();
|
|
16621
|
+
}
|
|
16622
|
+
});
|
|
16623
|
+
|
|
16624
|
+
// packages/experience-design-system-extraction/dist/src/extract/helpers/evidence/collect-allowed-component-names.js
|
|
16625
|
+
var init_collect_allowed_component_names = __esm({
|
|
16626
|
+
"packages/experience-design-system-extraction/dist/src/extract/helpers/evidence/collect-allowed-component-names.js"() {
|
|
16627
|
+
"use strict";
|
|
16628
|
+
}
|
|
16629
|
+
});
|
|
16630
|
+
|
|
16631
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/shared/helpers/build-component-lookup-maps.js
|
|
16632
|
+
var init_build_component_lookup_maps = __esm({
|
|
16633
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/shared/helpers/build-component-lookup-maps.js"() {
|
|
16634
|
+
"use strict";
|
|
16635
|
+
}
|
|
16636
|
+
});
|
|
16637
|
+
|
|
16638
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/extract-react-allowed-components.js
|
|
16639
|
+
var init_extract_react_allowed_components = __esm({
|
|
16640
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/extract-react-allowed-components.js"() {
|
|
16641
|
+
"use strict";
|
|
16642
|
+
init_collect_allowed_component_names();
|
|
16643
|
+
init_build_component_lookup_maps();
|
|
16644
|
+
}
|
|
16645
|
+
});
|
|
16646
|
+
|
|
16647
|
+
// packages/experience-design-system-extraction/dist/src/extract/helpers/evidence/ast/get-jsx-ast-data.js
|
|
16648
|
+
import { Node as Node14 } from "ts-morph";
|
|
16649
|
+
var init_get_jsx_ast_data = __esm({
|
|
16650
|
+
"packages/experience-design-system-extraction/dist/src/extract/helpers/evidence/ast/get-jsx-ast-data.js"() {
|
|
16651
|
+
"use strict";
|
|
16652
|
+
}
|
|
16653
|
+
});
|
|
16654
|
+
|
|
16655
|
+
// packages/experience-design-system-extraction/dist/src/extract/helpers/evidence/ast/collect-structural-jsx-evidence.js
|
|
16656
|
+
import { SyntaxKind as SyntaxKind8 } from "ts-morph";
|
|
16657
|
+
var init_collect_structural_jsx_evidence = __esm({
|
|
16658
|
+
"packages/experience-design-system-extraction/dist/src/extract/helpers/evidence/ast/collect-structural-jsx-evidence.js"() {
|
|
16659
|
+
"use strict";
|
|
16660
|
+
init_tsx_shared();
|
|
16661
|
+
init_get_jsx_ast_data();
|
|
16662
|
+
}
|
|
16663
|
+
});
|
|
16664
|
+
|
|
16665
|
+
// packages/experience-design-system-extraction/dist/src/extract/helpers/evidence/collect-jsx-component-references.js
|
|
16666
|
+
import { Node as Node15, SyntaxKind as SyntaxKind9 } from "ts-morph";
|
|
16667
|
+
var init_collect_jsx_component_references = __esm({
|
|
16668
|
+
"packages/experience-design-system-extraction/dist/src/extract/helpers/evidence/collect-jsx-component-references.js"() {
|
|
16669
|
+
"use strict";
|
|
16670
|
+
init_collect_allowed_component_names();
|
|
16671
|
+
init_get_jsx_ast_data();
|
|
16672
|
+
init_collect_structural_jsx_evidence();
|
|
16673
|
+
}
|
|
16674
|
+
});
|
|
16675
|
+
|
|
16676
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/synthesize-react-structural-slots.js
|
|
16677
|
+
var init_synthesize_react_structural_slots = __esm({
|
|
16678
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/synthesize-react-structural-slots.js"() {
|
|
16679
|
+
"use strict";
|
|
16680
|
+
init_collect_jsx_component_references();
|
|
16681
|
+
init_build_component_lookup_maps();
|
|
16682
|
+
}
|
|
16683
|
+
});
|
|
16684
|
+
|
|
16685
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/resolve-react-prop-forwarding.js
|
|
16686
|
+
var init_resolve_react_prop_forwarding = __esm({
|
|
16687
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/resolve-react-prop-forwarding.js"() {
|
|
16688
|
+
"use strict";
|
|
16689
|
+
}
|
|
16690
|
+
});
|
|
16691
|
+
|
|
16692
|
+
// packages/experience-design-system-extraction/dist/src/extract/helpers/evidence/ast/detect-react-node-types.js
|
|
16693
|
+
var init_detect_react_node_types = __esm({
|
|
16694
|
+
"packages/experience-design-system-extraction/dist/src/extract/helpers/evidence/ast/detect-react-node-types.js"() {
|
|
16695
|
+
"use strict";
|
|
16696
|
+
}
|
|
16697
|
+
});
|
|
16698
|
+
|
|
16699
|
+
// packages/experience-design-system-extraction/dist/src/extract/helpers/evidence/detect-slot-from-prop.js
|
|
16700
|
+
var init_detect_slot_from_prop = __esm({
|
|
16701
|
+
"packages/experience-design-system-extraction/dist/src/extract/helpers/evidence/detect-slot-from-prop.js"() {
|
|
16702
|
+
"use strict";
|
|
16703
|
+
init_detect_react_node_types();
|
|
16704
|
+
init_detect_react_node_types();
|
|
16705
|
+
}
|
|
16706
|
+
});
|
|
16707
|
+
|
|
16708
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/resolve-component-function.js
|
|
16709
|
+
import { Node as Node16 } from "ts-morph";
|
|
16710
|
+
var init_resolve_component_function = __esm({
|
|
16711
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/resolve-component-function.js"() {
|
|
16712
|
+
"use strict";
|
|
16713
|
+
init_tsx_shared();
|
|
16714
|
+
}
|
|
16715
|
+
});
|
|
16716
|
+
|
|
16717
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/collect-prop-dataflow.js
|
|
16718
|
+
import { Node as Node17, SyntaxKind as SyntaxKind10 } from "ts-morph";
|
|
16719
|
+
var init_collect_prop_dataflow = __esm({
|
|
16720
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/collect-prop-dataflow.js"() {
|
|
16721
|
+
"use strict";
|
|
16722
|
+
init_tsx_shared();
|
|
16723
|
+
init_resolve_component_function();
|
|
16724
|
+
}
|
|
16725
|
+
});
|
|
16726
|
+
|
|
16727
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/extract-react-slots.js
|
|
16728
|
+
var init_extract_react_slots = __esm({
|
|
16729
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/extract-react-slots.js"() {
|
|
16730
|
+
"use strict";
|
|
16731
|
+
}
|
|
16732
|
+
});
|
|
16733
|
+
|
|
16734
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/dom-attribute-surfaces.js
|
|
16735
|
+
import { Node as Node18 } from "ts-morph";
|
|
16736
|
+
function createTextControlSurface2(onChangeType, specificProps) {
|
|
16737
|
+
return [
|
|
16738
|
+
{ name: "autoComplete", type: "string", required: false },
|
|
16739
|
+
...specificProps,
|
|
16740
|
+
{ name: "disabled", type: "boolean", required: false },
|
|
16741
|
+
{ name: "name", type: "string", required: false },
|
|
16742
|
+
{ name: "onChange", type: onChangeType, required: false },
|
|
16743
|
+
{ name: "placeholder", type: "string", required: false },
|
|
16744
|
+
{ name: "readOnly", type: "boolean", required: false },
|
|
16745
|
+
{ name: "required", type: "boolean", required: false },
|
|
16746
|
+
{
|
|
16747
|
+
name: "value",
|
|
16748
|
+
type: "string | number | readonly string[]",
|
|
16749
|
+
required: false
|
|
16750
|
+
}
|
|
16751
|
+
];
|
|
16752
|
+
}
|
|
16753
|
+
var DOM_ATTRIBUTE_PROP_SURFACES2;
|
|
16754
|
+
var init_dom_attribute_surfaces = __esm({
|
|
16755
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/dom-attribute-surfaces.js"() {
|
|
16756
|
+
"use strict";
|
|
16757
|
+
DOM_ATTRIBUTE_PROP_SURFACES2 = {
|
|
16758
|
+
HTMLProps: [],
|
|
16759
|
+
HTMLAttributes: [
|
|
16760
|
+
{ name: "className", type: "string", required: false },
|
|
16761
|
+
{ name: "hidden", type: "boolean", required: false },
|
|
16762
|
+
{ name: "id", type: "string", required: false },
|
|
16763
|
+
{
|
|
16764
|
+
name: "onClick",
|
|
16765
|
+
type: "MouseEventHandler<HTMLElement>",
|
|
16766
|
+
required: false
|
|
16767
|
+
},
|
|
16768
|
+
{ name: "style", type: "CSSProperties", required: false },
|
|
16769
|
+
{ name: "tabIndex", type: "number", required: false },
|
|
16770
|
+
{ name: "title", type: "string", required: false }
|
|
16771
|
+
],
|
|
16772
|
+
ImgHTMLAttributes: [
|
|
16773
|
+
{ name: "alt", type: "string", required: false },
|
|
16774
|
+
{ name: "crossOrigin", type: "string", required: false },
|
|
16775
|
+
{ name: "height", type: "number | string", required: false },
|
|
16776
|
+
{
|
|
16777
|
+
name: "loading",
|
|
16778
|
+
type: "string",
|
|
16779
|
+
required: false,
|
|
16780
|
+
allowedValues: ["eager", "lazy"]
|
|
16781
|
+
},
|
|
16782
|
+
{ name: "sizes", type: "string", required: false },
|
|
16783
|
+
{ name: "src", type: "string", required: false },
|
|
16784
|
+
{ name: "srcSet", type: "string", required: false },
|
|
16785
|
+
{ name: "width", type: "number | string", required: false }
|
|
16786
|
+
],
|
|
16787
|
+
LiHTMLAttributes: [],
|
|
16788
|
+
AnchorHTMLAttributes: [
|
|
16789
|
+
{ name: "download", type: "boolean | string", required: false },
|
|
16790
|
+
{ name: "href", type: "string", required: false },
|
|
16791
|
+
{ name: "hrefLang", type: "string", required: false },
|
|
16792
|
+
{ name: "referrerPolicy", type: "string", required: false },
|
|
16793
|
+
{ name: "rel", type: "string", required: false },
|
|
16794
|
+
{
|
|
16795
|
+
name: "target",
|
|
16796
|
+
type: "string",
|
|
16797
|
+
required: false,
|
|
16798
|
+
allowedValues: ["_blank", "_parent", "_self", "_top"]
|
|
16799
|
+
}
|
|
16800
|
+
],
|
|
16801
|
+
ButtonHTMLAttributes: [
|
|
16802
|
+
{ name: "autoFocus", type: "boolean", required: false },
|
|
16803
|
+
{ name: "disabled", type: "boolean", required: false },
|
|
16804
|
+
{ name: "form", type: "string", required: false },
|
|
16805
|
+
{ name: "formAction", type: "string", required: false },
|
|
16806
|
+
{ name: "formMethod", type: "string", required: false },
|
|
16807
|
+
{ name: "formNoValidate", type: "boolean", required: false },
|
|
16808
|
+
{ name: "formTarget", type: "string", required: false },
|
|
16809
|
+
{ name: "name", type: "string", required: false },
|
|
16810
|
+
{
|
|
16811
|
+
name: "type",
|
|
16812
|
+
type: "string",
|
|
16813
|
+
required: false,
|
|
16814
|
+
allowedValues: ["button", "reset", "submit"]
|
|
16815
|
+
},
|
|
16816
|
+
{
|
|
16817
|
+
name: "value",
|
|
16818
|
+
type: "string | number | readonly string[]",
|
|
16819
|
+
required: false
|
|
16820
|
+
}
|
|
16821
|
+
],
|
|
16822
|
+
InputHTMLAttributes: createTextControlSurface2("ChangeEventHandler<HTMLInputElement>", [
|
|
16823
|
+
{ name: "checked", type: "boolean", required: false },
|
|
16824
|
+
{ name: "max", type: "number | string", required: false },
|
|
16825
|
+
{ name: "maxLength", type: "number", required: false },
|
|
16826
|
+
{ name: "min", type: "number | string", required: false },
|
|
16827
|
+
{ name: "minLength", type: "number", required: false },
|
|
16828
|
+
{ name: "type", type: "string", required: false }
|
|
16829
|
+
]),
|
|
16830
|
+
FieldsetHTMLAttributes: [
|
|
16831
|
+
{ name: "disabled", type: "boolean", required: false },
|
|
16832
|
+
{ name: "form", type: "string", required: false },
|
|
16833
|
+
{ name: "name", type: "string", required: false }
|
|
16834
|
+
],
|
|
16835
|
+
LabelHTMLAttributes: [
|
|
16836
|
+
{ name: "form", type: "string", required: false },
|
|
16837
|
+
{ name: "htmlFor", type: "string", required: false }
|
|
16838
|
+
],
|
|
16839
|
+
SelectHTMLAttributes: [
|
|
16840
|
+
{ name: "autoComplete", type: "string", required: false },
|
|
16841
|
+
{ name: "disabled", type: "boolean", required: false },
|
|
16842
|
+
{ name: "form", type: "string", required: false },
|
|
16843
|
+
{ name: "multiple", type: "boolean", required: false },
|
|
16844
|
+
{ name: "name", type: "string", required: false },
|
|
16845
|
+
{
|
|
16846
|
+
name: "onChange",
|
|
16847
|
+
type: "ChangeEventHandler<HTMLSelectElement>",
|
|
16848
|
+
required: false
|
|
16849
|
+
},
|
|
16850
|
+
{ name: "required", type: "boolean", required: false },
|
|
16851
|
+
{ name: "size", type: "number", required: false },
|
|
16852
|
+
{
|
|
16853
|
+
name: "value",
|
|
16854
|
+
type: "string | number | readonly string[]",
|
|
16855
|
+
required: false
|
|
16856
|
+
}
|
|
16857
|
+
],
|
|
16858
|
+
SVGAttributes: [
|
|
16859
|
+
{
|
|
16860
|
+
name: "focusable",
|
|
16861
|
+
type: 'boolean | "auto"',
|
|
16862
|
+
required: false,
|
|
16863
|
+
allowedValues: ["auto"]
|
|
16864
|
+
},
|
|
16865
|
+
{ name: "height", type: "number | string", required: false },
|
|
16866
|
+
{ name: "viewBox", type: "string", required: false },
|
|
16867
|
+
{ name: "width", type: "number | string", required: false }
|
|
16868
|
+
],
|
|
16869
|
+
SVGProps: [],
|
|
16870
|
+
TextareaHTMLAttributes: createTextControlSurface2("ChangeEventHandler<HTMLTextAreaElement>", [
|
|
16871
|
+
{ name: "cols", type: "number", required: false },
|
|
16872
|
+
{ name: "rows", type: "number", required: false },
|
|
16873
|
+
{ name: "wrap", type: "string", required: false }
|
|
16874
|
+
]),
|
|
16875
|
+
TdHTMLAttributes: [
|
|
16876
|
+
{
|
|
16877
|
+
name: "align",
|
|
16878
|
+
type: "string",
|
|
16879
|
+
required: false,
|
|
16880
|
+
allowedValues: ["center", "char", "justify", "left", "right"]
|
|
16881
|
+
},
|
|
16882
|
+
{ name: "colSpan", type: "number", required: false },
|
|
16883
|
+
{ name: "headers", type: "string", required: false },
|
|
16884
|
+
{ name: "rowSpan", type: "number", required: false },
|
|
16885
|
+
{ name: "scope", type: "string", required: false }
|
|
16886
|
+
]
|
|
16887
|
+
};
|
|
16888
|
+
}
|
|
16889
|
+
});
|
|
16890
|
+
|
|
16891
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/collect-dom-wrapper-contexts.js
|
|
16892
|
+
import { Node as Node19 } from "ts-morph";
|
|
16893
|
+
var init_collect_dom_wrapper_contexts = __esm({
|
|
16894
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/collect-dom-wrapper-contexts.js"() {
|
|
16895
|
+
"use strict";
|
|
16896
|
+
init_tsx_shared();
|
|
16897
|
+
init_tsx_node_utils();
|
|
16898
|
+
init_dom_attribute_surfaces();
|
|
16899
|
+
}
|
|
16900
|
+
});
|
|
16901
|
+
|
|
16902
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/detect-dom-is-pure-wrapper.js
|
|
16903
|
+
import { Node as Node20 } from "ts-morph";
|
|
16904
|
+
var init_detect_dom_is_pure_wrapper = __esm({
|
|
16905
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/detect-dom-is-pure-wrapper.js"() {
|
|
16906
|
+
"use strict";
|
|
16907
|
+
init_tsx_shared();
|
|
16908
|
+
init_tsx_node_utils();
|
|
16909
|
+
init_dom_attribute_surfaces();
|
|
16910
|
+
}
|
|
16911
|
+
});
|
|
16912
|
+
|
|
16913
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/detect-omit-wrapped-custom-props.js
|
|
16914
|
+
import { Node as Node21 } from "ts-morph";
|
|
16915
|
+
var init_detect_omit_wrapped_custom_props = __esm({
|
|
16916
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/detect-omit-wrapped-custom-props.js"() {
|
|
16917
|
+
"use strict";
|
|
16918
|
+
init_tsx_shared();
|
|
16919
|
+
init_tsx_node_utils();
|
|
16920
|
+
init_detect_dom_is_pure_wrapper();
|
|
16921
|
+
}
|
|
16922
|
+
});
|
|
16923
|
+
|
|
16924
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/detect-pick-type-patterns.js
|
|
16925
|
+
import { Node as Node22 } from "ts-morph";
|
|
16926
|
+
var init_detect_pick_type_patterns = __esm({
|
|
16927
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/detect-pick-type-patterns.js"() {
|
|
16928
|
+
"use strict";
|
|
16929
|
+
init_tsx_shared();
|
|
16930
|
+
init_tsx_node_utils();
|
|
16931
|
+
init_detect_dom_type_patterns();
|
|
16932
|
+
}
|
|
16933
|
+
});
|
|
16934
|
+
|
|
16935
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/detect-dom-type-patterns.js
|
|
16936
|
+
var init_detect_dom_type_patterns = __esm({
|
|
16937
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/detect-dom-type-patterns.js"() {
|
|
16938
|
+
"use strict";
|
|
16939
|
+
init_dom_attribute_surfaces();
|
|
16940
|
+
init_collect_dom_wrapper_contexts();
|
|
16941
|
+
init_detect_dom_is_pure_wrapper();
|
|
16942
|
+
init_detect_omit_wrapped_custom_props();
|
|
16943
|
+
init_detect_pick_type_patterns();
|
|
16944
|
+
init_collect_dom_wrapper_contexts();
|
|
16945
|
+
}
|
|
16946
|
+
});
|
|
16947
|
+
|
|
16948
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/detect-react-polymorphic.js
|
|
16949
|
+
import { Node as Node23 } from "ts-morph";
|
|
16950
|
+
var init_detect_react_polymorphic = __esm({
|
|
16951
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/detect-react-polymorphic.js"() {
|
|
16952
|
+
"use strict";
|
|
16953
|
+
init_tsx_shared();
|
|
16954
|
+
init_tsx_node_utils();
|
|
16955
|
+
}
|
|
16956
|
+
});
|
|
16957
|
+
|
|
16958
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/extract-react-props-from-type.js
|
|
16959
|
+
import { Node as Node24 } from "ts-morph";
|
|
16960
|
+
var init_extract_react_props_from_type = __esm({
|
|
16961
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/extract-react-props-from-type.js"() {
|
|
16962
|
+
"use strict";
|
|
16963
|
+
init_tsx_shared();
|
|
16964
|
+
init_get_node_source_lines();
|
|
16965
|
+
init_detect_dom_type_patterns();
|
|
16966
|
+
init_detect_react_polymorphic();
|
|
16967
|
+
init_dom_attribute_surfaces();
|
|
16968
|
+
}
|
|
16969
|
+
});
|
|
16970
|
+
|
|
16971
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/resolve-react-props-type.js
|
|
16972
|
+
import { Node as Node25 } from "ts-morph";
|
|
16973
|
+
var init_resolve_react_props_type = __esm({
|
|
16974
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/resolve-react-props-type.js"() {
|
|
16975
|
+
"use strict";
|
|
16976
|
+
init_tsx_shared();
|
|
16977
|
+
init_detect_dom_type_patterns();
|
|
16978
|
+
}
|
|
16979
|
+
});
|
|
16980
|
+
|
|
16981
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/filter-impl-alias-props.js
|
|
16982
|
+
import { Node as Node26 } from "ts-morph";
|
|
16983
|
+
var init_filter_impl_alias_props = __esm({
|
|
16984
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/filter-impl-alias-props.js"() {
|
|
16985
|
+
"use strict";
|
|
16986
|
+
}
|
|
16987
|
+
});
|
|
16988
|
+
|
|
16989
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/extract-binding-fallback-props.js
|
|
16990
|
+
import { Node as Node27, SyntaxKind as SyntaxKind11 } from "ts-morph";
|
|
16991
|
+
var init_extract_binding_fallback_props = __esm({
|
|
16992
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/extract-binding-fallback-props.js"() {
|
|
16993
|
+
"use strict";
|
|
16994
|
+
init_get_node_source_lines();
|
|
16995
|
+
}
|
|
16996
|
+
});
|
|
16997
|
+
|
|
16998
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/extract-react-binding-defaults.js
|
|
16999
|
+
import { Node as Node28 } from "ts-morph";
|
|
17000
|
+
var init_extract_react_binding_defaults = __esm({
|
|
17001
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/extract-react-binding-defaults.js"() {
|
|
17002
|
+
"use strict";
|
|
17003
|
+
init_filter_impl_alias_props();
|
|
17004
|
+
init_extract_binding_fallback_props();
|
|
17005
|
+
}
|
|
17006
|
+
});
|
|
17007
|
+
|
|
17008
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/infer-primitive-dom-props.js
|
|
17009
|
+
import { Node as Node29, SyntaxKind as SyntaxKind12 } from "ts-morph";
|
|
17010
|
+
var init_infer_primitive_dom_props = __esm({
|
|
17011
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/infer-primitive-dom-props.js"() {
|
|
17012
|
+
"use strict";
|
|
17013
|
+
init_tsx_shared();
|
|
17014
|
+
init_dom_attribute_surfaces();
|
|
17015
|
+
}
|
|
17016
|
+
});
|
|
17017
|
+
|
|
17018
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/collect-react-impl-hints.js
|
|
17019
|
+
import { Node as Node30, SyntaxKind as SyntaxKind13 } from "ts-morph";
|
|
17020
|
+
var init_collect_react_impl_hints = __esm({
|
|
17021
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/collect-react-impl-hints.js"() {
|
|
17022
|
+
"use strict";
|
|
17023
|
+
init_infer_primitive_dom_props();
|
|
17024
|
+
}
|
|
17025
|
+
});
|
|
17026
|
+
|
|
17027
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/extract-react-prop-types.js
|
|
17028
|
+
import { Node as Node31 } from "ts-morph";
|
|
17029
|
+
var init_extract_react_prop_types = __esm({
|
|
17030
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/extract-react-prop-types.js"() {
|
|
17031
|
+
"use strict";
|
|
17032
|
+
}
|
|
17033
|
+
});
|
|
17034
|
+
|
|
17035
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/extract-react-component-from-export.js
|
|
17036
|
+
import { Node as Node32 } from "ts-morph";
|
|
17037
|
+
var init_extract_react_component_from_export = __esm({
|
|
17038
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/extract-react-component-from-export.js"() {
|
|
17039
|
+
"use strict";
|
|
17040
|
+
init_detect_slot_from_prop();
|
|
17041
|
+
init_collect_prop_dataflow();
|
|
17042
|
+
init_resolve_component_function();
|
|
17043
|
+
init_extract_react_slots();
|
|
17044
|
+
init_extract_react_props_from_type();
|
|
17045
|
+
init_detect_dom_type_patterns();
|
|
17046
|
+
init_resolve_react_props_type();
|
|
17047
|
+
init_extract_react_binding_defaults();
|
|
17048
|
+
init_collect_react_impl_hints();
|
|
17049
|
+
init_extract_react_prop_types();
|
|
17050
|
+
}
|
|
17051
|
+
});
|
|
17052
|
+
|
|
17053
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/extract-from-react-source-file.js
|
|
17054
|
+
import { SyntaxKind as SyntaxKind14 } from "ts-morph";
|
|
17055
|
+
var init_extract_from_react_source_file = __esm({
|
|
17056
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/helpers/extract-from-react-source-file.js"() {
|
|
17057
|
+
"use strict";
|
|
17058
|
+
init_tsx_shared();
|
|
17059
|
+
init_extract_react_component_from_export();
|
|
17060
|
+
}
|
|
17061
|
+
});
|
|
17062
|
+
|
|
17063
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/extractor.js
|
|
17064
|
+
var init_extractor2 = __esm({
|
|
17065
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/react/extractor.js"() {
|
|
17066
|
+
"use strict";
|
|
17067
|
+
init_tsx_shared();
|
|
17068
|
+
init_extract_react_allowed_components();
|
|
17069
|
+
init_synthesize_react_structural_slots();
|
|
17070
|
+
init_resolve_react_prop_forwarding();
|
|
17071
|
+
init_extract_from_react_source_file();
|
|
17072
|
+
}
|
|
17073
|
+
});
|
|
17074
|
+
|
|
17075
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/shared/helpers/file-processing/project-source-files.js
|
|
17076
|
+
var init_project_source_files = __esm({
|
|
17077
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/shared/helpers/file-processing/project-source-files.js"() {
|
|
17078
|
+
"use strict";
|
|
17079
|
+
}
|
|
17080
|
+
});
|
|
17081
|
+
|
|
17082
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/stencil/helpers/detect-stencil-class.js
|
|
17083
|
+
import { Node as Node33 } from "ts-morph";
|
|
17084
|
+
var init_detect_stencil_class = __esm({
|
|
17085
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/stencil/helpers/detect-stencil-class.js"() {
|
|
17086
|
+
"use strict";
|
|
17087
|
+
}
|
|
17088
|
+
});
|
|
17089
|
+
|
|
17090
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/stencil/helpers/stencil-prop-helpers.js
|
|
17091
|
+
import { Node as Node34, SyntaxKind as SyntaxKind15 } from "ts-morph";
|
|
17092
|
+
var init_stencil_prop_helpers = __esm({
|
|
17093
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/stencil/helpers/stencil-prop-helpers.js"() {
|
|
17094
|
+
"use strict";
|
|
17095
|
+
init_tsx_shared();
|
|
17096
|
+
}
|
|
17097
|
+
});
|
|
17098
|
+
|
|
17099
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/stencil/helpers/extract-stencil-props.js
|
|
17100
|
+
import { Node as Node35 } from "ts-morph";
|
|
17101
|
+
var init_extract_stencil_props = __esm({
|
|
17102
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/stencil/helpers/extract-stencil-props.js"() {
|
|
17103
|
+
"use strict";
|
|
17104
|
+
init_detect_stencil_class();
|
|
17105
|
+
init_stencil_prop_helpers();
|
|
17106
|
+
init_stencil_prop_helpers();
|
|
17107
|
+
}
|
|
17108
|
+
});
|
|
17109
|
+
|
|
17110
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/shared/helpers/collect-jsdoc-slot-comments.js
|
|
17111
|
+
var init_collect_jsdoc_slot_comments = __esm({
|
|
17112
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/shared/helpers/collect-jsdoc-slot-comments.js"() {
|
|
17113
|
+
"use strict";
|
|
17114
|
+
}
|
|
17115
|
+
});
|
|
17116
|
+
|
|
17117
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/stencil/helpers/extract-stencil-slots.js
|
|
17118
|
+
import { Node as Node36 } from "ts-morph";
|
|
17119
|
+
var init_extract_stencil_slots = __esm({
|
|
17120
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/stencil/helpers/extract-stencil-slots.js"() {
|
|
17121
|
+
"use strict";
|
|
17122
|
+
init_collect_jsdoc_slot_comments();
|
|
17123
|
+
}
|
|
17124
|
+
});
|
|
17125
|
+
|
|
17126
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/stencil/extractor.js
|
|
17127
|
+
import { Project as Project9, Node as Node37 } from "ts-morph";
|
|
17128
|
+
var init_extractor3 = __esm({
|
|
17129
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/stencil/extractor.js"() {
|
|
17130
|
+
"use strict";
|
|
17131
|
+
init_tsx_shared();
|
|
17132
|
+
init_result_normalizer();
|
|
17133
|
+
init_project_source_files();
|
|
17134
|
+
init_detect_stencil_class();
|
|
17135
|
+
init_extract_stencil_props();
|
|
17136
|
+
init_extract_stencil_slots();
|
|
17137
|
+
}
|
|
17138
|
+
});
|
|
17139
|
+
|
|
17140
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/get-svelte-component-name.js
|
|
17141
|
+
var init_get_svelte_component_name = __esm({
|
|
17142
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/get-svelte-component-name.js"() {
|
|
17143
|
+
"use strict";
|
|
17144
|
+
}
|
|
17145
|
+
});
|
|
17146
|
+
|
|
17147
|
+
// packages/experience-design-system-extraction/dist/src/extract/services/quality/helpers/scoring/collect-scoring-inputs.js
|
|
17148
|
+
function isWidePrimitiveUnion2(type) {
|
|
17149
|
+
const parts = type.split("|").map((p) => p.trim());
|
|
17150
|
+
if (parts.length < 3)
|
|
17151
|
+
return false;
|
|
17152
|
+
const basePrimitives = /* @__PURE__ */ new Set(["string", "number", "boolean"]);
|
|
17153
|
+
const nullability = /* @__PURE__ */ new Set(["null", "undefined"]);
|
|
17154
|
+
const baseCount = parts.filter((p) => basePrimitives.has(p)).length;
|
|
17155
|
+
const nullabilityCount = parts.filter((p) => nullability.has(p)).length;
|
|
17156
|
+
return baseCount >= 3 || baseCount >= 2 && nullabilityCount > 0 && baseCount + nullabilityCount >= 3;
|
|
17157
|
+
}
|
|
17158
|
+
function countExtractionIssues(component, options = {}) {
|
|
17159
|
+
let count = 0;
|
|
17160
|
+
const reasons = [];
|
|
17161
|
+
if (component.props.length === 0 && component.slots.length === 0) {
|
|
17162
|
+
count++;
|
|
17163
|
+
reasons.push("no-props-or-slots");
|
|
17164
|
+
}
|
|
17165
|
+
if (component.props.length > 50) {
|
|
17166
|
+
count++;
|
|
17167
|
+
reasons.push(`high-prop-count:${component.props.length}`);
|
|
17168
|
+
}
|
|
17169
|
+
for (const prop of component.props) {
|
|
17170
|
+
if (OPAQUE_TYPES2.has(prop.type.trim())) {
|
|
17171
|
+
count++;
|
|
17172
|
+
reasons.push(`opaque-type:${prop.name}`);
|
|
17173
|
+
break;
|
|
17174
|
+
}
|
|
17175
|
+
if (isWidePrimitiveUnion2(prop.type)) {
|
|
17176
|
+
count++;
|
|
17177
|
+
reasons.push(`wide-union:${prop.name}`);
|
|
17178
|
+
break;
|
|
17179
|
+
}
|
|
17180
|
+
if (!prop.description && !OBVIOUS_PROP_NAMES2.has(prop.name)) {
|
|
17181
|
+
count++;
|
|
17182
|
+
reasons.push("props-missing-description");
|
|
17183
|
+
break;
|
|
17184
|
+
}
|
|
17185
|
+
}
|
|
17186
|
+
count += options.additionalIssueCount ?? 0;
|
|
17187
|
+
if (options.additionalReasons && options.additionalReasons.length > 0) {
|
|
17188
|
+
reasons.push(...options.additionalReasons);
|
|
17189
|
+
}
|
|
17190
|
+
return { count, reasons: [...new Set(reasons)] };
|
|
17191
|
+
}
|
|
17192
|
+
function mapIssueCountToConfidence(count) {
|
|
17193
|
+
if (count === 0)
|
|
17194
|
+
return 5;
|
|
17195
|
+
if (count === 1)
|
|
17196
|
+
return 4;
|
|
17197
|
+
if (count === 2)
|
|
17198
|
+
return 3;
|
|
17199
|
+
if (count === 3)
|
|
17200
|
+
return 2;
|
|
17201
|
+
return 1;
|
|
17202
|
+
}
|
|
17203
|
+
var OPAQUE_TYPES2, OBVIOUS_PROP_NAMES2;
|
|
17204
|
+
var init_collect_scoring_inputs = __esm({
|
|
17205
|
+
"packages/experience-design-system-extraction/dist/src/extract/services/quality/helpers/scoring/collect-scoring-inputs.js"() {
|
|
17206
|
+
"use strict";
|
|
17207
|
+
OPAQUE_TYPES2 = /* @__PURE__ */ new Set(["any", "unknown", "object", "Record<string, unknown>", "Record<string, any>"]);
|
|
17208
|
+
OBVIOUS_PROP_NAMES2 = /* @__PURE__ */ new Set([
|
|
17209
|
+
"className",
|
|
17210
|
+
"style",
|
|
17211
|
+
"id",
|
|
17212
|
+
"children",
|
|
17213
|
+
"disabled",
|
|
17214
|
+
"hidden",
|
|
17215
|
+
"onClick",
|
|
17216
|
+
"onChange",
|
|
17217
|
+
"onSubmit",
|
|
17218
|
+
"onBlur",
|
|
17219
|
+
"onFocus",
|
|
17220
|
+
"href",
|
|
17221
|
+
"src",
|
|
17222
|
+
"alt",
|
|
17223
|
+
"type",
|
|
17224
|
+
"value",
|
|
17225
|
+
"checked",
|
|
17226
|
+
"placeholder",
|
|
17227
|
+
"label",
|
|
17228
|
+
"title",
|
|
17229
|
+
"name",
|
|
17230
|
+
"required",
|
|
17231
|
+
"readOnly",
|
|
17232
|
+
"autoFocus",
|
|
17233
|
+
"tabIndex",
|
|
17234
|
+
"role",
|
|
17235
|
+
"aria-label",
|
|
17236
|
+
"aria-describedby"
|
|
17237
|
+
]);
|
|
17238
|
+
}
|
|
17239
|
+
});
|
|
17240
|
+
|
|
17241
|
+
// packages/experience-design-system-extraction/dist/src/extract/services/quality/helpers/scoring/compute-extraction-score.js
|
|
17242
|
+
function computeExtractionScore2(component, options = {}) {
|
|
17243
|
+
const { count, reasons } = countExtractionIssues(component, options);
|
|
17244
|
+
return {
|
|
17245
|
+
confidence: mapIssueCountToConfidence(count),
|
|
17246
|
+
reasons
|
|
17247
|
+
};
|
|
17248
|
+
}
|
|
17249
|
+
function deriveNeedsReview2(confidence) {
|
|
17250
|
+
return confidence <= 2;
|
|
17251
|
+
}
|
|
17252
|
+
var init_compute_extraction_score = __esm({
|
|
17253
|
+
"packages/experience-design-system-extraction/dist/src/extract/services/quality/helpers/scoring/compute-extraction-score.js"() {
|
|
17254
|
+
"use strict";
|
|
17255
|
+
init_collect_scoring_inputs();
|
|
17256
|
+
}
|
|
17257
|
+
});
|
|
17258
|
+
|
|
17259
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/extract-svelte-template-slots.js
|
|
17260
|
+
var init_extract_svelte_template_slots = __esm({
|
|
17261
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/extract-svelte-template-slots.js"() {
|
|
17262
|
+
"use strict";
|
|
17263
|
+
}
|
|
17264
|
+
});
|
|
17265
|
+
|
|
17266
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/collect-svelte-type-references.js
|
|
17267
|
+
var init_collect_svelte_type_references = __esm({
|
|
17268
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/collect-svelte-type-references.js"() {
|
|
17269
|
+
"use strict";
|
|
17270
|
+
}
|
|
17271
|
+
});
|
|
17272
|
+
|
|
17273
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/find-svelte-script-declarations.js
|
|
17274
|
+
var init_find_svelte_script_declarations = __esm({
|
|
17275
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/find-svelte-script-declarations.js"() {
|
|
17276
|
+
"use strict";
|
|
17277
|
+
init_collect_svelte_type_references();
|
|
17278
|
+
}
|
|
17279
|
+
});
|
|
17280
|
+
|
|
17281
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/render-svelte-type-strings.js
|
|
17282
|
+
var init_render_svelte_type_strings = __esm({
|
|
17283
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/render-svelte-type-strings.js"() {
|
|
17284
|
+
"use strict";
|
|
17285
|
+
}
|
|
17286
|
+
});
|
|
17287
|
+
|
|
17288
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/render-svelte-type.js
|
|
17289
|
+
var init_render_svelte_type = __esm({
|
|
17290
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/render-svelte-type.js"() {
|
|
17291
|
+
"use strict";
|
|
17292
|
+
init_render_svelte_type_strings();
|
|
17293
|
+
}
|
|
17294
|
+
});
|
|
17295
|
+
|
|
17296
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/extract-svelte-ast-type-members.js
|
|
17297
|
+
var init_extract_svelte_ast_type_members = __esm({
|
|
17298
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/extract-svelte-ast-type-members.js"() {
|
|
17299
|
+
"use strict";
|
|
17300
|
+
init_render_svelte_type();
|
|
17301
|
+
}
|
|
17302
|
+
});
|
|
17303
|
+
|
|
17304
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/extract-svelte-declaration-data.js
|
|
17305
|
+
import { Node as Node38 } from "ts-morph";
|
|
17306
|
+
var init_extract_svelte_declaration_data = __esm({
|
|
17307
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/extract-svelte-declaration-data.js"() {
|
|
17308
|
+
"use strict";
|
|
17309
|
+
}
|
|
17310
|
+
});
|
|
17311
|
+
|
|
17312
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/resolve-svelte-type-checker.js
|
|
17313
|
+
import { Project as Project10, ScriptTarget as ScriptTarget2, ModuleKind as ModuleKind2, ts as ts4 } from "ts-morph";
|
|
17314
|
+
var init_resolve_svelte_type_checker = __esm({
|
|
17315
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/resolve-svelte-type-checker.js"() {
|
|
17316
|
+
"use strict";
|
|
17317
|
+
init_render_svelte_type();
|
|
17318
|
+
init_extract_svelte_declaration_data();
|
|
17319
|
+
}
|
|
17320
|
+
});
|
|
17321
|
+
|
|
17322
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/shared/helpers/resolve-import-file-path.js
|
|
17323
|
+
var init_resolve_import_file_path = __esm({
|
|
17324
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/shared/helpers/resolve-import-file-path.js"() {
|
|
17325
|
+
"use strict";
|
|
17326
|
+
}
|
|
17327
|
+
});
|
|
17328
|
+
|
|
17329
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/extract-svelte-external-type-members.js
|
|
17330
|
+
import { Node as Node39 } from "ts-morph";
|
|
17331
|
+
var init_extract_svelte_external_type_members = __esm({
|
|
17332
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/extract-svelte-external-type-members.js"() {
|
|
17333
|
+
"use strict";
|
|
17334
|
+
init_render_svelte_type();
|
|
17335
|
+
}
|
|
17336
|
+
});
|
|
17337
|
+
|
|
17338
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/resolve-svelte-external-type-readers.js
|
|
17339
|
+
import { Node as Node40, Project as Project11, ScriptTarget as ScriptTarget3, ModuleKind as ModuleKind3 } from "ts-morph";
|
|
17340
|
+
var init_resolve_svelte_external_type_readers = __esm({
|
|
17341
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/resolve-svelte-external-type-readers.js"() {
|
|
17342
|
+
"use strict";
|
|
17343
|
+
init_resolve_import_file_path();
|
|
17344
|
+
init_extract_svelte_external_type_members();
|
|
17345
|
+
}
|
|
17346
|
+
});
|
|
17347
|
+
|
|
17348
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/resolve-svelte-type-members.js
|
|
17349
|
+
var init_resolve_svelte_type_members = __esm({
|
|
17350
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/resolve-svelte-type-members.js"() {
|
|
17351
|
+
"use strict";
|
|
17352
|
+
init_find_svelte_script_declarations();
|
|
17353
|
+
init_extract_svelte_ast_type_members();
|
|
17354
|
+
init_resolve_svelte_type_checker();
|
|
17355
|
+
init_resolve_svelte_external_type_readers();
|
|
17356
|
+
init_extract_svelte_ast_type_members();
|
|
17357
|
+
init_resolve_svelte_type_checker();
|
|
17358
|
+
}
|
|
17359
|
+
});
|
|
17360
|
+
|
|
17361
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/extract-svelte-from-destructure.js
|
|
17362
|
+
var init_extract_svelte_from_destructure = __esm({
|
|
17363
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/extract-svelte-from-destructure.js"() {
|
|
17364
|
+
"use strict";
|
|
17365
|
+
init_render_svelte_type();
|
|
17366
|
+
}
|
|
17367
|
+
});
|
|
17368
|
+
|
|
17369
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/extract-svelte-type-member-props.js
|
|
17370
|
+
var init_extract_svelte_type_member_props = __esm({
|
|
17371
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/extract-svelte-type-member-props.js"() {
|
|
17372
|
+
"use strict";
|
|
17373
|
+
}
|
|
17374
|
+
});
|
|
17375
|
+
|
|
17376
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/classify-svelte-props-annotation.js
|
|
17377
|
+
var init_classify_svelte_props_annotation = __esm({
|
|
17378
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/classify-svelte-props-annotation.js"() {
|
|
17379
|
+
"use strict";
|
|
17380
|
+
init_find_svelte_script_declarations();
|
|
17381
|
+
}
|
|
17382
|
+
});
|
|
17383
|
+
|
|
17384
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/extract-svelte-props.js
|
|
17385
|
+
var init_extract_svelte_props = __esm({
|
|
17386
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/extract-svelte-props.js"() {
|
|
17387
|
+
"use strict";
|
|
17388
|
+
init_resolve_svelte_type_members();
|
|
17389
|
+
init_extract_svelte_from_destructure();
|
|
17390
|
+
init_extract_svelte_type_member_props();
|
|
17391
|
+
init_classify_svelte_props_annotation();
|
|
17392
|
+
init_classify_svelte_props_annotation();
|
|
17393
|
+
}
|
|
17394
|
+
});
|
|
17395
|
+
|
|
17396
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/resolve-dts-location.js
|
|
17397
|
+
var init_resolve_dts_location = __esm({
|
|
17398
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/resolve-dts-location.js"() {
|
|
17399
|
+
"use strict";
|
|
17400
|
+
}
|
|
17401
|
+
});
|
|
17402
|
+
|
|
17403
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/resolve-svelte-unresolved-retry.js
|
|
17404
|
+
import { Project as Project12, ScriptTarget as ScriptTarget4, ModuleKind as ModuleKind4, ts as ts5 } from "ts-morph";
|
|
17405
|
+
var init_resolve_svelte_unresolved_retry = __esm({
|
|
17406
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/resolve-svelte-unresolved-retry.js"() {
|
|
17407
|
+
"use strict";
|
|
17408
|
+
init_compute_extraction_score();
|
|
17409
|
+
init_extract_svelte_template_slots();
|
|
17410
|
+
init_find_svelte_script_declarations();
|
|
17411
|
+
init_resolve_svelte_type_members();
|
|
17412
|
+
init_extract_svelte_props();
|
|
17413
|
+
init_resolve_dts_location();
|
|
17414
|
+
}
|
|
17415
|
+
});
|
|
17416
|
+
|
|
17417
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/resolve-svelte-allowed-components.js
|
|
17418
|
+
var init_resolve_svelte_allowed_components = __esm({
|
|
17419
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/resolve-svelte-allowed-components.js"() {
|
|
17420
|
+
"use strict";
|
|
17421
|
+
init_collect_allowed_component_names();
|
|
17422
|
+
init_build_component_lookup_maps();
|
|
17423
|
+
}
|
|
17424
|
+
});
|
|
17425
|
+
|
|
17426
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/extract-from-svelte-file.js
|
|
17427
|
+
import { parse as parseSvelte2 } from "svelte/compiler";
|
|
17428
|
+
var init_extract_from_svelte_file = __esm({
|
|
17429
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/helpers/extract-from-svelte-file.js"() {
|
|
17430
|
+
"use strict";
|
|
17431
|
+
init_compute_extraction_score();
|
|
17432
|
+
init_get_svelte_component_name();
|
|
17433
|
+
init_extract_svelte_template_slots();
|
|
17434
|
+
init_find_svelte_script_declarations();
|
|
17435
|
+
init_extract_svelte_props();
|
|
17436
|
+
}
|
|
17437
|
+
});
|
|
17438
|
+
|
|
17439
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/extractor.js
|
|
17440
|
+
var init_extractor4 = __esm({
|
|
17441
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/svelte/extractor.js"() {
|
|
17442
|
+
"use strict";
|
|
17443
|
+
init_file_workers();
|
|
17444
|
+
init_get_svelte_component_name();
|
|
17445
|
+
init_resolve_svelte_unresolved_retry();
|
|
17446
|
+
init_resolve_svelte_allowed_components();
|
|
17447
|
+
init_extract_from_svelte_file();
|
|
17448
|
+
}
|
|
17449
|
+
});
|
|
17450
|
+
|
|
17451
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/vue-tsx/helpers/resolve-ast-object.js
|
|
17452
|
+
import { Node as Node41, SyntaxKind as SyntaxKind16 } from "ts-morph";
|
|
17453
|
+
var init_resolve_ast_object = __esm({
|
|
17454
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/vue-tsx/helpers/resolve-ast-object.js"() {
|
|
17455
|
+
"use strict";
|
|
17456
|
+
init_tsx_shared();
|
|
17457
|
+
}
|
|
17458
|
+
});
|
|
17459
|
+
|
|
17460
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/vue-tsx/helpers/extract-vue-tsx-props.js
|
|
17461
|
+
import { Node as Node42 } from "ts-morph";
|
|
17462
|
+
var init_extract_vue_tsx_props = __esm({
|
|
17463
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/vue-tsx/helpers/extract-vue-tsx-props.js"() {
|
|
17464
|
+
"use strict";
|
|
17465
|
+
init_tsx_shared();
|
|
17466
|
+
init_resolve_ast_object();
|
|
17467
|
+
}
|
|
17468
|
+
});
|
|
17469
|
+
|
|
17470
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/vue-tsx/helpers/extract-vue-tsx-slots.js
|
|
17471
|
+
import { Node as Node43, SyntaxKind as SyntaxKind17 } from "ts-morph";
|
|
17472
|
+
var init_extract_vue_tsx_slots = __esm({
|
|
17473
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/vue-tsx/helpers/extract-vue-tsx-slots.js"() {
|
|
17474
|
+
"use strict";
|
|
17475
|
+
init_tsx_shared();
|
|
17476
|
+
}
|
|
17477
|
+
});
|
|
17478
|
+
|
|
17479
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/vue-tsx/extractor.js
|
|
17480
|
+
import { Node as Node44 } from "ts-morph";
|
|
17481
|
+
var init_extractor5 = __esm({
|
|
17482
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/vue-tsx/extractor.js"() {
|
|
17483
|
+
"use strict";
|
|
17484
|
+
init_tsx_shared();
|
|
17485
|
+
init_extract_vue_tsx_props();
|
|
17486
|
+
init_extract_vue_tsx_slots();
|
|
17487
|
+
}
|
|
17488
|
+
});
|
|
17489
|
+
|
|
17490
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/vue/helpers/resolve-vue-component-name.js
|
|
17491
|
+
var init_resolve_vue_component_name = __esm({
|
|
17492
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/vue/helpers/resolve-vue-component-name.js"() {
|
|
17493
|
+
"use strict";
|
|
17494
|
+
}
|
|
17495
|
+
});
|
|
17496
|
+
|
|
17497
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/vue/helpers/extract-vue-slots.js
|
|
17498
|
+
var init_extract_vue_slots = __esm({
|
|
17499
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/vue/helpers/extract-vue-slots.js"() {
|
|
17500
|
+
"use strict";
|
|
17501
|
+
}
|
|
17502
|
+
});
|
|
17503
|
+
|
|
17504
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/vue/helpers/extract-vue-object-props.js
|
|
17505
|
+
import { Node as Node45 } from "ts-morph";
|
|
17506
|
+
var init_extract_vue_object_props = __esm({
|
|
17507
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/vue/helpers/extract-vue-object-props.js"() {
|
|
17508
|
+
"use strict";
|
|
17509
|
+
}
|
|
17510
|
+
});
|
|
17511
|
+
|
|
17512
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/vue/helpers/extract-vue-setup-object-props.js
|
|
17513
|
+
import { Project as Project13, Node as Node46 } from "ts-morph";
|
|
17514
|
+
var init_extract_vue_setup_object_props = __esm({
|
|
17515
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/vue/helpers/extract-vue-setup-object-props.js"() {
|
|
17516
|
+
"use strict";
|
|
17517
|
+
init_resolve_import_file_path();
|
|
17518
|
+
init_extract_vue_object_props();
|
|
17519
|
+
}
|
|
17520
|
+
});
|
|
17521
|
+
|
|
17522
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/vue/helpers/extract-vue-setup-props.js
|
|
17523
|
+
import { Project as Project14, Node as Node47 } from "ts-morph";
|
|
17524
|
+
var init_extract_vue_setup_props = __esm({
|
|
17525
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/vue/helpers/extract-vue-setup-props.js"() {
|
|
17526
|
+
"use strict";
|
|
17527
|
+
init_resolve_type_symbol();
|
|
17528
|
+
init_extract_vue_setup_object_props();
|
|
17529
|
+
}
|
|
17530
|
+
});
|
|
17531
|
+
|
|
17532
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/vue/helpers/workspace-package-dirs.js
|
|
17533
|
+
var init_workspace_package_dirs = __esm({
|
|
17534
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/vue/helpers/workspace-package-dirs.js"() {
|
|
17535
|
+
"use strict";
|
|
17536
|
+
}
|
|
17537
|
+
});
|
|
17538
|
+
|
|
17539
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/vue/helpers/resolve-workspace-module.js
|
|
17540
|
+
var init_resolve_workspace_module = __esm({
|
|
17541
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/vue/helpers/resolve-workspace-module.js"() {
|
|
17542
|
+
"use strict";
|
|
17543
|
+
init_workspace_package_dirs();
|
|
17544
|
+
}
|
|
17545
|
+
});
|
|
17546
|
+
|
|
17547
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/vue/helpers/extract-vue-options-props.js
|
|
17548
|
+
import { parse as parseSFC2 } from "@vue/compiler-sfc";
|
|
17549
|
+
import { Node as Node48, Project as Project15 } from "ts-morph";
|
|
17550
|
+
var init_extract_vue_options_props = __esm({
|
|
17551
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/vue/helpers/extract-vue-options-props.js"() {
|
|
17552
|
+
"use strict";
|
|
17553
|
+
init_resolve_workspace_module();
|
|
17554
|
+
init_extract_vue_object_props();
|
|
17555
|
+
init_extract_vue_object_props();
|
|
17556
|
+
}
|
|
17557
|
+
});
|
|
17558
|
+
|
|
17559
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/vue/extractor.js
|
|
17560
|
+
import { parse as parseSFC3 } from "@vue/compiler-sfc";
|
|
17561
|
+
var init_extractor6 = __esm({
|
|
17562
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/vue/extractor.js"() {
|
|
17563
|
+
"use strict";
|
|
17564
|
+
init_file_workers();
|
|
17565
|
+
init_result_normalizer();
|
|
17566
|
+
init_resolve_vue_component_name();
|
|
17567
|
+
init_extract_vue_slots();
|
|
17568
|
+
init_extract_vue_setup_props();
|
|
17569
|
+
init_extract_vue_options_props();
|
|
17570
|
+
}
|
|
17571
|
+
});
|
|
17572
|
+
|
|
17573
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/extract-wc-observed-attrs.js
|
|
17574
|
+
import { Node as Node49 } from "ts-morph";
|
|
17575
|
+
var init_extract_wc_observed_attrs = __esm({
|
|
17576
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/extract-wc-observed-attrs.js"() {
|
|
17577
|
+
"use strict";
|
|
17578
|
+
}
|
|
17579
|
+
});
|
|
17580
|
+
|
|
17581
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/detect-wc-non-public-members.js
|
|
17582
|
+
var init_detect_wc_non_public_members = __esm({
|
|
17583
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/detect-wc-non-public-members.js"() {
|
|
17584
|
+
"use strict";
|
|
17585
|
+
}
|
|
17586
|
+
});
|
|
17587
|
+
|
|
17588
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/extract-wc-accessor-props.js
|
|
17589
|
+
var init_extract_wc_accessor_props = __esm({
|
|
17590
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/extract-wc-accessor-props.js"() {
|
|
17591
|
+
"use strict";
|
|
17592
|
+
init_detect_wc_non_public_members();
|
|
17593
|
+
}
|
|
17594
|
+
});
|
|
17595
|
+
|
|
17596
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/extract-wc-jsdoc-attr-props.js
|
|
17597
|
+
var init_extract_wc_jsdoc_attr_props = __esm({
|
|
17598
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/extract-wc-jsdoc-attr-props.js"() {
|
|
17599
|
+
"use strict";
|
|
17600
|
+
}
|
|
17601
|
+
});
|
|
17602
|
+
|
|
17603
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/extract-wc-class-properties.js
|
|
17604
|
+
import { Node as Node50 } from "ts-morph";
|
|
17605
|
+
var init_extract_wc_class_properties = __esm({
|
|
17606
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/extract-wc-class-properties.js"() {
|
|
17607
|
+
"use strict";
|
|
17608
|
+
init_detect_wc_non_public_members();
|
|
17609
|
+
}
|
|
17610
|
+
});
|
|
17611
|
+
|
|
17612
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/merge-wc-prop-lists.js
|
|
17613
|
+
var init_merge_wc_prop_lists = __esm({
|
|
17614
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/merge-wc-prop-lists.js"() {
|
|
17615
|
+
"use strict";
|
|
17616
|
+
init_extract_wc_observed_attrs();
|
|
17617
|
+
init_extract_wc_accessor_props();
|
|
17618
|
+
init_extract_wc_jsdoc_attr_props();
|
|
17619
|
+
init_extract_wc_class_properties();
|
|
17620
|
+
}
|
|
17621
|
+
});
|
|
17622
|
+
|
|
17623
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/resolve-wc-decorator-tag.js
|
|
17624
|
+
import { Node as Node51 } from "ts-morph";
|
|
17625
|
+
var init_resolve_wc_decorator_tag = __esm({
|
|
17626
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/resolve-wc-decorator-tag.js"() {
|
|
17627
|
+
"use strict";
|
|
17628
|
+
}
|
|
17629
|
+
});
|
|
17630
|
+
|
|
17631
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/resolve-wc-import-source.js
|
|
17632
|
+
import { Node as Node52 } from "ts-morph";
|
|
17633
|
+
var init_resolve_wc_import_source = __esm({
|
|
17634
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/resolve-wc-import-source.js"() {
|
|
17635
|
+
"use strict";
|
|
17636
|
+
}
|
|
17637
|
+
});
|
|
17638
|
+
|
|
17639
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/resolve-wc-import.js
|
|
17640
|
+
import { Node as Node53, SyntaxKind as SyntaxKind18 } from "ts-morph";
|
|
17641
|
+
var init_resolve_wc_import = __esm({
|
|
17642
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/resolve-wc-import.js"() {
|
|
17643
|
+
"use strict";
|
|
17644
|
+
init_resolve_wc_import_source();
|
|
17645
|
+
}
|
|
17646
|
+
});
|
|
17647
|
+
|
|
17648
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/resolve-wc-sibling-definition.js
|
|
17649
|
+
import { Node as Node54, SyntaxKind as SyntaxKind19 } from "ts-morph";
|
|
17650
|
+
var init_resolve_wc_sibling_definition = __esm({
|
|
17651
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/resolve-wc-sibling-definition.js"() {
|
|
17652
|
+
"use strict";
|
|
17653
|
+
init_resolve_wc_import();
|
|
17654
|
+
}
|
|
17655
|
+
});
|
|
17656
|
+
|
|
17657
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/resolve-wc-tag-name.js
|
|
17658
|
+
var init_resolve_wc_tag_name = __esm({
|
|
17659
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/resolve-wc-tag-name.js"() {
|
|
17660
|
+
"use strict";
|
|
17661
|
+
init_tsx_shared();
|
|
17662
|
+
init_resolve_wc_decorator_tag();
|
|
17663
|
+
init_resolve_wc_sibling_definition();
|
|
17664
|
+
}
|
|
17665
|
+
});
|
|
17666
|
+
|
|
17667
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/collect-wc-html-templates.js
|
|
17668
|
+
import { Node as Node55 } from "ts-morph";
|
|
17669
|
+
var init_collect_wc_html_templates = __esm({
|
|
17670
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/collect-wc-html-templates.js"() {
|
|
17671
|
+
"use strict";
|
|
17672
|
+
init_resolve_wc_import();
|
|
17673
|
+
}
|
|
17674
|
+
});
|
|
17675
|
+
|
|
17676
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/extract-wc-template-content.js
|
|
17677
|
+
import { Node as Node56 } from "ts-morph";
|
|
17678
|
+
var init_extract_wc_template_content = __esm({
|
|
17679
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/extract-wc-template-content.js"() {
|
|
17680
|
+
"use strict";
|
|
17681
|
+
init_resolve_wc_import();
|
|
17682
|
+
init_extract_wc_slots();
|
|
17683
|
+
init_collect_wc_html_templates();
|
|
17684
|
+
}
|
|
17685
|
+
});
|
|
17686
|
+
|
|
17687
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/extract-wc-slots.js
|
|
17688
|
+
var init_extract_wc_slots = __esm({
|
|
17689
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/extract-wc-slots.js"() {
|
|
17690
|
+
"use strict";
|
|
17691
|
+
init_collect_jsdoc_slot_comments();
|
|
17692
|
+
init_extract_wc_template_content();
|
|
17693
|
+
}
|
|
17694
|
+
});
|
|
17695
|
+
|
|
17696
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/resolve-wc-base-class.js
|
|
17697
|
+
import { Node as Node57, SyntaxKind as SyntaxKind20 } from "ts-morph";
|
|
17698
|
+
var init_resolve_wc_base_class = __esm({
|
|
17699
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/resolve-wc-base-class.js"() {
|
|
17700
|
+
"use strict";
|
|
17701
|
+
init_resolve_wc_import();
|
|
17702
|
+
}
|
|
17703
|
+
});
|
|
17704
|
+
|
|
17705
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/extract-wc-inheritance.js
|
|
17706
|
+
var init_extract_wc_inheritance = __esm({
|
|
17707
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/helpers/extract-wc-inheritance.js"() {
|
|
17708
|
+
"use strict";
|
|
17709
|
+
init_merge_wc_prop_lists();
|
|
17710
|
+
init_extract_wc_slots();
|
|
17711
|
+
init_resolve_wc_base_class();
|
|
17712
|
+
}
|
|
17713
|
+
});
|
|
17714
|
+
|
|
17715
|
+
// packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/extractor.js
|
|
17716
|
+
import { Project as Project16 } from "ts-morph";
|
|
17717
|
+
var init_extractor7 = __esm({
|
|
17718
|
+
"packages/experience-design-system-extraction/dist/src/extract/framework-adapters/web-components/extractor.js"() {
|
|
17719
|
+
"use strict";
|
|
17720
|
+
init_result_normalizer();
|
|
17721
|
+
init_project_source_files();
|
|
17722
|
+
init_merge_wc_prop_lists();
|
|
17723
|
+
init_resolve_wc_tag_name();
|
|
17724
|
+
init_extract_wc_slots();
|
|
17725
|
+
init_extract_wc_inheritance();
|
|
17726
|
+
}
|
|
17727
|
+
});
|
|
17728
|
+
|
|
17729
|
+
// packages/experience-design-system-extraction/dist/src/extract/services/extraction/helpers/register-extractors.js
|
|
17730
|
+
var init_register_extractors = __esm({
|
|
17731
|
+
"packages/experience-design-system-extraction/dist/src/extract/services/extraction/helpers/register-extractors.js"() {
|
|
17732
|
+
"use strict";
|
|
17733
|
+
init_extractor();
|
|
17734
|
+
init_extractor2();
|
|
17735
|
+
init_extractor3();
|
|
17736
|
+
init_extractor4();
|
|
17737
|
+
init_extractor5();
|
|
17738
|
+
init_extractor6();
|
|
17739
|
+
init_extractor7();
|
|
17740
|
+
}
|
|
17741
|
+
});
|
|
17742
|
+
|
|
17743
|
+
// packages/experience-design-system-extraction/dist/src/extract/services/extraction/helpers/run-extractor-batches.js
|
|
17744
|
+
var init_run_extractor_batches = __esm({
|
|
17745
|
+
"packages/experience-design-system-extraction/dist/src/extract/services/extraction/helpers/run-extractor-batches.js"() {
|
|
17746
|
+
"use strict";
|
|
17747
|
+
}
|
|
17748
|
+
});
|
|
17749
|
+
|
|
17750
|
+
// packages/experience-design-system-extraction/dist/src/extract/services/extraction/helpers/collect-sveltekit-route-exclusions.js
|
|
17751
|
+
var init_collect_sveltekit_route_exclusions = __esm({
|
|
17752
|
+
"packages/experience-design-system-extraction/dist/src/extract/services/extraction/helpers/collect-sveltekit-route-exclusions.js"() {
|
|
17753
|
+
"use strict";
|
|
17754
|
+
}
|
|
17755
|
+
});
|
|
17756
|
+
|
|
17757
|
+
// packages/experience-design-system-extraction/dist/src/extract/services/extraction/helpers/filter-hook-components.js
|
|
17758
|
+
var init_filter_hook_components = __esm({
|
|
17759
|
+
"packages/experience-design-system-extraction/dist/src/extract/services/extraction/helpers/filter-hook-components.js"() {
|
|
17760
|
+
"use strict";
|
|
17761
|
+
}
|
|
17762
|
+
});
|
|
17763
|
+
|
|
17764
|
+
// packages/experience-design-system-extraction/dist/src/extract/services/extraction/extract-components.js
|
|
17765
|
+
var init_extract_components = __esm({
|
|
17766
|
+
"packages/experience-design-system-extraction/dist/src/extract/services/extraction/extract-components.js"() {
|
|
17767
|
+
"use strict";
|
|
17768
|
+
init_deduplicate_components();
|
|
17769
|
+
init_register_extractors();
|
|
17770
|
+
init_run_extractor_batches();
|
|
17771
|
+
init_collect_sveltekit_route_exclusions();
|
|
17772
|
+
init_filter_hook_components();
|
|
17773
|
+
}
|
|
17774
|
+
});
|
|
17775
|
+
|
|
17776
|
+
// packages/experience-design-system-extraction/dist/src/extract/services/classification/helpers/check-prop-types.js
|
|
17777
|
+
function isStringLiteralUnion(type) {
|
|
17778
|
+
return type.includes("|") && type.includes("'");
|
|
17779
|
+
}
|
|
17780
|
+
function isSimpleType(type) {
|
|
17781
|
+
const t = type.trim();
|
|
17782
|
+
if (t === "string" || t === "boolean" || t === "number")
|
|
17783
|
+
return true;
|
|
17784
|
+
return isStringLiteralUnion(t);
|
|
17785
|
+
}
|
|
17786
|
+
function isBooleanType(type) {
|
|
17787
|
+
return type.trim() === "boolean";
|
|
17788
|
+
}
|
|
17789
|
+
function isStringType(type) {
|
|
17790
|
+
return type.trim() === "string";
|
|
17791
|
+
}
|
|
17792
|
+
function isNumberType(type) {
|
|
17793
|
+
return type.trim() === "number";
|
|
17794
|
+
}
|
|
17795
|
+
function isComplexType(type) {
|
|
17796
|
+
return !isSimpleType(type);
|
|
17797
|
+
}
|
|
17798
|
+
var init_check_prop_types = __esm({
|
|
17799
|
+
"packages/experience-design-system-extraction/dist/src/extract/services/classification/helpers/check-prop-types.js"() {
|
|
17800
|
+
"use strict";
|
|
17801
|
+
}
|
|
17802
|
+
});
|
|
17803
|
+
|
|
17804
|
+
// packages/experience-design-system-extraction/dist/src/extract/services/classification/helpers/detect-dom-props.js
|
|
17805
|
+
function isDomPassThroughProp(name) {
|
|
17806
|
+
if (DOM_PASS_THROUGH_PROPS.has(name))
|
|
17807
|
+
return true;
|
|
17808
|
+
if (/^aria[-A-Z]/.test(name))
|
|
17809
|
+
return true;
|
|
17810
|
+
return name.startsWith("data-");
|
|
17811
|
+
}
|
|
17812
|
+
var DOM_PASS_THROUGH_PROPS;
|
|
17813
|
+
var init_detect_dom_props = __esm({
|
|
17814
|
+
"packages/experience-design-system-extraction/dist/src/extract/services/classification/helpers/detect-dom-props.js"() {
|
|
17815
|
+
"use strict";
|
|
17816
|
+
DOM_PASS_THROUGH_PROPS = /* @__PURE__ */ new Set([
|
|
17817
|
+
// Bare HTML / framework styling pass-through
|
|
17818
|
+
"className",
|
|
17819
|
+
"class",
|
|
17820
|
+
"classes",
|
|
17821
|
+
"classNames",
|
|
17822
|
+
"rootClassName",
|
|
17823
|
+
"prefixCls",
|
|
17824
|
+
"style",
|
|
17825
|
+
"styles",
|
|
17826
|
+
// Bare HTML attributes
|
|
17827
|
+
"id",
|
|
17828
|
+
"role",
|
|
17829
|
+
"tabIndex",
|
|
17830
|
+
"tabindex",
|
|
17831
|
+
"htmlFor",
|
|
17832
|
+
"for",
|
|
17833
|
+
"slot",
|
|
17834
|
+
"is",
|
|
17835
|
+
"lang",
|
|
17836
|
+
"dir",
|
|
17837
|
+
"hidden",
|
|
17838
|
+
"draggable",
|
|
17839
|
+
"spellCheck",
|
|
17840
|
+
"spellcheck",
|
|
17841
|
+
"contentEditable",
|
|
17842
|
+
"contenteditable",
|
|
17843
|
+
"inputMode",
|
|
17844
|
+
"inputmode",
|
|
17845
|
+
"autoComplete",
|
|
17846
|
+
"autocomplete",
|
|
17847
|
+
"autoFocus",
|
|
17848
|
+
"autofocus",
|
|
17849
|
+
"translate",
|
|
17850
|
+
"part",
|
|
17851
|
+
"exportparts",
|
|
17852
|
+
"aria",
|
|
17853
|
+
// Framework theming / pass-through escape hatches — dev-facing, never marketer-configurable
|
|
17854
|
+
"dt",
|
|
17855
|
+
"pt",
|
|
17856
|
+
"ptOptions",
|
|
17857
|
+
"unstyled",
|
|
17858
|
+
"sx",
|
|
17859
|
+
// Polymorphic component props — change rendered HTML/component, not marketer-visible behavior
|
|
17860
|
+
"as",
|
|
17861
|
+
"element",
|
|
17862
|
+
"component",
|
|
17863
|
+
// QA / vendor test attributes
|
|
17864
|
+
"dataQa",
|
|
17865
|
+
"data-qa",
|
|
17866
|
+
// Vue v-model internals — framework wiring, never marketer-configurable
|
|
17867
|
+
"modelValue",
|
|
17868
|
+
"modelModifiers"
|
|
17869
|
+
]);
|
|
17870
|
+
}
|
|
17871
|
+
});
|
|
17872
|
+
|
|
17873
|
+
// packages/experience-design-system-extraction/dist/src/extract/services/classification/classify-component-props.js
|
|
17874
|
+
function preClassifyProp(prop) {
|
|
17875
|
+
const { name, type } = prop;
|
|
17876
|
+
if (/^on[A-Z]/.test(name) || type.includes("=> void") || type.includes("EventHandler")) {
|
|
17877
|
+
return { category: "exclude" };
|
|
17878
|
+
}
|
|
17879
|
+
if (name === "ref" || name === "innerRef" || type.includes("Ref<") || type.includes("RefObject<")) {
|
|
17880
|
+
return { category: "exclude" };
|
|
17881
|
+
}
|
|
17882
|
+
if (name === "testId" || name === "data-testid" || name === "dataTestId") {
|
|
17883
|
+
return { category: "exclude" };
|
|
17884
|
+
}
|
|
17885
|
+
if (name === "key") {
|
|
17886
|
+
return { category: "exclude" };
|
|
17887
|
+
}
|
|
17888
|
+
if (type.includes("Dispatch<") || type.includes("SetStateAction")) {
|
|
17889
|
+
return { category: "exclude" };
|
|
17890
|
+
}
|
|
17891
|
+
if (isDomPassThroughProp(name)) {
|
|
17892
|
+
return { category: "exclude" };
|
|
17893
|
+
}
|
|
17894
|
+
if (name === "name" && prop.domAttribute) {
|
|
17895
|
+
return { category: "exclude" };
|
|
17896
|
+
}
|
|
17897
|
+
if (isStringLiteralUnion(type)) {
|
|
17898
|
+
return { category: "design", cdfTypeHint: "enum" };
|
|
17899
|
+
}
|
|
17900
|
+
if (!isComplexType(type)) {
|
|
17901
|
+
const designNameStart = /^(variant|size|spacing|gap|color|bg|theme|align|layout|orientation|position)/i;
|
|
17902
|
+
const designNameEnd = /(Color|Size|Variant|Style)$/;
|
|
17903
|
+
if (designNameStart.test(name) || designNameEnd.test(name)) {
|
|
17904
|
+
return { category: "design", cdfTypeHint: "string" };
|
|
17905
|
+
}
|
|
17906
|
+
}
|
|
17907
|
+
if (isBooleanType(type)) {
|
|
17908
|
+
const stateNames = ["disabled", "loading", "expanded", "isOpen", "selected", "checked", "active", "preview"];
|
|
17909
|
+
if (stateNames.includes(name)) {
|
|
17910
|
+
return { category: "state", cdfTypeHint: "boolean" };
|
|
17911
|
+
}
|
|
17912
|
+
}
|
|
17913
|
+
if (isBooleanType(type)) {
|
|
17914
|
+
const visualToggle = /^(hide|show|enable|disable|vertical|horizontal|reverse|bold|italic|imageOn|with)/i;
|
|
17915
|
+
if (visualToggle.test(name)) {
|
|
17916
|
+
return { category: "design", cdfTypeHint: "boolean" };
|
|
17917
|
+
}
|
|
17918
|
+
}
|
|
17919
|
+
if (name === "componentId" || name === "sectionKey" || name === "locale" || name === "variantIndex") {
|
|
17920
|
+
return { category: "state", cdfTypeHint: "string" };
|
|
17921
|
+
}
|
|
17922
|
+
if (isStringType(type)) {
|
|
17923
|
+
const urlNameStart = /^(href|url|link|src)/i;
|
|
17924
|
+
const urlNameEnd = /(Url|Href|Link|Src)$/;
|
|
17925
|
+
if (urlNameStart.test(name) || urlNameEnd.test(name)) {
|
|
17926
|
+
return { category: "content", cdfTypeHint: "string" };
|
|
17927
|
+
}
|
|
17928
|
+
}
|
|
17929
|
+
if (isStringType(type)) {
|
|
17930
|
+
const textNameStart = /^(label|title|text|description|caption|heading|subheading|body|alt|name|placeholder|summary)/i;
|
|
17931
|
+
const textNameEnd = /(Text|Label|Title|Name)$/;
|
|
17932
|
+
if (textNameStart.test(name) || textNameEnd.test(name)) {
|
|
17933
|
+
return { category: "content", cdfTypeHint: "string" };
|
|
17934
|
+
}
|
|
17935
|
+
}
|
|
17936
|
+
if (isStringType(type)) {
|
|
17937
|
+
return { category: "content", cdfTypeHint: "string" };
|
|
17938
|
+
}
|
|
17939
|
+
if (isBooleanType(type)) {
|
|
17940
|
+
return { category: "design", cdfTypeHint: "boolean" };
|
|
17941
|
+
}
|
|
17942
|
+
if (isNumberType(type)) {
|
|
17943
|
+
return { category: "design", cdfTypeHint: "string" };
|
|
17944
|
+
}
|
|
17945
|
+
return void 0;
|
|
17946
|
+
}
|
|
17947
|
+
function preClassifyComponent(component) {
|
|
17948
|
+
const props = component.props.flatMap((prop) => {
|
|
17949
|
+
const result = preClassifyProp(prop);
|
|
17950
|
+
if (result?.category === "exclude") {
|
|
17951
|
+
return [];
|
|
17952
|
+
}
|
|
17953
|
+
const { domAttribute: _domAttribute, ...authorableProp } = prop;
|
|
17954
|
+
if (prop.category) {
|
|
17955
|
+
return [authorableProp];
|
|
17956
|
+
}
|
|
17957
|
+
if (!result) {
|
|
17958
|
+
return [authorableProp];
|
|
17959
|
+
}
|
|
17960
|
+
return [
|
|
17961
|
+
{
|
|
17962
|
+
...authorableProp,
|
|
17963
|
+
category: result.category
|
|
17964
|
+
}
|
|
17965
|
+
];
|
|
17966
|
+
});
|
|
17967
|
+
return { ...component, props };
|
|
17968
|
+
}
|
|
17969
|
+
var init_classify_component_props = __esm({
|
|
17970
|
+
"packages/experience-design-system-extraction/dist/src/extract/services/classification/classify-component-props.js"() {
|
|
17971
|
+
"use strict";
|
|
17972
|
+
init_check_prop_types();
|
|
17973
|
+
init_detect_dom_props();
|
|
17974
|
+
}
|
|
17975
|
+
});
|
|
17976
|
+
|
|
17977
|
+
// packages/experience-design-system-extraction/dist/src/extract/services/quality/helpers/authorability/evaluate-authorability.js
|
|
16479
17978
|
function isHandlerOrRefProp(prop) {
|
|
16480
17979
|
if (HANDLER_TYPE_PATTERN.test(prop.type))
|
|
16481
17980
|
return true;
|
|
@@ -16526,34 +18025,15 @@ function hasNoAuthoringSurface(component) {
|
|
|
16526
18025
|
return { skip: false };
|
|
16527
18026
|
}
|
|
16528
18027
|
var HANDLER_TYPE_PATTERN, REF_TYPE_PATTERN;
|
|
16529
|
-
var
|
|
16530
|
-
"packages/experience-design-system-
|
|
18028
|
+
var init_evaluate_authorability = __esm({
|
|
18029
|
+
"packages/experience-design-system-extraction/dist/src/extract/services/quality/helpers/authorability/evaluate-authorability.js"() {
|
|
16531
18030
|
"use strict";
|
|
16532
18031
|
HANDLER_TYPE_PATTERN = /=>|EventHandler|Dispatch<|SetStateAction/;
|
|
16533
18032
|
REF_TYPE_PATTERN = /Ref<|RefObject<|MutableRefObject/;
|
|
16534
18033
|
}
|
|
16535
18034
|
});
|
|
16536
18035
|
|
|
16537
|
-
// packages/experience-design-system-
|
|
16538
|
-
var HIGH_CONFIDENCE_DATA_FETCH_WRAPPER_REASON, POSSIBLE_DATA_FETCH_WRAPPER_REASON, ZERO_SURFACE_RENDERED_UI_REASON;
|
|
16539
|
-
var init_review_reasons = __esm({
|
|
16540
|
-
"packages/experience-design-system-backend-pipeline/dist/src/steps/extraction/src/constants/review-reasons.js"() {
|
|
16541
|
-
"use strict";
|
|
16542
|
-
HIGH_CONFIDENCE_DATA_FETCH_WRAPPER_REASON = "data-fetch-wrapper";
|
|
16543
|
-
POSSIBLE_DATA_FETCH_WRAPPER_REASON = "possible-data-fetch-wrapper";
|
|
16544
|
-
ZERO_SURFACE_RENDERED_UI_REASON = "zero-surface:rendered-ui";
|
|
16545
|
-
}
|
|
16546
|
-
});
|
|
16547
|
-
|
|
16548
|
-
// packages/experience-design-system-backend-pipeline/dist/src/steps/extraction/src/constants/index.js
|
|
16549
|
-
var init_constants7 = __esm({
|
|
16550
|
-
"packages/experience-design-system-backend-pipeline/dist/src/steps/extraction/src/constants/index.js"() {
|
|
16551
|
-
"use strict";
|
|
16552
|
-
init_review_reasons();
|
|
16553
|
-
}
|
|
16554
|
-
});
|
|
16555
|
-
|
|
16556
|
-
// packages/experience-design-system-backend-pipeline/dist/src/steps/extraction/src/framework-adapters/shared/parse-imported-names.js
|
|
18036
|
+
// packages/experience-design-system-extraction/dist/src/extract/helpers/evidence/parse-source-imports.js
|
|
16557
18037
|
function parseImportedNames(importClause) {
|
|
16558
18038
|
const trimmed = importClause.trim();
|
|
16559
18039
|
if (!trimmed)
|
|
@@ -16577,14 +18057,13 @@ function parseImportedNames(importClause) {
|
|
|
16577
18057
|
}
|
|
16578
18058
|
return names;
|
|
16579
18059
|
}
|
|
16580
|
-
var
|
|
16581
|
-
"packages/experience-design-system-
|
|
18060
|
+
var init_parse_source_imports = __esm({
|
|
18061
|
+
"packages/experience-design-system-extraction/dist/src/extract/helpers/evidence/parse-source-imports.js"() {
|
|
16582
18062
|
"use strict";
|
|
16583
18063
|
}
|
|
16584
18064
|
});
|
|
16585
18065
|
|
|
16586
|
-
// packages/experience-design-system-
|
|
16587
|
-
import { readFile as readFile15 } from "node:fs/promises";
|
|
18066
|
+
// packages/experience-design-system-extraction/dist/src/extract/services/quality/helpers/inspection/detect-data-wrapper-patterns.js
|
|
16588
18067
|
function escapeRegExp(value) {
|
|
16589
18068
|
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
16590
18069
|
}
|
|
@@ -16619,11 +18098,11 @@ function hasSiblingForwardRender(sourceText, siblingImports) {
|
|
|
16619
18098
|
function hasVisibleUiRender(sourceText) {
|
|
16620
18099
|
return /return\s*(?:\(|<)/.test(sourceText) && VISIBLE_UI_TAG_PATTERN.test(sourceText);
|
|
16621
18100
|
}
|
|
16622
|
-
function
|
|
18101
|
+
function collectInfraPropNames(component) {
|
|
16623
18102
|
const props = component.props.map((prop) => prop.name);
|
|
16624
18103
|
return props.length > 0 && props.every((prop) => INFRA_PROP_NAMES.has(prop)) ? props : [];
|
|
16625
18104
|
}
|
|
16626
|
-
function
|
|
18105
|
+
function mapScoreToWrapperConfidence(score) {
|
|
16627
18106
|
if (score <= 0)
|
|
16628
18107
|
return 0;
|
|
16629
18108
|
if (score <= 2)
|
|
@@ -16634,9 +18113,26 @@ function scoreToConfidence(score) {
|
|
|
16634
18113
|
return 4;
|
|
16635
18114
|
return 5;
|
|
16636
18115
|
}
|
|
16637
|
-
function
|
|
16638
|
-
return [...new Set(
|
|
18116
|
+
function dedupeStrings(values) {
|
|
18117
|
+
return [...new Set(values)];
|
|
16639
18118
|
}
|
|
18119
|
+
var INFRA_PROP_NAMES, VISIBLE_UI_TAG_PATTERN, GENERATED_IMPORT_PATTERN, GENERATED_QUERY_HOOK_PATTERN, GQL_FILENAME_PATTERN, LOADING_NULL_GUARD_PATTERN, IMPORT_PATTERN;
|
|
18120
|
+
var init_detect_data_wrapper_patterns = __esm({
|
|
18121
|
+
"packages/experience-design-system-extraction/dist/src/extract/services/quality/helpers/inspection/detect-data-wrapper-patterns.js"() {
|
|
18122
|
+
"use strict";
|
|
18123
|
+
init_parse_source_imports();
|
|
18124
|
+
INFRA_PROP_NAMES = /* @__PURE__ */ new Set(["id", "locale", "preview", "slug", "topic", "previousComponent", "__typename"]);
|
|
18125
|
+
VISIBLE_UI_TAG_PATTERN = /<(?:[A-Z][A-Za-z0-9_.]*|div|span|section|main|article|header|footer|nav|aside|img|video|p|h[1-6]|ul|ol|li|button|input|textarea|select|form|label|table|tbody|thead|tr|td|th)\b/;
|
|
18126
|
+
GENERATED_IMPORT_PATTERN = /from\s+['"][^'"]*__generated[^'"]*['"]/;
|
|
18127
|
+
GENERATED_QUERY_HOOK_PATTERN = /\buse[A-Z][A-Za-z0-9]*(?:Lazy|Suspense)?Query\s*\(/;
|
|
18128
|
+
GQL_FILENAME_PATTERN = /(?:-gql|-ggl)\.[cm]?[jt]sx?$/i;
|
|
18129
|
+
LOADING_NULL_GUARD_PATTERN = /if\s*\([^)]*(?:isLoading|loading|!data|!\w+Collection|!\w+Item|!\w+)\s*[^)]*\)\s*return\s+null\b/;
|
|
18130
|
+
IMPORT_PATTERN = /import\s+(?:type\s+)?(.+?)\s+from\s+['"]([^'"]+)['"]/g;
|
|
18131
|
+
}
|
|
18132
|
+
});
|
|
18133
|
+
|
|
18134
|
+
// packages/experience-design-system-extraction/dist/src/extract/services/quality/helpers/inspection/inspect-component-source.js
|
|
18135
|
+
import { readFile as readFile15 } from "node:fs/promises";
|
|
16640
18136
|
async function inspectComponentSource(component) {
|
|
16641
18137
|
let sourceText = "";
|
|
16642
18138
|
try {
|
|
@@ -16651,7 +18147,7 @@ async function inspectComponentSource(component) {
|
|
|
16651
18147
|
const reviewReasons = [];
|
|
16652
18148
|
let wrapperScore = 0;
|
|
16653
18149
|
const hasGeneratedQueryHook = GENERATED_IMPORT_PATTERN.test(sourceText) && GENERATED_QUERY_HOOK_PATTERN.test(sourceText);
|
|
16654
|
-
const infraProps =
|
|
18150
|
+
const infraProps = collectInfraPropNames(component);
|
|
16655
18151
|
const siblingImports = collectSiblingRendererImports(sourceText);
|
|
16656
18152
|
if (GQL_FILENAME_PATTERN.test(component.source)) {
|
|
16657
18153
|
reviewReasons.push("data-wrapper:gql-filename");
|
|
@@ -16681,7 +18177,7 @@ async function inspectComponentSource(component) {
|
|
|
16681
18177
|
reviewReasons.push("data-wrapper:loading-null-guard");
|
|
16682
18178
|
wrapperScore += 1;
|
|
16683
18179
|
}
|
|
16684
|
-
const wrapperConfidence =
|
|
18180
|
+
const wrapperConfidence = mapScoreToWrapperConfidence(wrapperScore);
|
|
16685
18181
|
if (wrapperConfidence >= 4) {
|
|
16686
18182
|
reviewReasons.unshift(HIGH_CONFIDENCE_DATA_FETCH_WRAPPER_REASON);
|
|
16687
18183
|
} else if (wrapperConfidence === 3) {
|
|
@@ -16693,7 +18189,7 @@ async function inspectComponentSource(component) {
|
|
|
16693
18189
|
}
|
|
16694
18190
|
return {
|
|
16695
18191
|
wrapperConfidence,
|
|
16696
|
-
reviewReasons:
|
|
18192
|
+
reviewReasons: dedupeStrings(reviewReasons),
|
|
16697
18193
|
keepDespiteZeroSurface
|
|
16698
18194
|
};
|
|
16699
18195
|
}
|
|
@@ -16724,25 +18220,92 @@ function describeReviewReason(reason) {
|
|
|
16724
18220
|
}
|
|
16725
18221
|
}
|
|
16726
18222
|
function describeReviewReasons(reasons) {
|
|
16727
|
-
return
|
|
18223
|
+
return dedupeStrings(reasons.map(describeReviewReason));
|
|
16728
18224
|
}
|
|
16729
|
-
var
|
|
16730
|
-
var
|
|
16731
|
-
"packages/experience-design-system-
|
|
18225
|
+
var HIGH_CONFIDENCE_DATA_FETCH_WRAPPER_REASON, POSSIBLE_DATA_FETCH_WRAPPER_REASON, ZERO_SURFACE_RENDERED_UI_REASON;
|
|
18226
|
+
var init_inspect_component_source = __esm({
|
|
18227
|
+
"packages/experience-design-system-extraction/dist/src/extract/services/quality/helpers/inspection/inspect-component-source.js"() {
|
|
18228
|
+
"use strict";
|
|
18229
|
+
init_detect_data_wrapper_patterns();
|
|
18230
|
+
HIGH_CONFIDENCE_DATA_FETCH_WRAPPER_REASON = "data-fetch-wrapper";
|
|
18231
|
+
POSSIBLE_DATA_FETCH_WRAPPER_REASON = "possible-data-fetch-wrapper";
|
|
18232
|
+
ZERO_SURFACE_RENDERED_UI_REASON = "zero-surface:rendered-ui";
|
|
18233
|
+
}
|
|
18234
|
+
});
|
|
18235
|
+
|
|
18236
|
+
// packages/experience-design-system-extraction/dist/src/extract/services/quality/helpers/inspection/validate-extracted-components.js
|
|
18237
|
+
function validateExtractedComponents2(components) {
|
|
18238
|
+
const nameCounts = /* @__PURE__ */ new Map();
|
|
18239
|
+
for (const component of components) {
|
|
18240
|
+
const key = component.name.trim();
|
|
18241
|
+
nameCounts.set(key, (nameCounts.get(key) ?? 0) + 1);
|
|
18242
|
+
}
|
|
18243
|
+
return components.map((component) => {
|
|
18244
|
+
const issues = [];
|
|
18245
|
+
if (!component.name.trim()) {
|
|
18246
|
+
issues.push({
|
|
18247
|
+
severity: "error",
|
|
18248
|
+
code: "EMPTY_COMPONENT_NAME",
|
|
18249
|
+
message: "Component name must not be empty"
|
|
18250
|
+
});
|
|
18251
|
+
}
|
|
18252
|
+
for (let i = 0; i < component.props.length; i++) {
|
|
18253
|
+
if (!component.props[i].name.trim()) {
|
|
18254
|
+
issues.push({
|
|
18255
|
+
severity: "error",
|
|
18256
|
+
code: "EMPTY_PROP_NAME",
|
|
18257
|
+
message: `Prop at index ${i} has an empty name`,
|
|
18258
|
+
field: `props[${i}].name`
|
|
18259
|
+
});
|
|
18260
|
+
}
|
|
18261
|
+
}
|
|
18262
|
+
for (let i = 0; i < component.slots.length; i++) {
|
|
18263
|
+
if (!component.slots[i].name.trim()) {
|
|
18264
|
+
issues.push({
|
|
18265
|
+
severity: "warning",
|
|
18266
|
+
code: "EMPTY_SLOT_NAME",
|
|
18267
|
+
message: `Slot at index ${i} has an empty name`,
|
|
18268
|
+
field: `slots[${i}].name`
|
|
18269
|
+
});
|
|
18270
|
+
}
|
|
18271
|
+
}
|
|
18272
|
+
const propNames = new Set(component.props.map((p) => p.name.trim()).filter(Boolean));
|
|
18273
|
+
for (let i = 0; i < component.slots.length; i++) {
|
|
18274
|
+
const slotName = component.slots[i].name.trim();
|
|
18275
|
+
if (slotName && propNames.has(slotName)) {
|
|
18276
|
+
issues.push({
|
|
18277
|
+
severity: "error",
|
|
18278
|
+
code: "PROP_SLOT_NAME_COLLISION",
|
|
18279
|
+
message: `"${slotName}" is used as both a prop name and a slot name`,
|
|
18280
|
+
field: `slots[${i}].name`
|
|
18281
|
+
});
|
|
18282
|
+
}
|
|
18283
|
+
}
|
|
18284
|
+
const nameKey = component.name.trim();
|
|
18285
|
+
if (nameKey && (nameCounts.get(nameKey) ?? 0) > 1) {
|
|
18286
|
+
issues.push({
|
|
18287
|
+
severity: "error",
|
|
18288
|
+
code: "DUPLICATE_COMPONENT_NAME",
|
|
18289
|
+
message: `Component name "${component.name}" appears more than once in the extracted set`
|
|
18290
|
+
});
|
|
18291
|
+
}
|
|
18292
|
+
if (component.props.length === 0 && component.slots.length === 0) {
|
|
18293
|
+
issues.push({
|
|
18294
|
+
severity: "warning",
|
|
18295
|
+
code: "EMPTY_COMPONENT",
|
|
18296
|
+
message: "Component has no props or slots and will be filtered out during generation"
|
|
18297
|
+
});
|
|
18298
|
+
}
|
|
18299
|
+
return { ...component, validationIssues: issues };
|
|
18300
|
+
});
|
|
18301
|
+
}
|
|
18302
|
+
var init_validate_extracted_components = __esm({
|
|
18303
|
+
"packages/experience-design-system-extraction/dist/src/extract/services/quality/helpers/inspection/validate-extracted-components.js"() {
|
|
16732
18304
|
"use strict";
|
|
16733
|
-
init_constants7();
|
|
16734
|
-
init_parse_imported_names();
|
|
16735
|
-
INFRA_PROP_NAMES = /* @__PURE__ */ new Set(["id", "locale", "preview", "slug", "topic", "previousComponent", "__typename"]);
|
|
16736
|
-
VISIBLE_UI_TAG_PATTERN = /<(?:[A-Z][A-Za-z0-9_.]*|div|span|section|main|article|header|footer|nav|aside|img|video|p|h[1-6]|ul|ol|li|button|input|textarea|select|form|label|table|tbody|thead|tr|td|th)\b/;
|
|
16737
|
-
GENERATED_IMPORT_PATTERN = /from\s+['"][^'"]*__generated[^'"]*['"]/;
|
|
16738
|
-
GENERATED_QUERY_HOOK_PATTERN = /\buse[A-Z][A-Za-z0-9]*(?:Lazy|Suspense)?Query\s*\(/;
|
|
16739
|
-
GQL_FILENAME_PATTERN = /(?:-gql|-ggl)\.[cm]?[jt]sx?$/i;
|
|
16740
|
-
LOADING_NULL_GUARD_PATTERN = /if\s*\([^)]*(?:isLoading|loading|!data|!\w+Collection|!\w+Item|!\w+)\s*[^)]*\)\s*return\s+null\b/;
|
|
16741
|
-
IMPORT_PATTERN = /import\s+(?:type\s+)?(.+?)\s+from\s+['"]([^'"]+)['"]/g;
|
|
16742
18305
|
}
|
|
16743
18306
|
});
|
|
16744
18307
|
|
|
16745
|
-
// packages/experience-design-system-
|
|
18308
|
+
// packages/experience-design-system-extraction/dist/src/extract/services/quality/evaluate-extraction-quality.js
|
|
16746
18309
|
function wrapperConfidenceToIssueCount(confidence) {
|
|
16747
18310
|
if (confidence >= 4)
|
|
16748
18311
|
return 2;
|
|
@@ -16774,7 +18337,7 @@ async function evaluateExtractionQuality(components, initialWarnings = []) {
|
|
|
16774
18337
|
}
|
|
16775
18338
|
const extractorReasons = component.reviewReasons ?? [];
|
|
16776
18339
|
const nonAuthorableReason = retainedForReview ? [`non-authorable:${verdict.reason}`] : [];
|
|
16777
|
-
const { confidence, reasons } =
|
|
18340
|
+
const { confidence, reasons } = computeExtractionScore2(component, {
|
|
16778
18341
|
additionalIssueCount: wrapperConfidenceToIssueCount(inspection.wrapperConfidence) + extractorReasons.length + nonAuthorableReason.length,
|
|
16779
18342
|
additionalReasons: [...extractorReasons, ...inspection.reviewReasons, ...nonAuthorableReason]
|
|
16780
18343
|
});
|
|
@@ -16782,206 +18345,74 @@ async function evaluateExtractionQuality(components, initialWarnings = []) {
|
|
|
16782
18345
|
...component,
|
|
16783
18346
|
extractionConfidence: confidence,
|
|
16784
18347
|
reviewReasons: reasons,
|
|
16785
|
-
needsReview:
|
|
18348
|
+
needsReview: deriveNeedsReview2(confidence) || inspection.wrapperConfidence >= 4 || inspection.keepDespiteZeroSurface || retainedForReview || extractorReasons.includes("props-type-unresolved") || (component.needsReview ?? false)
|
|
16786
18349
|
});
|
|
16787
18350
|
}
|
|
16788
18351
|
return {
|
|
16789
|
-
components:
|
|
18352
|
+
components: validateExtractedComponents2(scoredComponents),
|
|
16790
18353
|
warnings
|
|
16791
18354
|
};
|
|
16792
18355
|
}
|
|
16793
18356
|
var init_evaluate_extraction_quality = __esm({
|
|
16794
|
-
"packages/experience-design-system-
|
|
18357
|
+
"packages/experience-design-system-extraction/dist/src/extract/services/quality/evaluate-extraction-quality.js"() {
|
|
16795
18358
|
"use strict";
|
|
16796
|
-
|
|
16797
|
-
|
|
16798
|
-
|
|
16799
|
-
|
|
18359
|
+
init_evaluate_authorability();
|
|
18360
|
+
init_compute_extraction_score();
|
|
18361
|
+
init_inspect_component_source();
|
|
18362
|
+
init_validate_extracted_components();
|
|
16800
18363
|
}
|
|
16801
18364
|
});
|
|
16802
18365
|
|
|
16803
|
-
// packages/experience-design-system-
|
|
16804
|
-
|
|
16805
|
-
|
|
16806
|
-
|
|
16807
|
-
|
|
16808
|
-
|
|
16809
|
-
|
|
16810
|
-
return true;
|
|
16811
|
-
return isStringLiteralUnion(t);
|
|
16812
|
-
}
|
|
16813
|
-
function isBooleanType(type) {
|
|
16814
|
-
return type.trim() === "boolean";
|
|
16815
|
-
}
|
|
16816
|
-
function isStringType(type) {
|
|
16817
|
-
return type.trim() === "string";
|
|
16818
|
-
}
|
|
16819
|
-
function isNumberType(type) {
|
|
16820
|
-
return type.trim() === "number";
|
|
16821
|
-
}
|
|
16822
|
-
function isComplexType(type) {
|
|
16823
|
-
return !isSimpleType(type);
|
|
16824
|
-
}
|
|
16825
|
-
function isDomPassThroughProp(name) {
|
|
16826
|
-
if (DOM_PASS_THROUGH_PROPS.has(name))
|
|
16827
|
-
return true;
|
|
16828
|
-
if (/^aria[-A-Z]/.test(name))
|
|
16829
|
-
return true;
|
|
16830
|
-
return name.startsWith("data-");
|
|
16831
|
-
}
|
|
16832
|
-
function preClassifyProp(prop) {
|
|
16833
|
-
const { name, type } = prop;
|
|
16834
|
-
if (/^on[A-Z]/.test(name) || type.includes("=> void") || type.includes("EventHandler")) {
|
|
16835
|
-
return { category: "exclude" };
|
|
16836
|
-
}
|
|
16837
|
-
if (name === "ref" || name === "innerRef" || type.includes("Ref<") || type.includes("RefObject<")) {
|
|
16838
|
-
return { category: "exclude" };
|
|
16839
|
-
}
|
|
16840
|
-
if (name === "testId" || name === "data-testid" || name === "dataTestId") {
|
|
16841
|
-
return { category: "exclude" };
|
|
16842
|
-
}
|
|
16843
|
-
if (name === "key") {
|
|
16844
|
-
return { category: "exclude" };
|
|
16845
|
-
}
|
|
16846
|
-
if (type.includes("Dispatch<") || type.includes("SetStateAction")) {
|
|
16847
|
-
return { category: "exclude" };
|
|
16848
|
-
}
|
|
16849
|
-
if (isDomPassThroughProp(name)) {
|
|
16850
|
-
return { category: "exclude" };
|
|
16851
|
-
}
|
|
16852
|
-
if (name === "name" && prop.domAttribute) {
|
|
16853
|
-
return { category: "exclude" };
|
|
16854
|
-
}
|
|
16855
|
-
if (isStringLiteralUnion(type)) {
|
|
16856
|
-
return { category: "design", cdfTypeHint: "enum" };
|
|
16857
|
-
}
|
|
16858
|
-
if (!isComplexType(type)) {
|
|
16859
|
-
const designNameStart = /^(variant|size|spacing|gap|color|bg|theme|align|layout|orientation|position)/i;
|
|
16860
|
-
const designNameEnd = /(Color|Size|Variant|Style)$/;
|
|
16861
|
-
if (designNameStart.test(name) || designNameEnd.test(name)) {
|
|
16862
|
-
return { category: "design", cdfTypeHint: "string" };
|
|
16863
|
-
}
|
|
16864
|
-
}
|
|
16865
|
-
if (isBooleanType(type)) {
|
|
16866
|
-
const stateNames = ["disabled", "loading", "expanded", "isOpen", "selected", "checked", "active", "preview"];
|
|
16867
|
-
if (stateNames.includes(name)) {
|
|
16868
|
-
return { category: "state", cdfTypeHint: "boolean" };
|
|
16869
|
-
}
|
|
16870
|
-
}
|
|
16871
|
-
if (isBooleanType(type)) {
|
|
16872
|
-
const visualToggle = /^(hide|show|enable|disable|vertical|horizontal|reverse|bold|italic|imageOn|with)/i;
|
|
16873
|
-
if (visualToggle.test(name)) {
|
|
16874
|
-
return { category: "design", cdfTypeHint: "boolean" };
|
|
16875
|
-
}
|
|
16876
|
-
}
|
|
16877
|
-
if (name === "componentId" || name === "sectionKey" || name === "locale" || name === "variantIndex") {
|
|
16878
|
-
return { category: "state", cdfTypeHint: "string" };
|
|
16879
|
-
}
|
|
16880
|
-
if (isStringType(type)) {
|
|
16881
|
-
const urlNameStart = /^(href|url|link|src)/i;
|
|
16882
|
-
const urlNameEnd = /(Url|Href|Link|Src)$/;
|
|
16883
|
-
if (urlNameStart.test(name) || urlNameEnd.test(name)) {
|
|
16884
|
-
return { category: "content", cdfTypeHint: "string" };
|
|
16885
|
-
}
|
|
16886
|
-
}
|
|
16887
|
-
if (isStringType(type)) {
|
|
16888
|
-
const textNameStart = /^(label|title|text|description|caption|heading|subheading|body|alt|name|placeholder|summary)/i;
|
|
16889
|
-
const textNameEnd = /(Text|Label|Title|Name)$/;
|
|
16890
|
-
if (textNameStart.test(name) || textNameEnd.test(name)) {
|
|
16891
|
-
return { category: "content", cdfTypeHint: "string" };
|
|
16892
|
-
}
|
|
16893
|
-
}
|
|
16894
|
-
if (isStringType(type)) {
|
|
16895
|
-
return { category: "content", cdfTypeHint: "string" };
|
|
16896
|
-
}
|
|
16897
|
-
if (isBooleanType(type)) {
|
|
16898
|
-
return { category: "design", cdfTypeHint: "boolean" };
|
|
16899
|
-
}
|
|
16900
|
-
if (isNumberType(type)) {
|
|
16901
|
-
return { category: "design", cdfTypeHint: "string" };
|
|
18366
|
+
// packages/experience-design-system-extraction/dist/src/extract/orchestrator/execute-extraction-orchestrator.js
|
|
18367
|
+
var init_execute_extraction_orchestrator = __esm({
|
|
18368
|
+
"packages/experience-design-system-extraction/dist/src/extract/orchestrator/execute-extraction-orchestrator.js"() {
|
|
18369
|
+
"use strict";
|
|
18370
|
+
init_extract_components();
|
|
18371
|
+
init_classify_component_props();
|
|
18372
|
+
init_evaluate_extraction_quality();
|
|
16902
18373
|
}
|
|
16903
|
-
|
|
16904
|
-
|
|
16905
|
-
|
|
16906
|
-
|
|
16907
|
-
|
|
16908
|
-
|
|
16909
|
-
|
|
16910
|
-
|
|
16911
|
-
|
|
16912
|
-
|
|
16913
|
-
|
|
16914
|
-
|
|
16915
|
-
if (!result) {
|
|
16916
|
-
return [authorableProp];
|
|
16917
|
-
}
|
|
16918
|
-
return [
|
|
16919
|
-
{
|
|
16920
|
-
...authorableProp,
|
|
16921
|
-
category: result.category
|
|
16922
|
-
}
|
|
16923
|
-
];
|
|
16924
|
-
});
|
|
16925
|
-
return { ...component, props };
|
|
16926
|
-
}
|
|
16927
|
-
var DOM_PASS_THROUGH_PROPS;
|
|
16928
|
-
var init_pre_classify = __esm({
|
|
16929
|
-
"packages/experience-design-system-backend-pipeline/dist/src/steps/extraction/src/helpers/pre-classify.js"() {
|
|
18374
|
+
});
|
|
18375
|
+
|
|
18376
|
+
// packages/experience-design-system-extraction/dist/src/extract/controller/helpers/validate-endpoint-request.js
|
|
18377
|
+
var init_validate_endpoint_request = __esm({
|
|
18378
|
+
"packages/experience-design-system-extraction/dist/src/extract/controller/helpers/validate-endpoint-request.js"() {
|
|
18379
|
+
"use strict";
|
|
18380
|
+
}
|
|
18381
|
+
});
|
|
18382
|
+
|
|
18383
|
+
// packages/experience-design-system-extraction/dist/src/extract/controller/extract-controller.js
|
|
18384
|
+
var init_extract_controller = __esm({
|
|
18385
|
+
"packages/experience-design-system-extraction/dist/src/extract/controller/extract-controller.js"() {
|
|
16930
18386
|
"use strict";
|
|
16931
|
-
|
|
16932
|
-
|
|
16933
|
-
|
|
16934
|
-
|
|
16935
|
-
|
|
16936
|
-
|
|
16937
|
-
|
|
16938
|
-
|
|
16939
|
-
|
|
16940
|
-
|
|
16941
|
-
|
|
16942
|
-
|
|
16943
|
-
|
|
16944
|
-
|
|
16945
|
-
|
|
16946
|
-
|
|
16947
|
-
|
|
16948
|
-
|
|
16949
|
-
|
|
16950
|
-
|
|
16951
|
-
|
|
16952
|
-
|
|
16953
|
-
|
|
16954
|
-
|
|
16955
|
-
|
|
16956
|
-
|
|
16957
|
-
|
|
16958
|
-
|
|
16959
|
-
|
|
16960
|
-
"autoComplete",
|
|
16961
|
-
"autocomplete",
|
|
16962
|
-
"autoFocus",
|
|
16963
|
-
"autofocus",
|
|
16964
|
-
"translate",
|
|
16965
|
-
"part",
|
|
16966
|
-
"exportparts",
|
|
16967
|
-
"aria",
|
|
16968
|
-
// Framework theming / pass-through escape hatches — dev-facing, never marketer-configurable
|
|
16969
|
-
"dt",
|
|
16970
|
-
"pt",
|
|
16971
|
-
"ptOptions",
|
|
16972
|
-
"unstyled",
|
|
16973
|
-
"sx",
|
|
16974
|
-
// Polymorphic component props — change rendered HTML/component, not marketer-visible behavior
|
|
16975
|
-
"as",
|
|
16976
|
-
"element",
|
|
16977
|
-
"component",
|
|
16978
|
-
// QA / vendor test attributes
|
|
16979
|
-
"dataQa",
|
|
16980
|
-
"data-qa",
|
|
16981
|
-
// Vue v-model internals — framework wiring, never marketer-configurable
|
|
16982
|
-
"modelValue",
|
|
16983
|
-
"modelModifiers"
|
|
16984
|
-
]);
|
|
18387
|
+
init_execute_extraction_orchestrator();
|
|
18388
|
+
init_validate_endpoint_request();
|
|
18389
|
+
}
|
|
18390
|
+
});
|
|
18391
|
+
|
|
18392
|
+
// packages/experience-design-system-extraction/dist/src/index.js
|
|
18393
|
+
var init_src3 = __esm({
|
|
18394
|
+
"packages/experience-design-system-extraction/dist/src/index.js"() {
|
|
18395
|
+
"use strict";
|
|
18396
|
+
init_display();
|
|
18397
|
+
init_extract_components();
|
|
18398
|
+
init_extract_controller();
|
|
18399
|
+
init_extractor2();
|
|
18400
|
+
init_extractor6();
|
|
18401
|
+
init_extractor5();
|
|
18402
|
+
init_extractor3();
|
|
18403
|
+
init_extractor();
|
|
18404
|
+
init_extractor7();
|
|
18405
|
+
init_extractor4();
|
|
18406
|
+
init_collect_allowed_component_names();
|
|
18407
|
+
init_evaluate_extraction_quality();
|
|
18408
|
+
init_evaluate_authorability();
|
|
18409
|
+
init_evaluate_authorability();
|
|
18410
|
+
init_compute_extraction_score();
|
|
18411
|
+
init_inspect_component_source();
|
|
18412
|
+
init_validate_extracted_components();
|
|
18413
|
+
init_parse_source_imports();
|
|
18414
|
+
init_detect_slot_from_prop();
|
|
18415
|
+
init_classify_component_props();
|
|
16985
18416
|
}
|
|
16986
18417
|
});
|
|
16987
18418
|
|
|
@@ -17010,7 +18441,7 @@ function emitPreClassificationExclusions(extraction, onExclusion) {
|
|
|
17010
18441
|
var init_emit_pre_classification_exclusions = __esm({
|
|
17011
18442
|
"packages/experience-design-system-backend-pipeline/dist/src/orchestrators/run-extract-and-compose-session/helpers/emit-pre-classification-exclusions.js"() {
|
|
17012
18443
|
"use strict";
|
|
17013
|
-
|
|
18444
|
+
init_src3();
|
|
17014
18445
|
}
|
|
17015
18446
|
});
|
|
17016
18447
|
|
|
@@ -17353,8 +18784,7 @@ async function runExtractAndComposeSession(request) {
|
|
|
17353
18784
|
var init_run_extract_and_compose_session = __esm({
|
|
17354
18785
|
"packages/experience-design-system-backend-pipeline/dist/src/orchestrators/run-extract-and-compose-session/run-extract-and-compose-session.js"() {
|
|
17355
18786
|
"use strict";
|
|
17356
|
-
|
|
17357
|
-
init_pre_classify();
|
|
18787
|
+
init_src3();
|
|
17358
18788
|
init_resolve_composition_sources();
|
|
17359
18789
|
init_db();
|
|
17360
18790
|
init_emit_pre_classification_exclusions();
|
|
@@ -17945,7 +19375,7 @@ var init_run_generate_components_session = __esm({
|
|
|
17945
19375
|
});
|
|
17946
19376
|
|
|
17947
19377
|
// packages/experience-design-system-backend-pipeline/dist/src/index.js
|
|
17948
|
-
var
|
|
19378
|
+
var init_src4 = __esm({
|
|
17949
19379
|
"packages/experience-design-system-backend-pipeline/dist/src/index.js"() {
|
|
17950
19380
|
"use strict";
|
|
17951
19381
|
init_export_cdf_document();
|
|
@@ -18183,7 +19613,7 @@ var AGENT_LABELS, asString;
|
|
|
18183
19613
|
var init_agent_store = __esm({
|
|
18184
19614
|
"packages/experience-design-system-cli/src/tui/settings/configuration/agents/agent-store.ts"() {
|
|
18185
19615
|
"use strict";
|
|
18186
|
-
|
|
19616
|
+
init_src4();
|
|
18187
19617
|
init_v1_store();
|
|
18188
19618
|
AGENT_LABELS = {
|
|
18189
19619
|
claude: "Claude Code",
|
|
@@ -18216,7 +19646,7 @@ var shellValues;
|
|
|
18216
19646
|
var init_apply_binary_overrides = __esm({
|
|
18217
19647
|
"packages/experience-design-system-cli/src/tui/settings/configuration/agents/apply-binary-overrides.ts"() {
|
|
18218
19648
|
"use strict";
|
|
18219
|
-
|
|
19649
|
+
init_src4();
|
|
18220
19650
|
shellValues = /* @__PURE__ */ new Map();
|
|
18221
19651
|
}
|
|
18222
19652
|
});
|
|
@@ -18308,7 +19738,7 @@ var init_home_theme = __esm({
|
|
|
18308
19738
|
}
|
|
18309
19739
|
});
|
|
18310
19740
|
|
|
18311
|
-
// packages/experience-design-system-cli/src/tui/
|
|
19741
|
+
// packages/experience-design-system-cli/src/tui/home/version.ts
|
|
18312
19742
|
import { readFileSync as readFileSync8 } from "node:fs";
|
|
18313
19743
|
import { join as join17 } from "node:path";
|
|
18314
19744
|
import semver from "semver";
|
|
@@ -18341,7 +19771,7 @@ async function checkForUpgrade() {
|
|
|
18341
19771
|
}
|
|
18342
19772
|
var PACKAGE_NAME2, TAGS_URL;
|
|
18343
19773
|
var init_version = __esm({
|
|
18344
|
-
"packages/experience-design-system-cli/src/tui/
|
|
19774
|
+
"packages/experience-design-system-cli/src/tui/home/version.ts"() {
|
|
18345
19775
|
"use strict";
|
|
18346
19776
|
init_package_root();
|
|
18347
19777
|
PACKAGE_NAME2 = "@contentful/experience-design-system-cli";
|
|
@@ -18395,14 +19825,11 @@ var init_control_hints = __esm({
|
|
|
18395
19825
|
import { useEffect as useEffect2, useState as useState2 } from "react";
|
|
18396
19826
|
import { Box, Text as Text2, useApp, useInput } from "ink";
|
|
18397
19827
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
18398
|
-
function
|
|
19828
|
+
function versionStatus(upgradeCheck) {
|
|
18399
19829
|
if (upgradeCheck?.status === "update-available") {
|
|
18400
|
-
return {
|
|
18401
|
-
}
|
|
18402
|
-
if (upgradeCheck?.status === "up-to-date") {
|
|
18403
|
-
return { label: "Upgrade Version (up to date)", color: PALETTE.muted };
|
|
19830
|
+
return { text: ` (upgrade available v${upgradeCheck.latest})`, color: PALETTE.success };
|
|
18404
19831
|
}
|
|
18405
|
-
return
|
|
19832
|
+
return void 0;
|
|
18406
19833
|
}
|
|
18407
19834
|
function HomeScreen({ onNavigate }) {
|
|
18408
19835
|
const [focusIdx, setFocusIdx] = useState2(0);
|
|
@@ -18410,7 +19837,7 @@ function HomeScreen({ onNavigate }) {
|
|
|
18410
19837
|
const { exit } = useApp();
|
|
18411
19838
|
const terminalWidth = useTerminalWidth();
|
|
18412
19839
|
const tooNarrow = terminalWidth < MIN_TERMINAL_WIDTH;
|
|
18413
|
-
const
|
|
19840
|
+
const status = versionStatus(upgradeCheck);
|
|
18414
19841
|
useEffect2(() => {
|
|
18415
19842
|
checkForUpgrade().then(setUpgradeCheck).catch(() => setUpgradeCheck({ status: "error" }));
|
|
18416
19843
|
}, []);
|
|
@@ -18430,7 +19857,6 @@ function HomeScreen({ onNavigate }) {
|
|
|
18430
19857
|
}
|
|
18431
19858
|
if (key.return) {
|
|
18432
19859
|
const item = START_ITEMS[focusIdx];
|
|
18433
|
-
if (item.screen === "upgrade" && upgradeDisabled) return;
|
|
18434
19860
|
onNavigate(item.screen);
|
|
18435
19861
|
return;
|
|
18436
19862
|
}
|
|
@@ -18448,26 +19874,16 @@ function HomeScreen({ onNavigate }) {
|
|
|
18448
19874
|
/* @__PURE__ */ jsx2(Text2, { color: PALETTE.muted, children: SUBTITLE }),
|
|
18449
19875
|
/* @__PURE__ */ jsxs(Text2, { color: PALETTE.muted, children: [
|
|
18450
19876
|
"v",
|
|
18451
|
-
VERSION
|
|
19877
|
+
VERSION,
|
|
19878
|
+
status && /* @__PURE__ */ jsx2(Text2, { color: status.color, children: status.text })
|
|
18452
19879
|
] })
|
|
18453
19880
|
] }),
|
|
18454
19881
|
/* @__PURE__ */ jsx2(Box, { marginTop: 1, justifyContent: "center", children: /* @__PURE__ */ jsx2(Box, { flexDirection: "column", children: START_ITEMS.map((item, i) => {
|
|
18455
19882
|
const focused = i === focusIdx;
|
|
18456
|
-
|
|
18457
|
-
|
|
18458
|
-
const dimmed = isUpgradeItem && upgradeDisabled;
|
|
18459
|
-
return /* @__PURE__ */ jsxs(
|
|
18460
|
-
Text2,
|
|
18461
|
-
{
|
|
18462
|
-
bold: focused && !dimmed,
|
|
18463
|
-
color: dimmed ? PALETTE.muted : focused ? PALETTE.accent : display.color,
|
|
18464
|
-
children: [
|
|
18465
|
-
focused ? `${FOCUS_MARKER} ` : " ",
|
|
18466
|
-
display.label
|
|
18467
|
-
]
|
|
18468
|
-
},
|
|
19883
|
+
return /* @__PURE__ */ jsxs(Text2, { bold: focused, color: focused ? PALETTE.accent : void 0, children: [
|
|
19884
|
+
focused ? `${FOCUS_MARKER} ` : " ",
|
|
18469
19885
|
item.label
|
|
18470
|
-
);
|
|
19886
|
+
] }, item.label);
|
|
18471
19887
|
}) }) }),
|
|
18472
19888
|
/* @__PURE__ */ jsx2(Box, { marginTop: 1, justifyContent: "center", children: /* @__PURE__ */ jsx2(
|
|
18473
19889
|
ControlHints,
|
|
@@ -18496,7 +19912,6 @@ var init_home = __esm({
|
|
|
18496
19912
|
MIN_TERMINAL_WIDTH = 164;
|
|
18497
19913
|
START_ITEMS = [
|
|
18498
19914
|
{ label: "Import", screen: "import" },
|
|
18499
|
-
{ label: "Upgrade Version", screen: "upgrade" },
|
|
18500
19915
|
{ label: "Settings", screen: "settings" },
|
|
18501
19916
|
{ label: "Help", screen: "help" }
|
|
18502
19917
|
];
|
|
@@ -18889,7 +20304,7 @@ function foldSvelteAndMdIntoOther(counts) {
|
|
|
18889
20304
|
var init_scan_files = __esm({
|
|
18890
20305
|
"packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/helpers/scan-files.ts"() {
|
|
18891
20306
|
"use strict";
|
|
18892
|
-
|
|
20307
|
+
init_src4();
|
|
18893
20308
|
}
|
|
18894
20309
|
});
|
|
18895
20310
|
|
|
@@ -19011,7 +20426,7 @@ var FIELDS;
|
|
|
19011
20426
|
var init_logic4 = __esm({
|
|
19012
20427
|
"packages/experience-design-system-cli/src/tui/import/steps/04-credentials/logic.ts"() {
|
|
19013
20428
|
"use strict";
|
|
19014
|
-
|
|
20429
|
+
init_src4();
|
|
19015
20430
|
FIELDS = ["spaceId", "environmentId", "cmaToken", "host"];
|
|
19016
20431
|
}
|
|
19017
20432
|
});
|
|
@@ -19048,7 +20463,7 @@ function cliUserAgent() {
|
|
|
19048
20463
|
var init_user_agent = __esm({
|
|
19049
20464
|
"packages/experience-design-system-cli/src/tui/user-agent.ts"() {
|
|
19050
20465
|
"use strict";
|
|
19051
|
-
|
|
20466
|
+
init_src4();
|
|
19052
20467
|
init_version();
|
|
19053
20468
|
}
|
|
19054
20469
|
});
|
|
@@ -19083,7 +20498,7 @@ function toUserError(error, host) {
|
|
|
19083
20498
|
var init_validate4 = __esm({
|
|
19084
20499
|
"packages/experience-design-system-cli/src/tui/import/steps/04-credentials/validate.ts"() {
|
|
19085
20500
|
"use strict";
|
|
19086
|
-
|
|
20501
|
+
init_src4();
|
|
19087
20502
|
init_user_agent();
|
|
19088
20503
|
}
|
|
19089
20504
|
});
|
|
@@ -19186,7 +20601,7 @@ var init_screen4 = __esm({
|
|
|
19186
20601
|
"use strict";
|
|
19187
20602
|
init_theme();
|
|
19188
20603
|
init_controls4();
|
|
19189
|
-
|
|
20604
|
+
init_src4();
|
|
19190
20605
|
init_logic4();
|
|
19191
20606
|
init_validate4();
|
|
19192
20607
|
LABELS = {
|
|
@@ -19652,7 +21067,7 @@ function resolveAgentChoice(flag, stored) {
|
|
|
19652
21067
|
var init_logic9 = __esm({
|
|
19653
21068
|
"packages/experience-design-system-cli/src/tui/import/steps/06-extraction/logic.ts"() {
|
|
19654
21069
|
"use strict";
|
|
19655
|
-
|
|
21070
|
+
init_src4();
|
|
19656
21071
|
}
|
|
19657
21072
|
});
|
|
19658
21073
|
|
|
@@ -19808,7 +21223,7 @@ var SELECT_SKILL_PATH, DEFAULT_TIMEOUT_MS5;
|
|
|
19808
21223
|
var init_selection2 = __esm({
|
|
19809
21224
|
"packages/experience-design-system-cli/src/tui/import/steps/06-extraction/selection.ts"() {
|
|
19810
21225
|
"use strict";
|
|
19811
|
-
|
|
21226
|
+
init_src4();
|
|
19812
21227
|
init_find_skill_path();
|
|
19813
21228
|
SELECT_SKILL_PATH = findSkillPath("select-components.md");
|
|
19814
21229
|
DEFAULT_TIMEOUT_MS5 = Number(process.env.EDS_AGENT_TIMEOUT_MS ?? 5 * 60 * 1e3);
|
|
@@ -19953,7 +21368,7 @@ var TOKENS_SKILL_PATH, realDeps, fail, errorMessage2;
|
|
|
19953
21368
|
var init_run = __esm({
|
|
19954
21369
|
"packages/experience-design-system-cli/src/tui/import/steps/06-extraction/run.ts"() {
|
|
19955
21370
|
"use strict";
|
|
19956
|
-
|
|
21371
|
+
init_src4();
|
|
19957
21372
|
init_find_skill_path();
|
|
19958
21373
|
init_logic9();
|
|
19959
21374
|
init_selection2();
|
|
@@ -23050,7 +24465,7 @@ async function checkGenerationCache(input) {
|
|
|
23050
24465
|
var init_cache_check = __esm({
|
|
23051
24466
|
"packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/cache-check.ts"() {
|
|
23052
24467
|
"use strict";
|
|
23053
|
-
|
|
24468
|
+
init_src4();
|
|
23054
24469
|
}
|
|
23055
24470
|
});
|
|
23056
24471
|
|
|
@@ -23077,7 +24492,7 @@ function loadScopeGate(sessionId) {
|
|
|
23077
24492
|
var init_load = __esm({
|
|
23078
24493
|
"packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/load.ts"() {
|
|
23079
24494
|
"use strict";
|
|
23080
|
-
|
|
24495
|
+
init_src4();
|
|
23081
24496
|
}
|
|
23082
24497
|
});
|
|
23083
24498
|
|
|
@@ -23207,7 +24622,7 @@ async function prepareMapTokens(input, generatedSessionId) {
|
|
|
23207
24622
|
var init_map_tokens = __esm({
|
|
23208
24623
|
"packages/experience-design-system-cli/src/tui/import/steps/08-generation/map-tokens.ts"() {
|
|
23209
24624
|
"use strict";
|
|
23210
|
-
|
|
24625
|
+
init_src4();
|
|
23211
24626
|
init_logic10();
|
|
23212
24627
|
}
|
|
23213
24628
|
});
|
|
@@ -23225,7 +24640,7 @@ async function saveDecisions(input) {
|
|
|
23225
24640
|
var init_save_decisions = __esm({
|
|
23226
24641
|
"packages/experience-design-system-cli/src/tui/import/steps/08-generation/save-decisions.ts"() {
|
|
23227
24642
|
"use strict";
|
|
23228
|
-
|
|
24643
|
+
init_src4();
|
|
23229
24644
|
}
|
|
23230
24645
|
});
|
|
23231
24646
|
|
|
@@ -23343,7 +24758,7 @@ var COMPONENTS_SKILL_PATH, MAP_TOKENS_SKILL_PATH, realDeps3, fail2, errorMessage
|
|
|
23343
24758
|
var init_run2 = __esm({
|
|
23344
24759
|
"packages/experience-design-system-cli/src/tui/import/steps/08-generation/run.ts"() {
|
|
23345
24760
|
"use strict";
|
|
23346
|
-
|
|
24761
|
+
init_src4();
|
|
23347
24762
|
init_find_skill_path();
|
|
23348
24763
|
init_logic9();
|
|
23349
24764
|
init_map_tokens();
|
|
@@ -23421,7 +24836,7 @@ function buildFlowStart(input) {
|
|
|
23421
24836
|
var init_build_flow_start = __esm({
|
|
23422
24837
|
"packages/experience-design-system-cli/src/tui/import/steps/10-flow/flow/build-flow-start.ts"() {
|
|
23423
24838
|
"use strict";
|
|
23424
|
-
|
|
24839
|
+
init_src4();
|
|
23425
24840
|
}
|
|
23426
24841
|
});
|
|
23427
24842
|
|
|
@@ -23795,7 +25210,7 @@ var init_dtcg2 = __esm({
|
|
|
23795
25210
|
});
|
|
23796
25211
|
|
|
23797
25212
|
// packages/experience-design-system-types/dist/src/index.js
|
|
23798
|
-
var
|
|
25213
|
+
var init_src5 = __esm({
|
|
23799
25214
|
"packages/experience-design-system-types/dist/src/index.js"() {
|
|
23800
25215
|
"use strict";
|
|
23801
25216
|
init_cdf2();
|
|
@@ -25943,7 +27358,7 @@ var init_FieldEditor = __esm({
|
|
|
25943
27358
|
"packages/experience-design-system-cli/src/tui/import/steps/09-review/components/FieldEditor.tsx"() {
|
|
25944
27359
|
"use strict";
|
|
25945
27360
|
init_theme();
|
|
25946
|
-
|
|
27361
|
+
init_src5();
|
|
25947
27362
|
init_useImmediateInput();
|
|
25948
27363
|
init_scroll_offset();
|
|
25949
27364
|
init_cycle_detection();
|
|
@@ -26858,7 +28273,7 @@ function finalizeReviewSession(extractSessionId, components) {
|
|
|
26858
28273
|
var init_session3 = __esm({
|
|
26859
28274
|
"packages/experience-design-system-cli/src/tui/import/steps/09-review/session.ts"() {
|
|
26860
28275
|
"use strict";
|
|
26861
|
-
|
|
28276
|
+
init_src4();
|
|
26862
28277
|
}
|
|
26863
28278
|
});
|
|
26864
28279
|
|
|
@@ -26971,10 +28386,10 @@ var TimeoutError, DEFAULT_TIMEOUT_MS6;
|
|
|
26971
28386
|
var init_run_live_preview = __esm({
|
|
26972
28387
|
"packages/experience-design-system-cli/src/tui/import/steps/09-review/run-live-preview.ts"() {
|
|
26973
28388
|
"use strict";
|
|
28389
|
+
init_src5();
|
|
28390
|
+
init_src4();
|
|
28391
|
+
init_src4();
|
|
26974
28392
|
init_src4();
|
|
26975
|
-
init_src3();
|
|
26976
|
-
init_src3();
|
|
26977
|
-
init_src3();
|
|
26978
28393
|
init_user_agent();
|
|
26979
28394
|
TimeoutError = class extends Error {
|
|
26980
28395
|
constructor(message = "live-preview timed out") {
|
|
@@ -27300,7 +28715,7 @@ function useReviewFinalize({
|
|
|
27300
28715
|
var init_use_review_session = __esm({
|
|
27301
28716
|
"packages/experience-design-system-cli/src/tui/import/steps/09-review/use-review-session.ts"() {
|
|
27302
28717
|
"use strict";
|
|
27303
|
-
|
|
28718
|
+
init_src4();
|
|
27304
28719
|
init_history();
|
|
27305
28720
|
init_session3();
|
|
27306
28721
|
init_use_finalize_preview();
|
|
@@ -27478,7 +28893,7 @@ function useReviewEditor({
|
|
|
27478
28893
|
var init_use_review_editor = __esm({
|
|
27479
28894
|
"packages/experience-design-system-cli/src/tui/import/steps/09-review/use-review-editor.ts"() {
|
|
27480
28895
|
"use strict";
|
|
27481
|
-
|
|
28896
|
+
init_src4();
|
|
27482
28897
|
init_token_suggestions();
|
|
27483
28898
|
}
|
|
27484
28899
|
});
|
|
@@ -27928,7 +29343,7 @@ var DEFAULT_DEBOUNCE_MS;
|
|
|
27928
29343
|
var init_use_live_preview = __esm({
|
|
27929
29344
|
"packages/experience-design-system-cli/src/tui/import/steps/09-review/use-live-preview.ts"() {
|
|
27930
29345
|
"use strict";
|
|
27931
|
-
|
|
29346
|
+
init_src4();
|
|
27932
29347
|
init_run_live_preview();
|
|
27933
29348
|
DEFAULT_DEBOUNCE_MS = 500;
|
|
27934
29349
|
}
|
|
@@ -29311,7 +30726,7 @@ var init_generate_review_step = __esm({
|
|
|
29311
30726
|
init_issue_inheritance();
|
|
29312
30727
|
init_removed_components_text();
|
|
29313
30728
|
init_useImmediateInput();
|
|
29314
|
-
|
|
30729
|
+
init_src4();
|
|
29315
30730
|
init_cycle_detection();
|
|
29316
30731
|
init_cycle_panel_scroll();
|
|
29317
30732
|
init_fuzzy_search();
|
|
@@ -30268,7 +31683,7 @@ var init_WizardPreviewStep = __esm({
|
|
|
30268
31683
|
init_theme();
|
|
30269
31684
|
init_useImmediateInput();
|
|
30270
31685
|
init_use_terminal_size();
|
|
30271
|
-
|
|
31686
|
+
init_src4();
|
|
30272
31687
|
init_preview_diff();
|
|
30273
31688
|
init_StepHeader();
|
|
30274
31689
|
init_SpaceEnvironment();
|
|
@@ -30434,7 +31849,7 @@ function FlowScreen({
|
|
|
30434
31849
|
var init_screen10 = __esm({
|
|
30435
31850
|
"packages/experience-design-system-cli/src/tui/import/steps/10-flow/flow/screen.tsx"() {
|
|
30436
31851
|
"use strict";
|
|
30437
|
-
|
|
31852
|
+
init_src5();
|
|
30438
31853
|
init_shared2();
|
|
30439
31854
|
init_screen9();
|
|
30440
31855
|
init_generate_review_step();
|
|
@@ -30623,8 +32038,8 @@ var realPreviewDeps;
|
|
|
30623
32038
|
var init_preview2 = __esm({
|
|
30624
32039
|
"packages/experience-design-system-cli/src/tui/import/steps/10-flow/flow/preview.ts"() {
|
|
30625
32040
|
"use strict";
|
|
30626
|
-
init_src3();
|
|
30627
32041
|
init_src4();
|
|
32042
|
+
init_src5();
|
|
30628
32043
|
init_user_agent();
|
|
30629
32044
|
init_wizard_state_transitions();
|
|
30630
32045
|
realPreviewDeps = () => ({
|
|
@@ -30797,8 +32212,8 @@ var realPushDeps, zeroResult, componentsOf;
|
|
|
30797
32212
|
var init_push = __esm({
|
|
30798
32213
|
"packages/experience-design-system-cli/src/tui/import/steps/10-flow/flow/push.ts"() {
|
|
30799
32214
|
"use strict";
|
|
30800
|
-
init_src3();
|
|
30801
32215
|
init_src4();
|
|
32216
|
+
init_src5();
|
|
30802
32217
|
init_user_agent();
|
|
30803
32218
|
init_wizard_state_transitions();
|
|
30804
32219
|
realPushDeps = (log) => ({
|
|
@@ -30919,8 +32334,8 @@ var SAVE_CONFIRMATION_DELAY_MS, realSaveDeps;
|
|
|
30919
32334
|
var init_save = __esm({
|
|
30920
32335
|
"packages/experience-design-system-cli/src/tui/import/steps/10-flow/flow/save.ts"() {
|
|
30921
32336
|
"use strict";
|
|
30922
|
-
init_src3();
|
|
30923
32337
|
init_src4();
|
|
32338
|
+
init_src5();
|
|
30924
32339
|
init_run_print_files_helpers();
|
|
30925
32340
|
SAVE_CONFIRMATION_DELAY_MS = 1e3;
|
|
30926
32341
|
realSaveDeps = () => ({
|
|
@@ -31223,7 +32638,7 @@ var WIZARD_LOG;
|
|
|
31223
32638
|
var init_controller = __esm({
|
|
31224
32639
|
"packages/experience-design-system-cli/src/tui/import/steps/10-flow/flow/controller.ts"() {
|
|
31225
32640
|
"use strict";
|
|
31226
|
-
|
|
32641
|
+
init_src4();
|
|
31227
32642
|
init_slot_graph();
|
|
31228
32643
|
init_cycle_detection();
|
|
31229
32644
|
init_wizard_state_transitions();
|
|
@@ -31669,6 +33084,45 @@ var init_PageContainer3 = __esm({
|
|
|
31669
33084
|
}
|
|
31670
33085
|
});
|
|
31671
33086
|
|
|
33087
|
+
// packages/experience-design-system-cli/src/tui/settings/shared/debug-trail.ts
|
|
33088
|
+
import { existsSync as existsSync11 } from "node:fs";
|
|
33089
|
+
function diffSnapshots(before, after) {
|
|
33090
|
+
const names = [.../* @__PURE__ */ new Set([...Object.keys(before), ...Object.keys(after)])];
|
|
33091
|
+
const changed_fields = names.filter((name) => before[name] !== after[name]);
|
|
33092
|
+
return { changed: changed_fields.length > 0, changed_fields };
|
|
33093
|
+
}
|
|
33094
|
+
function createTrail(limit = DEFAULT_TRAIL_LIMIT) {
|
|
33095
|
+
const actions = [];
|
|
33096
|
+
return {
|
|
33097
|
+
record(action) {
|
|
33098
|
+
actions.push(action);
|
|
33099
|
+
if (actions.length > limit) actions.shift();
|
|
33100
|
+
},
|
|
33101
|
+
entries: () => [...actions]
|
|
33102
|
+
};
|
|
33103
|
+
}
|
|
33104
|
+
function scrubError(error, secrets) {
|
|
33105
|
+
let message = error instanceof Error ? error.message : String(error);
|
|
33106
|
+
for (const secret of secrets) {
|
|
33107
|
+
if (secret.length < MIN_SECRET_LENGTH) continue;
|
|
33108
|
+
for (const form of /* @__PURE__ */ new Set([secret, encodeURIComponent(secret)])) message = message.split(form).join("[redacted]");
|
|
33109
|
+
}
|
|
33110
|
+
return message;
|
|
33111
|
+
}
|
|
33112
|
+
function describeSettingsFile() {
|
|
33113
|
+
const path5 = configFilePath2();
|
|
33114
|
+
return { path: path5, eds_home_set: Boolean(process.env["EDS_HOME"]), exists: existsSync11(path5) };
|
|
33115
|
+
}
|
|
33116
|
+
var DEFAULT_TRAIL_LIMIT, MIN_SECRET_LENGTH;
|
|
33117
|
+
var init_debug_trail = __esm({
|
|
33118
|
+
"packages/experience-design-system-cli/src/tui/settings/shared/debug-trail.ts"() {
|
|
33119
|
+
"use strict";
|
|
33120
|
+
init_config();
|
|
33121
|
+
DEFAULT_TRAIL_LIMIT = 30;
|
|
33122
|
+
MIN_SECRET_LENGTH = 6;
|
|
33123
|
+
}
|
|
33124
|
+
});
|
|
33125
|
+
|
|
31672
33126
|
// packages/experience-design-system-cli/src/tui/settings/configuration/agents/agent-status.ts
|
|
31673
33127
|
import { execFile as execFile2 } from "node:child_process";
|
|
31674
33128
|
import { access as access6, constants } from "node:fs/promises";
|
|
@@ -31845,7 +33299,7 @@ var VERSION_TIMEOUT_MS, PROMPT_TIMEOUT_MS, TEST_PROMPT, INSTALL_HINTS, LOGIN_HIN
|
|
|
31845
33299
|
var init_agent_status = __esm({
|
|
31846
33300
|
"packages/experience-design-system-cli/src/tui/settings/configuration/agents/agent-status.ts"() {
|
|
31847
33301
|
"use strict";
|
|
31848
|
-
|
|
33302
|
+
init_src4();
|
|
31849
33303
|
VERSION_TIMEOUT_MS = 5e3;
|
|
31850
33304
|
PROMPT_TIMEOUT_MS = 6e4;
|
|
31851
33305
|
TEST_PROMPT = "Reply with the single word: ok";
|
|
@@ -31879,6 +33333,44 @@ var init_agent_status = __esm({
|
|
|
31879
33333
|
}
|
|
31880
33334
|
});
|
|
31881
33335
|
|
|
33336
|
+
// packages/experience-design-system-cli/src/tui/settings/configuration/agents/agent-debug.ts
|
|
33337
|
+
function agentSnapshot(config) {
|
|
33338
|
+
const snapshot = { default_agent: config.defaultAgent };
|
|
33339
|
+
for (const name of AGENT_NAMES) {
|
|
33340
|
+
snapshot[`${name}.model`] = config.agents[name].model;
|
|
33341
|
+
snapshot[`${name}.binary`] = config.agents[name].binary;
|
|
33342
|
+
}
|
|
33343
|
+
return snapshot;
|
|
33344
|
+
}
|
|
33345
|
+
function environmentFrom(checks, savedBinary, envValue) {
|
|
33346
|
+
const path5 = checks.find((check) => check.step === "path");
|
|
33347
|
+
const version = checks.find((check) => check.step === "version");
|
|
33348
|
+
const overridden = envValue !== void 0 && envValue !== "" && envValue !== savedBinary.trim();
|
|
33349
|
+
return {
|
|
33350
|
+
found: path5?.ok === true,
|
|
33351
|
+
resolved_path: path5?.ok ? path5.detail : "",
|
|
33352
|
+
version: version?.ok ? version.detail : "",
|
|
33353
|
+
env_override: overridden ? envValue : ""
|
|
33354
|
+
};
|
|
33355
|
+
}
|
|
33356
|
+
async function describeAgents(config) {
|
|
33357
|
+
const entries = await Promise.all(
|
|
33358
|
+
AGENT_NAMES.map(async (name) => {
|
|
33359
|
+
const saved = config.agents[name].binary;
|
|
33360
|
+
const checks = await inspectAgent(name, saved);
|
|
33361
|
+
return [name, environmentFrom(checks, saved, process.env[`EDS_AGENT_BINARY_${name.toUpperCase()}`])];
|
|
33362
|
+
})
|
|
33363
|
+
);
|
|
33364
|
+
return Object.fromEntries(entries);
|
|
33365
|
+
}
|
|
33366
|
+
var init_agent_debug = __esm({
|
|
33367
|
+
"packages/experience-design-system-cli/src/tui/settings/configuration/agents/agent-debug.ts"() {
|
|
33368
|
+
"use strict";
|
|
33369
|
+
init_src4();
|
|
33370
|
+
init_agent_status();
|
|
33371
|
+
}
|
|
33372
|
+
});
|
|
33373
|
+
|
|
31882
33374
|
// packages/experience-design-system-cli/src/tui/settings/shared/FieldForm.tsx
|
|
31883
33375
|
import { useState as useState29 } from "react";
|
|
31884
33376
|
import { Box as Box44, Text as Text46, useInput as useInput11 } from "ink";
|
|
@@ -32070,7 +33562,8 @@ function AgentDetail({
|
|
|
32070
33562
|
name,
|
|
32071
33563
|
config,
|
|
32072
33564
|
setConfig,
|
|
32073
|
-
onBack
|
|
33565
|
+
onBack,
|
|
33566
|
+
record: record3
|
|
32074
33567
|
}) {
|
|
32075
33568
|
const settings = config.agents[name];
|
|
32076
33569
|
const [saving, setSaving] = useState30(false);
|
|
@@ -32093,10 +33586,12 @@ function AgentDetail({
|
|
|
32093
33586
|
setNotice(null);
|
|
32094
33587
|
writeAgentConfig(config).then(() => {
|
|
32095
33588
|
applyBinaryOverrides(config);
|
|
33589
|
+
record3(`saved ${name}`);
|
|
32096
33590
|
setNotice({ kind: "success", text: `Saved: ${AGENT_LABELS[name]} settings are written to config.json` });
|
|
32097
|
-
}).catch(
|
|
32098
|
-
(
|
|
32099
|
-
|
|
33591
|
+
}).catch((err) => {
|
|
33592
|
+
record3(`saving ${name} failed`, err);
|
|
33593
|
+
setNotice({ kind: "error", text: `Not saved: ${err instanceof Error ? err.message : String(err)}` });
|
|
33594
|
+
}).finally(() => setSaving(false));
|
|
32100
33595
|
};
|
|
32101
33596
|
const runTest = () => {
|
|
32102
33597
|
setTesting(true);
|
|
@@ -32104,12 +33599,15 @@ function AgentDetail({
|
|
|
32104
33599
|
testAgent(name, settings.binary, settings.model).then((result) => {
|
|
32105
33600
|
setChecks(result);
|
|
32106
33601
|
const outcome = testOutcome(result);
|
|
33602
|
+
if (!outcome || !outcome.ok)
|
|
33603
|
+
record3(`test of ${name} failed: ${outcome?.text ?? "the agent could not be started"}`);
|
|
32107
33604
|
setNotice(
|
|
32108
33605
|
outcome ? { kind: outcome.ok ? "success" : "error", text: outcome.text } : { kind: "error", text: "Test not run: the agent could not be started (see Status)" }
|
|
32109
33606
|
);
|
|
32110
|
-
}).catch(
|
|
32111
|
-
(
|
|
32112
|
-
|
|
33607
|
+
}).catch((err) => {
|
|
33608
|
+
record3(`test of ${name} could not run`, err);
|
|
33609
|
+
setNotice({ kind: "error", text: `Test could not run: ${err instanceof Error ? err.message : String(err)}` });
|
|
33610
|
+
}).finally(() => setTesting(false));
|
|
32113
33611
|
};
|
|
32114
33612
|
const action = {
|
|
32115
33613
|
label: "Run test",
|
|
@@ -32130,6 +33628,7 @@ function AgentDetail({
|
|
|
32130
33628
|
onChange: (key, value) => {
|
|
32131
33629
|
setConfig({ ...config, agents: { ...config.agents, [name]: { ...settings, [key]: value } } });
|
|
32132
33630
|
setNotice(null);
|
|
33631
|
+
record3(`edited ${name}.${key}`);
|
|
32133
33632
|
},
|
|
32134
33633
|
onSave: save,
|
|
32135
33634
|
onQuit: onBack,
|
|
@@ -32147,7 +33646,7 @@ var fields, INSPECT_DELAY_MS;
|
|
|
32147
33646
|
var init_AgentDetail = __esm({
|
|
32148
33647
|
"packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentDetail.tsx"() {
|
|
32149
33648
|
"use strict";
|
|
32150
|
-
|
|
33649
|
+
init_src4();
|
|
32151
33650
|
init_theme();
|
|
32152
33651
|
init_FieldForm();
|
|
32153
33652
|
init_agent_store();
|
|
@@ -32163,7 +33662,7 @@ var init_AgentDetail = __esm({
|
|
|
32163
33662
|
});
|
|
32164
33663
|
|
|
32165
33664
|
// packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentsScreen.tsx
|
|
32166
|
-
import { useEffect as useEffect23, useState as useState31 } from "react";
|
|
33665
|
+
import { useEffect as useEffect23, useRef as useRef13, useState as useState31 } from "react";
|
|
32167
33666
|
import { Box as Box46, Text as Text49, useInput as useInput12 } from "ink";
|
|
32168
33667
|
import { Fragment as Fragment18, jsx as jsx58, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
32169
33668
|
function AgentsScreen({ onDone }) {
|
|
@@ -32174,6 +33673,12 @@ function AgentsScreen({ onDone }) {
|
|
|
32174
33673
|
const [saving, setSaving] = useState31(false);
|
|
32175
33674
|
const [loadError, setLoadError] = useState31(null);
|
|
32176
33675
|
const [checks, setChecks] = useState31({});
|
|
33676
|
+
const visit = useRef13({
|
|
33677
|
+
trail: createTrail(),
|
|
33678
|
+
before: void 0,
|
|
33679
|
+
environment: void 0,
|
|
33680
|
+
error: ""
|
|
33681
|
+
}).current;
|
|
32177
33682
|
const inspectAll = (loaded) => {
|
|
32178
33683
|
for (const name of AGENT_NAMES) {
|
|
32179
33684
|
void inspectAgent(name, loaded.agents[name].binary).then(
|
|
@@ -32185,14 +33690,38 @@ function AgentsScreen({ onDone }) {
|
|
|
32185
33690
|
readAgentConfig().then((loaded) => {
|
|
32186
33691
|
setConfig(loaded);
|
|
32187
33692
|
inspectAll(loaded);
|
|
33693
|
+
visit.before = agentSnapshot(loaded);
|
|
32188
33694
|
startDebugRun({
|
|
32189
33695
|
flow: "settings/agents",
|
|
32190
33696
|
step: "01-agents",
|
|
32191
33697
|
menuOption: "Configuration > Agents",
|
|
32192
|
-
inputs: {
|
|
33698
|
+
inputs: { ...visit.before, default_chosen: loaded.defaultChosen ?? false }
|
|
32193
33699
|
});
|
|
32194
|
-
|
|
33700
|
+
void describeAgents(loaded).then((found) => {
|
|
33701
|
+
visit.environment = found;
|
|
33702
|
+
});
|
|
33703
|
+
}).catch((err) => {
|
|
33704
|
+
visit.error = scrubError(err, []);
|
|
33705
|
+
startDebugRun({ flow: "settings/agents", step: "01-agents", menuOption: "Configuration > Agents", inputs: {} });
|
|
33706
|
+
setLoadError(visit.error);
|
|
33707
|
+
});
|
|
32195
33708
|
}, []);
|
|
33709
|
+
const endVisit = (current) => {
|
|
33710
|
+
const after = current ? agentSnapshot(current) : void 0;
|
|
33711
|
+
const change = visit.before && after ? diffSnapshots(visit.before, after) : { changed: false, changed_fields: [] };
|
|
33712
|
+
void finishDebugRun({
|
|
33713
|
+
outputs: {
|
|
33714
|
+
...after ?? {},
|
|
33715
|
+
...change,
|
|
33716
|
+
actions: visit.trail.entries(),
|
|
33717
|
+
// Missing only when the user left before the probes finished.
|
|
33718
|
+
...visit.environment ? { agents: visit.environment } : {},
|
|
33719
|
+
...visit.error ? { error: visit.error } : {}
|
|
33720
|
+
},
|
|
33721
|
+
status: visit.error ? "error" : "success",
|
|
33722
|
+
exitMethod: change.changed ? "saved" : "discarded"
|
|
33723
|
+
});
|
|
33724
|
+
};
|
|
32196
33725
|
const makeDefault = (name) => {
|
|
32197
33726
|
if (!config || saving) return;
|
|
32198
33727
|
if (name === config.defaultAgent) {
|
|
@@ -32204,15 +33733,16 @@ function AgentsScreen({ onDone }) {
|
|
|
32204
33733
|
writeAgentConfig({ ...config, defaultAgent: name, defaultChosen: true }).then(() => {
|
|
32205
33734
|
setConfig((current) => current ? { ...current, defaultAgent: name, defaultChosen: true } : current);
|
|
32206
33735
|
setNotice({ kind: "success", text: `Default agent is now ${AGENT_LABELS[name]}` });
|
|
32207
|
-
|
|
32208
|
-
|
|
32209
|
-
|
|
32210
|
-
|
|
32211
|
-
})
|
|
32212
|
-
).finally(() => setSaving(false));
|
|
33736
|
+
visit.trail.record(`made ${name} the default`);
|
|
33737
|
+
}).catch((err) => {
|
|
33738
|
+
visit.error = scrubError(err, []);
|
|
33739
|
+
visit.trail.record(`making ${name} the default failed`);
|
|
33740
|
+
setNotice({ kind: "error", text: `Default agent not changed: ${visit.error}` });
|
|
33741
|
+
}).finally(() => setSaving(false));
|
|
32213
33742
|
};
|
|
32214
33743
|
useInput12((input, key) => {
|
|
32215
33744
|
if (loadError && (key.escape || input === "q")) {
|
|
33745
|
+
endVisit(null);
|
|
32216
33746
|
onDone();
|
|
32217
33747
|
return;
|
|
32218
33748
|
}
|
|
@@ -32237,7 +33767,7 @@ function AgentsScreen({ onDone }) {
|
|
|
32237
33767
|
return;
|
|
32238
33768
|
}
|
|
32239
33769
|
if (key.escape || input === "q") {
|
|
32240
|
-
|
|
33770
|
+
endVisit(config);
|
|
32241
33771
|
onDone();
|
|
32242
33772
|
}
|
|
32243
33773
|
});
|
|
@@ -32262,6 +33792,10 @@ function AgentsScreen({ onDone }) {
|
|
|
32262
33792
|
name: open,
|
|
32263
33793
|
config,
|
|
32264
33794
|
setConfig,
|
|
33795
|
+
record: (action, error) => {
|
|
33796
|
+
visit.trail.record(action);
|
|
33797
|
+
if (error !== void 0) visit.error = scrubError(error, []);
|
|
33798
|
+
},
|
|
32265
33799
|
onBack: () => {
|
|
32266
33800
|
setOpen(null);
|
|
32267
33801
|
void readAgentConfig().then((saved) => {
|
|
@@ -32330,10 +33864,12 @@ var NAME_WIDTH, PANEL_LABEL_WIDTH;
|
|
|
32330
33864
|
var init_AgentsScreen = __esm({
|
|
32331
33865
|
"packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentsScreen.tsx"() {
|
|
32332
33866
|
"use strict";
|
|
32333
|
-
|
|
33867
|
+
init_src4();
|
|
32334
33868
|
init_theme();
|
|
32335
33869
|
init_control_hints();
|
|
32336
33870
|
init_debug_store();
|
|
33871
|
+
init_debug_trail();
|
|
33872
|
+
init_agent_debug();
|
|
32337
33873
|
init_agent_store();
|
|
32338
33874
|
init_agent_status();
|
|
32339
33875
|
init_AgentDetail();
|
|
@@ -32375,9 +33911,9 @@ var init_project_store = __esm({
|
|
|
32375
33911
|
});
|
|
32376
33912
|
|
|
32377
33913
|
// packages/experience-design-system-cli/src/tui/settings/configuration/project/ProjectScreen.tsx
|
|
32378
|
-
import { useEffect as useEffect24, useState as useState32 } from "react";
|
|
32379
|
-
import { Box as Box47, Text as Text50 } from "ink";
|
|
32380
|
-
import { jsx as jsx59, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
33914
|
+
import { useEffect as useEffect24, useRef as useRef14, useState as useState32 } from "react";
|
|
33915
|
+
import { Box as Box47, Text as Text50, useInput as useInput13 } from "ink";
|
|
33916
|
+
import { Fragment as Fragment19, jsx as jsx59, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
32381
33917
|
function debugFields(config) {
|
|
32382
33918
|
return {
|
|
32383
33919
|
space_id: config?.spaceId ?? "",
|
|
@@ -32393,40 +33929,88 @@ function ProjectScreen({ onDone }) {
|
|
|
32393
33929
|
const [config, setConfig] = useState32(null);
|
|
32394
33930
|
const [saving, setSaving] = useState32(false);
|
|
32395
33931
|
const [notice, setNotice] = useState32(null);
|
|
32396
|
-
const [
|
|
33932
|
+
const [loadError, setLoadError] = useState32(null);
|
|
33933
|
+
const visit = useRef14({
|
|
33934
|
+
trail: createTrail(),
|
|
33935
|
+
before: void 0,
|
|
33936
|
+
persisted: void 0,
|
|
33937
|
+
error: ""
|
|
33938
|
+
}).current;
|
|
33939
|
+
const scrub = (err) => scrubError(err, [config?.cmaToken ?? ""]);
|
|
32397
33940
|
useEffect24(() => {
|
|
32398
|
-
|
|
33941
|
+
readCredentials().then((cfg) => {
|
|
32399
33942
|
setConfig(cfg);
|
|
33943
|
+
visit.before = snapshotOf(cfg);
|
|
33944
|
+
visit.persisted = visit.before;
|
|
32400
33945
|
startDebugRun({
|
|
32401
33946
|
flow: "settings/contentful-configuration",
|
|
32402
33947
|
step: "01-configuration",
|
|
32403
33948
|
menuOption: "Configuration > Project",
|
|
32404
|
-
inputs: debugFields(cfg)
|
|
33949
|
+
inputs: { ...debugFields(cfg), settings_file: describeSettingsFile() }
|
|
32405
33950
|
});
|
|
33951
|
+
}).catch((err) => {
|
|
33952
|
+
visit.error = scrubError(err, []);
|
|
33953
|
+
startDebugRun({
|
|
33954
|
+
flow: "settings/contentful-configuration",
|
|
33955
|
+
step: "01-configuration",
|
|
33956
|
+
menuOption: "Configuration > Project",
|
|
33957
|
+
inputs: { settings_file: describeSettingsFile() }
|
|
33958
|
+
});
|
|
33959
|
+
setLoadError(visit.error);
|
|
32406
33960
|
});
|
|
32407
33961
|
}, []);
|
|
33962
|
+
const endVisit = (current) => {
|
|
33963
|
+
const onScreen = current ? snapshotOf(current) : void 0;
|
|
33964
|
+
const change = visit.before && visit.persisted ? diffSnapshots(visit.before, visit.persisted) : { changed: false, changed_fields: [] };
|
|
33965
|
+
const unsaved = visit.persisted && onScreen ? diffSnapshots(visit.persisted, onScreen) : { changed: false, changed_fields: [] };
|
|
33966
|
+
void finishDebugRun({
|
|
33967
|
+
outputs: {
|
|
33968
|
+
...debugFields(current),
|
|
33969
|
+
...change,
|
|
33970
|
+
unsaved_edits: unsaved.changed_fields,
|
|
33971
|
+
actions: visit.trail.entries(),
|
|
33972
|
+
...visit.error ? { error: visit.error } : {}
|
|
33973
|
+
},
|
|
33974
|
+
status: visit.error ? "error" : "success",
|
|
33975
|
+
exitMethod: change.changed ? "saved" : "discarded"
|
|
33976
|
+
});
|
|
33977
|
+
};
|
|
33978
|
+
useInput13((input, key) => {
|
|
33979
|
+
if (!config && loadError && (key.escape || input === "q")) {
|
|
33980
|
+
endVisit(null);
|
|
33981
|
+
onDone();
|
|
33982
|
+
}
|
|
33983
|
+
});
|
|
32408
33984
|
if (!config) {
|
|
32409
33985
|
return /* @__PURE__ */ jsxs48(Box47, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
32410
33986
|
/* @__PURE__ */ jsx59(Text50, { bold: true, children: "Project" }),
|
|
32411
33987
|
/* @__PURE__ */ jsx59(Text50, { children: " " }),
|
|
32412
|
-
/* @__PURE__ */
|
|
33988
|
+
loadError ? /* @__PURE__ */ jsxs48(Fragment19, { children: [
|
|
33989
|
+
/* @__PURE__ */ jsxs48(Text50, { color: PALETTE.error, children: [
|
|
33990
|
+
"\u2717 Could not read the settings: ",
|
|
33991
|
+
loadError
|
|
33992
|
+
] }),
|
|
33993
|
+
/* @__PURE__ */ jsx59(Text50, { children: " " }),
|
|
33994
|
+
/* @__PURE__ */ jsx59(ControlHints, { hints: [{ keys: "Esc/q", label: "back" }] })
|
|
33995
|
+
] }) : /* @__PURE__ */ jsx59(Text50, { color: PALETTE.accent, children: "Loading..." })
|
|
32413
33996
|
] });
|
|
32414
33997
|
}
|
|
32415
33998
|
const save = () => {
|
|
32416
33999
|
setSaving(true);
|
|
32417
34000
|
setNotice(null);
|
|
32418
34001
|
writeCredentials(config).then(() => {
|
|
32419
|
-
|
|
34002
|
+
visit.persisted = snapshotOf(config);
|
|
34003
|
+
visit.trail.record("saved");
|
|
32420
34004
|
if (config.contentfulBaseDir) void startDebugSessionIn(config.contentfulBaseDir, { replace: true });
|
|
32421
34005
|
setNotice({ kind: "success", text: "Project settings saved" });
|
|
32422
34006
|
}).catch((err) => {
|
|
34007
|
+
visit.error = scrub(err);
|
|
34008
|
+
visit.trail.record("save failed");
|
|
32423
34009
|
setNotice({ kind: "error", text: err instanceof Error ? err.message : "Failed to save" });
|
|
32424
34010
|
}).finally(() => setSaving(false));
|
|
32425
34011
|
};
|
|
32426
34012
|
const quit = () => {
|
|
32427
|
-
|
|
32428
|
-
lastSaved ? { outputs: debugFields(lastSaved), status: "success", exitMethod: "saved" } : { outputs: {}, status: "success", exitMethod: "discarded" }
|
|
32429
|
-
);
|
|
34013
|
+
endVisit(config);
|
|
32430
34014
|
onDone();
|
|
32431
34015
|
};
|
|
32432
34016
|
return /* @__PURE__ */ jsx59(
|
|
@@ -32439,6 +34023,7 @@ function ProjectScreen({ onDone }) {
|
|
|
32439
34023
|
onChange: (key, value) => {
|
|
32440
34024
|
setConfig({ ...config, [key]: value });
|
|
32441
34025
|
setNotice(null);
|
|
34026
|
+
visit.trail.record(`edited ${key}`);
|
|
32442
34027
|
},
|
|
32443
34028
|
onSave: save,
|
|
32444
34029
|
onQuit: quit,
|
|
@@ -32447,12 +34032,14 @@ function ProjectScreen({ onDone }) {
|
|
|
32447
34032
|
}
|
|
32448
34033
|
);
|
|
32449
34034
|
}
|
|
32450
|
-
var FIELDS2, valuesOf;
|
|
34035
|
+
var FIELDS2, snapshotOf, valuesOf;
|
|
32451
34036
|
var init_ProjectScreen = __esm({
|
|
32452
34037
|
"packages/experience-design-system-cli/src/tui/settings/configuration/project/ProjectScreen.tsx"() {
|
|
32453
34038
|
"use strict";
|
|
32454
34039
|
init_theme();
|
|
34040
|
+
init_control_hints();
|
|
32455
34041
|
init_debug_store();
|
|
34042
|
+
init_debug_trail();
|
|
32456
34043
|
init_FieldForm();
|
|
32457
34044
|
init_project_store();
|
|
32458
34045
|
FIELDS2 = [
|
|
@@ -32464,19 +34051,20 @@ var init_ProjectScreen = __esm({
|
|
|
32464
34051
|
{ key: "defaultTokenFile", label: "Default token file" },
|
|
32465
34052
|
{ key: "contentfulBaseDir", label: "Root Project Directory", hint: "(where .contentful goes)" }
|
|
32466
34053
|
];
|
|
34054
|
+
snapshotOf = (config) => Object.fromEntries(FIELDS2.map(({ key }) => [key, config[key] || ""]));
|
|
32467
34055
|
valuesOf = (config) => Object.fromEntries(FIELDS2.map(({ key }) => [key, config[key] || ""]));
|
|
32468
34056
|
}
|
|
32469
34057
|
});
|
|
32470
34058
|
|
|
32471
34059
|
// packages/experience-design-system-cli/src/tui/settings/configuration/ConfigurationScreen.tsx
|
|
32472
34060
|
import { useState as useState33 } from "react";
|
|
32473
|
-
import { Box as Box48, Text as Text51, useInput as
|
|
34061
|
+
import { Box as Box48, Text as Text51, useInput as useInput14 } from "ink";
|
|
32474
34062
|
import { jsx as jsx60, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
32475
34063
|
function ConfigurationScreen({ onDone }) {
|
|
32476
34064
|
const [focus, setFocus] = useState33(0);
|
|
32477
34065
|
const [open, setOpen] = useState33(null);
|
|
32478
34066
|
const close = () => setOpen(null);
|
|
32479
|
-
|
|
34067
|
+
useInput14((input, key) => {
|
|
32480
34068
|
if (open) return;
|
|
32481
34069
|
if (key.upArrow) {
|
|
32482
34070
|
setFocus((i) => (i - 1 + SECTIONS.length) % SECTIONS.length);
|
|
@@ -32536,8 +34124,8 @@ var init_ConfigurationScreen = __esm({
|
|
|
32536
34124
|
|
|
32537
34125
|
// packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx
|
|
32538
34126
|
import { useEffect as useEffect25, useState as useState34 } from "react";
|
|
32539
|
-
import { Box as Box49, Text as Text52, useInput as
|
|
32540
|
-
import { Fragment as
|
|
34127
|
+
import { Box as Box49, Text as Text52, useInput as useInput15 } from "ink";
|
|
34128
|
+
import { Fragment as Fragment20, jsx as jsx61, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
32541
34129
|
function OptInAnalyticsScreen({ onDone }) {
|
|
32542
34130
|
const [loading, setLoading] = useState34(true);
|
|
32543
34131
|
const [enabled, setEnabled] = useState34(true);
|
|
@@ -32553,7 +34141,7 @@ function OptInAnalyticsScreen({ onDone }) {
|
|
|
32553
34141
|
});
|
|
32554
34142
|
});
|
|
32555
34143
|
}, []);
|
|
32556
|
-
|
|
34144
|
+
useInput15((input, key) => {
|
|
32557
34145
|
if (loading) return;
|
|
32558
34146
|
if (key.return || input === " ") {
|
|
32559
34147
|
setEnabled((current) => {
|
|
@@ -32571,7 +34159,7 @@ function OptInAnalyticsScreen({ onDone }) {
|
|
|
32571
34159
|
return /* @__PURE__ */ jsxs50(Box49, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
32572
34160
|
/* @__PURE__ */ jsx61(Text52, { bold: true, children: "Settings \u203A Opt-in Analytics" }),
|
|
32573
34161
|
/* @__PURE__ */ jsx61(Text52, { children: " " }),
|
|
32574
|
-
loading ? /* @__PURE__ */ jsx61(Text52, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs50(
|
|
34162
|
+
loading ? /* @__PURE__ */ jsx61(Text52, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs50(Fragment20, { children: [
|
|
32575
34163
|
/* @__PURE__ */ jsxs50(Text52, { children: [
|
|
32576
34164
|
"Share anonymous usage data:",
|
|
32577
34165
|
" ",
|
|
@@ -32603,95 +34191,14 @@ var init_screen11 = __esm({
|
|
|
32603
34191
|
}
|
|
32604
34192
|
});
|
|
32605
34193
|
|
|
32606
|
-
// packages/experience-design-system-cli/src/tui/
|
|
34194
|
+
// packages/experience-design-system-cli/src/tui/settings/debug-mode/screen.tsx
|
|
32607
34195
|
import { useEffect as useEffect26, useState as useState35 } from "react";
|
|
32608
|
-
import { Box as Box50, Text as Text53, useInput as
|
|
34196
|
+
import { Box as Box50, Text as Text53, useInput as useInput16 } from "ink";
|
|
32609
34197
|
import { jsx as jsx62, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
32610
|
-
function UpgradeScreen({ onDone }) {
|
|
32611
|
-
const [upgradeCheck, setUpgradeCheck] = useState35();
|
|
32612
|
-
useEffect26(() => {
|
|
32613
|
-
startDebugRun({
|
|
32614
|
-
flow: "upgrade",
|
|
32615
|
-
step: "01-upgrade",
|
|
32616
|
-
menuOption: "Upgrade",
|
|
32617
|
-
inputs: { currentVersion: readPackageVersion() }
|
|
32618
|
-
});
|
|
32619
|
-
checkForUpgrade().then(setUpgradeCheck).catch(() => setUpgradeCheck({ status: "error" }));
|
|
32620
|
-
}, []);
|
|
32621
|
-
useInput15((_input, key) => {
|
|
32622
|
-
if (key.return) {
|
|
32623
|
-
void finishDebugRun({
|
|
32624
|
-
outputs: upgradeCheck ?? {},
|
|
32625
|
-
status: upgradeCheck?.status === "error" ? "error" : "success",
|
|
32626
|
-
exitMethod: "saved"
|
|
32627
|
-
});
|
|
32628
|
-
onDone();
|
|
32629
|
-
return;
|
|
32630
|
-
}
|
|
32631
|
-
});
|
|
32632
|
-
return /* @__PURE__ */ jsxs51(Box50, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
32633
|
-
/* @__PURE__ */ jsx62(Text53, { bold: true, children: "Upgrade" }),
|
|
32634
|
-
/* @__PURE__ */ jsx62(Text53, { children: " " }),
|
|
32635
|
-
renderBody(upgradeCheck),
|
|
32636
|
-
/* @__PURE__ */ jsx62(Text53, { children: " " }),
|
|
32637
|
-
/* @__PURE__ */ jsxs51(Text53, { bold: true, color: PALETTE.accent, children: [
|
|
32638
|
-
FOCUS_MARKER,
|
|
32639
|
-
" Go Back"
|
|
32640
|
-
] })
|
|
32641
|
-
] });
|
|
32642
|
-
}
|
|
32643
|
-
function renderBody(upgradeCheck) {
|
|
32644
|
-
if (!upgradeCheck) {
|
|
32645
|
-
return /* @__PURE__ */ jsx62(Text53, { color: PALETTE.muted, children: "Checking for updates\u2026" });
|
|
32646
|
-
}
|
|
32647
|
-
if (upgradeCheck.status === "error") {
|
|
32648
|
-
return /* @__PURE__ */ jsx62(Text53, { color: PALETTE.warning, children: "Couldn't check for updates \u2014 check your network connection and try again." });
|
|
32649
|
-
}
|
|
32650
|
-
if (upgradeCheck.status === "up-to-date") {
|
|
32651
|
-
return /* @__PURE__ */ jsxs51(Text53, { color: PALETTE.success, children: [
|
|
32652
|
-
"You're already on the latest version (v",
|
|
32653
|
-
upgradeCheck.current,
|
|
32654
|
-
")."
|
|
32655
|
-
] });
|
|
32656
|
-
}
|
|
32657
|
-
return /* @__PURE__ */ jsxs51(Box50, { flexDirection: "column", children: [
|
|
32658
|
-
/* @__PURE__ */ jsxs51(Text53, { color: PALETTE.muted, children: [
|
|
32659
|
-
/* @__PURE__ */ jsxs51(Text53, { bold: true, color: PALETTE.success, children: [
|
|
32660
|
-
"v",
|
|
32661
|
-
upgradeCheck.latest
|
|
32662
|
-
] }),
|
|
32663
|
-
" ",
|
|
32664
|
-
"is available (you're on ",
|
|
32665
|
-
/* @__PURE__ */ jsxs51(Text53, { bold: true, children: [
|
|
32666
|
-
"v",
|
|
32667
|
-
upgradeCheck.current
|
|
32668
|
-
] }),
|
|
32669
|
-
"). Exit this program, cd into the root of your local clone of contentful/experience-design-system-sdk-public, then run:"
|
|
32670
|
-
] }),
|
|
32671
|
-
/* @__PURE__ */ jsx62(Text53, { children: " " }),
|
|
32672
|
-
/* @__PURE__ */ jsx62(Box50, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.border, paddingX: 1, children: UPGRADE_COMMANDS.map((cmd) => /* @__PURE__ */ jsx62(Text53, { bold: true, children: cmd }, cmd)) })
|
|
32673
|
-
] });
|
|
32674
|
-
}
|
|
32675
|
-
var UPGRADE_COMMANDS;
|
|
32676
|
-
var init_PageContainer4 = __esm({
|
|
32677
|
-
"packages/experience-design-system-cli/src/tui/upgrade/PageContainer.tsx"() {
|
|
32678
|
-
"use strict";
|
|
32679
|
-
init_theme();
|
|
32680
|
-
init_home_theme();
|
|
32681
|
-
init_version();
|
|
32682
|
-
init_debug_store();
|
|
32683
|
-
UPGRADE_COMMANDS = ["git pull", "pnpm install", "pnpm build"];
|
|
32684
|
-
}
|
|
32685
|
-
});
|
|
32686
|
-
|
|
32687
|
-
// packages/experience-design-system-cli/src/tui/settings/debug-mode/screen.tsx
|
|
32688
|
-
import { useEffect as useEffect27, useState as useState36 } from "react";
|
|
32689
|
-
import { Box as Box51, Text as Text54, useInput as useInput16 } from "ink";
|
|
32690
|
-
import { jsx as jsx63, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
32691
34198
|
function DebugModeScreen({ onDone }) {
|
|
32692
|
-
const [loading, setLoading] =
|
|
32693
|
-
const [enabled, setEnabled] =
|
|
32694
|
-
|
|
34199
|
+
const [loading, setLoading] = useState35(true);
|
|
34200
|
+
const [enabled, setEnabled] = useState35(true);
|
|
34201
|
+
useEffect26(() => {
|
|
32695
34202
|
readDebugModeSetting().then((setting) => {
|
|
32696
34203
|
setEnabled(setting.enabled);
|
|
32697
34204
|
setLoading(false);
|
|
@@ -32718,16 +34225,16 @@ function DebugModeScreen({ onDone }) {
|
|
|
32718
34225
|
onDone();
|
|
32719
34226
|
}
|
|
32720
34227
|
});
|
|
32721
|
-
return /* @__PURE__ */
|
|
32722
|
-
/* @__PURE__ */
|
|
32723
|
-
/* @__PURE__ */
|
|
32724
|
-
loading ? /* @__PURE__ */
|
|
34228
|
+
return /* @__PURE__ */ jsxs51(Box50, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
34229
|
+
/* @__PURE__ */ jsx62(Text53, { bold: true, children: "Settings \u203A Debug Mode" }),
|
|
34230
|
+
/* @__PURE__ */ jsx62(Text53, { children: " " }),
|
|
34231
|
+
loading ? /* @__PURE__ */ jsx62(Text53, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs51(Text53, { children: [
|
|
32725
34232
|
"Debug logging:",
|
|
32726
34233
|
" ",
|
|
32727
|
-
/* @__PURE__ */
|
|
34234
|
+
/* @__PURE__ */ jsx62(Text53, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
|
|
32728
34235
|
] }),
|
|
32729
|
-
/* @__PURE__ */
|
|
32730
|
-
/* @__PURE__ */
|
|
34236
|
+
/* @__PURE__ */ jsx62(Text53, { children: " " }),
|
|
34237
|
+
/* @__PURE__ */ jsx62(
|
|
32731
34238
|
ControlHints,
|
|
32732
34239
|
{
|
|
32733
34240
|
hints: [
|
|
@@ -32754,19 +34261,19 @@ __export(app_exports, {
|
|
|
32754
34261
|
runApp: () => runApp
|
|
32755
34262
|
});
|
|
32756
34263
|
import { join as join27 } from "node:path";
|
|
32757
|
-
import { useEffect as
|
|
32758
|
-
import { Fragment as
|
|
34264
|
+
import { useEffect as useEffect27, useState as useState36 } from "react";
|
|
34265
|
+
import { Fragment as Fragment21, jsx as jsx63 } from "react/jsx-runtime";
|
|
32759
34266
|
function App({ importOptions, inkClear }) {
|
|
32760
|
-
const [screen, setScreen] =
|
|
32761
|
-
const [importExitCode, setImportExitCode] =
|
|
34267
|
+
const [screen, setScreen] = useState36("start");
|
|
34268
|
+
const [importExitCode, setImportExitCode] = useState36();
|
|
32762
34269
|
const showImportResult = importExitCode !== void 0;
|
|
32763
|
-
const [projectPath, setProjectPath] =
|
|
32764
|
-
const [tokensPath, setTokensPath] =
|
|
32765
|
-
const [scannedFiles, setScannedFiles] =
|
|
32766
|
-
const [pendingLaunch, setPendingLaunch] =
|
|
32767
|
-
const [extractionRun, setExtractionRun] =
|
|
34270
|
+
const [projectPath, setProjectPath] = useState36();
|
|
34271
|
+
const [tokensPath, setTokensPath] = useState36();
|
|
34272
|
+
const [scannedFiles, setScannedFiles] = useState36();
|
|
34273
|
+
const [pendingLaunch, setPendingLaunch] = useState36();
|
|
34274
|
+
const [extractionRun, setExtractionRun] = useState36();
|
|
32768
34275
|
const extraction = useExtraction(extractionRun?.input);
|
|
32769
|
-
const [scopeRun, setScopeRun] =
|
|
34276
|
+
const [scopeRun, setScopeRun] = useState36();
|
|
32770
34277
|
const scopeFlow = useScopeGateFlow(
|
|
32771
34278
|
scopeRun && {
|
|
32772
34279
|
sessionId: scopeRun.extraction.sessionId,
|
|
@@ -32781,12 +34288,12 @@ function App({ importOptions, inkClear }) {
|
|
|
32781
34288
|
}
|
|
32782
34289
|
}
|
|
32783
34290
|
);
|
|
32784
|
-
const [generationInput, setGenerationInput] =
|
|
34291
|
+
const [generationInput, setGenerationInput] = useState36();
|
|
32785
34292
|
const generation = useGeneration(generationInput);
|
|
32786
|
-
const [flowStart, setFlowStart] =
|
|
34293
|
+
const [flowStart, setFlowStart] = useState36();
|
|
32787
34294
|
const flow = useFlow(flowStart, { beforeStepChange: inkClear });
|
|
32788
|
-
const [importDefaults, setImportDefaults] =
|
|
32789
|
-
|
|
34295
|
+
const [importDefaults, setImportDefaults] = useState36();
|
|
34296
|
+
useEffect27(() => {
|
|
32790
34297
|
if (screen !== "import") {
|
|
32791
34298
|
setImportDefaults(void 0);
|
|
32792
34299
|
return;
|
|
@@ -32846,12 +34353,12 @@ function App({ importOptions, inkClear }) {
|
|
|
32846
34353
|
}
|
|
32847
34354
|
});
|
|
32848
34355
|
};
|
|
32849
|
-
|
|
34356
|
+
useEffect27(() => {
|
|
32850
34357
|
if (!extractionRun || extraction?.status !== "done" || !extraction.result.ok) return;
|
|
32851
34358
|
setExtractionRun(void 0);
|
|
32852
34359
|
setScopeRun({ ...extractionRun, extraction: extraction.result.extraction });
|
|
32853
34360
|
}, [extraction, extractionRun]);
|
|
32854
|
-
|
|
34361
|
+
useEffect27(() => {
|
|
32855
34362
|
if (!scopeRun || scopeFlow?.status !== "confirmed" || generationInput) return;
|
|
32856
34363
|
const { extraction: produced, input, generatePromptPath } = scopeRun;
|
|
32857
34364
|
setGenerationInput({
|
|
@@ -32869,7 +34376,7 @@ function App({ importOptions, inkClear }) {
|
|
|
32869
34376
|
...generatePromptPath ? { generatePromptPath } : {}
|
|
32870
34377
|
});
|
|
32871
34378
|
}, [scopeFlow, scopeRun, generationInput]);
|
|
32872
|
-
|
|
34379
|
+
useEffect27(() => {
|
|
32873
34380
|
if (!scopeRun || generation?.status !== "done" || !generation.result.ok) return;
|
|
32874
34381
|
const { credentialsSkipped, tokenStrategy, extraction: produced, input, generatePromptPath } = scopeRun;
|
|
32875
34382
|
inkClear();
|
|
@@ -32912,9 +34419,9 @@ function App({ importOptions, inkClear }) {
|
|
|
32912
34419
|
};
|
|
32913
34420
|
switch (screen) {
|
|
32914
34421
|
case "import":
|
|
32915
|
-
if (showImportResult) return /* @__PURE__ */
|
|
34422
|
+
if (showImportResult) return /* @__PURE__ */ jsx63(ImportScreen, { exitCode: importExitCode, onDone: finishImportResult });
|
|
32916
34423
|
if (flow && flowStart) {
|
|
32917
|
-
return /* @__PURE__ */
|
|
34424
|
+
return /* @__PURE__ */ jsx63(
|
|
32918
34425
|
FlowScreen,
|
|
32919
34426
|
{
|
|
32920
34427
|
state: flow.state,
|
|
@@ -32924,12 +34431,12 @@ function App({ importOptions, inkClear }) {
|
|
|
32924
34431
|
}
|
|
32925
34432
|
);
|
|
32926
34433
|
}
|
|
32927
|
-
if (importDefaults === void 0) return /* @__PURE__ */
|
|
34434
|
+
if (importDefaults === void 0) return /* @__PURE__ */ jsx63(Fragment21, {});
|
|
32928
34435
|
if (projectPath === void 0) {
|
|
32929
|
-
return /* @__PURE__ */
|
|
34436
|
+
return /* @__PURE__ */ jsx63(WelcomeScreen, { onContinue: setProjectPath, onQuit: leaveImport, initialPath: importDefaults.componentDir });
|
|
32930
34437
|
}
|
|
32931
34438
|
if (tokensPath === void 0) {
|
|
32932
|
-
return /* @__PURE__ */
|
|
34439
|
+
return /* @__PURE__ */ jsx63(
|
|
32933
34440
|
TokenInputScreen,
|
|
32934
34441
|
{
|
|
32935
34442
|
initialPath: importDefaults.tokenFile,
|
|
@@ -32939,7 +34446,7 @@ function App({ importOptions, inkClear }) {
|
|
|
32939
34446
|
);
|
|
32940
34447
|
}
|
|
32941
34448
|
if (scannedFiles === void 0) {
|
|
32942
|
-
return /* @__PURE__ */
|
|
34449
|
+
return /* @__PURE__ */ jsx63(
|
|
32943
34450
|
PathValidationScreen,
|
|
32944
34451
|
{
|
|
32945
34452
|
projectPath,
|
|
@@ -32951,10 +34458,10 @@ function App({ importOptions, inkClear }) {
|
|
|
32951
34458
|
}
|
|
32952
34459
|
if (extractionRun) {
|
|
32953
34460
|
if (extraction?.status === "done" && !extraction.result.ok) {
|
|
32954
|
-
return /* @__PURE__ */
|
|
34461
|
+
return /* @__PURE__ */ jsx63(ErrorStep, { stepName: extraction.result.step, message: extraction.result.message, onExit: leaveImport });
|
|
32955
34462
|
}
|
|
32956
34463
|
if (extraction?.status === "running") {
|
|
32957
|
-
return /* @__PURE__ */
|
|
34464
|
+
return /* @__PURE__ */ jsx63(
|
|
32958
34465
|
ExtractionScreen,
|
|
32959
34466
|
{
|
|
32960
34467
|
progress: extraction.progress,
|
|
@@ -32963,14 +34470,14 @@ function App({ importOptions, inkClear }) {
|
|
|
32963
34470
|
}
|
|
32964
34471
|
);
|
|
32965
34472
|
}
|
|
32966
|
-
return /* @__PURE__ */
|
|
34473
|
+
return /* @__PURE__ */ jsx63(Fragment21, {});
|
|
32967
34474
|
}
|
|
32968
34475
|
if (scopeRun && scopeFlow) {
|
|
32969
34476
|
if (scopeFlow.status === "failed") {
|
|
32970
|
-
return /* @__PURE__ */
|
|
34477
|
+
return /* @__PURE__ */ jsx63(ErrorStep, { stepName: "scope gate", message: scopeFlow.message, onExit: leaveImport });
|
|
32971
34478
|
}
|
|
32972
34479
|
if (scopeFlow.status === "deciding") {
|
|
32973
|
-
return /* @__PURE__ */
|
|
34480
|
+
return /* @__PURE__ */ jsx63(
|
|
32974
34481
|
ScopeGateScreen,
|
|
32975
34482
|
{
|
|
32976
34483
|
components: scopeFlow.load.components,
|
|
@@ -32980,7 +34487,7 @@ function App({ importOptions, inkClear }) {
|
|
|
32980
34487
|
);
|
|
32981
34488
|
}
|
|
32982
34489
|
if (generation?.status === "done" && !generation.result.ok) {
|
|
32983
|
-
return /* @__PURE__ */
|
|
34490
|
+
return /* @__PURE__ */ jsx63(ErrorStep, { stepName: generation.result.step, message: generation.result.message, onExit: leaveImport });
|
|
32984
34491
|
}
|
|
32985
34492
|
if (generation?.status === "running") {
|
|
32986
34493
|
const hasRawTokens = scopeRun.input.rawTokensPath !== "";
|
|
@@ -32988,7 +34495,7 @@ function App({ importOptions, inkClear }) {
|
|
|
32988
34495
|
hasRawTokens,
|
|
32989
34496
|
mapTokensEligible: generation.progress.mapTokensEligible
|
|
32990
34497
|
});
|
|
32991
|
-
return /* @__PURE__ */
|
|
34498
|
+
return /* @__PURE__ */ jsx63(
|
|
32992
34499
|
GenerationScreen,
|
|
32993
34500
|
{
|
|
32994
34501
|
progress: generation.progress,
|
|
@@ -33000,10 +34507,10 @@ function App({ importOptions, inkClear }) {
|
|
|
33000
34507
|
}
|
|
33001
34508
|
);
|
|
33002
34509
|
}
|
|
33003
|
-
return /* @__PURE__ */
|
|
34510
|
+
return /* @__PURE__ */ jsx63(Fragment21, {});
|
|
33004
34511
|
}
|
|
33005
34512
|
if (pendingLaunch?.cached) {
|
|
33006
|
-
return /* @__PURE__ */
|
|
34513
|
+
return /* @__PURE__ */ jsx63(
|
|
33007
34514
|
TokenReuseScreen,
|
|
33008
34515
|
{
|
|
33009
34516
|
tokensPath: pendingLaunch.cached.tokensPath,
|
|
@@ -33014,7 +34521,7 @@ function App({ importOptions, inkClear }) {
|
|
|
33014
34521
|
}
|
|
33015
34522
|
);
|
|
33016
34523
|
}
|
|
33017
|
-
return /* @__PURE__ */
|
|
34524
|
+
return /* @__PURE__ */ jsx63(
|
|
33018
34525
|
CredentialsScreen,
|
|
33019
34526
|
{
|
|
33020
34527
|
initial: importDefaults.credentials,
|
|
@@ -33023,19 +34530,17 @@ function App({ importOptions, inkClear }) {
|
|
|
33023
34530
|
}
|
|
33024
34531
|
);
|
|
33025
34532
|
case "help":
|
|
33026
|
-
return /* @__PURE__ */
|
|
33027
|
-
case "upgrade":
|
|
33028
|
-
return /* @__PURE__ */ jsx64(UpgradeScreen, { onDone: goToStart });
|
|
34533
|
+
return /* @__PURE__ */ jsx63(HelpScreen, { onDone: goToStart });
|
|
33029
34534
|
case "settings":
|
|
33030
|
-
return /* @__PURE__ */
|
|
34535
|
+
return /* @__PURE__ */ jsx63(SettingsScreen, { onNavigate: setScreen, onBack: goToStart });
|
|
33031
34536
|
case "settings-configuration":
|
|
33032
|
-
return /* @__PURE__ */
|
|
34537
|
+
return /* @__PURE__ */ jsx63(ConfigurationScreen, { onDone: goToSettings });
|
|
33033
34538
|
case "settings-opt-in-analytics":
|
|
33034
|
-
return /* @__PURE__ */
|
|
34539
|
+
return /* @__PURE__ */ jsx63(OptInAnalyticsScreen, { onDone: goToSettings });
|
|
33035
34540
|
case "settings-debug-mode":
|
|
33036
|
-
return /* @__PURE__ */
|
|
34541
|
+
return /* @__PURE__ */ jsx63(DebugModeScreen, { onDone: goToSettings });
|
|
33037
34542
|
case "start":
|
|
33038
|
-
return /* @__PURE__ */
|
|
34543
|
+
return /* @__PURE__ */ jsx63(HomeScreen, { onNavigate: setScreen });
|
|
33039
34544
|
}
|
|
33040
34545
|
}
|
|
33041
34546
|
async function runApp(renderApp, importOptions) {
|
|
@@ -33043,7 +34548,7 @@ async function runApp(renderApp, importOptions) {
|
|
|
33043
34548
|
instance.clear?.();
|
|
33044
34549
|
process.stdout.write("\x1B[H\x1B[0J");
|
|
33045
34550
|
};
|
|
33046
|
-
const instance = renderApp(/* @__PURE__ */
|
|
34551
|
+
const instance = renderApp(/* @__PURE__ */ jsx63(App, { importOptions, inkClear }));
|
|
33047
34552
|
await instance.waitUntilExit();
|
|
33048
34553
|
}
|
|
33049
34554
|
var init_app = __esm({
|
|
@@ -33069,14 +34574,13 @@ var init_app = __esm({
|
|
|
33069
34574
|
init_PageContainer3();
|
|
33070
34575
|
init_ConfigurationScreen();
|
|
33071
34576
|
init_screen11();
|
|
33072
|
-
init_PageContainer4();
|
|
33073
34577
|
init_screen12();
|
|
33074
34578
|
init_project_store();
|
|
33075
34579
|
}
|
|
33076
34580
|
});
|
|
33077
34581
|
|
|
33078
34582
|
// packages/experience-design-system-cli/program.ts
|
|
33079
|
-
|
|
34583
|
+
init_src4();
|
|
33080
34584
|
import { readFileSync as readFileSync9 } from "node:fs";
|
|
33081
34585
|
import { join as join28 } from "node:path";
|
|
33082
34586
|
import { Command } from "commander";
|
|
@@ -33183,7 +34687,7 @@ function createProgram() {
|
|
|
33183
34687
|
// packages/experience-design-system-cli/src/config/migrate.ts
|
|
33184
34688
|
init_config();
|
|
33185
34689
|
init_package_root();
|
|
33186
|
-
import { existsSync as
|
|
34690
|
+
import { existsSync as existsSync12 } from "node:fs";
|
|
33187
34691
|
import { mkdir as mkdir10, readFile as readFile19, rename as rename3, rmdir, unlink } from "node:fs/promises";
|
|
33188
34692
|
import { dirname as dirname16, join as join29 } from "node:path";
|
|
33189
34693
|
var PACKAGE_NAME3 = "@contentful/experience-design-system-cli";
|
|
@@ -33209,8 +34713,8 @@ async function migrateOldConfig() {
|
|
|
33209
34713
|
if (debugMode) migrated["debugMode"] = debugMode;
|
|
33210
34714
|
Object.assign(migrated, await readJson(oldCredentials));
|
|
33211
34715
|
if (Object.keys(migrated).length > 0) await updateSettings2({ ...migrated, ...await readSettings2() });
|
|
33212
|
-
if (
|
|
33213
|
-
if (!
|
|
34716
|
+
if (existsSync12(oldRuns)) {
|
|
34717
|
+
if (!existsSync12(runsFilePath2())) {
|
|
33214
34718
|
await mkdir10(dirname16(runsFilePath2()), { recursive: true });
|
|
33215
34719
|
await rename3(oldRuns, runsFilePath2());
|
|
33216
34720
|
} else {
|