@cyberskill/design 1.3.10 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DESIGN.md +2 -2
- package/README.md +12 -10
- package/SKILL.md +3 -3
- package/VERSION +1 -1
- package/_ds_bundle.js +2 -2
- package/_ds_manifest.json +1 -1
- package/_esm/cs.mjs +2 -2
- package/docs/benchmark-rubric.md +1 -1
- package/docs/consuming.md +2 -2
- package/docs/contrast-report.md +1 -1
- package/docs/conventions.md +4 -4
- package/docs/decisions.md +4 -3
- package/docs/doctrine.md +1 -1
- package/docs/hr-suite-sources.md +91 -0
- package/docs/live-hub.md +16 -9
- package/docs/quality-gates.md +6 -6
- package/docs/release-notes.md +5 -1
- package/docs/storybook.md +6 -2
- package/docs/sync.md +1 -1
- package/docs/vi/benchmark-rubric.md +1 -1
- package/docs/vi/consuming.md +2 -2
- package/docs/vi/contrast-report.md +1 -1
- package/docs/vi/conventions.md +4 -4
- package/docs/vi/decisions.md +4 -3
- package/docs/vi/doctrine.md +1 -1
- package/docs/vi/hr-suite-sources.md +47 -0
- package/docs/vi/live-hub.md +24 -17
- package/docs/vi/quality-gates.md +6 -6
- package/docs/vi/release-notes.md +5 -1
- package/docs/vi/storybook.md +26 -22
- package/docs/vi/sync.md +1 -1
- package/docs/viewer.html +2 -2
- package/llms.txt +5 -5
- package/package.json +1 -1
- package/templates/doc-suite-index/DocSuiteIndex.dc.html +1 -0
- package/templates/vn-framework-agreement/.thumbnail +0 -0
- package/templates/vn-framework-agreement/VnFrameworkAgreement.dc.html +138 -0
- package/templates/vn-framework-agreement/ds-base.js +55 -0
- package/templates/vn-framework-agreement/support.js +1834 -0
- package/tokens/element-seeds.json +1 -1
- package/tokens/native/CSTokens.kt +1 -1
- package/tokens/native/CSTokens.swift +1 -1
- package/tokens/native/cs_tokens.dart +1 -1
- package/tokens/provenance.json +6 -6
- package/tokens/tokens.dtcg.json +1 -1
- package/tokens/tokens.js +2 -2
- package/tokens/tokens.json +1 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Loads this design system into the template. In a consuming project, point
|
|
2
|
+
// base at the bound DS folder relative to this file (e.g. '_ds/<folder>' at
|
|
3
|
+
// the project root, '../_ds/<folder>' one level down) — one line to edit.
|
|
4
|
+
// Artifact head standard (UX-002 / B1): ensure <html lang> + <title> from @template.
|
|
5
|
+
(() => {
|
|
6
|
+
const base = '../..';
|
|
7
|
+
for (const p of ['dist/styles.min.css']) {
|
|
8
|
+
const l = document.createElement('link');
|
|
9
|
+
l.rel = 'stylesheet'; l.href = base + '/' + p;
|
|
10
|
+
document.head.appendChild(l);
|
|
11
|
+
}
|
|
12
|
+
const s = document.createElement('script');
|
|
13
|
+
s.src = base + '/_ds_bundle.js';
|
|
14
|
+
s.onload = () => {
|
|
15
|
+
// Expose a STABLE, project-id-independent alias. The compiler names the bundle
|
|
16
|
+
// global CyberSkillDesignSystem_<6-hex-project-id>, which changes whenever this
|
|
17
|
+
// system is re-imported into another project. Templates/cards read window.CyberSkillDS
|
|
18
|
+
// so no file ever has to be rewritten on re-import.
|
|
19
|
+
const k = Object.keys(window).find((k) => /^CyberSkillDesignSystem_[0-9a-f]{6}$/.test(k));
|
|
20
|
+
if (k) window.CyberSkillDS = window[k];
|
|
21
|
+
};
|
|
22
|
+
s.onerror = () => console.error('ds-base.js: failed to load ' + s.src + ' — if this is a consuming project, point the base line in ds-base.js at the bound _ds/<folder> tree relative to this page (e.g. _ds/<folder> at the project root, ../_ds/<folder> one level down); in a fresh design system this can just mean the bundle is not compiled yet');
|
|
23
|
+
document.head.appendChild(s);
|
|
24
|
+
|
|
25
|
+
const syncLang = () => {
|
|
26
|
+
try {
|
|
27
|
+
const a = document.querySelector('[lang]');
|
|
28
|
+
const v = a && a.getAttribute('lang');
|
|
29
|
+
// Ignore unresolved DC holes like {{ langAttr }}
|
|
30
|
+
if (v && v.indexOf('{{') === -1) document.documentElement.setAttribute('lang', v);
|
|
31
|
+
else if (!document.documentElement.getAttribute('lang')) document.documentElement.setAttribute('lang', 'en');
|
|
32
|
+
} catch (e) { /* authoring host may sandbox */ }
|
|
33
|
+
};
|
|
34
|
+
const ensureHead = () => {
|
|
35
|
+
try {
|
|
36
|
+
if (!document.title || !document.title.trim()) {
|
|
37
|
+
const src = document.documentElement.innerHTML;
|
|
38
|
+
const m = src.match(/@template\s+name="([^"]+)"/);
|
|
39
|
+
if (m) document.title = m[1] + ' · CyberSkill';
|
|
40
|
+
}
|
|
41
|
+
syncLang();
|
|
42
|
+
const obs = new MutationObserver(syncLang);
|
|
43
|
+
obs.observe(document.body || document.documentElement, {
|
|
44
|
+
attributes: true,
|
|
45
|
+
attributeFilter: ['lang'],
|
|
46
|
+
subtree: true,
|
|
47
|
+
});
|
|
48
|
+
} catch (e) { /* authoring host may sandbox */ }
|
|
49
|
+
};
|
|
50
|
+
if (document.readyState === 'loading') {
|
|
51
|
+
document.addEventListener('DOMContentLoaded', ensureHead);
|
|
52
|
+
} else {
|
|
53
|
+
ensureHead();
|
|
54
|
+
}
|
|
55
|
+
})();
|