@supersoniks/concorde 5.0.5 → 5.1.1
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/.claude/launch.json +15 -0
- package/.claude/vite.http.config.mjs +7 -0
- package/.taste-skill/after/desktop-fold.jpg +0 -0
- package/.taste-skill/after/desktop-page-01.jpg +0 -0
- package/.taste-skill/after/desktop-page-02.jpg +0 -0
- package/.taste-skill/after/desktop-page-03.jpg +0 -0
- package/.taste-skill/after/mobile-fold.jpg +0 -0
- package/.taste-skill/after/mobile-page-01.jpg +0 -0
- package/.taste-skill/after/report.json +4103 -0
- package/.taste-skill/after/tablet-fold.jpg +0 -0
- package/.taste-skill/after/tablet-page-01.jpg +0 -0
- package/.taste-skill/after/tablet-page-02.jpg +0 -0
- package/.taste-skill/before/desktop-fold.jpg +0 -0
- package/.taste-skill/before/desktop-page-01.jpg +0 -0
- package/.taste-skill/before/desktop-page-02.jpg +0 -0
- package/.taste-skill/before/mobile-fold.jpg +0 -0
- package/.taste-skill/before/mobile-page-01.jpg +0 -0
- package/.taste-skill/before/report.json +2556 -0
- package/.taste-skill/before/tablet-fold.jpg +0 -0
- package/.taste-skill/before/tablet-page-01.jpg +0 -0
- package/.taste-skill/direction.json +510 -0
- package/.taste-skill/notes.md +84 -0
- package/.taste-skill/prod/desktop-fold.jpg +0 -0
- package/.taste-skill/prod/desktop-page-01.jpg +0 -0
- package/.taste-skill/prod/desktop-page-02.jpg +0 -0
- package/.taste-skill/prod/desktop-page-03.jpg +0 -0
- package/.taste-skill/prod/mobile-fold.jpg +0 -0
- package/.taste-skill/prod/mobile-page-01.jpg +0 -0
- package/.taste-skill/prod/mobile-page-02.jpg +0 -0
- package/.taste-skill/prod/report.json +1973 -0
- package/.taste-skill/prod/tablet-fold.jpg +0 -0
- package/.taste-skill/prod/tablet-page-01.jpg +0 -0
- package/.taste-skill/prod/tablet-page-02.jpg +0 -0
- package/.tmp-cem/custom-elements.json +13705 -0
- package/AUDIT.md +228 -0
- package/PLAN-AMELIORATION.md +220 -0
- package/build-infos.json +1 -1
- package/concorde-core.bundle.js +196 -196
- package/concorde-core.es.js +3854 -3572
- package/custom-elements-manifest.config.mjs +14 -0
- package/dist/concorde-core.bundle.js +196 -196
- package/dist/concorde-core.es.js +3854 -3572
- package/dist/img/archive/concorde-001-2cv.webp +0 -0
- package/dist/img/archive/concorde-red-arrows-2002-poster.jpg +0 -0
- package/dist/img/archive/concorde-red-arrows-2002.webm +0 -0
- package/dist/img/archive/credits.json +28 -0
- package/docs/assets/index-Bb-_LRyY.js +12280 -0
- package/docs/index.html +1 -1
- package/index.html +27 -63
- package/package.json +44 -3
- package/public/img/archive/concorde-001-2cv.webp +0 -0
- package/public/img/archive/concorde-red-arrows-2002-poster.jpg +0 -0
- package/public/img/archive/concorde-red-arrows-2002.webm +0 -0
- package/public/img/archive/credits.json +28 -0
- package/scripts/generate-sdui-catalog.mjs +250 -0
- package/scripts/generate-sdui-catalog.spec.ts +91 -0
- package/scripts/pre-build.mjs +15 -0
- package/src/core/components/functional/fetch/fetch.md +2 -2
- package/src/core/components/functional/sdui/SDUIDescriptorTransformer.ts +5 -5
- package/src/core/components/functional/sdui/__fixtures__/descriptors.ts +251 -0
- package/src/core/components/functional/sdui/__snapshots__/sdui-action.spec.ts.snap +73 -0
- package/src/core/components/functional/sdui/__snapshots__/sdui-incremental.spec.ts.snap +50 -0
- package/src/core/components/functional/sdui/__snapshots__/sdui-partial.spec.ts.snap +50 -0
- package/src/core/components/functional/sdui/__snapshots__/sdui.regression.spec.ts.snap +461 -0
- package/src/core/components/functional/sdui/component-catalog.gaps.json +511 -0
- package/src/core/components/functional/sdui/component-catalog.json +3103 -0
- package/src/core/components/functional/sdui/component-catalog.spec.ts +23 -0
- package/src/core/components/functional/sdui/sdui-action.spec.ts +99 -0
- package/src/core/components/functional/sdui/sdui-dom-snapshot.ts +61 -0
- package/src/core/components/functional/sdui/sdui-extension-points.md +94 -0
- package/src/core/components/functional/sdui/sdui-incremental.spec.ts +137 -0
- package/src/core/components/functional/sdui/sdui-partial.spec.ts +83 -0
- package/src/core/components/functional/sdui/sdui-partial.ts +19 -0
- package/src/core/components/functional/sdui/sdui-safe.spec.ts +188 -0
- package/src/core/components/functional/sdui/sdui-safe.ts +100 -0
- package/src/core/components/functional/sdui/sdui.md +122 -0
- package/src/core/components/functional/sdui/sdui.regression.spec.ts +64 -0
- package/src/core/components/functional/sdui/sdui.ts +442 -34
- package/src/core/components/functional/sdui/types.ts +49 -0
- package/src/core/components/ui/modal/modal.ts +14 -11
- package/src/docs/_getting-started/components.md +5 -0
- package/src/docs/_getting-started/theming.md +2 -2
- package/src/docs/code.ts +88 -75
- package/src/docs/components/docs-demo-sources.ts +16 -8
- package/src/docs/components/docs-lit-demo.ts +19 -37
- package/src/docs/docs.ts +5 -0
- package/src/docs/example/docs-boarding-pass-demo.ts +134 -0
- package/src/docs/example/docs-provider-keys.ts +12 -0
- package/src/docs/header/header.ts +233 -69
- package/src/docs/home/catalog.ts +44 -0
- package/src/docs/home/home.ts +513 -0
- package/src/docs/home/mach-stage.ts +389 -0
- package/src/docs/layout.ts +3 -1
- package/src/docs/navigation/components-index.ts +56 -0
- package/src/docs/navigation/navigation.ts +240 -232
- package/src/docs/navigation/pager.ts +67 -0
- package/src/docs/navigation/toc.ts +98 -0
- package/src/docs/search/docs-search.json +330 -20
- package/src/docs/search/markdown-renderer.ts +11 -3
- package/src/docs/shiki/index.ts +109 -0
- package/src/docs/tailwind/css/base/scrollbar.css +22 -0
- package/src/docs/tailwind/css/base/theme.css +96 -0
- package/src/docs/tailwind/css/base/typography.css +4 -0
- package/src/docs/tailwind/css/docs/boarding-pass.css +65 -0
- package/src/docs/tailwind/css/docs/content.css +32 -0
- package/src/docs/tailwind/css/docs/page.css +10 -0
- package/src/docs/tailwind/css/docs.css +9 -0
- package/src/docs/tailwind/css/home/hero.css +210 -0
- package/src/docs/tailwind/css/home/motion.css +84 -0
- package/src/docs/tailwind/css/home/sections.css +416 -0
- package/src/docs/tailwind/css/tailwind.css +7 -185
- package/src/tsconfig.json +113 -2
- package/src/tsconfig.tsbuildinfo +1 -1
- package/tailwind.config.js +8 -4
- package/docs/assets/index-wVZpLVYW.js +0 -12122
- package/docs/crawl/core/components/functional/date/date.html +0 -190
- package/docs/crawl/core/components/functional/fetch/fetch.html +0 -109
- package/docs/crawl/core/components/functional/if/if.html +0 -27
- package/docs/crawl/core/components/functional/jsonata/jsonata.html +0 -79
- package/docs/crawl/core/components/functional/list/list.html +0 -70
- package/docs/crawl/core/components/functional/mix/mix.html +0 -45
- package/docs/crawl/core/components/functional/queue/queue.html +0 -96
- package/docs/crawl/core/components/functional/router/router.html +0 -106
- package/docs/crawl/core/components/functional/sdui/sdui.html +0 -269
- package/docs/crawl/core/components/functional/states/states.html +0 -66
- package/docs/crawl/core/components/functional/submit/submit.html +0 -160
- package/docs/crawl/core/components/functional/subscriber/subscriber.html +0 -67
- package/docs/crawl/core/components/functional/value/value.html +0 -51
- package/docs/crawl/core/components/ui/alert/alert.html +0 -211
- package/docs/crawl/core/components/ui/alert-messages/alert-messages.html +0 -131
- package/docs/crawl/core/components/ui/badge/badge.html +0 -197
- package/docs/crawl/core/components/ui/button/button.html +0 -150
- package/docs/crawl/core/components/ui/captcha/captcha.html +0 -112
- package/docs/crawl/core/components/ui/card/card.html +0 -253
- package/docs/crawl/core/components/ui/divider/divider.html +0 -144
- package/docs/crawl/core/components/ui/form/checkbox/checkbox.html +0 -73
- package/docs/crawl/core/components/ui/form/fieldset/fieldset.html +0 -266
- package/docs/crawl/core/components/ui/form/form-actions/form-actions.html +0 -122
- package/docs/crawl/core/components/ui/form/form-layout/form-layout.html +0 -121
- package/docs/crawl/core/components/ui/form/input/input.html +0 -109
- package/docs/crawl/core/components/ui/form/input-autocomplete/input-autocomplete.html +0 -38
- package/docs/crawl/core/components/ui/form/radio/radio.html +0 -56
- package/docs/crawl/core/components/ui/form/select/select.html +0 -73
- package/docs/crawl/core/components/ui/form/switch/switch.html +0 -56
- package/docs/crawl/core/components/ui/form/textarea/textarea.html +0 -59
- package/docs/crawl/core/components/ui/group/group.html +0 -104
- package/docs/crawl/core/components/ui/icon/icon.html +0 -222
- package/docs/crawl/core/components/ui/image/image.html +0 -298
- package/docs/crawl/core/components/ui/link/link.html +0 -100
- package/docs/crawl/core/components/ui/loader/loader.html +0 -124
- package/docs/crawl/core/components/ui/menu/menu.html +0 -394
- package/docs/crawl/core/components/ui/modal/modal.html +0 -342
- package/docs/crawl/core/components/ui/pop/pop.html +0 -296
- package/docs/crawl/core/components/ui/progress/progress.html +0 -131
- package/docs/crawl/core/components/ui/table/table.html +0 -545
- package/docs/crawl/core/components/ui/theme/theme.html +0 -131
- package/docs/crawl/core/components/ui/toast/toast.html +0 -233
- package/docs/crawl/core/components/ui/tooltip/tooltip.html +0 -140
- package/docs/crawl/docs/_core-concept/dataFlow.html +0 -177
- package/docs/crawl/docs/_core-concept/overview.html +0 -66
- package/docs/crawl/docs/_core-concept/subscriber.html +0 -75
- package/docs/crawl/docs/_decorators/ancestor-attribute.html +0 -117
- package/docs/crawl/docs/_decorators/auto-subscribe.html +0 -202
- package/docs/crawl/docs/_decorators/bind.html +0 -141
- package/docs/crawl/docs/_decorators/get.html +0 -149
- package/docs/crawl/docs/_decorators/handle.html +0 -165
- package/docs/crawl/docs/_decorators/on-assign.html +0 -355
- package/docs/crawl/docs/_decorators/patch.html +0 -78
- package/docs/crawl/docs/_decorators/post.html +0 -139
- package/docs/crawl/docs/_decorators/publish.html +0 -61
- package/docs/crawl/docs/_decorators/put.html +0 -78
- package/docs/crawl/docs/_decorators/subscribe.html +0 -109
- package/docs/crawl/docs/_decorators/wait-for-ancestors.html +0 -137
- package/docs/crawl/docs/_directives/sub.html +0 -93
- package/docs/crawl/docs/_getting-started/ai-agents.html +0 -173
- package/docs/crawl/docs/_getting-started/concorde-manual-install.html +0 -100
- package/docs/crawl/docs/_getting-started/concorde-outside.html +0 -58
- package/docs/crawl/docs/_getting-started/create-a-component.html +0 -111
- package/docs/crawl/docs/_getting-started/my-first-component.html +0 -189
- package/docs/crawl/docs/_getting-started/my-first-subscriber.html +0 -110
- package/docs/crawl/docs/_getting-started/pubsub.html +0 -62
- package/docs/crawl/docs/_getting-started/start.html +0 -76
- package/docs/crawl/docs/_getting-started/theming.html +0 -333
- package/docs/crawl/docs/_misc/api-configuration.html +0 -149
- package/docs/crawl/docs/_misc/dataProviderKey.html +0 -135
- package/docs/crawl/docs/_misc/docs-mock-api.html +0 -158
- package/docs/crawl/docs/_misc/dynamic-path.html +0 -180
- package/docs/crawl/docs/_misc/endpoint.html +0 -50
- package/docs/crawl/docs/_misc/formelement-subscriber-removal.html +0 -138
- package/docs/crawl/docs/_misc/html-integration.html +0 -48
- package/docs/crawl/hubs/decorators.html +0 -547
- package/docs/crawl/hubs/form-components.html +0 -381
- package/docs/crawl/hubs/remote-data.html +0 -452
- package/docs/crawl/index.html +0 -102
- package/docs/llms-full.txt +0 -7008
- package/docs/llms.txt +0 -97
- package/docs/sitemap.xml +0 -240
- package/docs/src/core/components/functional/date/date.md +0 -290
- package/docs/src/core/components/functional/fetch/fetch.md +0 -125
- package/docs/src/core/components/functional/if/if.md +0 -9
- package/docs/src/core/components/functional/jsonata/jsonata.md +0 -56
- package/docs/src/core/components/functional/list/list.md +0 -65
- package/docs/src/core/components/functional/mix/mix.md +0 -41
- package/docs/src/core/components/functional/queue/queue.md +0 -72
- package/docs/src/core/components/functional/router/router.md +0 -94
- package/docs/src/core/components/functional/sdui/default-library.json +0 -108
- package/docs/src/core/components/functional/sdui/example.json +0 -99
- package/docs/src/core/components/functional/sdui/sdui.md +0 -356
- package/docs/src/core/components/functional/states/states.md +0 -87
- package/docs/src/core/components/functional/submit/submit.md +0 -114
- package/docs/src/core/components/functional/subscriber/subscriber.md +0 -91
- package/docs/src/core/components/functional/value/value.md +0 -35
- package/docs/src/core/components/ui/alert/alert.md +0 -196
- package/docs/src/core/components/ui/alert-messages/alert-messages.md +0 -85
- package/docs/src/core/components/ui/badge/badge.md +0 -188
- package/docs/src/core/components/ui/button/button.md +0 -183
- package/docs/src/core/components/ui/captcha/captcha.md +0 -71
- package/docs/src/core/components/ui/card/card.md +0 -215
- package/docs/src/core/components/ui/divider/divider.md +0 -129
- package/docs/src/core/components/ui/form/checkbox/checkbox.md +0 -77
- package/docs/src/core/components/ui/form/fieldset/fieldset.md +0 -205
- package/docs/src/core/components/ui/form/form-actions/form-actions.md +0 -100
- package/docs/src/core/components/ui/form/form-layout/form-layout.md +0 -119
- package/docs/src/core/components/ui/form/input/input.md +0 -142
- package/docs/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +0 -29
- package/docs/src/core/components/ui/form/radio/radio.md +0 -57
- package/docs/src/core/components/ui/form/select/select.md +0 -71
- package/docs/src/core/components/ui/form/switch/switch.md +0 -57
- package/docs/src/core/components/ui/form/textarea/textarea.md +0 -65
- package/docs/src/core/components/ui/group/group.md +0 -75
- package/docs/src/core/components/ui/icon/icon.md +0 -214
- package/docs/src/core/components/ui/icon/icons.json +0 -1
- package/docs/src/core/components/ui/image/image.md +0 -233
- package/docs/src/core/components/ui/link/link.md +0 -81
- package/docs/src/core/components/ui/loader/loader.md +0 -112
- package/docs/src/core/components/ui/menu/menu.md +0 -370
- package/docs/src/core/components/ui/modal/modal.md +0 -235
- package/docs/src/core/components/ui/pop/pop.md +0 -294
- package/docs/src/core/components/ui/progress/progress.md +0 -109
- package/docs/src/core/components/ui/table/table.md +0 -431
- package/docs/src/core/components/ui/theme/theme.md +0 -122
- package/docs/src/core/components/ui/toast/toast.md +0 -216
- package/docs/src/core/components/ui/tooltip/tooltip.md +0 -124
- package/docs/src/docs/_core-concept/dataFlow.md +0 -88
- package/docs/src/docs/_core-concept/overview.md +0 -57
- package/docs/src/docs/_core-concept/subscriber.md +0 -75
- package/docs/src/docs/_decorators/ancestor-attribute.md +0 -128
- package/docs/src/docs/_decorators/auto-subscribe.md +0 -202
- package/docs/src/docs/_decorators/bind.md +0 -167
- package/docs/src/docs/_decorators/get.md +0 -162
- package/docs/src/docs/_decorators/handle.md +0 -175
- package/docs/src/docs/_decorators/on-assign.md +0 -390
- package/docs/src/docs/_decorators/patch.md +0 -70
- package/docs/src/docs/_decorators/post.md +0 -146
- package/docs/src/docs/_decorators/publish.md +0 -55
- package/docs/src/docs/_decorators/put.md +0 -70
- package/docs/src/docs/_decorators/subscribe.md +0 -100
- package/docs/src/docs/_decorators/wait-for-ancestors.md +0 -163
- package/docs/src/docs/_directives/sub.md +0 -91
- package/docs/src/docs/_getting-started/ai-agents.md +0 -76
- package/docs/src/docs/_getting-started/concorde-manual-install.md +0 -133
- package/docs/src/docs/_getting-started/concorde-outside.md +0 -33
- package/docs/src/docs/_getting-started/create-a-component.md +0 -139
- package/docs/src/docs/_getting-started/my-first-component.md +0 -236
- package/docs/src/docs/_getting-started/my-first-subscriber.md +0 -120
- package/docs/src/docs/_getting-started/pubsub.md +0 -37
- package/docs/src/docs/_getting-started/start.md +0 -47
- package/docs/src/docs/_getting-started/theming.md +0 -253
- package/docs/src/docs/_misc/api-configuration.md +0 -81
- package/docs/src/docs/_misc/dataProviderKey.md +0 -168
- package/docs/src/docs/_misc/docs-mock-api.md +0 -63
- package/docs/src/docs/_misc/dynamic-path.md +0 -71
- package/docs/src/docs/_misc/endpoint.md +0 -45
- package/docs/src/docs/_misc/formelement-subscriber-removal.md +0 -115
- package/docs/src/docs/_misc/html-integration.md +0 -15
- package/docs/src/docs/search/docs-search.json +0 -12242
- package/docs/src/tag-list.json +0 -1
- package/docs/src/tsconfig-model.json +0 -23
- package/docs/src/tsconfig.json +0 -1242
- package/src/docs/prism/index.ts +0 -6
- package/src/docs/prism/prism.css +0 -158
- package/src/docs/prism/prism.js +0 -1022
package/docs/index.html
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<!-- <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
|
11
11
|
-->
|
|
12
12
|
<script src="https://cdn.jsdelivr.net/npm/marked@13.0.3"></script>
|
|
13
|
-
<script type="module" crossorigin src="./assets/index-
|
|
13
|
+
<script type="module" crossorigin src="./assets/index-Bb-_LRyY.js"></script>
|
|
14
14
|
<link rel="stylesheet" crossorigin href="./assets/index-CD4WyL6o.css">
|
|
15
15
|
</head>
|
|
16
16
|
<body class="px-6 lg:px-20">
|
package/index.html
CHANGED
|
@@ -5,15 +5,20 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="./svg/favicon.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Concorde - A supersonic design system</title>
|
|
8
|
-
<link rel="
|
|
8
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
9
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
10
|
+
<link
|
|
11
|
+
href="https://fonts.googleapis.com/css2?family=Schibsted+Grotesk:wght@400;600;800&display=swap"
|
|
12
|
+
rel="stylesheet"
|
|
13
|
+
/>
|
|
9
14
|
<script src="https://cdn.jsdelivr.net/npm/fuzzysort@2.0.1/fuzzysort.min.js"></script>
|
|
10
15
|
<!-- <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
|
11
16
|
-->
|
|
12
17
|
<script src="https://cdn.jsdelivr.net/npm/marked@13.0.3"></script>
|
|
13
18
|
<script type="module" src="./src/docs.ts"></script>
|
|
14
|
-
<link href="./src/docs/tailwind/css/
|
|
19
|
+
<link href="./src/docs/tailwind/css/docs.css" rel="stylesheet" />
|
|
15
20
|
</head>
|
|
16
|
-
<body class="px-6 lg:px-20">
|
|
21
|
+
<body class="px-4 sm:px-6 lg:px-10 2xl:px-20">
|
|
17
22
|
<sonic-theme
|
|
18
23
|
customIconLibraryPath="https://cdn.supersoniks.com/concorde/icons/fontawesome/v6/$prefix/$name.svg"
|
|
19
24
|
customIconDefaultPrefix="regular"
|
|
@@ -22,73 +27,32 @@
|
|
|
22
27
|
<sonic-docs-header></sonic-docs-header>
|
|
23
28
|
<sonic-router>
|
|
24
29
|
<template data-route="^((?!.md).)*$">
|
|
25
|
-
<
|
|
26
|
-
<div
|
|
27
|
-
class="font-headings text-4xl leading-none md:text-5xl lg:text-7xl xl:text-8xl max-w-[29ch] lg:max-w-[19ch] mt-9 mb-10 text-neutral-900"
|
|
28
|
-
>
|
|
29
|
-
webcomponents for
|
|
30
|
-
<div class="animated-text font-medium">
|
|
31
|
-
|
|
32
|
-
<span> scoped </span>
|
|
33
|
-
<span> consistent </span>
|
|
34
|
-
<span> shareable </span>
|
|
35
|
-
</div>
|
|
36
|
-
user interfaces
|
|
37
|
-
</div>
|
|
38
|
-
<div class="text-base mt-6 relative z-2 mb-40">
|
|
39
|
-
<div
|
|
40
|
-
class="inline-flex gap-3 w-full text-lg leading-none flex-col lg:flex-row items-start lg:items-center"
|
|
41
|
-
>
|
|
42
|
-
<sonic-button
|
|
43
|
-
size="2xl"
|
|
44
|
-
variant="outline"
|
|
45
|
-
type="primary"
|
|
46
|
-
href="#docs/_getting-started/start.md/start"
|
|
47
|
-
>
|
|
48
|
-
<sonic-icon
|
|
49
|
-
name="airplane"
|
|
50
|
-
library="iconoir"
|
|
51
|
-
class="rotate-90 inline-block mr-1"
|
|
52
|
-
></sonic-icon
|
|
53
|
-
><span class="font-bold">Get Started</span>
|
|
54
|
-
</sonic-button>
|
|
55
|
-
<sonic-code language="bash" inline noEdit class="max-w-full">
|
|
56
|
-
<template>
|
|
57
|
-
npx @supersoniks/create-concorde-ts-starter "MyProject"
|
|
58
|
-
</template></sonic-code
|
|
59
|
-
>
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
<img
|
|
63
|
-
src="./img/concorde_seuil.png.webp"
|
|
64
|
-
alt=""
|
|
65
|
-
loading="lazy"
|
|
66
|
-
class="w-full block dark:hidden"
|
|
67
|
-
/>
|
|
68
|
-
<img
|
|
69
|
-
src="./img/concorde_seuil_invert.png"
|
|
70
|
-
alt=""
|
|
71
|
-
loading="lazy"
|
|
72
|
-
class="w-full hidden dark:block dark:opacity-60"
|
|
73
|
-
/>
|
|
74
|
-
</div>
|
|
30
|
+
<docs-home></docs-home>
|
|
75
31
|
</template>
|
|
76
32
|
</sonic-router>
|
|
77
33
|
|
|
78
34
|
<div
|
|
79
|
-
class="[[data-home]_&]:hidden grid grid-cols-[
|
|
35
|
+
class="[[data-home]_&]:hidden grid grid-cols-1 lg:grid-cols-[14rem_minmax(0,1fr)] xl:grid-cols-[15rem_minmax(0,1fr)_13rem] gap-8 xl:gap-12"
|
|
80
36
|
>
|
|
81
|
-
<
|
|
37
|
+
<aside class="hidden lg:block">
|
|
82
38
|
<docs-navigation
|
|
83
|
-
class="sticky top-[4.2rem] max-h-[calc(
|
|
39
|
+
class="sticky top-[4.2rem] max-h-[calc(100svh_-_4.2rem)] block overflow-auto py-4 custom-scroll"
|
|
84
40
|
></docs-navigation>
|
|
85
|
-
</
|
|
86
|
-
<
|
|
87
|
-
<
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
41
|
+
</aside>
|
|
42
|
+
<main class="min-w-0 min-h-[100svh] pt-3">
|
|
43
|
+
<div class="max-w-prose mx-auto xl:mx-0 justify-self-center">
|
|
44
|
+
<docs-page
|
|
45
|
+
noShadowDom
|
|
46
|
+
class="prose max-w-none block py-8 prose-li:my-[.2em] leading-[1.5] lg:leading-[1.5] prose-h1:text-[2.4em] sm:prose-h1:text-[3.25em] prose-code:before:content-none prose-code:after:content-none prose-pre:font-mono"
|
|
47
|
+
></docs-page>
|
|
48
|
+
<docs-pager class="block mt-8 pb-16"></docs-pager>
|
|
49
|
+
</div>
|
|
50
|
+
</main>
|
|
51
|
+
<aside class="hidden xl:block">
|
|
52
|
+
<docs-toc
|
|
53
|
+
class="sticky top-[4.2rem] max-h-[calc(100svh_-_4.2rem)] block overflow-auto py-4 custom-scroll"
|
|
54
|
+
></docs-toc>
|
|
55
|
+
</aside>
|
|
92
56
|
</div>
|
|
93
57
|
</sonic-theme>
|
|
94
58
|
</body>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supersoniks/concorde",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.1.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"build-docs": "LIB_NAME=docs vite build",
|
|
13
13
|
"postbuild-docs": "node scripts/post-build-docs.js",
|
|
14
14
|
"prepublishOnly": "node scripts/pre-publish.mjs",
|
|
15
|
+
"generate:sdui-catalog": "node scripts/generate-sdui-catalog.mjs",
|
|
15
16
|
"test": "vitest --reporter verbose --watch",
|
|
16
17
|
"test:ci": "vitest run --reporter verbose",
|
|
17
18
|
"ai-init": "node scripts/ai-init.mjs"
|
|
@@ -19,6 +20,8 @@
|
|
|
19
20
|
"exports": {
|
|
20
21
|
"./core/components/ui/icon/icons.json": "./src/core/components/ui/icon/icons.json",
|
|
21
22
|
"./core/components/functional/sdui/default-library.json": "./src/core/components/functional/sdui/default-library.json",
|
|
23
|
+
"./core/components/functional/sdui/component-catalog.json": "./src/core/components/functional/sdui/component-catalog.json",
|
|
24
|
+
"./sdui/component-catalog.json": "./src/core/components/functional/sdui/component-catalog.json",
|
|
22
25
|
"./dataProviderKey": "./src/core/utils/dataProviderKey.ts",
|
|
23
26
|
"./*": "./src/*.ts",
|
|
24
27
|
"./vite-config": "./vite/config.js",
|
|
@@ -73,9 +76,39 @@
|
|
|
73
76
|
"./SDUIDescriptorTransformer": "./src/core/components/functional/sdui/SDUIDescriptorTransformer.ts",
|
|
74
77
|
"./functional/SDUIDescriptorTransformer": "./src/core/components/functional/sdui/SDUIDescriptorTransformer.ts",
|
|
75
78
|
"./functional/sdui/SDUIDescriptorTransformer": "./src/core/components/functional/sdui/SDUIDescriptorTransformer.ts",
|
|
79
|
+
"./descriptors": "./src/core/components/functional/sdui/__fixtures__/descriptors.ts",
|
|
80
|
+
"./functional/descriptors": "./src/core/components/functional/sdui/__fixtures__/descriptors.ts",
|
|
81
|
+
"./functional/sdui/descriptors": "./src/core/components/functional/sdui/__fixtures__/descriptors.ts",
|
|
82
|
+
"./component-catalog.spec": "./src/core/components/functional/sdui/component-catalog.spec.ts",
|
|
83
|
+
"./functional/component-catalog.spec": "./src/core/components/functional/sdui/component-catalog.spec.ts",
|
|
84
|
+
"./functional/sdui/component-catalog.spec": "./src/core/components/functional/sdui/component-catalog.spec.ts",
|
|
85
|
+
"./sdui-action.spec": "./src/core/components/functional/sdui/sdui-action.spec.ts",
|
|
86
|
+
"./functional/sdui-action.spec": "./src/core/components/functional/sdui/sdui-action.spec.ts",
|
|
87
|
+
"./functional/sdui/sdui-action.spec": "./src/core/components/functional/sdui/sdui-action.spec.ts",
|
|
88
|
+
"./sdui-dom-snapshot": "./src/core/components/functional/sdui/sdui-dom-snapshot.ts",
|
|
89
|
+
"./functional/sdui-dom-snapshot": "./src/core/components/functional/sdui/sdui-dom-snapshot.ts",
|
|
90
|
+
"./functional/sdui/sdui-dom-snapshot": "./src/core/components/functional/sdui/sdui-dom-snapshot.ts",
|
|
91
|
+
"./sdui-incremental.spec": "./src/core/components/functional/sdui/sdui-incremental.spec.ts",
|
|
92
|
+
"./functional/sdui-incremental.spec": "./src/core/components/functional/sdui/sdui-incremental.spec.ts",
|
|
93
|
+
"./functional/sdui/sdui-incremental.spec": "./src/core/components/functional/sdui/sdui-incremental.spec.ts",
|
|
94
|
+
"./sdui-partial.spec": "./src/core/components/functional/sdui/sdui-partial.spec.ts",
|
|
95
|
+
"./functional/sdui-partial.spec": "./src/core/components/functional/sdui/sdui-partial.spec.ts",
|
|
96
|
+
"./functional/sdui/sdui-partial.spec": "./src/core/components/functional/sdui/sdui-partial.spec.ts",
|
|
97
|
+
"./sdui-partial": "./src/core/components/functional/sdui/sdui-partial.ts",
|
|
98
|
+
"./functional/sdui-partial": "./src/core/components/functional/sdui/sdui-partial.ts",
|
|
99
|
+
"./functional/sdui/sdui-partial": "./src/core/components/functional/sdui/sdui-partial.ts",
|
|
100
|
+
"./sdui-safe.spec": "./src/core/components/functional/sdui/sdui-safe.spec.ts",
|
|
101
|
+
"./functional/sdui-safe.spec": "./src/core/components/functional/sdui/sdui-safe.spec.ts",
|
|
102
|
+
"./functional/sdui/sdui-safe.spec": "./src/core/components/functional/sdui/sdui-safe.spec.ts",
|
|
103
|
+
"./sdui-safe": "./src/core/components/functional/sdui/sdui-safe.ts",
|
|
104
|
+
"./functional/sdui-safe": "./src/core/components/functional/sdui/sdui-safe.ts",
|
|
105
|
+
"./functional/sdui/sdui-safe": "./src/core/components/functional/sdui/sdui-safe.ts",
|
|
76
106
|
"./sdui-utils": "./src/core/components/functional/sdui/sdui-utils.ts",
|
|
77
107
|
"./functional/sdui-utils": "./src/core/components/functional/sdui/sdui-utils.ts",
|
|
78
108
|
"./functional/sdui/sdui-utils": "./src/core/components/functional/sdui/sdui-utils.ts",
|
|
109
|
+
"./sdui.regression.spec": "./src/core/components/functional/sdui/sdui.regression.spec.ts",
|
|
110
|
+
"./functional/sdui.regression.spec": "./src/core/components/functional/sdui/sdui.regression.spec.ts",
|
|
111
|
+
"./functional/sdui/sdui.regression.spec": "./src/core/components/functional/sdui/sdui.regression.spec.ts",
|
|
79
112
|
"./sdui": "./src/core/components/functional/sdui/sdui.ts",
|
|
80
113
|
"./functional/sdui": "./src/core/components/functional/sdui/sdui.ts",
|
|
81
114
|
"./sonic-scope": "./src/core/components/functional/sonic-scope/sonic-scope.ts",
|
|
@@ -392,6 +425,7 @@
|
|
|
392
425
|
"./example/decorators-demo-subscribe-publish-get-demos": "./src/docs/example/decorators-demo-subscribe-publish-get-demos.ts",
|
|
393
426
|
"./example/decorators-demo": "./src/docs/example/decorators-demo.ts",
|
|
394
427
|
"./example/docs-api-config-demos": "./src/docs/example/docs-api-config-demos.ts",
|
|
428
|
+
"./example/docs-boarding-pass-demo": "./src/docs/example/docs-boarding-pass-demo.ts",
|
|
395
429
|
"./example/docs-input-autocomplete-demos": "./src/docs/example/docs-input-autocomplete-demos.ts",
|
|
396
430
|
"./example/docs-joke-demos": "./src/docs/example/docs-joke-demos.ts",
|
|
397
431
|
"./example/docs-jsonata-demos": "./src/docs/example/docs-jsonata-demos.ts",
|
|
@@ -405,6 +439,9 @@
|
|
|
405
439
|
"./example/docs-users-list": "./src/docs/example/docs-users-list.ts",
|
|
406
440
|
"./example/users": "./src/docs/example/users.ts",
|
|
407
441
|
"./header/header": "./src/docs/header/header.ts",
|
|
442
|
+
"./home/catalog": "./src/docs/home/catalog.ts",
|
|
443
|
+
"./home/home": "./src/docs/home/home.ts",
|
|
444
|
+
"./home/mach-stage": "./src/docs/home/mach-stage.ts",
|
|
408
445
|
"./layout": "./src/docs/layout.ts",
|
|
409
446
|
"./mock-api/api-config-mock": "./src/docs/mock-api/api-config-mock.ts",
|
|
410
447
|
"./mock-api/fixtures-jsonata": "./src/docs/mock-api/fixtures-jsonata.ts",
|
|
@@ -413,19 +450,23 @@
|
|
|
413
450
|
"./mock-api/router": "./src/docs/mock-api/router.ts",
|
|
414
451
|
"./mock-api/service-worker": "./src/docs/mock-api/service-worker.ts",
|
|
415
452
|
"./mock-api/urls": "./src/docs/mock-api/urls.ts",
|
|
453
|
+
"./navigation/components-index": "./src/docs/navigation/components-index.ts",
|
|
416
454
|
"./navigation/navigation": "./src/docs/navigation/navigation.ts",
|
|
417
|
-
"./
|
|
455
|
+
"./navigation/pager": "./src/docs/navigation/pager.ts",
|
|
456
|
+
"./navigation/toc": "./src/docs/navigation/toc.ts",
|
|
418
457
|
"./search/markdown-renderer": "./src/docs/search/markdown-renderer.ts",
|
|
419
458
|
"./search/page": "./src/docs/search/page.ts",
|
|
420
459
|
"./search/search": "./src/docs/search/search.ts",
|
|
421
460
|
"./search/sonic-code-markdown.spec": "./src/docs/search/sonic-code-markdown.spec.ts",
|
|
422
461
|
"./search/sonic-code-markdown": "./src/docs/search/sonic-code-markdown.ts",
|
|
462
|
+
"./shiki/index": "./src/docs/shiki/index.ts",
|
|
423
463
|
"./tailwind/css/tailwind.d": "./src/docs/tailwind/css/tailwind.d.ts",
|
|
424
464
|
"./tailwind/css.d": "./src/docs/tailwind/css.d.ts",
|
|
425
465
|
"./tailwind/index": "./src/docs/tailwind/index.ts",
|
|
426
466
|
"./TestUtils": "./src/test-utils/TestUtils.ts"
|
|
427
467
|
},
|
|
428
468
|
"devDependencies": {
|
|
469
|
+
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
429
470
|
"@tailwindcss/typography": "^0.5.12",
|
|
430
471
|
"@types/node": "^24.5.2",
|
|
431
472
|
"@vitejs/plugin-basic-ssl": "^2.1.0",
|
|
@@ -437,7 +478,7 @@
|
|
|
437
478
|
"marked": "^12.0.1",
|
|
438
479
|
"marked-gfm-heading-id": "^3.1.3",
|
|
439
480
|
"postcss": "^8.4.38",
|
|
440
|
-
"
|
|
481
|
+
"shiki": "^3.23.0",
|
|
441
482
|
"rollup-plugin-postcss-lit": "^2.1.0",
|
|
442
483
|
"tailwindcss": "^3.4.3",
|
|
443
484
|
"typescript": "^5.4.3",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"file": "public/img/archive/concorde-red-arrows-2002.webm",
|
|
4
|
+
"media": "video",
|
|
5
|
+
"poster": "public/img/archive/concorde-red-arrows-2002-poster.jpg",
|
|
6
|
+
"ref": "commons:191164291",
|
|
7
|
+
"title": "Concorde & Red Arrows 2002",
|
|
8
|
+
"creator": "Steve Elliott from UK",
|
|
9
|
+
"creatorUrl": null,
|
|
10
|
+
"date": "2002",
|
|
11
|
+
"license": "CC BY-SA 2.0",
|
|
12
|
+
"licenseCode": "by-sa",
|
|
13
|
+
"licenseUrl": "https://creativecommons.org/licenses/by-sa/2.0",
|
|
14
|
+
"creditRequired": true,
|
|
15
|
+
"page": "https://commons.wikimedia.org/wiki/File:Concorde_%26_Red_Arrows_2002.webm",
|
|
16
|
+
"via": "Wikimedia Commons",
|
|
17
|
+
"video": "https://upload.wikimedia.org/wikipedia/commons/0/07/Concorde_%26_Red_Arrows_2002.webm",
|
|
18
|
+
"width": 640,
|
|
19
|
+
"height": 360,
|
|
20
|
+
"duration": 10.4,
|
|
21
|
+
"bytes": 402387,
|
|
22
|
+
"credit": "\"Concorde & Red Arrows 2002\" by Steve Elliott from UK, CC BY-SA 2.0, via Wikimedia Commons",
|
|
23
|
+
"notes": [
|
|
24
|
+
"Share-alike: an altered version (recoloured, combined with other pictures) must be shared under the same licence."
|
|
25
|
+
],
|
|
26
|
+
"saved": "2026-10-25T16:21:03.878Z"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Génère un catalogue neutre de composants pour SDUI / agents externes.
|
|
3
|
+
* Build-only : lit le Custom Elements Manifest + les tagName sources.
|
|
4
|
+
*
|
|
5
|
+
* Sorties :
|
|
6
|
+
* - src/core/components/functional/sdui/component-catalog.json
|
|
7
|
+
* - src/core/components/functional/sdui/component-catalog.gaps.json
|
|
8
|
+
*/
|
|
9
|
+
import { execFileSync } from "child_process";
|
|
10
|
+
import fs from "fs";
|
|
11
|
+
import path from "path";
|
|
12
|
+
import { fileURLToPath } from "url";
|
|
13
|
+
|
|
14
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
15
|
+
const ROOT = path.resolve(__dirname, "..");
|
|
16
|
+
const CEM_DIR = path.join(ROOT, ".tmp-cem");
|
|
17
|
+
const CEM_PATH = path.join(CEM_DIR, "custom-elements.json");
|
|
18
|
+
const OUT_CATALOG = path.join(
|
|
19
|
+
ROOT,
|
|
20
|
+
"src/core/components/functional/sdui/component-catalog.json"
|
|
21
|
+
);
|
|
22
|
+
const OUT_GAPS = path.join(
|
|
23
|
+
ROOT,
|
|
24
|
+
"src/core/components/functional/sdui/component-catalog.gaps.json"
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
function extractTagNameFromSource(filePath) {
|
|
28
|
+
if (!fs.existsSync(filePath)) return undefined;
|
|
29
|
+
const src = fs.readFileSync(filePath, "utf8");
|
|
30
|
+
const literal = src.match(/@customElement\(\s*["'`]([^"'`]+)["'`]\s*\)/);
|
|
31
|
+
if (literal) return literal[1];
|
|
32
|
+
const constTag = src.match(
|
|
33
|
+
/(?:const|let|var)\s+tagName\s*=\s*["'`]([^"'`]+)["'`]/
|
|
34
|
+
);
|
|
35
|
+
if (constTag && /@customElement\(\s*tagName\s*\)/.test(src)) {
|
|
36
|
+
return constTag[1];
|
|
37
|
+
}
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function parseAllowedValues(typeText) {
|
|
42
|
+
if (!typeText) return undefined;
|
|
43
|
+
const values = [...typeText.matchAll(/["']([^"']+)["']/g)].map((m) => m[1]);
|
|
44
|
+
// Ignore if it looks like a single non-enum string type annotation noise
|
|
45
|
+
if (values.length < 2) return undefined;
|
|
46
|
+
return [...new Set(values)];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function stripDefaultQuotes(value) {
|
|
50
|
+
if (value == null) return undefined;
|
|
51
|
+
const s = String(value).trim();
|
|
52
|
+
if (
|
|
53
|
+
(s.startsWith('"') && s.endsWith('"')) ||
|
|
54
|
+
(s.startsWith("'") && s.endsWith("'"))
|
|
55
|
+
) {
|
|
56
|
+
return s.slice(1, -1);
|
|
57
|
+
}
|
|
58
|
+
return s;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function isPublicProp(member) {
|
|
62
|
+
if (member.kind !== "field") return false;
|
|
63
|
+
if (member.privacy === "private" || member.privacy === "protected")
|
|
64
|
+
return false;
|
|
65
|
+
if (member.static) return false;
|
|
66
|
+
// Lit reactive props typically have attribute or are @property
|
|
67
|
+
return member.attribute != null || member.reflects || member.type;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Transforme un CEM Package en catalogue neutre.
|
|
72
|
+
* Exportée pour les tests unitaires.
|
|
73
|
+
*/
|
|
74
|
+
export function cemToCatalog(cem, { resolveTagName } = {}) {
|
|
75
|
+
const components = [];
|
|
76
|
+
const insufficientAnnotations = [];
|
|
77
|
+
|
|
78
|
+
for (const mod of cem.modules || []) {
|
|
79
|
+
const modulePath = mod.path;
|
|
80
|
+
for (const decl of mod.declarations || []) {
|
|
81
|
+
if (decl.kind !== "class" || !decl.customElement) continue;
|
|
82
|
+
|
|
83
|
+
const tag =
|
|
84
|
+
decl.tagName ||
|
|
85
|
+
(resolveTagName ? resolveTagName(modulePath, decl) : undefined);
|
|
86
|
+
if (!tag) {
|
|
87
|
+
insufficientAnnotations.push({
|
|
88
|
+
className: decl.name,
|
|
89
|
+
module: modulePath,
|
|
90
|
+
reasons: ["tagName introuvable (const tagName non résolu par CEM)"],
|
|
91
|
+
});
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const props = (decl.members || []).filter(isPublicProp).map((m) => {
|
|
96
|
+
const typeText = m.type?.text?.replace(/\s+/g, " ").trim();
|
|
97
|
+
const prop = {
|
|
98
|
+
name: m.name,
|
|
99
|
+
attribute: m.attribute ?? m.name,
|
|
100
|
+
type: typeText || "unknown",
|
|
101
|
+
};
|
|
102
|
+
const values = parseAllowedValues(typeText);
|
|
103
|
+
if (values) prop.values = values;
|
|
104
|
+
const def = stripDefaultQuotes(m.default);
|
|
105
|
+
if (def !== undefined) prop.default = def;
|
|
106
|
+
if (m.description) prop.description = m.description.trim();
|
|
107
|
+
return prop;
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
const component = {
|
|
111
|
+
tag,
|
|
112
|
+
className: decl.name,
|
|
113
|
+
module: modulePath,
|
|
114
|
+
description: (decl.description || "").trim() || undefined,
|
|
115
|
+
props,
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
if (decl.slots?.length) {
|
|
119
|
+
component.slots = decl.slots.map((s) => ({
|
|
120
|
+
name: s.name || "",
|
|
121
|
+
description: s.description?.trim() || undefined,
|
|
122
|
+
}));
|
|
123
|
+
}
|
|
124
|
+
if (decl.events?.length) {
|
|
125
|
+
component.events = decl.events.map((e) => ({
|
|
126
|
+
name: e.name,
|
|
127
|
+
description: e.description?.trim() || undefined,
|
|
128
|
+
type: e.type?.text || undefined,
|
|
129
|
+
}));
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Exemple : premier @example du JSDoc si le CEM l'expose
|
|
133
|
+
const example = decl.examples?.[0]?.text || decl.example;
|
|
134
|
+
if (example) component.example = String(example).trim();
|
|
135
|
+
|
|
136
|
+
components.push(component);
|
|
137
|
+
|
|
138
|
+
const reasons = [];
|
|
139
|
+
if (!component.description) reasons.push("pas de description de classe");
|
|
140
|
+
const propsWithoutDesc = props.filter((p) => !p.description);
|
|
141
|
+
if (propsWithoutDesc.length > 0) {
|
|
142
|
+
reasons.push(
|
|
143
|
+
`${propsWithoutDesc.length} prop(s) sans description (${propsWithoutDesc
|
|
144
|
+
.slice(0, 5)
|
|
145
|
+
.map((p) => p.name)
|
|
146
|
+
.join(", ")}${propsWithoutDesc.length > 5 ? ", …" : ""})`
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
const propsUnknownType = props.filter((p) => p.type === "unknown");
|
|
150
|
+
if (propsUnknownType.length > 0) {
|
|
151
|
+
reasons.push(
|
|
152
|
+
`${propsUnknownType.length} prop(s) sans type (${propsUnknownType
|
|
153
|
+
.slice(0, 5)
|
|
154
|
+
.map((p) => p.name)
|
|
155
|
+
.join(", ")})`
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
// Pas d'exemple JSDoc : fréquent, non bloquant — omis des gaps.
|
|
159
|
+
if (reasons.length) {
|
|
160
|
+
insufficientAnnotations.push({ tag, module: modulePath, reasons });
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
components.sort((a, b) => a.tag.localeCompare(b.tag));
|
|
166
|
+
insufficientAnnotations.sort((a, b) =>
|
|
167
|
+
(a.tag || a.className || "").localeCompare(b.tag || b.className || "")
|
|
168
|
+
);
|
|
169
|
+
|
|
170
|
+
return {
|
|
171
|
+
version: 1,
|
|
172
|
+
generatedAt: new Date().toISOString(),
|
|
173
|
+
componentCount: components.length,
|
|
174
|
+
components,
|
|
175
|
+
insufficientAnnotations,
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function runCem() {
|
|
180
|
+
fs.mkdirSync(CEM_DIR, { recursive: true });
|
|
181
|
+
const cemBin = path.join(
|
|
182
|
+
ROOT,
|
|
183
|
+
"node_modules/@custom-elements-manifest/analyzer/cem.js"
|
|
184
|
+
);
|
|
185
|
+
execFileSync(
|
|
186
|
+
process.execPath,
|
|
187
|
+
[
|
|
188
|
+
cemBin,
|
|
189
|
+
"analyze",
|
|
190
|
+
"--config",
|
|
191
|
+
path.join(ROOT, "custom-elements-manifest.config.mjs"),
|
|
192
|
+
],
|
|
193
|
+
{ cwd: ROOT, stdio: ["ignore", "pipe", "pipe"] }
|
|
194
|
+
);
|
|
195
|
+
// Ne pas laisser cem écrire customElements dans package.json
|
|
196
|
+
const pkgPath = path.join(ROOT, "package.json");
|
|
197
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8"));
|
|
198
|
+
if (pkg.customElements) {
|
|
199
|
+
delete pkg.customElements;
|
|
200
|
+
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + "\n");
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
function main() {
|
|
205
|
+
console.log("🚀 SDUI component catalog — CEM analyze…");
|
|
206
|
+
runCem();
|
|
207
|
+
const cem = JSON.parse(fs.readFileSync(CEM_PATH, "utf8"));
|
|
208
|
+
const catalog = cemToCatalog(cem, {
|
|
209
|
+
resolveTagName(modulePath) {
|
|
210
|
+
const abs = path.isAbsolute(modulePath)
|
|
211
|
+
? modulePath
|
|
212
|
+
: path.join(ROOT, modulePath);
|
|
213
|
+
return extractTagNameFromSource(abs);
|
|
214
|
+
},
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
const { insufficientAnnotations, ...published } = catalog;
|
|
218
|
+
// Garder un résumé léger dans le catalogue publié
|
|
219
|
+
published.insufficientAnnotationCount = insufficientAnnotations.length;
|
|
220
|
+
|
|
221
|
+
fs.writeFileSync(OUT_CATALOG, JSON.stringify(published, null, 2) + "\n");
|
|
222
|
+
fs.writeFileSync(
|
|
223
|
+
OUT_GAPS,
|
|
224
|
+
JSON.stringify(
|
|
225
|
+
{
|
|
226
|
+
version: 1,
|
|
227
|
+
generatedAt: catalog.generatedAt,
|
|
228
|
+
count: insufficientAnnotations.length,
|
|
229
|
+
items: insufficientAnnotations,
|
|
230
|
+
},
|
|
231
|
+
null,
|
|
232
|
+
2
|
|
233
|
+
) + "\n"
|
|
234
|
+
);
|
|
235
|
+
|
|
236
|
+
console.log(
|
|
237
|
+
`✅ Catalog: ${published.componentCount} composants → ${path.relative(ROOT, OUT_CATALOG)}`
|
|
238
|
+
);
|
|
239
|
+
console.log(
|
|
240
|
+
`ℹ️ Annotations insuffisantes: ${insufficientAnnotations.length} → ${path.relative(ROOT, OUT_GAPS)}`
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
const isMain =
|
|
245
|
+
process.argv[1] &&
|
|
246
|
+
path.resolve(process.argv[1]) === fileURLToPath(import.meta.url);
|
|
247
|
+
|
|
248
|
+
if (isMain) {
|
|
249
|
+
main();
|
|
250
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { cemToCatalog } from "./generate-sdui-catalog.mjs";
|
|
3
|
+
|
|
4
|
+
const fixtureCem = {
|
|
5
|
+
schemaVersion: "1.0.0",
|
|
6
|
+
modules: [
|
|
7
|
+
{
|
|
8
|
+
kind: "javascript-module",
|
|
9
|
+
path: "src/core/components/ui/button/button.ts",
|
|
10
|
+
declarations: [
|
|
11
|
+
{
|
|
12
|
+
kind: "class",
|
|
13
|
+
customElement: true,
|
|
14
|
+
name: "Button",
|
|
15
|
+
description: "Un bouton.",
|
|
16
|
+
members: [
|
|
17
|
+
{
|
|
18
|
+
kind: "field",
|
|
19
|
+
name: "type",
|
|
20
|
+
attribute: "type",
|
|
21
|
+
type: { text: '"default" | "success"' },
|
|
22
|
+
default: '"default"',
|
|
23
|
+
description: "Couleur",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
kind: "field",
|
|
27
|
+
name: "secret",
|
|
28
|
+
privacy: "private",
|
|
29
|
+
type: { text: "string" },
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
kind: "field",
|
|
33
|
+
name: "undocumented",
|
|
34
|
+
attribute: "undocumented",
|
|
35
|
+
type: { text: "string" },
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
slots: [{ name: "", description: "contenu" }],
|
|
39
|
+
events: [{ name: "click", type: { text: "Event" } }],
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
describe("cemToCatalog", () => {
|
|
47
|
+
it("produit un catalogue neutre avec props publiques", () => {
|
|
48
|
+
const catalog = cemToCatalog(fixtureCem, {
|
|
49
|
+
resolveTagName: () => "sonic-button",
|
|
50
|
+
});
|
|
51
|
+
expect(catalog.componentCount).toBe(1);
|
|
52
|
+
const btn = catalog.components[0];
|
|
53
|
+
expect(btn.tag).toBe("sonic-button");
|
|
54
|
+
expect(btn.description).toBe("Un bouton.");
|
|
55
|
+
expect(btn.props.map((p: { name: string }) => p.name)).toEqual([
|
|
56
|
+
"type",
|
|
57
|
+
"undocumented",
|
|
58
|
+
]);
|
|
59
|
+
expect(btn.props[0]).toMatchObject({
|
|
60
|
+
name: "type",
|
|
61
|
+
attribute: "type",
|
|
62
|
+
type: '"default" | "success"',
|
|
63
|
+
values: ["default", "success"],
|
|
64
|
+
default: "default",
|
|
65
|
+
description: "Couleur",
|
|
66
|
+
});
|
|
67
|
+
expect(btn.slots?.[0].name).toBe("");
|
|
68
|
+
expect(btn.events?.[0].name).toBe("click");
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
it("liste les annotations insuffisantes", () => {
|
|
72
|
+
const catalog = cemToCatalog(fixtureCem, {
|
|
73
|
+
resolveTagName: () => "sonic-button",
|
|
74
|
+
});
|
|
75
|
+
const gap = catalog.insufficientAnnotations.find(
|
|
76
|
+
(g: { tag?: string }) => g.tag === "sonic-button"
|
|
77
|
+
);
|
|
78
|
+
expect(gap).toBeTruthy();
|
|
79
|
+
expect(gap.reasons.some((r: string) => r.includes("sans description"))).toBe(
|
|
80
|
+
true
|
|
81
|
+
);
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
it("signale un custom element sans tag résolu", () => {
|
|
85
|
+
const catalog = cemToCatalog(fixtureCem, {
|
|
86
|
+
resolveTagName: () => undefined,
|
|
87
|
+
});
|
|
88
|
+
expect(catalog.componentCount).toBe(0);
|
|
89
|
+
expect(catalog.insufficientAnnotations[0].reasons[0]).toMatch(/tagName/);
|
|
90
|
+
});
|
|
91
|
+
});
|
package/scripts/pre-build.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// console.log("hey");
|
|
2
2
|
|
|
3
|
+
import { execFileSync } from "child_process";
|
|
3
4
|
import fs from "fs";
|
|
4
5
|
import path from "path";
|
|
5
6
|
import { fileURLToPath } from "url";
|
|
@@ -25,6 +26,16 @@ fs.writeFileSync(
|
|
|
25
26
|
JSON.stringify(icons)
|
|
26
27
|
);
|
|
27
28
|
|
|
29
|
+
console.log("🚀 Catalogue SDUI (CEM → component-catalog.json)");
|
|
30
|
+
execFileSync(
|
|
31
|
+
process.execPath,
|
|
32
|
+
[path.resolve(__dirname, "generate-sdui-catalog.mjs")],
|
|
33
|
+
{
|
|
34
|
+
cwd: path.resolve(__dirname, ".."),
|
|
35
|
+
stdio: "inherit",
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
|
|
28
39
|
console.log("🚀 Maintenance des shortPath");
|
|
29
40
|
function listFiles(dir) {
|
|
30
41
|
let files = [];
|
|
@@ -116,6 +127,10 @@ const pExports = {
|
|
|
116
127
|
"./src/core/components/ui/icon/icons.json",
|
|
117
128
|
"./core/components/functional/sdui/default-library.json":
|
|
118
129
|
"./src/core/components/functional/sdui/default-library.json",
|
|
130
|
+
"./core/components/functional/sdui/component-catalog.json":
|
|
131
|
+
"./src/core/components/functional/sdui/component-catalog.json",
|
|
132
|
+
"./sdui/component-catalog.json":
|
|
133
|
+
"./src/core/components/functional/sdui/component-catalog.json",
|
|
119
134
|
"./dataProviderKey": "./src/core/utils/dataProviderKey.ts",
|
|
120
135
|
"./*": "./src/*.ts",
|
|
121
136
|
"./vite-config": "./vite/config.js",
|