@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
|
@@ -527,6 +527,16 @@
|
|
|
527
527
|
}
|
|
528
528
|
}
|
|
529
529
|
},
|
|
530
|
+
"docs/_getting-started/components.md": {
|
|
531
|
+
"title": "Components",
|
|
532
|
+
"hashes": {
|
|
533
|
+
"components": {
|
|
534
|
+
"count": 1,
|
|
535
|
+
"title": "",
|
|
536
|
+
"type": "paragraph"
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
},
|
|
530
540
|
"docs/_misc/api-configuration.md": {
|
|
531
541
|
"title": "API configuration",
|
|
532
542
|
"hashes": {
|
|
@@ -1359,6 +1369,126 @@
|
|
|
1359
1369
|
}
|
|
1360
1370
|
}
|
|
1361
1371
|
},
|
|
1372
|
+
{
|
|
1373
|
+
"search": "SDUI — points d’extension publics",
|
|
1374
|
+
"files": {
|
|
1375
|
+
"core/components/functional/sdui/sdui-extension-points.md": {
|
|
1376
|
+
"title": "SDUI — points d’extension publics",
|
|
1377
|
+
"hashes": {
|
|
1378
|
+
"sdui--points-dextension-publics": {
|
|
1379
|
+
"count": 1,
|
|
1380
|
+
"title": "",
|
|
1381
|
+
"type": "page"
|
|
1382
|
+
}
|
|
1383
|
+
}
|
|
1384
|
+
}
|
|
1385
|
+
}
|
|
1386
|
+
},
|
|
1387
|
+
{
|
|
1388
|
+
"search": "Aide-mémoire pour les dépôts externes (adaptateurs, shells).Pas une page de la doc site — à lire dans le package npm(node_modules/@supersoniks/concorde/src/core/components/functional/sdui/sdui-extension-points.md).La doc utilisateur / crawl reste sdui.md (auto-suffisante).\n",
|
|
1389
|
+
"files": {
|
|
1390
|
+
"core/components/functional/sdui/sdui-extension-points.md": {
|
|
1391
|
+
"title": "SDUI — points d’extension publics",
|
|
1392
|
+
"hashes": {
|
|
1393
|
+
"sdui--points-dextension-publics": {
|
|
1394
|
+
"count": 1,
|
|
1395
|
+
"title": "",
|
|
1396
|
+
"type": "paragraph"
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
},
|
|
1402
|
+
{
|
|
1403
|
+
"search": "Aucune mention de protocoles tiers ici : uniquement les API génériques Concorde.\n",
|
|
1404
|
+
"files": {
|
|
1405
|
+
"core/components/functional/sdui/sdui-extension-points.md": {
|
|
1406
|
+
"title": "SDUI — points d’extension publics",
|
|
1407
|
+
"hashes": {
|
|
1408
|
+
"sdui--points-dextension-publics": {
|
|
1409
|
+
"count": 1,
|
|
1410
|
+
"title": "",
|
|
1411
|
+
"type": "paragraph"
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
},
|
|
1417
|
+
{
|
|
1418
|
+
"search": "Sur un nœud :\n",
|
|
1419
|
+
"files": {
|
|
1420
|
+
"core/components/functional/sdui/sdui-extension-points.md": {
|
|
1421
|
+
"title": "SDUI — points d’extension publics",
|
|
1422
|
+
"hashes": {
|
|
1423
|
+
"2-événement-sdui-action": {
|
|
1424
|
+
"count": 1,
|
|
1425
|
+
"title": "2. Événement `sdui-action`",
|
|
1426
|
+
"type": "paragraph"
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
},
|
|
1432
|
+
{
|
|
1433
|
+
"search": "Au clic, sonic-sdui émet :\n",
|
|
1434
|
+
"files": {
|
|
1435
|
+
"core/components/functional/sdui/sdui-extension-points.md": {
|
|
1436
|
+
"title": "SDUI — points d’extension publics",
|
|
1437
|
+
"hashes": {
|
|
1438
|
+
"2-événement-sdui-action": {
|
|
1439
|
+
"count": 1,
|
|
1440
|
+
"title": "2. Événement `sdui-action`",
|
|
1441
|
+
"type": "paragraph"
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
},
|
|
1447
|
+
{
|
|
1448
|
+
"search": "Ne remplace pas sonic-submit / POST / messagesKey.\n",
|
|
1449
|
+
"files": {
|
|
1450
|
+
"core/components/functional/sdui/sdui-extension-points.md": {
|
|
1451
|
+
"title": "SDUI — points d’extension publics",
|
|
1452
|
+
"hashes": {
|
|
1453
|
+
"2-événement-sdui-action": {
|
|
1454
|
+
"count": 1,
|
|
1455
|
+
"title": "2. Événement `sdui-action`",
|
|
1456
|
+
"type": "paragraph"
|
|
1457
|
+
}
|
|
1458
|
+
}
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
},
|
|
1462
|
+
{
|
|
1463
|
+
"search": "Le descripteur entier + rebuild reste le chemin par défaut. Les ops mutent un descripteur local et mettent à jour le DOM chirurgicalement (frères préservés : focus, valeurs d’input, état composants).\n",
|
|
1464
|
+
"files": {
|
|
1465
|
+
"core/components/functional/sdui/sdui-extension-points.md": {
|
|
1466
|
+
"title": "SDUI — points d’extension publics",
|
|
1467
|
+
"hashes": {
|
|
1468
|
+
"5-ops-incrémentales-opt-in-chemin-à-côté": {
|
|
1469
|
+
"count": 1,
|
|
1470
|
+
"title": "5. Ops incrémentales (opt-in, chemin à côté)",
|
|
1471
|
+
"type": "paragraph"
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
},
|
|
1477
|
+
{
|
|
1478
|
+
"search": "Attribut opsDataProvider : chaque valeur assignée (SDUIOp ou SDUIOp[]) est passée à applyOp.\n",
|
|
1479
|
+
"files": {
|
|
1480
|
+
"core/components/functional/sdui/sdui-extension-points.md": {
|
|
1481
|
+
"title": "SDUI — points d’extension publics",
|
|
1482
|
+
"hashes": {
|
|
1483
|
+
"flux-optionnel": {
|
|
1484
|
+
"count": 1,
|
|
1485
|
+
"title": "Flux optionnel",
|
|
1486
|
+
"type": "paragraph"
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
},
|
|
1362
1492
|
{
|
|
1363
1493
|
"search": "SDUI",
|
|
1364
1494
|
"files": {
|
|
@@ -1464,6 +1594,156 @@
|
|
|
1464
1594
|
}
|
|
1465
1595
|
}
|
|
1466
1596
|
},
|
|
1597
|
+
{
|
|
1598
|
+
"search": "Set profile="safe" on sonic-sdui to refuse untrusted HTML/JS from the descriptor:\n",
|
|
1599
|
+
"files": {
|
|
1600
|
+
"core/components/functional/sdui/sdui.md": {
|
|
1601
|
+
"title": "SDUI",
|
|
1602
|
+
"hashes": {
|
|
1603
|
+
"safe-profile-opt-in": {
|
|
1604
|
+
"count": 1,
|
|
1605
|
+
"title": "Safe profile (opt-in)",
|
|
1606
|
+
"type": "paragraph"
|
|
1607
|
+
}
|
|
1608
|
+
}
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
},
|
|
1612
|
+
{
|
|
1613
|
+
"search": "Use the pure helper validateSafeDescriptor(descriptor) (from sdui-safe) to list violations server-side or in a custom validator — it returns { path, field, message }[] and has no side effects.\n",
|
|
1614
|
+
"files": {
|
|
1615
|
+
"core/components/functional/sdui/sdui.md": {
|
|
1616
|
+
"title": "SDUI",
|
|
1617
|
+
"hashes": {
|
|
1618
|
+
"safe-profile-opt-in": {
|
|
1619
|
+
"count": 1,
|
|
1620
|
+
"title": "Safe profile (opt-in)",
|
|
1621
|
+
"type": "paragraph"
|
|
1622
|
+
}
|
|
1623
|
+
}
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
},
|
|
1627
|
+
{
|
|
1628
|
+
"search": "At build time, Concorde generates a neutral JSON catalog of custom elements for SDUI / external agents:\n",
|
|
1629
|
+
"files": {
|
|
1630
|
+
"core/components/functional/sdui/sdui.md": {
|
|
1631
|
+
"title": "SDUI",
|
|
1632
|
+
"hashes": {
|
|
1633
|
+
"component-catalog-build-only": {
|
|
1634
|
+
"count": 1,
|
|
1635
|
+
"title": "Component catalog (build-only)",
|
|
1636
|
+
"type": "paragraph"
|
|
1637
|
+
}
|
|
1638
|
+
}
|
|
1639
|
+
}
|
|
1640
|
+
}
|
|
1641
|
+
},
|
|
1642
|
+
{
|
|
1643
|
+
"search": "Each entry includes tag, props (name, attribute, type, allowed values when detectable, default, description), plus slots/events when present.\n",
|
|
1644
|
+
"files": {
|
|
1645
|
+
"core/components/functional/sdui/sdui.md": {
|
|
1646
|
+
"title": "SDUI",
|
|
1647
|
+
"hashes": {
|
|
1648
|
+
"component-catalog-build-only": {
|
|
1649
|
+
"count": 1,
|
|
1650
|
+
"title": "Component catalog (build-only)",
|
|
1651
|
+
"type": "paragraph"
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
}
|
|
1655
|
+
}
|
|
1656
|
+
},
|
|
1657
|
+
{
|
|
1658
|
+
"search": "Components with thin JSDoc are listed in component-catalog.gaps.json (same folder) — annotations are not mass-rewritten in this step.\n",
|
|
1659
|
+
"files": {
|
|
1660
|
+
"core/components/functional/sdui/sdui.md": {
|
|
1661
|
+
"title": "SDUI",
|
|
1662
|
+
"hashes": {
|
|
1663
|
+
"component-catalog-build-only": {
|
|
1664
|
+
"count": 1,
|
|
1665
|
+
"title": "Component catalog (build-only)",
|
|
1666
|
+
"type": "paragraph"
|
|
1667
|
+
}
|
|
1668
|
+
}
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
},
|
|
1672
|
+
{
|
|
1673
|
+
"search": "Beside the full-descriptor rebuild path, sonic-sdui exposes surgical ops (siblings keep DOM state):\n",
|
|
1674
|
+
"files": {
|
|
1675
|
+
"core/components/functional/sdui/sdui.md": {
|
|
1676
|
+
"title": "SDUI",
|
|
1677
|
+
"hashes": {
|
|
1678
|
+
"incremental-operations-opt-in": {
|
|
1679
|
+
"count": 1,
|
|
1680
|
+
"title": "Incremental operations (opt-in)",
|
|
1681
|
+
"type": "paragraph"
|
|
1682
|
+
}
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1686
|
+
},
|
|
1687
|
+
{
|
|
1688
|
+
"search": "Public extension surface (also covered above): profile="safe", textContent, sdui-action / action, component catalog JSON, partial + childNodeIds / nodeById, and these incremental ops.\n",
|
|
1689
|
+
"files": {
|
|
1690
|
+
"core/components/functional/sdui/sdui.md": {
|
|
1691
|
+
"title": "SDUI",
|
|
1692
|
+
"hashes": {
|
|
1693
|
+
"incremental-operations-opt-in": {
|
|
1694
|
+
"count": 1,
|
|
1695
|
+
"title": "Incremental operations (opt-in)",
|
|
1696
|
+
"type": "paragraph"
|
|
1697
|
+
}
|
|
1698
|
+
}
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
},
|
|
1702
|
+
{
|
|
1703
|
+
"search": "Set the boolean attribute partial on sonic-sdui to tolerate missing child references:\n",
|
|
1704
|
+
"files": {
|
|
1705
|
+
"core/components/functional/sdui/sdui.md": {
|
|
1706
|
+
"title": "SDUI",
|
|
1707
|
+
"hashes": {
|
|
1708
|
+
"partial-rendering-opt-in": {
|
|
1709
|
+
"count": 1,
|
|
1710
|
+
"title": "Partial rendering (opt-in)",
|
|
1711
|
+
"type": "paragraph"
|
|
1712
|
+
}
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
}
|
|
1716
|
+
},
|
|
1717
|
+
{
|
|
1718
|
+
"search": "Declarative opt-in on a node: set action: { name, context? } (and optionally nodeId).\nA click on the rendered element dispatches a CustomEvent named sdui-action on sonic-sdui with:\n",
|
|
1719
|
+
"files": {
|
|
1720
|
+
"core/components/functional/sdui/sdui.md": {
|
|
1721
|
+
"title": "SDUI",
|
|
1722
|
+
"hashes": {
|
|
1723
|
+
"actions-sdui-action": {
|
|
1724
|
+
"count": 1,
|
|
1725
|
+
"title": "Actions (`sdui-action`)",
|
|
1726
|
+
"type": "paragraph"
|
|
1727
|
+
}
|
|
1728
|
+
}
|
|
1729
|
+
}
|
|
1730
|
+
}
|
|
1731
|
+
},
|
|
1732
|
+
{
|
|
1733
|
+
"search": "This does not replace form submit (sonic-submit / POST / messagesKey). Those keep working as before; only nodes that declare action emit sdui-action.\n",
|
|
1734
|
+
"files": {
|
|
1735
|
+
"core/components/functional/sdui/sdui.md": {
|
|
1736
|
+
"title": "SDUI",
|
|
1737
|
+
"hashes": {
|
|
1738
|
+
"actions-sdui-action": {
|
|
1739
|
+
"count": 1,
|
|
1740
|
+
"title": "Actions (`sdui-action`)",
|
|
1741
|
+
"type": "paragraph"
|
|
1742
|
+
}
|
|
1743
|
+
}
|
|
1744
|
+
}
|
|
1745
|
+
}
|
|
1746
|
+
},
|
|
1467
1747
|
{
|
|
1468
1748
|
"search": "An SDUINode represents an HTMLElement.\n",
|
|
1469
1749
|
"files": {
|
|
@@ -9849,6 +10129,36 @@
|
|
|
9849
10129
|
}
|
|
9850
10130
|
}
|
|
9851
10131
|
},
|
|
10132
|
+
{
|
|
10133
|
+
"search": "Components",
|
|
10134
|
+
"files": {
|
|
10135
|
+
"docs/_getting-started/components.md": {
|
|
10136
|
+
"title": "Components",
|
|
10137
|
+
"hashes": {
|
|
10138
|
+
"components": {
|
|
10139
|
+
"count": 1,
|
|
10140
|
+
"title": "",
|
|
10141
|
+
"type": "page"
|
|
10142
|
+
}
|
|
10143
|
+
}
|
|
10144
|
+
}
|
|
10145
|
+
}
|
|
10146
|
+
},
|
|
10147
|
+
{
|
|
10148
|
+
"search": "Every Concorde web component, grouped like the sidebar. Pick one to see its live demos, attributes and import path.\n",
|
|
10149
|
+
"files": {
|
|
10150
|
+
"docs/_getting-started/components.md": {
|
|
10151
|
+
"title": "Components",
|
|
10152
|
+
"hashes": {
|
|
10153
|
+
"components": {
|
|
10154
|
+
"count": 1,
|
|
10155
|
+
"title": "",
|
|
10156
|
+
"type": "paragraph"
|
|
10157
|
+
}
|
|
10158
|
+
}
|
|
10159
|
+
}
|
|
10160
|
+
}
|
|
10161
|
+
},
|
|
9852
10162
|
{
|
|
9853
10163
|
"search": "Manual installation (Vite)",
|
|
9854
10164
|
"files": {
|
|
@@ -11100,12 +11410,12 @@
|
|
|
11100
11410
|
}
|
|
11101
11411
|
},
|
|
11102
11412
|
{
|
|
11103
|
-
"search": "
|
|
11413
|
+
"search": "Theming",
|
|
11104
11414
|
"files": {
|
|
11105
11415
|
"docs/_getting-started/theming.md": {
|
|
11106
|
-
"title": "
|
|
11416
|
+
"title": "Theming",
|
|
11107
11417
|
"hashes": {
|
|
11108
|
-
"
|
|
11418
|
+
"theming": {
|
|
11109
11419
|
"count": 1,
|
|
11110
11420
|
"title": "",
|
|
11111
11421
|
"type": "page"
|
|
@@ -11118,7 +11428,7 @@
|
|
|
11118
11428
|
"search": "Concorde components ship with default styles (fallback values in each component and in <sonic-theme>).You do not need to define any CSS variables to get a usable UI.\n",
|
|
11119
11429
|
"files": {
|
|
11120
11430
|
"docs/_getting-started/theming.md": {
|
|
11121
|
-
"title": "
|
|
11431
|
+
"title": "Theming",
|
|
11122
11432
|
"hashes": {
|
|
11123
11433
|
"theme-first-customization": {
|
|
11124
11434
|
"count": 1,
|
|
@@ -11133,7 +11443,7 @@
|
|
|
11133
11443
|
"search": "To align the kit with your brand, override only the essential theme tokens on <sonic-theme>, on :root, or in a project stylesheet.Concorde derives radius steps, button/input rounding, shadows, and most per-component layout from these primitives—do not copy long lists of derived variables unless you have a specific need.\n",
|
|
11134
11444
|
"files": {
|
|
11135
11445
|
"docs/_getting-started/theming.md": {
|
|
11136
|
-
"title": "
|
|
11446
|
+
"title": "Theming",
|
|
11137
11447
|
"hashes": {
|
|
11138
11448
|
"theme-first-customization": {
|
|
11139
11449
|
"count": 1,
|
|
@@ -11148,7 +11458,7 @@
|
|
|
11148
11458
|
"search": "Popovers, modals, and toasts mount under the nearest <sonic-theme>.\n",
|
|
11149
11459
|
"files": {
|
|
11150
11460
|
"docs/_getting-started/theming.md": {
|
|
11151
|
-
"title": "
|
|
11461
|
+
"title": "Theming",
|
|
11152
11462
|
"hashes": {
|
|
11153
11463
|
"theme-first-customization": {
|
|
11154
11464
|
"count": 1,
|
|
@@ -11163,7 +11473,7 @@
|
|
|
11163
11473
|
"search": "Example (full brand override on <sonic-theme> or :root). Set every essential token below; derived radii and shadows still come from the theme engine—only --sc-rounded is listed here.\n",
|
|
11164
11474
|
"files": {
|
|
11165
11475
|
"docs/_getting-started/theming.md": {
|
|
11166
|
-
"title": "
|
|
11476
|
+
"title": "Theming",
|
|
11167
11477
|
"hashes": {
|
|
11168
11478
|
"customization-example": {
|
|
11169
11479
|
"count": 1,
|
|
@@ -11178,7 +11488,7 @@
|
|
|
11178
11488
|
"search": " /* Text/icons on semantic fills */\n --sc-primary-content: #fff;\n --sc-secondary-content: #fff;\n --sc-info-content: #fff;\n --sc-danger-content: #fff;\n --sc-warning-content: #fff;\n --sc-success-content: #fff;\n --sc-contrast-content: #fff;\n",
|
|
11179
11489
|
"files": {
|
|
11180
11490
|
"docs/_getting-started/theming.md": {
|
|
11181
|
-
"title": "
|
|
11491
|
+
"title": "Theming",
|
|
11182
11492
|
"hashes": {
|
|
11183
11493
|
"customization-example": {
|
|
11184
11494
|
"count": 1,
|
|
@@ -11193,7 +11503,7 @@
|
|
|
11193
11503
|
"search": " /* Neutral fills */\n --sc-base: #fff;\n --sc-base-50: #f6f6f5;\n --sc-base-100: #ededec;\n --sc-base-200: #d7d7d4;\n --sc-base-300: #c8c7c4;\n --sc-base-400: #a8a7a2;\n --sc-base-500: #94938c;\n --sc-base-600: #76756c;\n --sc-base-700: #59584e;\n --sc-base-800: #47463b;\n --sc-base-900: #353429;\n",
|
|
11194
11504
|
"files": {
|
|
11195
11505
|
"docs/_getting-started/theming.md": {
|
|
11196
|
-
"title": "
|
|
11506
|
+
"title": "Theming",
|
|
11197
11507
|
"hashes": {
|
|
11198
11508
|
"customization-example": {
|
|
11199
11509
|
"count": 1,
|
|
@@ -11208,7 +11518,7 @@
|
|
|
11208
11518
|
"search": " /* Text/icons on neutral surfaces */\n --sc-base-content: var(--sc-base-900);\n",
|
|
11209
11519
|
"files": {
|
|
11210
11520
|
"docs/_getting-started/theming.md": {
|
|
11211
|
-
"title": "
|
|
11521
|
+
"title": "Theming",
|
|
11212
11522
|
"hashes": {
|
|
11213
11523
|
"customization-example": {
|
|
11214
11524
|
"count": 1,
|
|
@@ -11223,7 +11533,7 @@
|
|
|
11223
11533
|
"search": " /* Typography */\n --sc-font-family-base: "Oswald", system-ui, -apple-system, "Segoe UI", Roboto,\n "Helvetica Neue", Arial, sans-serif;\n --sc-headings-font-family: "alternate-gothic-compressed", system-ui, sans-serif;\n --sc-headings-line-height: 1.1;\n --sc-headings-font-weight: bold;\n --sc-headings-text-transform: none;\n",
|
|
11224
11534
|
"files": {
|
|
11225
11535
|
"docs/_getting-started/theming.md": {
|
|
11226
|
-
"title": "
|
|
11536
|
+
"title": "Theming",
|
|
11227
11537
|
"hashes": {
|
|
11228
11538
|
"customization-example": {
|
|
11229
11539
|
"count": 1,
|
|
@@ -11238,7 +11548,7 @@
|
|
|
11238
11548
|
"search": " /* Shape (primitive only) */\n --sc-rounded: 0;\n",
|
|
11239
11549
|
"files": {
|
|
11240
11550
|
"docs/_getting-started/theming.md": {
|
|
11241
|
-
"title": "
|
|
11551
|
+
"title": "Theming",
|
|
11242
11552
|
"hashes": {
|
|
11243
11553
|
"customization-example": {
|
|
11244
11554
|
"count": 1,
|
|
@@ -11253,7 +11563,7 @@
|
|
|
11253
11563
|
"search": " /* Forms */\n --sc-border-width: 0.2rem;\n --sc-form-height: 2em;\n --sc-input-bg: var(--sc-base);\n --sc-input-color: var(--sc-base-content);\n --sc-input-border-color: var(--sc-input-color);\n --sc-input-active-bg: var(--sc-primary);\n --sc-input-active-color: var(--sc-primary-content);\n --sc-input-active-border-color: var(--sc-primary);\n}\n \n\n",
|
|
11254
11564
|
"files": {
|
|
11255
11565
|
"docs/_getting-started/theming.md": {
|
|
11256
|
-
"title": "
|
|
11566
|
+
"title": "Theming",
|
|
11257
11567
|
"hashes": {
|
|
11258
11568
|
"customization-example": {
|
|
11259
11569
|
"count": 1,
|
|
@@ -11268,7 +11578,7 @@
|
|
|
11268
11578
|
"search": " Palette generator: concordecolors\n",
|
|
11269
11579
|
"files": {
|
|
11270
11580
|
"docs/_getting-started/theming.md": {
|
|
11271
|
-
"title": "
|
|
11581
|
+
"title": "Theming",
|
|
11272
11582
|
"hashes": {
|
|
11273
11583
|
"customization-example": {
|
|
11274
11584
|
"count": 1,
|
|
@@ -11283,7 +11593,7 @@
|
|
|
11283
11593
|
"search": "Without these overrides, components keep Concorde’s per-component fallbacks. Built-in light/dark palettes apply only when you set theme="light", theme="dark", or theme="auto".\n",
|
|
11284
11594
|
"files": {
|
|
11285
11595
|
"docs/_getting-started/theming.md": {
|
|
11286
|
-
"title": "
|
|
11596
|
+
"title": "Theming",
|
|
11287
11597
|
"hashes": {
|
|
11288
11598
|
"customization-example": {
|
|
11289
11599
|
"count": 1,
|
|
@@ -11298,7 +11608,7 @@
|
|
|
11298
11608
|
"search": "What we intentionally avoid: large public --sc-alert-* / --sc-badge-* APIs or ::part() styling hooks on most components. Prefer attributes (type, status, size, …) and the theme tokens above.\n",
|
|
11299
11609
|
"files": {
|
|
11300
11610
|
"docs/_getting-started/theming.md": {
|
|
11301
|
-
"title": "
|
|
11611
|
+
"title": "Theming",
|
|
11302
11612
|
"hashes": {
|
|
11303
11613
|
"customization-example": {
|
|
11304
11614
|
"count": 1,
|
|
@@ -11313,7 +11623,7 @@
|
|
|
11313
11623
|
"search": "These are the smallest set we recommend customizing. Everything else should stay internal to the theme or to components (--sc_* private variables, attributes like type, size, variant).\n",
|
|
11314
11624
|
"files": {
|
|
11315
11625
|
"docs/_getting-started/theming.md": {
|
|
11316
|
-
"title": "
|
|
11626
|
+
"title": "Theming",
|
|
11317
11627
|
"hashes": {
|
|
11318
11628
|
"only-essential-css-variables-public-theme-api": {
|
|
11319
11629
|
"count": 1,
|
|
@@ -11328,7 +11638,7 @@
|
|
|
11328
11638
|
"search": "Tokens without a -content suffix are fill / background colors.Tokens with -content are text and icons on top of the matching fill (solid buttons, badges, alerts, etc.).\n",
|
|
11329
11639
|
"files": {
|
|
11330
11640
|
"docs/_getting-started/theming.md": {
|
|
11331
|
-
"title": "
|
|
11641
|
+
"title": "Theming",
|
|
11332
11642
|
"hashes": {
|
|
11333
11643
|
"surfaces-and-foreground": {
|
|
11334
11644
|
"count": 1,
|
|
@@ -11343,7 +11653,7 @@
|
|
|
11343
11653
|
"search": "Interactive controls expose a few extra theme-level tokens; prefer these over styling individual inputs from outside.\n",
|
|
11344
11654
|
"files": {
|
|
11345
11655
|
"docs/_getting-started/theming.md": {
|
|
11346
|
-
"title": "
|
|
11656
|
+
"title": "Theming",
|
|
11347
11657
|
"hashes": {
|
|
11348
11658
|
"forms-only-if-you-customize-inputs-globally": {
|
|
11349
11659
|
"count": 1,
|
|
@@ -11358,7 +11668,7 @@
|
|
|
11358
11668
|
"search": "Set tailwind.config.js to match concorde style token in your custom component.\n",
|
|
11359
11669
|
"files": {
|
|
11360
11670
|
"docs/_getting-started/theming.md": {
|
|
11361
|
-
"title": "
|
|
11671
|
+
"title": "Theming",
|
|
11362
11672
|
"hashes": {
|
|
11363
11673
|
"tailwind-in-new-components-": {
|
|
11364
11674
|
"count": 1,
|
|
@@ -5,6 +5,8 @@ import { Subscriber } from "@supersoniks/concorde/mixins";
|
|
|
5
5
|
import { Marked } from "marked-ts";
|
|
6
6
|
import { gfmHeadingId } from "marked-gfm-heading-id";
|
|
7
7
|
import { parseMarkdownWithSonicCode } from "./sonic-code-markdown";
|
|
8
|
+
import { DOCS_PAGE_RENDERED } from "../navigation/toc";
|
|
9
|
+
import { parseDocsLocation } from "../docs-location";
|
|
8
10
|
declare const window: { marked: Marked };
|
|
9
11
|
const tagName = "docs-markdown-renderer"; // For Astro.build
|
|
10
12
|
const marked = window.marked;
|
|
@@ -25,9 +27,12 @@ export class DocsMakdownRenderer extends Subscriber(LitElement) {
|
|
|
25
27
|
this.requestUpdate();
|
|
26
28
|
setTimeout(() => {
|
|
27
29
|
this.appendImport();
|
|
28
|
-
|
|
30
|
+
window.dispatchEvent(new CustomEvent(DOCS_PAGE_RENDERED));
|
|
31
|
+
const anchor = this.anchor
|
|
32
|
+
? (this.querySelector("#" + CSS.escape(this.anchor)) as HTMLElement)
|
|
33
|
+
: null;
|
|
29
34
|
if (anchor) {
|
|
30
|
-
|
|
35
|
+
anchor.scrollIntoView({ block: "start" });
|
|
31
36
|
} else if (!(this.anchor && this.anchor.indexOf("#") != -1)) {
|
|
32
37
|
document.documentElement.scrollTop = 0;
|
|
33
38
|
}
|
|
@@ -41,7 +46,10 @@ export class DocsMakdownRenderer extends Subscriber(LitElement) {
|
|
|
41
46
|
if (this.querySelector("h1 + sonic-code")) return;
|
|
42
47
|
|
|
43
48
|
const locationHash = document.location.hash;
|
|
44
|
-
|
|
49
|
+
// Only real component pages (core/components/…), not any URL mentioning "components"
|
|
50
|
+
const isComponent = parseDocsLocation(locationHash).url.startsWith(
|
|
51
|
+
"core/components/",
|
|
52
|
+
);
|
|
45
53
|
|
|
46
54
|
if (isComponent) {
|
|
47
55
|
const split = locationHash.split("/");
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
import { createHighlighterCore, type HighlighterCore } from "shiki/core";
|
|
3
|
+
import { createJavaScriptRegexEngine } from "shiki/engine/javascript";
|
|
4
|
+
import bash from "shiki/langs/bash.mjs";
|
|
5
|
+
import cssLang from "shiki/langs/css.mjs";
|
|
6
|
+
import html from "shiki/langs/html.mjs";
|
|
7
|
+
import javascript from "shiki/langs/javascript.mjs";
|
|
8
|
+
import json from "shiki/langs/json.mjs";
|
|
9
|
+
import typescript from "shiki/langs/typescript.mjs";
|
|
10
|
+
import githubDark from "shiki/themes/github-dark.mjs";
|
|
11
|
+
import githubLight from "shiki/themes/github-light.mjs";
|
|
12
|
+
|
|
13
|
+
let highlighter: Promise<HighlighterCore> | null = null;
|
|
14
|
+
|
|
15
|
+
function getHighlighter() {
|
|
16
|
+
highlighter ??= createHighlighterCore({
|
|
17
|
+
themes: [githubLight, githubDark],
|
|
18
|
+
langs: [html, typescript, javascript, json, bash, cssLang],
|
|
19
|
+
engine: createJavaScriptRegexEngine(),
|
|
20
|
+
});
|
|
21
|
+
return highlighter;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function normalizeDocsCodeLanguage(language: string): string {
|
|
25
|
+
if (language === "html" || language === "markup") return "html";
|
|
26
|
+
if (language === "shell") return "bash";
|
|
27
|
+
if (language === "js") return "javascript";
|
|
28
|
+
return language;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function normalizeDocsSource(source: string): string {
|
|
32
|
+
// Drop blank edge lines only: trimming would also eat the first line's
|
|
33
|
+
// indentation and make the dedent below a no-op.
|
|
34
|
+
let text = source
|
|
35
|
+
.replace(/\r\n?/g, "\n")
|
|
36
|
+
.replace(/^(?:[\t ]*\n)+/, "")
|
|
37
|
+
.trimEnd();
|
|
38
|
+
const lines = text.split("\n");
|
|
39
|
+
const indents = lines
|
|
40
|
+
.filter((l) => l.trim())
|
|
41
|
+
.map((l) => l.match(/^[\t ]*/)?.[0].length ?? 0);
|
|
42
|
+
const min = Math.min(...indents);
|
|
43
|
+
if (min > 0) text = lines.map((l) => l.slice(min)).join("\n");
|
|
44
|
+
return text
|
|
45
|
+
.replaceAll('=""', "")
|
|
46
|
+
.replaceAll(""", '"')
|
|
47
|
+
.replaceAll('"{', "'{")
|
|
48
|
+
.replaceAll('}"', "}'")
|
|
49
|
+
.replaceAll("&", "&");
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function escapeHtml(text: string): string {
|
|
53
|
+
return text
|
|
54
|
+
.replace(/&/g, "&")
|
|
55
|
+
.replace(/</g, "<")
|
|
56
|
+
.replace(/>/g, ">");
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export async function highlightDocsCode(
|
|
60
|
+
source: string,
|
|
61
|
+
language: string,
|
|
62
|
+
): Promise<string> {
|
|
63
|
+
const code = normalizeDocsSource(source);
|
|
64
|
+
if (!code) return "";
|
|
65
|
+
|
|
66
|
+
const lang = normalizeDocsCodeLanguage(language);
|
|
67
|
+
const h = await getHighlighter();
|
|
68
|
+
if (!h.getLoadedLanguages().includes(lang)) return escapeHtml(code);
|
|
69
|
+
|
|
70
|
+
try {
|
|
71
|
+
return h.codeToHtml(code, {
|
|
72
|
+
lang,
|
|
73
|
+
themes: { light: "github-light", dark: "github-dark" },
|
|
74
|
+
defaultColor: false,
|
|
75
|
+
structure: "inline",
|
|
76
|
+
});
|
|
77
|
+
} catch {
|
|
78
|
+
return escapeHtml(code);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export const docsCodeCSS = css`
|
|
83
|
+
pre {
|
|
84
|
+
margin: 0;
|
|
85
|
+
padding: 1em;
|
|
86
|
+
overflow: auto;
|
|
87
|
+
font-size: 13px;
|
|
88
|
+
line-height: 1.55;
|
|
89
|
+
tab-size: 2;
|
|
90
|
+
color: var(--sc-base-content);
|
|
91
|
+
background: var(--sc-base-100);
|
|
92
|
+
border: 1px solid var(--sc-base-200);
|
|
93
|
+
border-radius: var(--sc-rounded, 0.5rem);
|
|
94
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
code {
|
|
98
|
+
display: block;
|
|
99
|
+
font-family: inherit;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
code span {
|
|
103
|
+
color: var(--shiki-light);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
:host-context([data-concorde-theme="dark"]) code span {
|
|
107
|
+
color: var(--shiki-dark);
|
|
108
|
+
}
|
|
109
|
+
`;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* CUSTOM SCROLL */
|
|
2
|
+
.custom-scroll {
|
|
3
|
+
overflow: auto !important;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.custom-scroll:hover::-webkit-scrollbar-thumb {
|
|
7
|
+
box-shadow: /* taste-skill-ignore: scrollbar thumb fill, not an elevation */ inset 0 0 2rem 2rem var(--sc-base-900);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.custom-scroll::-webkit-scrollbar {
|
|
11
|
+
width: 0.5rem;
|
|
12
|
+
height: 0.5rem;
|
|
13
|
+
border: solid 0.15rem transparent;
|
|
14
|
+
border-radius: var(--sc-rounded);
|
|
15
|
+
background: transparent;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.custom-scroll::-webkit-scrollbar-thumb {
|
|
19
|
+
opacity: 0;
|
|
20
|
+
transition: box-shadow 0.2s;
|
|
21
|
+
border: solid 0.15rem transparent;
|
|
22
|
+
}
|