@supersoniks/concorde 5.1.1 → 5.1.3-immutable.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/.agents/skills/concorde-docs/SKILL.md +153 -0
- package/.agents/skills/{concorde-component-docs/template.md → concorde-docs/templates/component.md} +6 -2
- package/.agents/skills/concorde-docs/templates/decorator.md +43 -0
- package/.agents/skills/concorde-docs/templates/guide.md +25 -0
- package/.claude/skills +1 -0
- package/.github/workflows/ci.yml +21 -0
- package/.github-export-ignore +30 -0
- package/CONTRIBUTING.md +59 -0
- package/DEV.md +54 -0
- package/LICENSE +21 -0
- package/OPEN_SOURCE_CHECKPOINT.md +133 -0
- package/README.md +4 -4
- package/ai/README.md +29 -41
- package/ai/skills/concorde/SKILL.md +54 -324
- package/ai/skills/concorde/rules/composition.md +32 -0
- package/ai/skills/concorde/rules/data.md +47 -0
- package/ai/skills/concorde/rules/http.md +25 -0
- package/ai/skills/concorde/rules/lists-forms.md +35 -0
- package/ai/skills/concorde/rules/styling.md +46 -0
- package/ai/skills/concorde/rules/troubleshooting.md +45 -0
- package/build-infos.json +1 -1
- package/concorde-core.bundle.js +177 -177
- package/concorde-core.es.js +4993 -4833
- package/custom-elements-manifest.public.config.mjs +8 -0
- package/{.tmp-cem/custom-elements.json → custom-elements.json} +11758 -8904
- package/dist/concorde-core.bundle.js +177 -177
- package/dist/concorde-core.es.js +4993 -4833
- package/dist/docs-mock-api-sw.js +58 -223
- package/dist/docs-mock-api-sw.js.map +4 -4
- package/dist/img/concorde/plane_01.jpg +0 -0
- package/dist/img/concorde/plane_02.jpg +0 -0
- package/dist/img/concorde/plane_03.jpg +0 -0
- package/dist/img/concorde/plane_04.jpg +0 -0
- package/dist/img/concorde/plane_05.jpg +0 -0
- package/dist/img/concorde/plane_06.jpg +0 -0
- package/dist/img/concorde/plane_07.jpg +0 -0
- package/dist/img/concorde/plane_08.jpg +0 -0
- package/dist/img/concorde/plane_09.jpg +0 -0
- package/dist/img/concorde/plane_10.jpg +0 -0
- package/dist/img/concorde/plane_11.jpg +0 -0
- package/dist/img/concorde/plane_12.jpg +0 -0
- package/dist/img/concorde/plane_13.jpg +0 -0
- package/dist/img/og-concorde.jpg +0 -0
- package/dist/robots.txt +11 -10
- package/docs/assets/index-D_alEsng.js +12122 -0
- package/docs/crawl/core/components/functional/date/date.html +190 -0
- package/docs/crawl/core/components/functional/fetch/fetch.html +109 -0
- package/docs/crawl/core/components/functional/if/if.html +27 -0
- package/docs/crawl/core/components/functional/jsonata/jsonata.html +79 -0
- package/docs/crawl/core/components/functional/list/list.html +70 -0
- package/docs/crawl/core/components/functional/mix/mix.html +45 -0
- package/docs/crawl/core/components/functional/queue/queue.html +96 -0
- package/docs/crawl/core/components/functional/router/router.html +106 -0
- package/docs/crawl/core/components/functional/sdui/sdui-extension-points.html +126 -0
- package/docs/crawl/core/components/functional/sdui/sdui.html +368 -0
- package/docs/crawl/core/components/functional/states/states.html +66 -0
- package/docs/crawl/core/components/functional/submit/submit.html +160 -0
- package/docs/crawl/core/components/functional/subscriber/subscriber.html +67 -0
- package/docs/crawl/core/components/functional/value/value.html +51 -0
- package/docs/crawl/core/components/ui/alert/alert.html +211 -0
- package/docs/crawl/core/components/ui/alert-messages/alert-messages.html +131 -0
- package/docs/crawl/core/components/ui/badge/badge.html +197 -0
- package/docs/crawl/core/components/ui/button/button.html +150 -0
- package/docs/crawl/core/components/ui/captcha/captcha.html +112 -0
- package/docs/crawl/core/components/ui/card/card.html +253 -0
- package/docs/crawl/core/components/ui/divider/divider.html +144 -0
- package/docs/crawl/core/components/ui/form/checkbox/checkbox.html +73 -0
- package/docs/crawl/core/components/ui/form/fieldset/fieldset.html +266 -0
- package/docs/crawl/core/components/ui/form/form-actions/form-actions.html +122 -0
- package/docs/crawl/core/components/ui/form/form-layout/form-layout.html +121 -0
- package/docs/crawl/core/components/ui/form/input/input.html +109 -0
- package/docs/crawl/core/components/ui/form/input-autocomplete/input-autocomplete.html +38 -0
- package/docs/crawl/core/components/ui/form/radio/radio.html +56 -0
- package/docs/crawl/core/components/ui/form/select/select.html +73 -0
- package/docs/crawl/core/components/ui/form/switch/switch.html +56 -0
- package/docs/crawl/core/components/ui/form/textarea/textarea.html +59 -0
- package/docs/crawl/core/components/ui/group/group.html +104 -0
- package/docs/crawl/core/components/ui/icon/icon.html +222 -0
- package/docs/crawl/core/components/ui/image/image.html +298 -0
- package/docs/crawl/core/components/ui/link/link.html +100 -0
- package/docs/crawl/core/components/ui/loader/loader.html +124 -0
- package/docs/crawl/core/components/ui/menu/menu.html +394 -0
- package/docs/crawl/core/components/ui/modal/modal.html +342 -0
- package/docs/crawl/core/components/ui/pop/pop.html +296 -0
- package/docs/crawl/core/components/ui/progress/progress.html +131 -0
- package/docs/crawl/core/components/ui/table/table.html +545 -0
- package/docs/crawl/core/components/ui/theme/theme.html +131 -0
- package/docs/crawl/core/components/ui/toast/toast.html +233 -0
- package/docs/crawl/core/components/ui/tooltip/tooltip.html +140 -0
- package/docs/crawl/docs/_core-concept/dataFlow.html +177 -0
- package/docs/crawl/docs/_core-concept/overview.html +66 -0
- package/docs/crawl/docs/_core-concept/subscriber.html +75 -0
- package/docs/crawl/docs/_decorators/ancestor-attribute.html +117 -0
- package/docs/crawl/docs/_decorators/auto-subscribe.html +202 -0
- package/docs/crawl/docs/_decorators/bind.html +141 -0
- package/docs/crawl/docs/_decorators/get.html +149 -0
- package/docs/crawl/docs/_decorators/handle.html +165 -0
- package/docs/crawl/docs/_decorators/on-assign.html +355 -0
- package/docs/crawl/docs/_decorators/patch.html +78 -0
- package/docs/crawl/docs/_decorators/post.html +139 -0
- package/docs/crawl/docs/_decorators/publish.html +61 -0
- package/docs/crawl/docs/_decorators/put.html +78 -0
- package/docs/crawl/docs/_decorators/subscribe.html +109 -0
- package/docs/crawl/docs/_decorators/wait-for-ancestors.html +137 -0
- package/docs/crawl/docs/_directives/sub.html +93 -0
- package/docs/crawl/docs/_getting-started/ai-agents.html +173 -0
- package/docs/crawl/docs/_getting-started/concorde-manual-install.html +100 -0
- package/docs/crawl/docs/_getting-started/concorde-outside.html +58 -0
- package/docs/crawl/docs/_getting-started/create-a-component.html +111 -0
- package/docs/crawl/docs/_getting-started/my-first-component.html +189 -0
- package/docs/crawl/docs/_getting-started/my-first-subscriber.html +110 -0
- package/docs/crawl/docs/_getting-started/pubsub.html +62 -0
- package/docs/crawl/docs/_getting-started/start.html +76 -0
- package/docs/crawl/docs/_getting-started/theming.html +333 -0
- package/docs/crawl/docs/_misc/api-configuration.html +149 -0
- package/docs/crawl/docs/_misc/dataProviderKey.html +135 -0
- package/docs/crawl/docs/_misc/docs-mock-api.html +158 -0
- package/docs/crawl/docs/_misc/dynamic-path.html +180 -0
- package/docs/crawl/docs/_misc/endpoint.html +50 -0
- package/docs/crawl/docs/_misc/formelement-subscriber-removal.html +138 -0
- package/docs/crawl/docs/_misc/html-integration.html +48 -0
- package/docs/crawl/hubs/decorators.html +547 -0
- package/docs/crawl/hubs/form-components.html +381 -0
- package/docs/crawl/hubs/remote-data.html +452 -0
- package/docs/crawl/index.html +103 -0
- package/docs/index.html +1 -1
- package/docs/llms-full.txt +7174 -0
- package/docs/llms.txt +98 -0
- package/docs/sitemap.xml +243 -0
- package/docs/src/core/components/functional/date/date.md +290 -0
- package/docs/src/core/components/functional/fetch/fetch.md +125 -0
- package/docs/src/core/components/functional/if/if.md +9 -0
- package/docs/src/core/components/functional/jsonata/jsonata.md +56 -0
- package/docs/src/core/components/functional/list/list.md +65 -0
- package/docs/src/core/components/functional/mix/mix.md +41 -0
- package/docs/src/core/components/functional/queue/queue.md +72 -0
- package/docs/src/core/components/functional/router/router.md +94 -0
- package/docs/src/core/components/functional/sdui/component-catalog.gaps.json +511 -0
- package/docs/src/core/components/functional/sdui/component-catalog.json +3103 -0
- package/docs/src/core/components/functional/sdui/default-library.json +108 -0
- package/docs/src/core/components/functional/sdui/example.json +99 -0
- package/docs/src/core/components/functional/sdui/sdui-extension-points.md +94 -0
- package/docs/src/core/components/functional/sdui/sdui.md +478 -0
- package/docs/src/core/components/functional/states/states.md +87 -0
- package/docs/src/core/components/functional/submit/submit.md +114 -0
- package/docs/src/core/components/functional/subscriber/subscriber.md +91 -0
- package/docs/src/core/components/functional/value/value.md +35 -0
- package/docs/src/core/components/ui/alert/alert.md +196 -0
- package/docs/src/core/components/ui/alert-messages/alert-messages.md +85 -0
- package/docs/src/core/components/ui/badge/badge.md +188 -0
- package/docs/src/core/components/ui/button/button.md +183 -0
- package/docs/src/core/components/ui/captcha/captcha.md +71 -0
- package/docs/src/core/components/ui/card/card.md +215 -0
- package/docs/src/core/components/ui/divider/divider.md +129 -0
- package/docs/src/core/components/ui/form/checkbox/checkbox.md +77 -0
- package/docs/src/core/components/ui/form/fieldset/fieldset.md +205 -0
- package/docs/src/core/components/ui/form/form-actions/form-actions.md +100 -0
- package/docs/src/core/components/ui/form/form-layout/form-layout.md +119 -0
- package/docs/src/core/components/ui/form/input/input.md +142 -0
- package/docs/src/core/components/ui/form/radio/radio.md +57 -0
- package/docs/src/core/components/ui/form/select/select.md +71 -0
- package/docs/src/core/components/ui/form/switch/switch.md +57 -0
- package/docs/src/core/components/ui/form/textarea/textarea.md +65 -0
- package/docs/src/core/components/ui/group/group.md +75 -0
- package/docs/src/core/components/ui/icon/icon.md +214 -0
- package/docs/src/core/components/ui/icon/icons.json +1 -0
- package/docs/src/core/components/ui/image/image.md +233 -0
- package/docs/src/core/components/ui/link/link.md +81 -0
- package/docs/src/core/components/ui/loader/loader.md +112 -0
- package/docs/src/core/components/ui/menu/menu.md +370 -0
- package/docs/src/core/components/ui/modal/modal.md +235 -0
- package/docs/src/core/components/ui/pop/pop.md +294 -0
- package/docs/src/core/components/ui/progress/progress.md +109 -0
- package/docs/src/core/components/ui/table/table.md +431 -0
- package/docs/src/core/components/ui/theme/theme.md +122 -0
- package/docs/src/core/components/ui/toast/toast.md +216 -0
- package/docs/src/core/components/ui/tooltip/tooltip.md +124 -0
- package/{src → docs/src}/docs/_core-concept/subscriber.md +0 -0
- package/{src → docs/src}/docs/_getting-started/my-first-subscriber.md +0 -0
- package/{src → docs/src}/docs/_getting-started/pubsub.md +0 -0
- package/docs/src/docs/_getting-started/theming.md +253 -0
- package/docs/src/docs/search/docs-search.json +12242 -0
- package/docs/src/tag-list.json +1 -0
- package/docs/src/tsconfig-model.json +23 -0
- package/docs/src/tsconfig.declarations.json +22 -0
- package/docs/src/tsconfig.emit.json +23 -0
- package/docs/src/tsconfig.json +1332 -0
- package/gitlab/job_github_mirror.sh +39 -0
- package/index.html +157 -5
- package/package.json +22 -4
- package/public/docs-mock-api-sw.js +58 -223
- package/public/docs-mock-api-sw.js.map +4 -4
- package/public/img/concorde/plane_01.jpg +0 -0
- package/public/img/concorde/plane_02.jpg +0 -0
- package/public/img/concorde/plane_03.jpg +0 -0
- package/public/img/concorde/plane_04.jpg +0 -0
- package/public/img/concorde/plane_05.jpg +0 -0
- package/public/img/concorde/plane_06.jpg +0 -0
- package/public/img/concorde/plane_07.jpg +0 -0
- package/public/img/concorde/plane_08.jpg +0 -0
- package/public/img/concorde/plane_09.jpg +0 -0
- package/public/img/concorde/plane_10.jpg +0 -0
- package/public/img/concorde/plane_11.jpg +0 -0
- package/public/img/concorde/plane_12.jpg +0 -0
- package/public/img/concorde/plane_13.jpg +0 -0
- package/public/img/og-concorde.jpg +0 -0
- package/public/robots.txt +11 -10
- package/scripts/ai-init.mjs +104 -379
- package/scripts/ai-init.test.mjs +81 -239
- package/scripts/docs-markdown-vite-plugin.ts +43 -0
- package/scripts/docs-public-url.mjs +56 -0
- package/scripts/docs.htaccess +82 -0
- package/scripts/generate-cem.mjs +244 -0
- package/scripts/generate-cem.test.mjs +122 -0
- package/scripts/generate-crawl-docs.mjs +233 -118
- package/scripts/generate-crawl-docs.test.mjs +124 -0
- package/scripts/generate-sdui-catalog.mjs +11 -10
- package/scripts/github-export.mjs +150 -0
- package/scripts/post-build-docs.js +37 -50
- package/scripts/post-build.mjs +0 -0
- package/scripts/pre-publish.mjs +2 -1
- package/scripts/site-pages.mjs +212 -0
- package/scripts/site-pages.test.mjs +116 -0
- package/site-pages/about.md +22 -0
- package/site-pages/privacy.md +32 -0
- package/src/core/components/functional/date/date.md +91 -231
- package/src/core/components/functional/example/example.ts +3 -1
- package/src/core/components/functional/fetch/fetch.md +66 -83
- package/src/core/components/functional/if/if.md +28 -3
- package/src/core/components/functional/if/if.ts +0 -0
- package/src/core/components/functional/jsonata/jsonata.md +42 -37
- package/src/core/components/functional/list/list.demo.ts +0 -0
- package/src/core/components/functional/list/list.md +103 -43
- package/src/core/components/functional/list/list.ts +17 -4
- package/src/core/components/functional/mix/mix.md +31 -26
- package/src/core/components/functional/queue/queue.demo.ts +10 -7
- package/src/core/components/functional/queue/queue.md +40 -61
- package/src/core/components/functional/router/router.demo.ts +16 -16
- package/src/core/components/functional/router/router.md +64 -65
- package/src/core/components/functional/router/router.ts +0 -0
- package/src/core/components/functional/sdui/SDUIDescriptorTransformer.ts +0 -0
- package/src/core/components/functional/sdui/component-catalog.gaps.json +1 -1
- package/src/core/components/functional/sdui/component-catalog.json +2 -2
- package/src/core/components/functional/sdui/example.json +19 -86
- package/src/core/components/functional/sdui/sdui-extension-points.md +1 -1
- package/src/core/components/functional/sdui/sdui-immutable.spec.ts +74 -0
- package/src/core/components/functional/sdui/sdui.md +187 -358
- package/src/core/components/functional/sdui/sdui.ts +33 -8
- package/src/core/components/functional/sdui/types.ts +0 -0
- package/src/core/components/functional/states/states.demo.ts +21 -22
- package/src/core/components/functional/states/states.md +86 -61
- package/src/core/components/functional/states/states.ts +1 -1
- package/src/core/components/functional/submit/submit.md +64 -72
- package/src/core/components/functional/submit/submit.spec.ts +60 -0
- package/src/core/components/functional/submit/submit.ts +6 -3
- package/src/core/components/functional/subscriber/subscriber.ts +0 -0
- package/src/core/components/functional/translation/translation.md +38 -0
- package/src/core/components/functional/value/value.md +34 -22
- package/src/core/components/functional/value/value.ts +0 -0
- package/src/core/components/ui/_css/size.ts +0 -0
- package/src/core/components/ui/alert/alert.md +48 -58
- package/src/core/components/ui/badge/badge.md +27 -34
- package/src/core/components/ui/button/button.md +139 -106
- package/src/core/components/ui/captcha/altchaStyles.ts +0 -0
- package/src/core/components/ui/captcha/captcha.md +17 -32
- package/src/core/components/ui/card/card.md +6 -6
- package/src/core/components/ui/divider/divider.md +8 -11
- package/src/core/components/ui/form/checkbox/checkbox.md +90 -42
- package/src/core/components/ui/form/fieldset/fieldset.md +31 -75
- package/src/core/components/ui/form/form-actions/form-actions.md +14 -16
- package/src/core/components/ui/form/form-layout/form-layout.md +19 -29
- package/src/core/components/ui/form/input/input.md +108 -90
- package/src/core/components/ui/form/input/input.ts +8 -2
- package/src/core/components/ui/form/radio/radio.md +65 -30
- package/src/core/components/ui/form/select/select.md +60 -45
- package/src/core/components/ui/form/switch/switch.md +57 -34
- package/src/core/components/ui/form/textarea/textarea.md +55 -38
- package/src/core/components/ui/group/group.md +35 -33
- package/src/core/components/ui/icon/icon.md +4 -4
- package/src/core/components/ui/image/image.md +41 -107
- package/src/core/components/ui/link/link.md +6 -6
- package/src/core/components/ui/loader/loader.md +30 -55
- package/src/core/components/ui/menu/menu.md +27 -27
- package/src/core/components/ui/modal/modal.md +72 -96
- package/src/core/components/ui/pop/pop.md +80 -158
- package/src/core/components/ui/progress/progress.md +2 -2
- package/src/core/components/ui/table/table.md +91 -255
- package/src/core/components/ui/theme/theme.md +11 -36
- package/src/core/components/ui/toast/toast.md +48 -117
- package/src/core/components/ui/tooltip/tooltip.md +27 -62
- package/src/core/decorators/subscriber/bind.ts +9 -14
- package/src/core/decorators/subscriber/subscribe.ts +15 -9
- package/src/core/decorators/subscriber/subscribe.type-test.ts +14 -5
- package/src/core/mixins/Subscriber.ts +0 -0
- package/src/core/utils/DataBindObserver.ts +0 -0
- package/src/core/utils/LocationHandler.spec.ts +80 -0
- package/src/core/utils/LocationHandler.ts +5 -9
- package/src/core/utils/Objects.ts +0 -0
- package/src/core/utils/PublisherProxy.ts +166 -125
- package/src/core/utils/deepReadonly.spec.ts +66 -0
- package/src/core/utils/deepReadonly.ts +71 -0
- package/src/core/utils/immutableValue.spec.ts +54 -0
- package/src/core/utils/immutableValue.ts +102 -0
- package/src/core/utils/nestedDotForm.spec.ts +88 -0
- package/src/core/utils/publisherImmutable.spec.ts +76 -0
- package/src/core/utils/route.ts +0 -0
- package/src/core/utils/strictGet.spec.ts +61 -0
- package/src/core/utils/strictGet.ts +102 -0
- package/src/css.d.ts +19 -0
- package/src/docs/components/docs-demo-sources.ts +55 -140
- package/src/docs/components/docs-lit-demo.ts +1 -3
- package/src/docs/components/docs-source-link.ts +0 -82
- package/src/docs/decorators/ancestor-attribute.md +59 -0
- package/src/docs/decorators/auto-subscribe.md +40 -0
- package/src/docs/decorators/bind.md +76 -0
- package/src/docs/decorators/get.md +160 -0
- package/src/docs/decorators/handle.md +119 -0
- package/src/docs/decorators/on-assign.md +63 -0
- package/src/docs/decorators/patch.md +44 -0
- package/src/docs/decorators/post.md +134 -0
- package/src/docs/decorators/publish.md +56 -0
- package/src/docs/decorators/put.md +51 -0
- package/src/docs/decorators/subscribe.md +87 -0
- package/src/docs/decorators/wait-for-ancestors.md +76 -0
- package/src/docs/directives/sub.md +75 -0
- package/src/docs/directives/t.md +73 -0
- package/src/docs/docs-location.spec.ts +56 -0
- package/src/docs/docs-location.ts +133 -32
- package/src/docs/docs.ts +1 -2
- package/src/docs/example/decorators-demo-bind-demos.ts +83 -135
- package/src/docs/example/decorators-demo-geo.ts +30 -19
- package/src/docs/example/decorators-demo-post.ts +88 -186
- package/src/docs/example/decorators-demo-subscribe-publish-get-demos.ts +165 -268
- package/src/docs/example/decorators-demo.ts +85 -98
- package/src/docs/example/docs-api-config-demos.ts +19 -20
- package/src/docs/example/docs-flight-demos.ts +147 -0
- package/src/docs/example/docs-jsonata-demos.ts +52 -52
- package/src/docs/example/docs-list-demos.ts +43 -123
- package/src/docs/example/docs-provider-keys.ts +21 -28
- package/src/docs/example/docs-queue-demos.ts +37 -77
- package/src/docs/example/docs-router-demos.ts +20 -25
- package/src/docs/example/docs-submit-demos.ts +48 -48
- package/src/docs/example/docs-toggle-demos.ts +4 -3
- package/src/docs/example/users.ts +0 -0
- package/src/docs/getting-started/ai-agents.md +50 -0
- package/src/docs/getting-started/create-a-component.md +136 -0
- package/src/docs/getting-started/dataFlow.md +87 -0
- package/src/docs/getting-started/installation.md +36 -0
- package/src/docs/getting-started/my-first-component.md +227 -0
- package/src/docs/getting-started/start.md +35 -0
- package/src/docs/header/header.ts +11 -6
- package/src/docs/home/catalog.ts +1 -1
- package/src/docs/home/home.ts +20 -11
- package/src/docs/layout.ts +12 -13
- package/src/docs/misc/api-configuration.md +79 -0
- package/src/docs/misc/dataProviderKey.md +168 -0
- package/src/docs/misc/docs-mock-api.md +62 -0
- package/src/docs/misc/dynamic-path.md +71 -0
- package/src/docs/misc/endpoint.md +45 -0
- package/src/docs/misc/html-integration.md +14 -0
- package/src/docs/misc/publisher-get-immutability-docs-crawl.json +902 -0
- package/src/docs/misc/publisher-get-immutability-docs-recheck.json +13 -0
- package/src/docs/misc/publisher-get-immutability-study.md +229 -0
- package/src/docs/mock-api/api-config-mock.ts +5 -0
- package/src/docs/mock-api/fixtures.ts +0 -278
- package/src/docs/mock-api/flights.ts +89 -0
- package/src/docs/mock-api/router.ts +3 -4
- package/src/docs/mock-api/urls.ts +1 -2
- package/src/docs/navigation/navigation.ts +84 -101
- package/src/docs/navigation/toc.ts +7 -4
- package/src/docs/search/docs-search.json +3188 -5153
- package/src/docs/search/markdown-renderer.ts +31 -8
- package/src/docs/search/page.ts +9 -6
- package/src/docs/search/search.ts +154 -122
- package/src/docs/tailwind/css/docs/content.css +4 -5
- package/src/tsconfig.declarations.json +22 -0
- package/src/tsconfig.emit.json +23 -0
- package/src/tsconfig.json +53 -5
- package/src/tsconfig.tsbuildinfo +1 -1
- package/vite.config.mts +11 -2
- package/.agents/skills/concorde-component-docs/SKILL.md +0 -194
- 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 +0 -4103
- 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 +0 -2556
- package/.taste-skill/before/tablet-fold.jpg +0 -0
- package/.taste-skill/before/tablet-page-01.jpg +0 -0
- package/.taste-skill/direction.json +0 -510
- package/.taste-skill/notes.md +0 -84
- 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 +0 -1973
- 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/AUDIT.md +0 -228
- package/PLAN-AMELIORATION.md +0 -220
- package/ai/AGENTS.md +0 -56
- package/ai/cursor/rules/concorde-menu.mdc +0 -15
- package/ai/cursor/rules/concorde-scope.mdc +0 -14
- package/ai/cursor/rules/concorde-theme.mdc +0 -13
- package/ai/cursor/rules/concorde.mdc +0 -66
- package/ai/jetbrains/rules/concorde.md +0 -53
- package/ai/skills/concorde-get-set-dp/SKILL.md +0 -194
- package/ai/skills/concorde-imports/SKILL.md +0 -78
- package/ai/skills/concorde-menu/SKILL.md +0 -74
- package/ai/skills/concorde-scope/SKILL.md +0 -70
- package/ai/skills/concorde-theme/SKILL.md +0 -57
- package/docs/assets/index-Bb-_LRyY.js +0 -12280
- package/src/docs/example/docs-input-autocomplete-demos.ts +0 -110
- package/src/docs/example/docs-joke-demos.ts +0 -297
- /package/{src → docs/src}/core/components/ui/form/input-autocomplete/input-autocomplete.md +0 -0
- /package/{src → docs/src}/docs/_core-concept/dataFlow.md +0 -0
- /package/{src → docs/src}/docs/_core-concept/overview.md +0 -0
- /package/{src → docs/src}/docs/_decorators/ancestor-attribute.md +0 -0
- /package/{src → docs/src}/docs/_decorators/auto-subscribe.md +0 -0
- /package/{src → docs/src}/docs/_decorators/bind.md +0 -0
- /package/{src → docs/src}/docs/_decorators/get.md +0 -0
- /package/{src → docs/src}/docs/_decorators/handle.md +0 -0
- /package/{src → docs/src}/docs/_decorators/on-assign.md +0 -0
- /package/{src → docs/src}/docs/_decorators/patch.md +0 -0
- /package/{src → docs/src}/docs/_decorators/post.md +0 -0
- /package/{src → docs/src}/docs/_decorators/publish.md +0 -0
- /package/{src → docs/src}/docs/_decorators/put.md +0 -0
- /package/{src → docs/src}/docs/_decorators/subscribe.md +0 -0
- /package/{src → docs/src}/docs/_decorators/wait-for-ancestors.md +0 -0
- /package/{src → docs/src}/docs/_directives/sub.md +0 -0
- /package/{src → docs/src}/docs/_getting-started/ai-agents.md +0 -0
- /package/{src → docs/src}/docs/_getting-started/concorde-manual-install.md +0 -0
- /package/{src → docs/src}/docs/_getting-started/concorde-outside.md +0 -0
- /package/{src → docs/src}/docs/_getting-started/create-a-component.md +0 -0
- /package/{src → docs/src}/docs/_getting-started/my-first-component.md +0 -0
- /package/{src → docs/src}/docs/_getting-started/start.md +0 -0
- /package/{src → docs/src}/docs/_misc/api-configuration.md +0 -0
- /package/{src → docs/src}/docs/_misc/dataProviderKey.md +0 -0
- /package/{src → docs/src}/docs/_misc/docs-mock-api.md +0 -0
- /package/{src → docs/src}/docs/_misc/dynamic-path.md +0 -0
- /package/{src → docs/src}/docs/_misc/endpoint.md +0 -0
- /package/{src → docs/src}/docs/_misc/formelement-subscriber-removal.md +0 -0
- /package/{src → docs/src}/docs/_misc/html-integration.md +0 -0
- /package/src/docs/{_getting-started → getting-started}/components.md +0 -0
- /package/src/docs/{_getting-started → getting-started}/theming.md +0 -0
|
@@ -1,13 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Post-build agent/SEO artifacts for the docs site.
|
|
3
|
+
*
|
|
4
|
+
* Canonical page URLs are the SPA pathnames (`/docs/…`, `/core/…`):
|
|
5
|
+
* - Browsers → index.html (pushState SPA)
|
|
6
|
+
* - Accept: text/markdown → sibling `*.md` (same pathname + `.md`)
|
|
7
|
+
* - Known crawler UAs → sibling `*.html` static pages (same path + `.html`)
|
|
8
|
+
*
|
|
9
|
+
* No redirects for old URL shapes (`/crawl/`, `/docs/…`, `…/name/name`).
|
|
10
|
+
*/
|
|
1
11
|
import fs from "fs";
|
|
2
12
|
import path from "path";
|
|
3
13
|
import { fileURLToPath } from "url";
|
|
4
14
|
import { marked } from "marked";
|
|
5
15
|
import { gfmHeadingId } from "marked-gfm-heading-id";
|
|
16
|
+
import { toPublicPath } from "./docs-public-url.mjs";
|
|
17
|
+
import { STATIC_PAGES, renderSitePage } from "./site-pages.mjs";
|
|
6
18
|
|
|
7
19
|
const SITE_ORIGIN = "https://concorde.supersoniks.org";
|
|
8
20
|
const SRC_DIR = path.resolve("src");
|
|
9
21
|
const DOCS_OUT = path.resolve("docs");
|
|
10
|
-
const CRAWL_DIR = path.join(DOCS_OUT, "crawl");
|
|
11
22
|
|
|
12
23
|
const SONIC_CODE_BLOCK_RE = /<sonic-code\b[\s\S]*?<\/sonic-code>/gi;
|
|
13
24
|
const DOC_HASH_LINK_RE = /#([^)\s"']+)\.md\/([^)\s"'#]+)/g;
|
|
@@ -48,28 +59,44 @@ function mdRelativePath(absPath) {
|
|
|
48
59
|
return path.relative(SRC_DIR, absPath).replace(/\\/g, "/");
|
|
49
60
|
}
|
|
50
61
|
|
|
51
|
-
function crawlHtmlPath(mdRel) {
|
|
52
|
-
return path.join("crawl", mdRel.replace(/\.mdx?$/, ".html")).replace(/\\/g, "/");
|
|
53
|
-
}
|
|
54
|
-
|
|
55
62
|
function docId(mdRel) {
|
|
56
63
|
return mdRel.replace(/\.mdx?$/, "");
|
|
57
64
|
}
|
|
58
65
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
return `${
|
|
66
|
+
/** Public pathname (SPA + agents): /docs/getting-started/start */
|
|
67
|
+
export function pagePath(mdRel) {
|
|
68
|
+
return toPublicPath(mdRel);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** On-disk static HTML next to the SPA build: docs/getting-started/start.html */
|
|
72
|
+
function staticHtmlRel(mdRel) {
|
|
73
|
+
return `${docId(mdRel)}.html`;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function pageUrl(mdRel) {
|
|
77
|
+
return `${SITE_ORIGIN}${pagePath(mdRel)}`;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function docLink(toMdPath, anchor) {
|
|
81
|
+
const base = pagePath(`${toMdPath}.md`);
|
|
82
|
+
const slug = toMdPath.split("/").pop() || "page";
|
|
83
|
+
if (!anchor || anchor === slug) return base;
|
|
84
|
+
return `${base}#${anchor}`;
|
|
67
85
|
}
|
|
68
86
|
|
|
69
|
-
function rewriteDocLinks(text
|
|
70
|
-
|
|
71
|
-
return
|
|
87
|
+
function rewriteDocLinks(text) {
|
|
88
|
+
let out = text.replace(DOC_HASH_LINK_RE, (match, mdPath, anchor) => {
|
|
89
|
+
return docLink(mdPath, anchor);
|
|
72
90
|
});
|
|
91
|
+
out = out.replace(
|
|
92
|
+
/\]\((\/(?:docs|core)\/[^)\s"'#]+)(#[^)\s"']*)?\)/g,
|
|
93
|
+
(match, pathname, fragment) => {
|
|
94
|
+
const mdPath = pathname.replace(/^\//, "");
|
|
95
|
+
const anchor = fragment ? fragment.slice(1) : mdPath.split("/").pop() || "page";
|
|
96
|
+
return `](${docLink(mdPath, anchor)})`;
|
|
97
|
+
},
|
|
98
|
+
);
|
|
99
|
+
return out;
|
|
73
100
|
}
|
|
74
101
|
|
|
75
102
|
function extractTitle(markdown) {
|
|
@@ -133,11 +160,10 @@ function extractDescription(markdown, title) {
|
|
|
133
160
|
}
|
|
134
161
|
|
|
135
162
|
function docKind(mdRel) {
|
|
136
|
-
if (mdRel.includes("/
|
|
137
|
-
if (mdRel.includes("/
|
|
138
|
-
if (mdRel.includes("/
|
|
139
|
-
if (mdRel.includes("/
|
|
140
|
-
if (mdRel.includes("/_misc/")) return "reference";
|
|
163
|
+
if (mdRel.includes("/decorators/")) return "decorator";
|
|
164
|
+
if (mdRel.includes("/directives/")) return "directive";
|
|
165
|
+
if (mdRel.includes("/getting-started/")) return "guide";
|
|
166
|
+
if (mdRel.includes("/misc/")) return "reference";
|
|
141
167
|
if (mdRel.includes("/components/functional/")) return "functional component";
|
|
142
168
|
if (mdRel.includes("/components/ui/")) return "UI component";
|
|
143
169
|
return "documentation";
|
|
@@ -167,10 +193,10 @@ function extractKeywords(mdRel, title, raw) {
|
|
|
167
193
|
keywords.add(`sonic-${baseName}`);
|
|
168
194
|
keywords.add("web component", "Lit");
|
|
169
195
|
}
|
|
170
|
-
if (mdRel.includes("/
|
|
196
|
+
if (mdRel.includes("/decorators/")) {
|
|
171
197
|
keywords.add("decorator", "DataProvider", "ApiResult", "Endpoint");
|
|
172
198
|
}
|
|
173
|
-
if (mdRel.
|
|
199
|
+
if (mdRel.endsWith("/dataFlow.md")) {
|
|
174
200
|
keywords.add("DataProvider", "data flow");
|
|
175
201
|
}
|
|
176
202
|
|
|
@@ -184,16 +210,6 @@ function extractKeywords(mdRel, title, raw) {
|
|
|
184
210
|
return [...keywords].join(", ");
|
|
185
211
|
}
|
|
186
212
|
|
|
187
|
-
function pageHash(mdRel) {
|
|
188
|
-
const base = mdRel.replace(/\.mdx?$/, "");
|
|
189
|
-
const anchor = base.split("/").pop() || "page";
|
|
190
|
-
return `#${base}.md/${anchor}`;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
function crawlPageUrl(crawlRel) {
|
|
194
|
-
return `${SITE_ORIGIN}/${crawlRel}`;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
213
|
function buildLeadParagraph({ title, mdRel, description, canonical, keywords }) {
|
|
198
214
|
const id = docId(mdRel);
|
|
199
215
|
const kind = docKind(mdRel);
|
|
@@ -201,11 +217,7 @@ function buildLeadParagraph({ title, mdRel, description, canonical, keywords })
|
|
|
201
217
|
}
|
|
202
218
|
|
|
203
219
|
function renderPage({ mdRel, title, description, keywords, bodyHtml }) {
|
|
204
|
-
const
|
|
205
|
-
const canonical = crawlPageUrl(crawlRel);
|
|
206
|
-
const interactiveDoc = `${SITE_ORIGIN}/${pageHash(mdRel)}`;
|
|
207
|
-
const depth = path.dirname(crawlRel).split("/").length - 1;
|
|
208
|
-
const indexHref = `${"../".repeat(depth)}index.html`;
|
|
220
|
+
const canonical = pageUrl(mdRel);
|
|
209
221
|
const id = docId(mdRel);
|
|
210
222
|
const leadHtml = buildLeadParagraph({
|
|
211
223
|
title,
|
|
@@ -216,19 +228,20 @@ function renderPage({ mdRel, title, description, keywords, bodyHtml }) {
|
|
|
216
228
|
});
|
|
217
229
|
|
|
218
230
|
return `<!DOCTYPE html>
|
|
219
|
-
<html lang="
|
|
231
|
+
<html lang="en" data-doc-url="${escapeHtml(canonical)}" data-doc-id="${escapeHtml(id)}">
|
|
220
232
|
<head>
|
|
221
233
|
<meta charset="UTF-8">
|
|
222
234
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
223
|
-
<title>${escapeHtml(title)} — Concorde</title>
|
|
235
|
+
<title>${escapeHtml(title)} — Concorde by Supersoniks</title>
|
|
224
236
|
<meta name="description" content="${escapeHtml(description)}">
|
|
225
237
|
<meta name="keywords" content="${escapeHtml(keywords)}">
|
|
226
238
|
<meta name="concorde-doc-id" content="${escapeHtml(id)}">
|
|
227
239
|
<link rel="canonical" href="${escapeHtml(canonical)}">
|
|
240
|
+
<link rel="alternate" type="text/markdown" href="${SITE_ORIGIN}${pagePath(mdRel)}.md">
|
|
228
241
|
</head>
|
|
229
242
|
<body>
|
|
230
243
|
<header>
|
|
231
|
-
<p><a href="
|
|
244
|
+
<p><a href="/docs/index.html">Concorde documentation</a> · <a href="${escapeHtml(canonical)}">same URL (interactive)</a> · <a href="/llms.txt">llms.txt</a></p>
|
|
232
245
|
</header>
|
|
233
246
|
<main>
|
|
234
247
|
<article>
|
|
@@ -245,29 +258,29 @@ function renderIndex(pages) {
|
|
|
245
258
|
const items = pages
|
|
246
259
|
.map(
|
|
247
260
|
(p) =>
|
|
248
|
-
` <li><a href="${escapeHtml(p.
|
|
261
|
+
` <li><a href="${escapeHtml(p.pagePath)}">${escapeHtml(p.title)}</a> <small>(${escapeHtml(p.docId)})</small></li>`,
|
|
249
262
|
)
|
|
250
263
|
.join("\n");
|
|
251
264
|
|
|
252
265
|
return `<!DOCTYPE html>
|
|
253
|
-
<html lang="
|
|
266
|
+
<html lang="en" data-doc-id="docs-index">
|
|
254
267
|
<head>
|
|
255
268
|
<meta charset="UTF-8">
|
|
256
269
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
257
|
-
<title>Concorde documentation index</title>
|
|
258
|
-
<meta name="description" content="
|
|
259
|
-
<meta name="keywords" content="Concorde, documentation index, web components, Lit, DataProvider">
|
|
260
|
-
<link rel="canonical" href="${SITE_ORIGIN}/
|
|
270
|
+
<title>Concorde documentation index — Supersoniks</title>
|
|
271
|
+
<meta name="description" content="Documentation index for Concorde by Supersoniks. Same pathnames as the interactive docs; static HTML for crawlers, Markdown via Accept: text/markdown.">
|
|
272
|
+
<meta name="keywords" content="Concorde, Supersoniks, documentation index, web components, Lit, DataProvider">
|
|
273
|
+
<link rel="canonical" href="${SITE_ORIGIN}/docs/index.html">
|
|
261
274
|
</head>
|
|
262
275
|
<body>
|
|
263
276
|
<header>
|
|
264
277
|
<h1>Concorde documentation</h1>
|
|
265
|
-
<p>
|
|
266
|
-
<p>Full text
|
|
278
|
+
<p>Canonical URLs match the interactive docs (<code>/docs/…</code>, <code>/core/…</code>). Crawlers receive static HTML; agents can request <code>Accept: text/markdown</code>.</p>
|
|
279
|
+
<p>Interactive site: <a href="${SITE_ORIGIN}/">${SITE_ORIGIN}/</a> · Full text: <a href="${SITE_ORIGIN}/llms-full.txt">llms-full.txt</a></p>
|
|
267
280
|
<ul>
|
|
268
|
-
<li><a href="hubs/decorators.html">Decorators hub (@get, @post, …)</a></li>
|
|
269
|
-
<li><a href="hubs/remote-data.html">Remote data hub (@get, List, Queue)</a></li>
|
|
270
|
-
<li><a href="hubs/form-components.html">Form components hub</a></li>
|
|
281
|
+
<li><a href="/hubs/decorators.html">Decorators hub (@get, @post, …)</a></li>
|
|
282
|
+
<li><a href="/hubs/remote-data.html">Remote data hub (@get, List, Queue)</a></li>
|
|
283
|
+
<li><a href="/hubs/form-components.html">Form components hub</a></li>
|
|
271
284
|
</ul>
|
|
272
285
|
</header>
|
|
273
286
|
<main>
|
|
@@ -285,17 +298,31 @@ function writeFileEnsuringDir(filePath, content) {
|
|
|
285
298
|
fs.writeFileSync(filePath, content);
|
|
286
299
|
}
|
|
287
300
|
|
|
288
|
-
function generateLlmsTxt(pages, hubs = []) {
|
|
301
|
+
export function generateLlmsTxt(pages, hubs = []) {
|
|
289
302
|
const lines = [
|
|
290
|
-
"# Concorde",
|
|
303
|
+
"# Concorde by Supersoniks",
|
|
304
|
+
"",
|
|
305
|
+
"> Concorde is the Supersoniks Lit web-components library (UI, DataProvider, decorators, forms, SDUI).",
|
|
306
|
+
"> npm: `@supersoniks/concorde` — https://www.npmjs.com/package/@supersoniks/concorde",
|
|
307
|
+
`> Site: ${SITE_ORIGIN}/`,
|
|
291
308
|
"",
|
|
292
|
-
"
|
|
309
|
+
"## Developer resources",
|
|
293
310
|
"",
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
311
|
+
`- [Homepage (HTML)](${SITE_ORIGIN}/) — interactive docs SPA`,
|
|
312
|
+
`- [Homepage (Markdown)](${SITE_ORIGIN}/index.md) — also via \`Accept: text/markdown\` on ${SITE_ORIGIN}/`,
|
|
313
|
+
`- [llms-full.txt](${SITE_ORIGIN}/llms-full.txt) — full plain-text mirror`,
|
|
314
|
+
`- [Docs index](${SITE_ORIGIN}/docs/index.html)`,
|
|
315
|
+
`- [Sitemap](${SITE_ORIGIN}/sitemap.xml)`,
|
|
316
|
+
`- [npm package @supersoniks/concorde](https://www.npmjs.com/package/@supersoniks/concorde)`,
|
|
317
|
+
`- [Getting started](${SITE_ORIGIN}/docs/getting-started/start)`,
|
|
318
|
+
`- [AI agents (skill)](${SITE_ORIGIN}/docs/getting-started/ai-agents)`,
|
|
319
|
+
`- [Components index](${SITE_ORIGIN}/docs/getting-started/components)`,
|
|
320
|
+
`- [custom-elements.json](${SITE_ORIGIN}/custom-elements.json) — Custom Elements Manifest: attributes, properties, events and slots of every \`sonic-*\` element`,
|
|
321
|
+
`- [About](${SITE_ORIGIN}/about) · [Privacy](${SITE_ORIGIN}/privacy)`,
|
|
297
322
|
"",
|
|
298
|
-
|
|
323
|
+
"Doc pages use the same pathnames as the interactive site (`/docs/…`, `/core/…`).",
|
|
324
|
+
"Markdown: same URL with `.md` (e.g. `/docs/getting-started/start.md`), or `Accept: text/markdown` on the pathname.",
|
|
325
|
+
"HTML crawlers receive a static HTML variant of the same URL.",
|
|
299
326
|
"",
|
|
300
327
|
"## Topic hubs (start here for RAG)",
|
|
301
328
|
"",
|
|
@@ -303,7 +330,7 @@ function generateLlmsTxt(pages, hubs = []) {
|
|
|
303
330
|
|
|
304
331
|
for (const h of hubs) {
|
|
305
332
|
lines.push(
|
|
306
|
-
`- [${h.title}](${SITE_ORIGIN}/${h.
|
|
333
|
+
`- [${h.title}](${SITE_ORIGIN}/${h.hubPath}) (${h.docId}, ${h.sectionCount} pages)`,
|
|
307
334
|
);
|
|
308
335
|
}
|
|
309
336
|
|
|
@@ -311,27 +338,29 @@ function generateLlmsTxt(pages, hubs = []) {
|
|
|
311
338
|
|
|
312
339
|
for (const p of pages) {
|
|
313
340
|
lines.push(
|
|
314
|
-
`- [${p.title}](${SITE_ORIGIN}
|
|
341
|
+
`- [${p.title}](${SITE_ORIGIN}${p.pagePath}) (${p.docId}): ${p.description}`,
|
|
315
342
|
);
|
|
316
343
|
}
|
|
317
344
|
|
|
318
|
-
lines.push("", "## Optional", "", `- [Full index](${SITE_ORIGIN}/
|
|
345
|
+
lines.push("", "## Optional", "", `- [Full index](${SITE_ORIGIN}/docs/index.html)`);
|
|
319
346
|
return lines.join("\n");
|
|
320
347
|
}
|
|
321
348
|
|
|
322
349
|
function generateLlmsFullTxt(pages, hubs = []) {
|
|
323
350
|
const lines = [
|
|
324
|
-
"# Concorde — full documentation (plain text)",
|
|
351
|
+
"# Concorde by Supersoniks — full documentation (plain text)",
|
|
325
352
|
"",
|
|
326
353
|
"> Mirror for AI indexers. Each page is a section below.",
|
|
327
|
-
">
|
|
354
|
+
"> Canonical URLs: /docs/** and /core/** (Markdown via Accept: text/markdown).",
|
|
355
|
+
`> Homepage Markdown: ${SITE_ORIGIN}/index.md`,
|
|
356
|
+
`> npm: https://www.npmjs.com/package/@supersoniks/concorde`,
|
|
328
357
|
"",
|
|
329
358
|
"## Topic hubs",
|
|
330
359
|
"",
|
|
331
360
|
];
|
|
332
361
|
|
|
333
362
|
for (const h of hubs) {
|
|
334
|
-
lines.push(`- ${h.title}: ${SITE_ORIGIN}/${h.
|
|
363
|
+
lines.push(`- ${h.title}: ${SITE_ORIGIN}/${h.hubPath} (${h.docId})`);
|
|
335
364
|
}
|
|
336
365
|
|
|
337
366
|
lines.push("");
|
|
@@ -342,7 +371,7 @@ function generateLlmsFullTxt(pages, hubs = []) {
|
|
|
342
371
|
"",
|
|
343
372
|
`## ${p.title}`,
|
|
344
373
|
"",
|
|
345
|
-
`- URL: ${SITE_ORIGIN}
|
|
374
|
+
`- URL: ${SITE_ORIGIN}${p.pagePath}`,
|
|
346
375
|
`- Doc ID: ${p.docId}`,
|
|
347
376
|
`- Keywords: ${p.keywords}`,
|
|
348
377
|
"",
|
|
@@ -363,7 +392,7 @@ const TOPIC_HUBS = [
|
|
|
363
392
|
"Hub for all Concorde Lit decorators: @get @post @put @patch @subscribe @publish @bind @handle and related. Use this page when asking about any decorator.",
|
|
364
393
|
keywords:
|
|
365
394
|
"decorator, @get, @post, @put, @patch, @subscribe, @publish, @bind, @handle, ApiResult, Endpoint, DataProviderKey",
|
|
366
|
-
filter: (p) => p.docId.startsWith("docs/
|
|
395
|
+
filter: (p) => p.docId.startsWith("docs/decorators/"),
|
|
367
396
|
},
|
|
368
397
|
{
|
|
369
398
|
slug: "remote-data",
|
|
@@ -375,14 +404,14 @@ const TOPIC_HUBS = [
|
|
|
375
404
|
"@get, fetch, remote data, API, Endpoint, ApiResult, serviceURL, sonic-list, sonic-queue, HTTP GET",
|
|
376
405
|
filter: (p) =>
|
|
377
406
|
[
|
|
378
|
-
"docs/
|
|
379
|
-
"docs/
|
|
380
|
-
"docs/
|
|
381
|
-
"docs/
|
|
382
|
-
"docs/
|
|
383
|
-
"docs/
|
|
384
|
-
"docs/
|
|
385
|
-
"docs/
|
|
407
|
+
"docs/decorators/get",
|
|
408
|
+
"docs/decorators/post",
|
|
409
|
+
"docs/decorators/put",
|
|
410
|
+
"docs/decorators/patch",
|
|
411
|
+
"docs/misc/endpoint",
|
|
412
|
+
"docs/misc/api-configuration",
|
|
413
|
+
"docs/misc/dynamic-path",
|
|
414
|
+
"docs/getting-started/dataFlow",
|
|
386
415
|
"core/components/functional/fetch/fetch",
|
|
387
416
|
"core/components/functional/list/list",
|
|
388
417
|
"core/components/functional/queue/queue",
|
|
@@ -400,26 +429,19 @@ const TOPIC_HUBS = [
|
|
|
400
429
|
},
|
|
401
430
|
];
|
|
402
431
|
|
|
403
|
-
function
|
|
404
|
-
return `
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
function relativeHubLink(fromHubSlug, targetCrawlPath) {
|
|
408
|
-
const from = hubCrawlPath(fromHubSlug);
|
|
409
|
-
const rel = path.relative(path.dirname(from), targetCrawlPath).replace(/\\/g, "/");
|
|
410
|
-
return rel.startsWith(".") ? rel : `./${rel}`;
|
|
432
|
+
function hubPath(slug) {
|
|
433
|
+
return `hubs/${slug}.html`;
|
|
411
434
|
}
|
|
412
435
|
|
|
413
436
|
function renderHubPage(hub, sections) {
|
|
414
|
-
const
|
|
415
|
-
const canonical =
|
|
437
|
+
const hubRel = hubPath(hub.slug);
|
|
438
|
+
const canonical = `${SITE_ORIGIN}/${hubRel}`;
|
|
416
439
|
const sectionHtml = sections
|
|
417
440
|
.map((p) => {
|
|
418
441
|
const excerpt = p.plainText.slice(0, 1200);
|
|
419
|
-
const href = relativeHubLink(hub.slug, p.crawlPath);
|
|
420
442
|
return `<section id="${escapeHtml(p.docId.replace(/\//g, "-"))}" data-doc-id="${escapeHtml(p.docId)}">
|
|
421
|
-
<h2><a href="${escapeHtml(
|
|
422
|
-
<p><strong>Doc ID:</strong> <code>${escapeHtml(p.docId)}</code> · <a href="${escapeHtml(
|
|
443
|
+
<h2><a href="${escapeHtml(p.pagePath)}">${escapeHtml(p.title)}</a></h2>
|
|
444
|
+
<p><strong>Doc ID:</strong> <code>${escapeHtml(p.docId)}</code> · <a href="${escapeHtml(p.pagePath)}">full page</a></p>
|
|
423
445
|
<p>${escapeHtml(p.description)}</p>
|
|
424
446
|
<pre class="doc-excerpt">${escapeHtml(excerpt)}</pre>
|
|
425
447
|
</section>`;
|
|
@@ -435,11 +457,11 @@ function renderHubPage(hub, sections) {
|
|
|
435
457
|
});
|
|
436
458
|
|
|
437
459
|
return `<!DOCTYPE html>
|
|
438
|
-
<html lang="
|
|
460
|
+
<html lang="en" data-doc-url="${escapeHtml(canonical)}" data-doc-id="${escapeHtml(hub.docId)}">
|
|
439
461
|
<head>
|
|
440
462
|
<meta charset="UTF-8">
|
|
441
463
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
442
|
-
<title>${escapeHtml(hub.title)} — Concorde</title>
|
|
464
|
+
<title>${escapeHtml(hub.title)} — Concorde by Supersoniks</title>
|
|
443
465
|
<meta name="description" content="${escapeHtml(hub.intro)}">
|
|
444
466
|
<meta name="keywords" content="${escapeHtml(hub.keywords)}">
|
|
445
467
|
<meta name="concorde-doc-id" content="${escapeHtml(hub.docId)}">
|
|
@@ -447,7 +469,7 @@ function renderHubPage(hub, sections) {
|
|
|
447
469
|
</head>
|
|
448
470
|
<body>
|
|
449
471
|
<header>
|
|
450
|
-
<p><a href="
|
|
472
|
+
<p><a href="/docs/index.html">Concorde documentation</a></p>
|
|
451
473
|
</header>
|
|
452
474
|
<main>
|
|
453
475
|
<article>
|
|
@@ -465,47 +487,145 @@ function generateTopicHubs(pages) {
|
|
|
465
487
|
for (const hub of TOPIC_HUBS) {
|
|
466
488
|
const sections = pages.filter(hub.filter);
|
|
467
489
|
if (sections.length === 0) continue;
|
|
468
|
-
const
|
|
469
|
-
writeFileEnsuringDir(
|
|
470
|
-
path.join(DOCS_OUT, crawlRel),
|
|
471
|
-
renderHubPage(hub, sections),
|
|
472
|
-
);
|
|
490
|
+
const rel = hubPath(hub.slug);
|
|
491
|
+
writeFileEnsuringDir(path.join(DOCS_OUT, rel), renderHubPage(hub, sections));
|
|
473
492
|
hubs.push({
|
|
474
493
|
...hub,
|
|
475
|
-
|
|
494
|
+
hubPath: rel,
|
|
476
495
|
sectionCount: sections.length,
|
|
477
496
|
});
|
|
478
497
|
}
|
|
479
498
|
return hubs;
|
|
480
499
|
}
|
|
481
500
|
|
|
482
|
-
function generateSitemap(pages, hubs = []) {
|
|
483
|
-
const
|
|
501
|
+
export function generateSitemap(pages, hubs = []) {
|
|
502
|
+
const homeUrl = ` <url>\n <loc>${SITE_ORIGIN}/</loc>\n </url>`;
|
|
503
|
+
const homeMdUrl = ` <url>\n <loc>${SITE_ORIGIN}/index.md</loc>\n </url>`;
|
|
504
|
+
const indexUrl = ` <url>\n <loc>${SITE_ORIGIN}/docs/index.html</loc>\n </url>`;
|
|
484
505
|
const hubUrls = hubs
|
|
485
|
-
.map((h) => ` <url>\n <loc>${SITE_ORIGIN}/${h.
|
|
506
|
+
.map((h) => ` <url>\n <loc>${SITE_ORIGIN}/${h.hubPath}</loc>\n </url>`)
|
|
486
507
|
.join("\n");
|
|
508
|
+
const staticUrls = STATIC_PAGES.map(
|
|
509
|
+
(p) => ` <url>\n <loc>${SITE_ORIGIN}/${p.slug}</loc>\n </url>`,
|
|
510
|
+
).join("\n");
|
|
487
511
|
const urls = pages
|
|
488
|
-
.map((p) => ` <url>\n <loc>${SITE_ORIGIN}
|
|
512
|
+
.map((p) => ` <url>\n <loc>${SITE_ORIGIN}${p.pagePath}</loc>\n </url>`)
|
|
489
513
|
.join("\n");
|
|
490
514
|
|
|
491
515
|
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
492
516
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
517
|
+
${homeUrl}
|
|
518
|
+
${homeMdUrl}
|
|
493
519
|
${indexUrl}
|
|
520
|
+
${staticUrls}
|
|
494
521
|
${hubUrls}
|
|
495
522
|
${urls}
|
|
496
523
|
</urlset>
|
|
497
524
|
`;
|
|
498
525
|
}
|
|
499
526
|
|
|
527
|
+
/** Homepage Markdown for Accept: text/markdown negotiation (acceptmarkdown.com). */
|
|
528
|
+
export function generateHomepageMarkdown() {
|
|
529
|
+
return `# Concorde by Supersoniks
|
|
530
|
+
|
|
531
|
+
Concorde is an open-source Lit web-components library from Supersoniks. It provides UI primitives, data binding, forms, routing helpers and theming that run the same way in React, Vue, PHP templates or a static HTML page.
|
|
532
|
+
|
|
533
|
+
Install the npm package [\`@supersoniks/concorde\`](https://www.npmjs.com/package/@supersoniks/concorde).
|
|
534
|
+
|
|
535
|
+
## Developer resources
|
|
536
|
+
|
|
537
|
+
- Interactive docs: ${SITE_ORIGIN}/
|
|
538
|
+
- Agent index: ${SITE_ORIGIN}/llms.txt
|
|
539
|
+
- Full text mirror: ${SITE_ORIGIN}/llms-full.txt
|
|
540
|
+
- Docs index: ${SITE_ORIGIN}/docs/index.html
|
|
541
|
+
- Sitemap: ${SITE_ORIGIN}/sitemap.xml
|
|
542
|
+
- Getting started: ${SITE_ORIGIN}/docs/getting-started/start
|
|
543
|
+
- AI agents (skill): ${SITE_ORIGIN}/docs/getting-started/ai-agents
|
|
544
|
+
- Components: ${SITE_ORIGIN}/docs/getting-started/components
|
|
545
|
+
|
|
546
|
+
Doc pages share pathnames with the interactive site (\`/docs/…\`, \`/core/…\`). Markdown is at the same path with a \`.md\` suffix (e.g. \`/docs/getting-started/start.md\`), or via \`Accept: text/markdown\` on the pathname (\`Content-Type: text/markdown\`, \`Vary: Accept\`).
|
|
547
|
+
|
|
548
|
+
## What Concorde includes
|
|
549
|
+
|
|
550
|
+
Custom elements (\`sonic-*\`) for buttons, forms, lists, queues, SDUI trees and more. Decorators such as \`@get\`, \`@post\`, \`@subscribe\` and \`@bind\` wire components to a shared DataProvider without framework lock-in. Concorde is MIT-licensed and maintained by Supersoniks ([about](${SITE_ORIGIN}/about), [privacy](${SITE_ORIGIN}/privacy)).
|
|
551
|
+
`;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
/** Markdown 404 body for agents (HTTP 404 + text/markdown). */
|
|
555
|
+
export function generateNotFoundMarkdown() {
|
|
556
|
+
return `# Page not found
|
|
557
|
+
|
|
558
|
+
The requested URL does not exist on the Concorde documentation site (Concorde by Supersoniks).
|
|
559
|
+
|
|
560
|
+
Try the [homepage](${SITE_ORIGIN}/), the [documentation index](${SITE_ORIGIN}/docs/index.html), [llms.txt](${SITE_ORIGIN}/llms.txt), or the [sitemap](${SITE_ORIGIN}/sitemap.xml).
|
|
561
|
+
`;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
export function generateNotFoundHtml() {
|
|
565
|
+
return `<!DOCTYPE html>
|
|
566
|
+
<html lang="en">
|
|
567
|
+
<head>
|
|
568
|
+
<meta charset="UTF-8">
|
|
569
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
570
|
+
<title>Page not found — Concorde by Supersoniks</title>
|
|
571
|
+
<meta name="robots" content="noindex">
|
|
572
|
+
<link rel="canonical" href="${SITE_ORIGIN}/">
|
|
573
|
+
</head>
|
|
574
|
+
<body>
|
|
575
|
+
<h1>Page not found</h1>
|
|
576
|
+
<p>The requested URL does not exist on the Concorde documentation site (Concorde by Supersoniks).</p>
|
|
577
|
+
<p>Try the <a href="${SITE_ORIGIN}/">homepage</a>, the <a href="${SITE_ORIGIN}/docs/index.html">documentation index</a>, <a href="${SITE_ORIGIN}/llms.txt">llms.txt</a>, or the <a href="${SITE_ORIGIN}/sitemap.xml">sitemap</a>.</p>
|
|
578
|
+
</body>
|
|
579
|
+
</html>
|
|
580
|
+
`;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* Apache rules live in scripts/docs.htaccess (pretty URLs + negotiation).
|
|
585
|
+
*/
|
|
586
|
+
export function generateHtaccess() {
|
|
587
|
+
const htaccessPath = fileURLToPath(new URL("./docs.htaccess", import.meta.url));
|
|
588
|
+
return fs.readFileSync(htaccessPath, "utf8");
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
/** SPA shell for site pages: the built docs/index.html, else the source one. */
|
|
592
|
+
function readSpaShell(docsOut) {
|
|
593
|
+
const built = path.join(docsOut, "index.html");
|
|
594
|
+
return fs.readFileSync(
|
|
595
|
+
fs.existsSync(built) ? built : path.resolve("index.html"),
|
|
596
|
+
"utf8",
|
|
597
|
+
);
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
export function writeAgentSiteArtifacts(docsOut = DOCS_OUT) {
|
|
601
|
+
fs.writeFileSync(path.join(docsOut, "index.md"), generateHomepageMarkdown());
|
|
602
|
+
fs.writeFileSync(path.join(docsOut, "404.md"), generateNotFoundMarkdown());
|
|
603
|
+
fs.writeFileSync(path.join(docsOut, "404.html"), generateNotFoundHtml());
|
|
604
|
+
fs.writeFileSync(path.join(docsOut, ".htaccess"), generateHtaccess());
|
|
605
|
+
const shell = readSpaShell(docsOut);
|
|
606
|
+
for (const page of STATIC_PAGES) {
|
|
607
|
+
fs.writeFileSync(path.join(docsOut, `${page.slug}.md`), page.markdown);
|
|
608
|
+
fs.writeFileSync(
|
|
609
|
+
path.join(docsOut, `${page.slug}.html`),
|
|
610
|
+
renderSitePage(page, marked.parse(page.markdown), shell),
|
|
611
|
+
);
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
function removeLegacyCrawlDir() {
|
|
616
|
+
const crawlDir = path.join(DOCS_OUT, "crawl");
|
|
617
|
+
if (fs.existsSync(crawlDir)) {
|
|
618
|
+
fs.rmSync(crawlDir, { recursive: true, force: true });
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
|
|
500
622
|
export function generateCrawlDocs() {
|
|
501
623
|
if (!fs.existsSync(DOCS_OUT)) {
|
|
502
624
|
console.warn("generate-crawl-docs: docs/ not found, skipping");
|
|
503
625
|
return;
|
|
504
626
|
}
|
|
505
627
|
|
|
506
|
-
|
|
507
|
-
fs.rmSync(CRAWL_DIR, { recursive: true, force: true });
|
|
508
|
-
}
|
|
628
|
+
removeLegacyCrawlDir();
|
|
509
629
|
|
|
510
630
|
const mdFiles = listMdFiles(SRC_DIR).sort();
|
|
511
631
|
const pages = [];
|
|
@@ -517,14 +637,13 @@ export function generateCrawlDocs() {
|
|
|
517
637
|
const description = extractDescription(raw, title);
|
|
518
638
|
const keywords = extractKeywords(mdRel, title, raw);
|
|
519
639
|
const plainText = markdownToPlainText(raw);
|
|
520
|
-
const markdown = rewriteDocLinks(preprocessSonicCode(raw)
|
|
640
|
+
const markdown = rewriteDocLinks(preprocessSonicCode(raw));
|
|
521
641
|
const bodyHtml = marked.parse(markdown);
|
|
522
|
-
const
|
|
523
|
-
const outPath = path.join(DOCS_OUT, crawlRel);
|
|
642
|
+
const htmlRel = staticHtmlRel(mdRel);
|
|
524
643
|
const id = docId(mdRel);
|
|
525
644
|
|
|
526
645
|
writeFileEnsuringDir(
|
|
527
|
-
|
|
646
|
+
path.join(DOCS_OUT, htmlRel),
|
|
528
647
|
renderPage({ mdRel, title, description, keywords, bodyHtml }),
|
|
529
648
|
);
|
|
530
649
|
|
|
@@ -535,19 +654,14 @@ export function generateCrawlDocs() {
|
|
|
535
654
|
description,
|
|
536
655
|
keywords,
|
|
537
656
|
plainText,
|
|
538
|
-
|
|
539
|
-
|
|
657
|
+
pagePath: pagePath(mdRel),
|
|
658
|
+
htmlRel,
|
|
540
659
|
});
|
|
541
660
|
}
|
|
542
661
|
|
|
543
662
|
writeFileEnsuringDir(
|
|
544
|
-
path.join(
|
|
545
|
-
renderIndex(
|
|
546
|
-
pages.map((p) => ({
|
|
547
|
-
...p,
|
|
548
|
-
crawlHref: p.mdRel.replace(/\.mdx?$/, ".html"),
|
|
549
|
-
})),
|
|
550
|
-
),
|
|
663
|
+
path.join(DOCS_OUT, "docs/index.html"),
|
|
664
|
+
renderIndex(pages),
|
|
551
665
|
);
|
|
552
666
|
|
|
553
667
|
const hubs = generateTopicHubs(pages);
|
|
@@ -558,9 +672,10 @@ export function generateCrawlDocs() {
|
|
|
558
672
|
path.join(DOCS_OUT, "llms-full.txt"),
|
|
559
673
|
generateLlmsFullTxt(pages, hubs),
|
|
560
674
|
);
|
|
675
|
+
writeAgentSiteArtifacts(DOCS_OUT);
|
|
561
676
|
|
|
562
677
|
console.info(
|
|
563
|
-
`generate-crawl-docs: ${pages.length} pages, ${hubs.length} hubs → docs
|
|
678
|
+
`generate-crawl-docs: ${pages.length} pages, ${hubs.length} hubs → pathnames /docs|/core + hubs/, sitemap, llms*, index.md (no /crawl/)`,
|
|
564
679
|
);
|
|
565
680
|
}
|
|
566
681
|
|