@supersoniks/concorde 5.0.3 → 5.0.4
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/.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/build-infos.json +1 -1
- package/concorde-core.bundle.js +66 -66
- package/concorde-core.es.js +1368 -1318
- package/dist/concorde-core.bundle.js +66 -66
- package/dist/concorde-core.es.js +1368 -1318
- package/docs/assets/{index-BnK6OS7w.js → index-D8MVWqY6.js} +1144 -1008
- package/docs/assets/index-DiD0qYvE.css +1 -0
- package/docs/crawl/core/components/ui/alert/alert.html +71 -101
- package/docs/crawl/core/components/ui/badge/badge.html +77 -106
- package/docs/crawl/core/components/ui/button/button.html +0 -1
- package/docs/crawl/core/components/ui/card/card.html +68 -112
- package/docs/crawl/core/components/ui/form/input/input.html +3 -3
- package/docs/crawl/core/components/ui/form/textarea/textarea.html +3 -3
- package/docs/crawl/core/components/ui/image/image.html +56 -132
- package/docs/crawl/core/components/ui/link/link.html +4 -4
- package/docs/crawl/core/components/ui/pop/pop.html +3 -79
- package/docs/crawl/docs/_getting-started/concorde-outside.html +3 -3
- package/docs/crawl/hubs/form-components.html +4 -4
- package/docs/index.html +5 -5
- package/docs/llms-full.txt +97 -281
- package/docs/llms.txt +8 -8
- package/docs/src/core/components/functional/fetch/fetch.md +0 -0
- package/docs/src/core/components/functional/if/if.md +0 -0
- package/docs/src/core/components/functional/list/list.md +0 -0
- package/docs/src/core/components/functional/router/router.md +0 -0
- package/docs/src/core/components/functional/sdui/sdui.md +0 -0
- package/docs/src/core/components/functional/states/states.md +0 -0
- package/docs/src/core/components/functional/submit/submit.md +0 -0
- package/docs/src/core/components/ui/alert/alert.md +72 -128
- package/docs/src/core/components/ui/badge/badge.md +78 -126
- package/docs/src/core/components/ui/button/button.md +0 -1
- package/docs/src/core/components/ui/captcha/captcha.md +0 -0
- package/docs/src/core/components/ui/card/card.md +65 -120
- package/docs/src/core/components/ui/form/input/input.md +1 -1
- package/docs/src/core/components/ui/form/radio/radio.md +0 -0
- package/docs/src/core/components/ui/form/select/select.md +0 -0
- package/docs/src/core/components/ui/form/switch/switch.md +0 -0
- package/docs/src/core/components/ui/form/textarea/textarea.md +1 -1
- package/docs/src/core/components/ui/image/image.md +53 -147
- package/docs/src/core/components/ui/link/link.md +2 -2
- package/docs/src/core/components/ui/loader/loader.md +0 -0
- package/docs/src/core/components/ui/menu/menu.md +0 -0
- package/docs/src/core/components/ui/modal/modal.md +0 -0
- package/docs/src/core/components/ui/pop/pop.md +1 -105
- package/docs/src/core/components/ui/table/table.md +0 -0
- package/docs/src/docs/_core-concept/subscriber.md +0 -0
- package/docs/src/docs/_getting-started/concorde-outside.md +3 -3
- package/docs/src/docs/_getting-started/my-first-subscriber.md +0 -0
- package/docs/src/docs/_getting-started/pubsub.md +0 -0
- package/docs/src/docs/_getting-started/start.md +0 -0
- package/docs/src/docs/search/docs-search.json +25 -655
- package/docs/src/tsconfig.declarations.json +22 -0
- package/docs/src/tsconfig.emit.json +23 -0
- package/docs/src/tsconfig.json +3 -45
- package/gitlab/job_github_mirror.sh +39 -0
- package/gitlab/job_tests.sh +0 -0
- package/package.json +1 -1
- package/scripts/github-export.mjs +150 -0
- package/scripts/post-build-docs.js +0 -0
- package/scripts/post-build.mjs +0 -0
- package/src/core/components/functional/fetch/fetch.md +0 -0
- package/src/core/components/functional/if/if.md +0 -0
- package/src/core/components/functional/list/list.demo.ts +0 -0
- package/src/core/components/functional/list/list.md +0 -0
- package/src/core/components/functional/router/router.md +0 -0
- package/src/core/components/functional/router/router.ts +0 -0
- package/src/core/components/functional/sdui/sdui.md +0 -0
- package/src/core/components/functional/states/states.md +0 -0
- package/src/core/components/functional/submit/submit.md +0 -0
- package/src/core/components/functional/subscriber/subscriber.ts +0 -0
- package/src/core/components/ui/_css/size.ts +0 -0
- package/src/core/components/ui/captcha/altchaStyles.ts +0 -0
- package/src/core/components/ui/captcha/captcha.md +0 -0
- package/src/core/components/ui/form/radio/radio.md +0 -0
- package/src/core/components/ui/form/select/select.md +0 -0
- package/src/core/components/ui/form/switch/switch.md +0 -0
- package/src/core/components/ui/loader/loader.md +0 -0
- package/src/core/components/ui/menu/menu.md +0 -0
- package/src/core/components/ui/modal/modal.md +0 -0
- package/src/core/components/ui/table/table-caption.ts +0 -0
- package/src/core/components/ui/table/table.md +0 -0
- package/src/core/decorators/subscriber/ancestorAttribute.spec.ts +26 -0
- package/src/core/decorators/subscriber/ancestorAttribute.ts +3 -4
- package/src/core/mixins/Subscriber.ts +0 -0
- package/src/core/utils/AncestorAttributeObserver.ts +183 -70
- package/src/core/utils/DataBindObserver.ts +0 -0
- package/src/core/utils/Objects.ts +0 -0
- package/src/core/utils/route.ts +0 -0
- package/src/css.d.ts +19 -0
- package/src/docs/_core-concept/subscriber.md +0 -0
- package/src/docs/_decorators/ancestor-attribute.md +3 -2
- package/src/docs/_getting-started/my-first-subscriber.md +0 -0
- package/src/docs/_getting-started/pubsub.md +0 -0
- package/src/docs/_getting-started/start.md +0 -0
- package/src/docs/example/users.ts +0 -0
- package/src/docs/search/page.ts +0 -0
- package/src/tsconfig.declarations.json +22 -0
- package/src/tsconfig.emit.json +23 -0
- package/src/tsconfig.tsbuildinfo +1 -1
- package/docs/assets/index--GpD7R7a.css +0 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig-model.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"noEmit": false,
|
|
5
|
+
"emitDeclarationOnly": true,
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"declarationMap": true,
|
|
8
|
+
"outDir": "../dist/types",
|
|
9
|
+
"rootDir": "."
|
|
10
|
+
},
|
|
11
|
+
"include": ["**/*.ts"],
|
|
12
|
+
"exclude": [
|
|
13
|
+
"node_modules/**/*",
|
|
14
|
+
"**/*.spec.ts",
|
|
15
|
+
"**/*.test.ts",
|
|
16
|
+
"**/*.demo.ts",
|
|
17
|
+
"**/*.stories.ts",
|
|
18
|
+
"**/*.type-test.ts",
|
|
19
|
+
"docs.ts",
|
|
20
|
+
"docs/**/*"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig-model.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"noEmit": false,
|
|
5
|
+
"emitDeclarationOnly": false,
|
|
6
|
+
"declaration": false,
|
|
7
|
+
"sourceMap": true,
|
|
8
|
+
"outDir": "../dist/js",
|
|
9
|
+
"rootDir": ".",
|
|
10
|
+
"lib": ["ES2021", "DOM", "DOM.Iterable"]
|
|
11
|
+
},
|
|
12
|
+
"include": ["**/*.ts"],
|
|
13
|
+
"exclude": [
|
|
14
|
+
"node_modules/**/*",
|
|
15
|
+
"**/*.spec.ts",
|
|
16
|
+
"**/*.test.ts",
|
|
17
|
+
"**/*.demo.ts",
|
|
18
|
+
"**/*.stories.ts",
|
|
19
|
+
"**/*.type-test.ts",
|
|
20
|
+
"docs.ts",
|
|
21
|
+
"docs/**/*"
|
|
22
|
+
]
|
|
23
|
+
}
|
package/docs/src/tsconfig.json
CHANGED
|
@@ -234,15 +234,6 @@
|
|
|
234
234
|
"./functional/value": [
|
|
235
235
|
"/sites/concorde/src/core/components/functional/value/value.ts"
|
|
236
236
|
],
|
|
237
|
-
"./rounded": [
|
|
238
|
-
"/sites/concorde/src/core/components/ui/_css/rounded.ts"
|
|
239
|
-
],
|
|
240
|
-
"./ui/rounded": [
|
|
241
|
-
"/sites/concorde/src/core/components/ui/_css/rounded.ts"
|
|
242
|
-
],
|
|
243
|
-
"./ui/_css/rounded": [
|
|
244
|
-
"/sites/concorde/src/core/components/ui/_css/rounded.ts"
|
|
245
|
-
],
|
|
246
237
|
"./scroll": [
|
|
247
238
|
"/sites/concorde/src/core/components/ui/_css/scroll.ts"
|
|
248
239
|
],
|
|
@@ -279,24 +270,6 @@
|
|
|
279
270
|
"./ui/_css/type": [
|
|
280
271
|
"/sites/concorde/src/core/components/ui/_css/type.ts"
|
|
281
272
|
],
|
|
282
|
-
"./ui-aria-labels": [
|
|
283
|
-
"/sites/concorde/src/core/components/ui/_i18n/ui-aria-labels.ts"
|
|
284
|
-
],
|
|
285
|
-
"./ui/ui-aria-labels": [
|
|
286
|
-
"/sites/concorde/src/core/components/ui/_i18n/ui-aria-labels.ts"
|
|
287
|
-
],
|
|
288
|
-
"./ui/_i18n/ui-aria-labels": [
|
|
289
|
-
"/sites/concorde/src/core/components/ui/_i18n/ui-aria-labels.ts"
|
|
290
|
-
],
|
|
291
|
-
"./alert.spec": [
|
|
292
|
-
"/sites/concorde/src/core/components/ui/alert/alert.spec.ts"
|
|
293
|
-
],
|
|
294
|
-
"./ui/alert.spec": [
|
|
295
|
-
"/sites/concorde/src/core/components/ui/alert/alert.spec.ts"
|
|
296
|
-
],
|
|
297
|
-
"./ui/alert/alert.spec": [
|
|
298
|
-
"/sites/concorde/src/core/components/ui/alert/alert.spec.ts"
|
|
299
|
-
],
|
|
300
273
|
"./alert": [
|
|
301
274
|
"/sites/concorde/src/core/components/ui/alert/alert.ts"
|
|
302
275
|
],
|
|
@@ -783,15 +756,6 @@
|
|
|
783
756
|
"./ui/theme": [
|
|
784
757
|
"/sites/concorde/src/core/components/ui/theme/theme.ts"
|
|
785
758
|
],
|
|
786
|
-
"./dismissed": [
|
|
787
|
-
"/sites/concorde/src/core/components/ui/toast/dismissed.ts"
|
|
788
|
-
],
|
|
789
|
-
"./ui/dismissed": [
|
|
790
|
-
"/sites/concorde/src/core/components/ui/toast/dismissed.ts"
|
|
791
|
-
],
|
|
792
|
-
"./ui/toast/dismissed": [
|
|
793
|
-
"/sites/concorde/src/core/components/ui/toast/dismissed.ts"
|
|
794
|
-
],
|
|
795
759
|
"./message-subscriber": [
|
|
796
760
|
"/sites/concorde/src/core/components/ui/toast/message-subscriber.ts"
|
|
797
761
|
],
|
|
@@ -927,6 +891,9 @@
|
|
|
927
891
|
"./directives/Wording": [
|
|
928
892
|
"/sites/concorde/src/core/directives/Wording.ts"
|
|
929
893
|
],
|
|
894
|
+
"./directives/stableTemplateContent": [
|
|
895
|
+
"/sites/concorde/src/core/directives/stableTemplateContent.ts"
|
|
896
|
+
],
|
|
930
897
|
"./mixins/Fetcher": [
|
|
931
898
|
"/sites/concorde/src/core/mixins/Fetcher.ts"
|
|
932
899
|
],
|
|
@@ -1002,9 +969,6 @@
|
|
|
1002
969
|
"./utils/derive": [
|
|
1003
970
|
"/sites/concorde/src/core/utils/derive.ts"
|
|
1004
971
|
],
|
|
1005
|
-
"./utils/dismissed": [
|
|
1006
|
-
"/sites/concorde/src/core/utils/dismissed.ts"
|
|
1007
|
-
],
|
|
1008
972
|
"./utils/dpOptions.spec": [
|
|
1009
973
|
"/sites/concorde/src/core/utils/dpOptions.spec.ts"
|
|
1010
974
|
],
|
|
@@ -1020,12 +984,6 @@
|
|
|
1020
984
|
"./utils/jsonataRuntime": [
|
|
1021
985
|
"/sites/concorde/src/core/utils/jsonataRuntime.ts"
|
|
1022
986
|
],
|
|
1023
|
-
"./utils/positioning.spec": [
|
|
1024
|
-
"/sites/concorde/src/core/utils/positioning.spec.ts"
|
|
1025
|
-
],
|
|
1026
|
-
"./utils/positioning": [
|
|
1027
|
-
"/sites/concorde/src/core/utils/positioning.ts"
|
|
1028
|
-
],
|
|
1029
987
|
"./utils/publisherPathKey.spec": [
|
|
1030
988
|
"/sites/concorde/src/core/utils/publisherPathKey.spec.ts"
|
|
1031
989
|
],
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Pousse un export filtré (lib publique) vers GitHub.
|
|
3
|
+
# Remplace le push mirror « tout le dépôt » : pas de doc, pas de captcha, pas de gitlab/.
|
|
4
|
+
#
|
|
5
|
+
# Variables CI requises :
|
|
6
|
+
# GITHUB_REPO_URL — ex. https://github.com/supersoniks/concorde.git
|
|
7
|
+
# GITHUB_TOKEN — PAT avec scope repo (masqué)
|
|
8
|
+
#
|
|
9
|
+
# Usage manuel (hors CI) :
|
|
10
|
+
# GITHUB_REPO_URL=https://github.com/supersoniks/concorde.git \
|
|
11
|
+
# GITHUB_TOKEN=ghp_… \
|
|
12
|
+
# bash gitlab/job_github_mirror.sh
|
|
13
|
+
#
|
|
14
|
+
set -euo pipefail
|
|
15
|
+
|
|
16
|
+
EXPORT_DIR="${CI_PROJECT_DIR:-$(cd "$(dirname "$0")/.." && pwd)}/.github-export"
|
|
17
|
+
BRANCH="${GITHUB_BRANCH:-master}"
|
|
18
|
+
|
|
19
|
+
if [[ -z "${GITHUB_REPO_URL:-}" || -z "${GITHUB_TOKEN:-}" ]]; then
|
|
20
|
+
echo "❌ GITHUB_REPO_URL et GITHUB_TOKEN sont requis."
|
|
21
|
+
exit 1
|
|
22
|
+
fi
|
|
23
|
+
|
|
24
|
+
echo "=== Export filtré ==="
|
|
25
|
+
node "${CI_PROJECT_DIR:-.}/scripts/github-export.mjs" "$EXPORT_DIR"
|
|
26
|
+
|
|
27
|
+
echo "=== Push vers GitHub ($BRANCH) ==="
|
|
28
|
+
cd "$EXPORT_DIR"
|
|
29
|
+
git init -q
|
|
30
|
+
git config user.email "ci@supersoniks.org"
|
|
31
|
+
git config user.name "GitLab CI"
|
|
32
|
+
git add -A
|
|
33
|
+
git commit -q -m "sync: export lib depuis GitLab ${CI_COMMIT_SHORT_SHA:-local}"
|
|
34
|
+
|
|
35
|
+
PUSH_URL="${GITHUB_REPO_URL/https:\/\//https://${GITHUB_TOKEN}@}"
|
|
36
|
+
git branch -M "$BRANCH"
|
|
37
|
+
git push -f "$PUSH_URL" "$BRANCH"
|
|
38
|
+
|
|
39
|
+
echo "=== Miroir GitHub à jour ==="
|
package/gitlab/job_tests.sh
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Prépare une arborescence « lib publique » pour GitHub :
|
|
4
|
+
* - sans site doc (src/docs, index.html, …)
|
|
5
|
+
* - sans sonic-captcha (altcha.supersoniks.org)
|
|
6
|
+
* - sans scripts / jobs GitLab internes
|
|
7
|
+
*
|
|
8
|
+
* Usage :
|
|
9
|
+
* node scripts/github-export.mjs [répertoire_cible]
|
|
10
|
+
*
|
|
11
|
+
* Par défaut : ../concorde-github-export
|
|
12
|
+
*/
|
|
13
|
+
import fs from "fs";
|
|
14
|
+
import path from "path";
|
|
15
|
+
import { fileURLToPath } from "url";
|
|
16
|
+
|
|
17
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
18
|
+
const ROOT = path.resolve(__dirname, "..");
|
|
19
|
+
const IGNORE_FILE = path.join(ROOT, ".github-export-ignore");
|
|
20
|
+
const DEFAULT_OUT = path.resolve(ROOT, "../concorde-github-export");
|
|
21
|
+
|
|
22
|
+
const EXPORT_FILTER_KEY =
|
|
23
|
+
/(?:^|\/)(?:docs|mock-api|undefined)(?:\/|$)|captcha|\.demo\.|\.stories\.|TestUtils|\/prism\/|\/search\/|\/tailwind\/|\/header\/|\/navigation\/|\/layout\.ts$|\/code\.ts$|^code$|^docs$|^layout$/;
|
|
24
|
+
|
|
25
|
+
function readIgnorePatterns() {
|
|
26
|
+
if (!fs.existsSync(IGNORE_FILE)) return [];
|
|
27
|
+
return fs
|
|
28
|
+
.readFileSync(IGNORE_FILE, "utf8")
|
|
29
|
+
.split("\n")
|
|
30
|
+
.map((l) => l.trim())
|
|
31
|
+
.filter((l) => l && !l.startsWith("#"));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function globToRegExp(pattern) {
|
|
35
|
+
const escaped = pattern
|
|
36
|
+
.replace(/[.+^${}()|[\]\\]/g, "\\$&")
|
|
37
|
+
.replace(/\*\*/g, "{{GLOBSTAR}}")
|
|
38
|
+
.replace(/\*/g, "[^/]*")
|
|
39
|
+
.replace(/\{\{GLOBSTAR\}\}/g, ".*");
|
|
40
|
+
return new RegExp(`^${escaped}$`);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function shouldExclude(relativePath, patterns) {
|
|
44
|
+
const normalized = relativePath.replace(/\\/g, "/");
|
|
45
|
+
for (const pattern of patterns) {
|
|
46
|
+
const re = globToRegExp(pattern);
|
|
47
|
+
if (re.test(normalized)) return true;
|
|
48
|
+
if (normalized.startsWith(pattern.endsWith("/") ? pattern : `${pattern}/`))
|
|
49
|
+
return true;
|
|
50
|
+
if (normalized === pattern) return true;
|
|
51
|
+
}
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function listAllFiles(dir, base = dir) {
|
|
56
|
+
const out = [];
|
|
57
|
+
for (const name of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
58
|
+
if (name.name === ".git" || name.name === "node_modules") continue;
|
|
59
|
+
const full = path.join(dir, name.name);
|
|
60
|
+
const rel = path.relative(base, full).replace(/\\/g, "/");
|
|
61
|
+
if (name.isDirectory()) {
|
|
62
|
+
if (shouldExclude(rel, ignorePatterns)) continue;
|
|
63
|
+
out.push(...listAllFiles(full, base));
|
|
64
|
+
} else {
|
|
65
|
+
if (!shouldExclude(rel, ignorePatterns)) out.push(rel);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return out;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function copyFile(rel, destRoot) {
|
|
72
|
+
const src = path.join(ROOT, rel);
|
|
73
|
+
const dest = path.join(destRoot, rel);
|
|
74
|
+
fs.mkdirSync(path.dirname(dest), { recursive: true });
|
|
75
|
+
fs.copyFileSync(src, dest);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function patchUiTs(destRoot) {
|
|
79
|
+
const uiPath = path.join(
|
|
80
|
+
destRoot,
|
|
81
|
+
"src/core/components/ui/ui.ts",
|
|
82
|
+
);
|
|
83
|
+
if (!fs.existsSync(uiPath)) return;
|
|
84
|
+
const content = fs.readFileSync(uiPath, "utf8");
|
|
85
|
+
const patched = content.replace(
|
|
86
|
+
/import "\.\/captcha\/captcha";\n?/,
|
|
87
|
+
"",
|
|
88
|
+
);
|
|
89
|
+
fs.writeFileSync(uiPath, patched);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function exportHaystack(value) {
|
|
93
|
+
if (typeof value === "string") return value;
|
|
94
|
+
if (value && typeof value === "object") {
|
|
95
|
+
return `${value.types ?? ""}${value.default ?? ""}`;
|
|
96
|
+
}
|
|
97
|
+
return String(value);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function filterPackageJson(destRoot) {
|
|
101
|
+
const pkgPath = path.join(destRoot, "package.json");
|
|
102
|
+
if (!fs.existsSync(pkgPath)) return;
|
|
103
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8"));
|
|
104
|
+
if (pkg.exports && typeof pkg.exports === "object") {
|
|
105
|
+
const next = {};
|
|
106
|
+
for (const [key, value] of Object.entries(pkg.exports)) {
|
|
107
|
+
const hay = `${key}:${exportHaystack(value)}`;
|
|
108
|
+
if (EXPORT_FILTER_KEY.test(hay)) continue;
|
|
109
|
+
if (exportHaystack(value).includes("/captcha/")) continue;
|
|
110
|
+
if (exportHaystack(value).includes("/docs/")) continue;
|
|
111
|
+
if (exportHaystack(value).includes(".demo.")) continue;
|
|
112
|
+
if (exportHaystack(value).includes(".stories.")) continue;
|
|
113
|
+
next[key] = value;
|
|
114
|
+
}
|
|
115
|
+
pkg.exports = next;
|
|
116
|
+
}
|
|
117
|
+
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + "\n");
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function patchReadme(destRoot) {
|
|
121
|
+
const readmePath = path.join(destRoot, "README.md");
|
|
122
|
+
if (!fs.existsSync(readmePath)) return;
|
|
123
|
+
let text = fs.readFileSync(readmePath, "utf8");
|
|
124
|
+
text = text.replace(
|
|
125
|
+
/Le dépôt GitHub est un \*\*miroir\*\* synchronisé depuis GitLab \(voir \[OPEN_SOURCE_CHECKPOINT\.md\]\(OPEN_SOURCE_CHECKPOINT\.md\)\)\./,
|
|
126
|
+
"Le dépôt GitHub est un **export filtré** depuis GitLab (librairie uniquement, sans site doc ni composant captcha — voir [OPEN_SOURCE_CHECKPOINT.md](OPEN_SOURCE_CHECKPOINT.md)).",
|
|
127
|
+
);
|
|
128
|
+
fs.writeFileSync(readmePath, text);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
const ignorePatterns = readIgnorePatterns();
|
|
132
|
+
const outDir = path.resolve(process.argv[2] || DEFAULT_OUT);
|
|
133
|
+
|
|
134
|
+
if (fs.existsSync(outDir)) {
|
|
135
|
+
fs.rmSync(outDir, { recursive: true, force: true });
|
|
136
|
+
}
|
|
137
|
+
fs.mkdirSync(outDir, { recursive: true });
|
|
138
|
+
|
|
139
|
+
const files = listAllFiles(ROOT);
|
|
140
|
+
for (const rel of files) {
|
|
141
|
+
copyFile(rel, outDir);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
patchUiTs(outDir);
|
|
145
|
+
filterPackageJson(outDir);
|
|
146
|
+
patchReadme(outDir);
|
|
147
|
+
|
|
148
|
+
console.log(`✅ Export GitHub : ${files.length} fichiers → ${outDir}`);
|
|
149
|
+
console.log(" Exclusions : .github-export-ignore");
|
|
150
|
+
console.log(" Patches : ui.ts (sans captcha), package.json exports");
|
|
File without changes
|
package/scripts/post-build.mjs
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -236,4 +236,30 @@ describe("ancestorAttribute", () => {
|
|
|
236
236
|
|
|
237
237
|
expect(el.dataProvider).toBe("scope-a");
|
|
238
238
|
});
|
|
239
|
+
|
|
240
|
+
it("suit un wrapper plus proche après reparent (sans opt-in)", async () => {
|
|
241
|
+
const tag = "test-ancestor-attr-dynamic-reparent";
|
|
242
|
+
class C extends HTMLElement {
|
|
243
|
+
@ancestorAttribute("dataProvider", { dynamic: true })
|
|
244
|
+
dataProvider: string | null = null;
|
|
245
|
+
}
|
|
246
|
+
if (!customElements.get(tag)) {
|
|
247
|
+
customElements.define(tag, C);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
const outer = document.createElement("div");
|
|
251
|
+
outer.setAttribute("dataProvider", "from-outer");
|
|
252
|
+
const el = document.createElement(tag) as InstanceType<typeof C>;
|
|
253
|
+
outer.appendChild(el);
|
|
254
|
+
document.body.appendChild(outer);
|
|
255
|
+
expect(el.dataProvider).toBe("from-outer");
|
|
256
|
+
|
|
257
|
+
const closer = document.createElement("div");
|
|
258
|
+
closer.setAttribute("dataProvider", "from-closer");
|
|
259
|
+
closer.appendChild(el);
|
|
260
|
+
outer.appendChild(closer);
|
|
261
|
+
await flushFrames();
|
|
262
|
+
|
|
263
|
+
expect(el.dataProvider).toBe("from-closer");
|
|
264
|
+
});
|
|
239
265
|
});
|
|
@@ -5,10 +5,9 @@ import { ConnectedComponent, setSubscribable } from "./common";
|
|
|
5
5
|
|
|
6
6
|
export type AncestorAttributeOptions = {
|
|
7
7
|
/**
|
|
8
|
-
* Si true,
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* Défaut : false (lecture unique au connect, rétrocompat).
|
|
8
|
+
* Si true, reste synchronisé quand un attribut ancêtre change **et** au
|
|
9
|
+
* reparenting (sans flag séparé). MO attributs partagés ; childList seulement
|
|
10
|
+
* sur le parent direct (ignoré pour les siblings). Défaut : false.
|
|
12
11
|
*/
|
|
13
12
|
dynamic?: boolean;
|
|
14
13
|
};
|
|
File without changes
|