@cyberskill/design 1.1.0 → 1.2.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 +25 -3
- package/README.md +7 -7
- package/SKILL.md +4 -4
- package/VERSION +1 -1
- package/_ds_bundle.js +819 -416
- package/_ds_manifest.json +1 -1
- package/_esm/cs.mjs +18 -4
- package/_esm/react.d.ts +2 -0
- package/_esm/react.mjs +1 -0
- package/base/a11y.css +18 -0
- package/base/ai.css +2 -2
- package/base/collections.css +8 -3
- package/base/components.css +11 -2
- package/base/controls.css +61 -48
- package/base/data.css +3 -3
- package/base/feedback.css +5 -0
- package/base/forms.css +9 -3
- package/base/glass.css +6 -0
- package/base/navigation.css +8 -2
- package/base/reset.css +1 -1
- package/base/responsive.css +25 -0
- package/base/shell.css +7 -1
- package/components/_i18n/i18n.js +13 -1
- package/components/_i18n/strings.js +52 -3
- package/components/ai/ConfidenceMeter.jsx +8 -6
- package/components/data/Watermark.jsx +11 -3
- package/components/datatable/DataGrid.jsx +10 -1
- package/components/dialog/Dialog.jsx +13 -45
- package/components/feedback/ProgressBar.jsx +4 -2
- package/components/forms/Cascader.jsx +69 -6
- package/components/forms/Editor.jsx +37 -2
- package/components/forms/FileUpload.jsx +22 -8
- package/components/forms/Switch.jsx +16 -2
- package/components/forms/TimePicker.jsx +3 -1
- package/components/icon/Icon.jsx +1 -0
- package/components/navigation/CommandPalette.jsx +22 -7
- package/components/navigation/Toolbar.jsx +2 -1
- package/components/overlays/AlertDialog.jsx +19 -49
- package/components/overlays/Drawer.jsx +24 -20
- package/components/overlays/OverlayManager.d.ts +40 -0
- package/components/overlays/OverlayManager.jsx +214 -0
- package/components/overlays/OverlayManager.prompt.md +12 -0
- package/components/overlays/Tour.jsx +14 -7
- package/dist/styles.min.css +2004 -0
- package/docs/benchmark-rubric.md +1 -1
- package/docs/ci-cd.md +3 -1
- package/docs/consuming.md +6 -6
- package/docs/contrast-report.md +1 -1
- package/docs/conventions.md +4 -4
- package/docs/decisions/container-query-migration.md +18 -0
- package/docs/decisions/overlay-manager-design.md +101 -0
- package/docs/decisions.md +5 -5
- package/docs/design-styles.md +1 -1
- package/docs/plans/cyberskill-design-system-audit-and-12-month-evolution-plan.md +1490 -0
- package/docs/quality-gates.md +21 -9
- package/docs/release-notes.md +10 -2
- package/docs/status/data/status-feed.json +1 -1
- package/docs/status/data/task/TASK-REL-002.js +1 -0
- package/docs/status/index.html +7 -6
- package/docs/status/status-legacy.html +13 -12
- package/docs/sync.md +1 -1
- package/docs/tasks/BACKLOG.md +1 -0
- package/docs/tasks/_state/commit-links.yaml +14 -0
- package/docs/tasks/release/TASK-REL-002-republish-1-1-1/spec.md +54 -0
- package/docs/vi/benchmark-rubric.md +1 -1
- package/docs/vi/ci-cd.md +3 -1
- package/docs/vi/consuming.md +6 -6
- package/docs/vi/contrast-report.md +1 -1
- package/docs/vi/conventions.md +2 -2
- package/docs/vi/decisions.md +5 -5
- package/docs/vi/quality-gates.md +21 -9
- package/docs/vi/release-notes.md +10 -2
- package/docs/vi/sync.md +1 -1
- package/guidelines/atomic-view.html +11 -7
- package/llms.txt +5 -5
- package/package.json +14 -6
- package/templates/_ds-base.canonical.js +55 -0
- package/templates/ai-cluster-demo.html +2 -2
- package/templates/app-shell/AppShell.dc.html +5 -3
- package/templates/app-shell/ds-base.js +33 -1
- package/templates/app-shell/support.js +13 -20
- package/templates/article/Article.dc.html +5 -1
- package/templates/article/ds-base.js +33 -1
- package/templates/article/support.js +13 -20
- package/templates/auth/Auth.dc.html +10 -5
- package/templates/auth/content-schema.json +12 -0
- package/templates/auth/ds-base.js +33 -1
- package/templates/auth/support.js +13 -20
- package/templates/bod-deck/BodDeck.dc.html +11 -10
- package/templates/bod-deck/ds-base.js +33 -1
- package/templates/bod-deck/support.js +13 -20
- package/templates/bod-investor-update/BodInvestorUpdate.dc.html +4 -3
- package/templates/bod-investor-update/ds-base.js +33 -1
- package/templates/bod-investor-update/support.js +13 -20
- package/templates/bod-memo/BodMemo.dc.html +6 -5
- package/templates/bod-memo/ds-base.js +33 -1
- package/templates/bod-memo/support.js +13 -20
- package/templates/bod-minutes/BodMinutes.dc.html +2 -1
- package/templates/bod-minutes/ds-base.js +33 -1
- package/templates/bod-minutes/support.js +13 -20
- package/templates/bod-report/BodReport.dc.html +3 -2
- package/templates/bod-report/ds-base.js +33 -1
- package/templates/bod-report/support.js +13 -20
- package/templates/bod-resolution/BodResolution.dc.html +5 -4
- package/templates/bod-resolution/ds-base.js +33 -1
- package/templates/bod-resolution/support.js +13 -20
- package/templates/culture-event-invite/CultureEventInvite.dc.html +3 -2
- package/templates/culture-event-invite/ds-base.js +33 -1
- package/templates/culture-event-invite/support.js +13 -20
- package/templates/dashboard/Dashboard.dc.html +7 -3
- package/templates/dashboard/ds-base.js +33 -1
- package/templates/dashboard/support.js +13 -20
- package/templates/delivery-change-note/DeliveryChangeNote.dc.html +2 -1
- package/templates/delivery-change-note/ds-base.js +33 -1
- package/templates/delivery-change-note/support.js +13 -20
- package/templates/delivery-kickoff/DeliveryKickoff.dc.html +3 -2
- package/templates/delivery-kickoff/ds-base.js +33 -1
- package/templates/delivery-kickoff/support.js +13 -20
- package/templates/delivery-qbr-deck/DeliveryQbrDeck.dc.html +6 -5
- package/templates/delivery-qbr-deck/ds-base.js +33 -1
- package/templates/delivery-qbr-deck/support.js +13 -20
- package/templates/delivery-runbook/DeliveryRunbook.dc.html +3 -2
- package/templates/delivery-runbook/ds-base.js +33 -1
- package/templates/delivery-runbook/support.js +13 -20
- package/templates/delivery-status-email/DeliveryStatusEmail.dc.html +3 -2
- package/templates/delivery-status-email/ds-base.js +33 -1
- package/templates/delivery-status-email/support.js +13 -20
- package/templates/doc-style-guide/DocStyleGuide.dc.html +67 -64
- package/templates/doc-style-guide/ds-base.js +33 -1
- package/templates/doc-style-guide/support.js +13 -20
- package/templates/doc-suite-index/DocSuiteIndex.dc.html +46 -45
- package/templates/doc-suite-index/ds-base.js +33 -1
- package/templates/doc-suite-index/support.js +13 -20
- package/templates/doc-templates/DocTemplates.dc.html +42 -41
- package/templates/doc-templates/ds-base.js +33 -1
- package/templates/doc-templates/support.js +13 -20
- package/templates/email/Email.dc.html +3 -2
- package/templates/email/ds-base.js +33 -1
- package/templates/email/support.js +13 -20
- package/templates/finance-dunning-email/FinanceDunningEmail.dc.html +4 -3
- package/templates/finance-dunning-email/ds-base.js +33 -1
- package/templates/finance-dunning-email/support.js +13 -20
- package/templates/finance-expense-report/FinanceExpenseReport.dc.html +4 -3
- package/templates/finance-expense-report/ds-base.js +33 -1
- package/templates/finance-expense-report/support.js +13 -20
- package/templates/finance-invoice/FinanceInvoice.dc.html +4 -3
- package/templates/finance-invoice/ds-base.js +33 -1
- package/templates/finance-invoice/support.js +13 -20
- package/templates/finance-quote/FinanceQuote.dc.html +4 -3
- package/templates/finance-quote/ds-base.js +33 -1
- package/templates/finance-quote/support.js +13 -20
- package/templates/hr-announcement/HrAnnouncement.dc.html +5 -4
- package/templates/hr-announcement/ds-base.js +33 -1
- package/templates/hr-announcement/support.js +13 -20
- package/templates/hr-interview-kit/HrInterviewKit.dc.html +4 -3
- package/templates/hr-interview-kit/ds-base.js +33 -1
- package/templates/hr-interview-kit/support.js +13 -20
- package/templates/hr-offboarding/HrOffboarding.dc.html +2 -1
- package/templates/hr-offboarding/ds-base.js +33 -1
- package/templates/hr-offboarding/support.js +13 -20
- package/templates/hr-performance-review/HrPerformanceReview.dc.html +2 -1
- package/templates/hr-performance-review/ds-base.js +33 -1
- package/templates/hr-performance-review/support.js +13 -20
- package/templates/hr-pip/HrPip.dc.html +2 -1
- package/templates/hr-pip/ds-base.js +33 -1
- package/templates/hr-pip/support.js +13 -20
- package/templates/kitchen-sink.html +9 -4
- package/templates/legal-msa/LegalMsa.dc.html +2 -1
- package/templates/legal-msa/ds-base.js +33 -1
- package/templates/legal-msa/support.js +13 -20
- package/templates/legal-sow/LegalSow.dc.html +2 -1
- package/templates/legal-sow/ds-base.js +33 -1
- package/templates/legal-sow/support.js +13 -20
- package/templates/marketing-campaign-brief/MarketingCampaignBrief.dc.html +3 -2
- package/templates/marketing-campaign-brief/ds-base.js +33 -1
- package/templates/marketing-campaign-brief/support.js +13 -20
- package/templates/marketing-case-study/MarketingCaseStudy.dc.html +5 -4
- package/templates/marketing-case-study/ds-base.js +33 -1
- package/templates/marketing-case-study/support.js +13 -20
- package/templates/marketing-launch/MarketingLaunch.dc.html +6 -5
- package/templates/marketing-launch/ds-base.js +33 -1
- package/templates/marketing-launch/support.js +13 -20
- package/templates/marketing-newsletter/MarketingNewsletter.dc.html +13 -12
- package/templates/marketing-newsletter/ds-base.js +33 -1
- package/templates/marketing-newsletter/support.js +13 -20
- package/templates/marketing-page/MarketingPage.dc.html +17 -12
- package/templates/marketing-page/ds-base.js +33 -1
- package/templates/marketing-page/support.js +13 -20
- package/templates/marketing-press-release/MarketingPressRelease.dc.html +2 -1
- package/templates/marketing-press-release/ds-base.js +33 -1
- package/templates/marketing-press-release/support.js +13 -20
- package/templates/marketing-social-kit/MarketingSocialKit.dc.html +5 -4
- package/templates/marketing-social-kit/ds-base.js +33 -1
- package/templates/marketing-social-kit/support.js +13 -20
- package/templates/sales-one-pager/SalesOnePager.dc.html +5 -4
- package/templates/sales-one-pager/ds-base.js +33 -1
- package/templates/sales-one-pager/support.js +13 -20
- package/templates/sales-proposal-deck/SalesProposalDeck.dc.html +7 -6
- package/templates/sales-proposal-deck/ds-base.js +33 -1
- package/templates/sales-proposal-deck/support.js +13 -20
- package/templates/settings/Settings.dc.html +5 -1
- package/templates/settings/ds-base.js +33 -1
- package/templates/settings/support.js +13 -20
- package/templates/slide-deck/SlideDeck.dc.html +5 -4
- package/templates/slide-deck/ds-base.js +33 -1
- package/templates/slide-deck/support.js +13 -20
- package/templates/team-meeting-agenda/TeamMeetingAgenda.dc.html +2 -1
- package/templates/team-meeting-agenda/ds-base.js +33 -1
- package/templates/team-meeting-agenda/support.js +13 -20
- package/templates/tech-incident-report/TechIncidentReport.dc.html +3 -2
- package/templates/tech-incident-report/ds-base.js +33 -1
- package/templates/tech-incident-report/support.js +13 -20
- package/templates/tech-release-notes/TechReleaseNotes.dc.html +6 -5
- package/templates/tech-release-notes/ds-base.js +33 -1
- package/templates/tech-release-notes/support.js +13 -20
- package/templates/tech-retro/TechRetro.dc.html +4 -3
- package/templates/tech-retro/ds-base.js +33 -1
- package/templates/tech-retro/support.js +13 -20
- package/templates/tech-rfc/TechRfc.dc.html +3 -2
- package/templates/tech-rfc/ds-base.js +33 -1
- package/templates/tech-rfc/support.js +13 -20
- package/templates/vn-appointment-transfer/VnAppointmentTransfer.dc.html +36 -35
- package/templates/vn-appointment-transfer/ds-base.js +33 -1
- package/templates/vn-appointment-transfer/support.js +13 -20
- package/templates/vn-certificate-of-employment/VnCertificateOfEmployment.dc.html +27 -26
- package/templates/vn-certificate-of-employment/ds-base.js +33 -1
- package/templates/vn-certificate-of-employment/support.js +13 -20
- package/templates/vn-code-of-conduct/VnCodeOfConduct.dc.html +44 -43
- package/templates/vn-code-of-conduct/ds-base.js +33 -1
- package/templates/vn-code-of-conduct/support.js +13 -20
- package/templates/vn-compensation-regulation/VnCompensationRegulation.dc.html +53 -52
- package/templates/vn-compensation-regulation/ds-base.js +33 -1
- package/templates/vn-compensation-regulation/support.js +13 -20
- package/templates/vn-contract-amendment/VnContractAmendment.dc.html +41 -40
- package/templates/vn-contract-amendment/ds-base.js +33 -1
- package/templates/vn-contract-amendment/support.js +13 -20
- package/templates/vn-contractor-agreement/VnContractorAgreement.dc.html +50 -49
- package/templates/vn-contractor-agreement/ds-base.js +33 -1
- package/templates/vn-contractor-agreement/support.js +13 -20
- package/templates/vn-data-protection-policy/VnDataProtectionPolicy.dc.html +54 -53
- package/templates/vn-data-protection-policy/ds-base.js +33 -1
- package/templates/vn-data-protection-policy/support.js +13 -20
- package/templates/vn-disciplinary-case-file/VnDisciplinaryCaseFile.dc.html +72 -71
- package/templates/vn-disciplinary-case-file/ds-base.js +33 -1
- package/templates/vn-disciplinary-case-file/support.js +13 -20
- package/templates/vn-disciplinary-schedule/VnDisciplinarySchedule.dc.html +21 -20
- package/templates/vn-disciplinary-schedule/ds-base.js +33 -1
- package/templates/vn-disciplinary-schedule/support.js +13 -20
- package/templates/vn-employee-request/VnEmployeeRequest.dc.html +54 -53
- package/templates/vn-employee-request/ds-base.js +33 -1
- package/templates/vn-employee-request/support.js +13 -20
- package/templates/vn-exit-handover/VnExitHandover.dc.html +122 -121
- package/templates/vn-exit-handover/ds-base.js +33 -1
- package/templates/vn-exit-handover/support.js +13 -20
- package/templates/vn-foreign-employee-pack/VnForeignEmployeePack.dc.html +31 -30
- package/templates/vn-foreign-employee-pack/ds-base.js +33 -1
- package/templates/vn-foreign-employee-pack/support.js +13 -20
- package/templates/vn-grassroots-democracy/VnGrassrootsDemocracy.dc.html +54 -53
- package/templates/vn-grassroots-democracy/ds-base.js +33 -1
- package/templates/vn-grassroots-democracy/support.js +13 -20
- package/templates/vn-infosec-policy/VnInfosecPolicy.dc.html +50 -49
- package/templates/vn-infosec-policy/ds-base.js +33 -1
- package/templates/vn-infosec-policy/support.js +13 -20
- package/templates/vn-internal-labor-regulations/VnInternalLaborRegulations.dc.html +84 -83
- package/templates/vn-internal-labor-regulations/ds-base.js +33 -1
- package/templates/vn-internal-labor-regulations/support.js +13 -20
- package/templates/vn-internship-agreement/VnInternshipAgreement.dc.html +44 -43
- package/templates/vn-internship-agreement/ds-base.js +33 -1
- package/templates/vn-internship-agreement/support.js +13 -20
- package/templates/vn-job-description/VnJobDescription.dc.html +28 -27
- package/templates/vn-job-description/ds-base.js +33 -1
- package/templates/vn-job-description/support.js +13 -20
- package/templates/vn-labor-contract/VnLaborContract.dc.html +109 -108
- package/templates/vn-labor-contract/ds-base.js +33 -1
- package/templates/vn-labor-contract/support.js +13 -20
- package/templates/vn-labour-management-book/VnLabourManagementBook.dc.html +32 -31
- package/templates/vn-labour-management-book/ds-base.js +33 -1
- package/templates/vn-labour-management-book/support.js +13 -20
- package/templates/vn-mutual-nda/VnMutualNda.dc.html +45 -44
- package/templates/vn-mutual-nda/ds-base.js +33 -1
- package/templates/vn-mutual-nda/support.js +13 -20
- package/templates/vn-ndnca-ip/VnNdncaIp.dc.html +73 -72
- package/templates/vn-ndnca-ip/ds-base.js +33 -1
- package/templates/vn-ndnca-ip/support.js +13 -20
- package/templates/vn-offer-letter/VnOfferLetter.dc.html +32 -31
- package/templates/vn-offer-letter/ds-base.js +33 -1
- package/templates/vn-offer-letter/support.js +13 -20
- package/templates/vn-onboarding-checklist/VnOnboardingChecklist.dc.html +16 -15
- package/templates/vn-onboarding-checklist/ds-base.js +33 -1
- package/templates/vn-onboarding-checklist/support.js +13 -20
- package/templates/vn-pdpl-consent/VnPdplConsent.dc.html +43 -42
- package/templates/vn-pdpl-consent/ds-base.js +33 -1
- package/templates/vn-pdpl-consent/support.js +13 -20
- package/templates/vn-performance-evaluation-regulation/VnPerformanceEvaluationRegulation.dc.html +65 -64
- package/templates/vn-performance-evaluation-regulation/ds-base.js +33 -1
- package/templates/vn-performance-evaluation-regulation/support.js +13 -20
- package/templates/vn-performance-review-form/VnPerformanceReviewForm.dc.html +49 -48
- package/templates/vn-performance-review-form/ds-base.js +33 -1
- package/templates/vn-performance-review-form/support.js +13 -20
- package/templates/vn-phantom-stock/VnPhantomStock.dc.html +41 -40
- package/templates/vn-phantom-stock/ds-base.js +33 -1
- package/templates/vn-phantom-stock/support.js +13 -20
- package/templates/vn-probation-contract/VnProbationContract.dc.html +56 -55
- package/templates/vn-probation-contract/ds-base.js +33 -1
- package/templates/vn-probation-contract/support.js +13 -20
- package/templates/vn-receipt-acknowledgement/VnReceiptAcknowledgement.dc.html +28 -27
- package/templates/vn-receipt-acknowledgement/ds-base.js +33 -1
- package/templates/vn-receipt-acknowledgement/support.js +13 -20
- package/templates/vn-remote-work-policy/VnRemoteWorkPolicy.dc.html +44 -43
- package/templates/vn-remote-work-policy/ds-base.js +33 -1
- package/templates/vn-remote-work-policy/support.js +13 -20
- package/templates/vn-resignation-letter/VnResignationLetter.dc.html +20 -19
- package/templates/vn-resignation-letter/ds-base.js +33 -1
- package/templates/vn-resignation-letter/support.js +13 -20
- package/templates/vn-salary-scale/VnSalaryScale.dc.html +39 -38
- package/templates/vn-salary-scale/ds-base.js +33 -1
- package/templates/vn-salary-scale/support.js +13 -20
- package/templates/vn-sow-appendix/VnSowAppendix.dc.html +21 -20
- package/templates/vn-sow-appendix/ds-base.js +33 -1
- package/templates/vn-sow-appendix/support.js +13 -20
- package/templates/vn-termination-decision/VnTerminationDecision.dc.html +25 -24
- package/templates/vn-termination-decision/ds-base.js +33 -1
- package/templates/vn-termination-decision/support.js +13 -20
- package/templates/vn-total-rewards-appendix/VnTotalRewardsAppendix.dc.html +63 -62
- package/templates/vn-total-rewards-appendix/ds-base.js +33 -1
- package/templates/vn-total-rewards-appendix/support.js +13 -20
- package/templates/vn-training-commitment/VnTrainingCommitment.dc.html +39 -38
- package/templates/vn-training-commitment/ds-base.js +33 -1
- package/templates/vn-training-commitment/support.js +13 -20
- package/templates/vn-travel-expense-policy/VnTravelExpensePolicy.dc.html +50 -49
- package/templates/vn-travel-expense-policy/ds-base.js +33 -1
- package/templates/vn-travel-expense-policy/support.js +13 -20
- package/tokens/colors.css +19 -1
- package/tokens/component-tokens.css +1 -0
- package/tokens/elements.css +35 -2
- package/tokens/elevation.css +8 -2
- package/tokens/native/CSTokens.kt +35 -1
- package/tokens/native/CSTokens.swift +35 -1
- package/tokens/native/cs_tokens.dart +35 -1
- package/tokens/provenance.json +12 -12
- package/tokens/spacing.css +2 -0
- package/tokens/tokens.dtcg.json +111 -3
- package/tokens/tokens.js +46 -6
- package/tokens/tokens.json +45 -5
- package/tokens/typography.css +2 -0
- package/ui_kits/deck/index.html +4 -0
- package/ui_kits/status-hub/StatusHub.jsx +30 -4
- package/ui_kits/status-hub/index.html +3 -3
- package/ui_kits/status-hub/login.html +4 -0
- package/ui_kits/status-hub/project.html +4 -0
- package/ui_kits/status-hub/settings.html +35 -13
- package/ui_kits/status-hub/status.css +5 -1
- package/ui_kits/website/Website.jsx +25 -3
- package/ui_kits/website/careers.html +4 -0
- package/ui_kits/website/chat.html +5 -3
- package/ui_kits/website/index.html +3 -3
- package/ui_kits/website/site.css +2 -2
- package/ui_kits/website/work.html +4 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
// Loads this design system into the template. In a consuming project, point
|
|
2
2
|
// base at the bound DS folder relative to this file (e.g. '_ds/<folder>' at
|
|
3
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.
|
|
4
5
|
(() => {
|
|
5
6
|
const base = '../..';
|
|
6
|
-
for (const p of ['styles.css']) {
|
|
7
|
+
for (const p of ['dist/styles.min.css']) {
|
|
7
8
|
const l = document.createElement('link');
|
|
8
9
|
l.rel = 'stylesheet'; l.href = base + '/' + p;
|
|
9
10
|
document.head.appendChild(l);
|
|
@@ -20,4 +21,35 @@
|
|
|
20
21
|
};
|
|
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');
|
|
22
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
|
+
}
|
|
23
55
|
})();
|
|
@@ -1070,16 +1070,15 @@
|
|
|
1070
1070
|
}
|
|
1071
1071
|
|
|
1072
1072
|
// src/cdn.ts
|
|
1073
|
-
var
|
|
1074
|
-
var
|
|
1075
|
-
var
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
function cdnScriptFor(url, sri) {
|
|
1073
|
+
var REACT_LOCAL = "../../_vendor/react/react.production.min.js";
|
|
1074
|
+
var REACT_DOM_LOCAL = "../../_vendor/react/react-dom.production.min.js";
|
|
1075
|
+
var BABEL_LOCAL = "../../_vendor/babel/babel.min.js";
|
|
1076
|
+
// Product surfaces are offline-first (UX-026 / D4): no third-party script origins.
|
|
1077
|
+
// Host editors may still remap via window.__resources[localPath].
|
|
1078
|
+
function localScriptFor(path) {
|
|
1080
1079
|
const res = window.__resources;
|
|
1081
|
-
const v = res ? res[
|
|
1082
|
-
return typeof v === "string" && v ?
|
|
1080
|
+
const v = res ? res[path] : void 0;
|
|
1081
|
+
return typeof v === "string" && v ? v : path;
|
|
1083
1082
|
}
|
|
1084
1083
|
|
|
1085
1084
|
// src/external.ts
|
|
@@ -1106,16 +1105,12 @@
|
|
|
1106
1105
|
function ensureBabel() {
|
|
1107
1106
|
if (window.Babel) return Promise.resolve();
|
|
1108
1107
|
if (babelLoading) return babelLoading;
|
|
1109
|
-
const
|
|
1108
|
+
const src = localScriptFor(BABEL_LOCAL);
|
|
1110
1109
|
babelLoading = new Promise((res, rej) => {
|
|
1111
1110
|
const s = document.createElement("script");
|
|
1112
|
-
s.src =
|
|
1113
|
-
if (babel.integrity) {
|
|
1114
|
-
s.integrity = babel.integrity;
|
|
1115
|
-
s.crossOrigin = "anonymous";
|
|
1116
|
-
}
|
|
1111
|
+
s.src = src;
|
|
1117
1112
|
s.onload = () => res();
|
|
1118
|
-
s.onerror = rej;
|
|
1113
|
+
s.onerror = () => rej(new Error("failed to load local Babel: " + src));
|
|
1119
1114
|
document.head.appendChild(s);
|
|
1120
1115
|
});
|
|
1121
1116
|
return babelLoading;
|
|
@@ -1768,11 +1763,9 @@
|
|
|
1768
1763
|
function loadReactUmd() {
|
|
1769
1764
|
const w = window;
|
|
1770
1765
|
if (w.React && w.ReactDOM) return Promise.resolve();
|
|
1771
|
-
const react = cdnScriptFor(REACT_URL, REACT_SRI);
|
|
1772
|
-
const reactDom = cdnScriptFor(REACT_DOM_URL, REACT_DOM_SRI);
|
|
1773
1766
|
return Promise.all([
|
|
1774
|
-
loadScript(
|
|
1775
|
-
loadScript(
|
|
1767
|
+
loadScript(localScriptFor(REACT_LOCAL)),
|
|
1768
|
+
loadScript(localScriptFor(REACT_DOM_LOCAL))
|
|
1776
1769
|
]).then(() => void 0);
|
|
1777
1770
|
}
|
|
1778
1771
|
function init() {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
2
|
+
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
+
<title>HR · Internal announcement · CyberSkill</title>
|
|
4
5
|
<meta charset="utf-8">
|
|
5
6
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
7
|
<script src="./support.js"></script>
|
|
@@ -15,7 +16,7 @@
|
|
|
15
16
|
<div style="max-width:620px;margin:0 auto;background:var(--cs-color-surface-panel);border-radius:16px;overflow:hidden;box-shadow:var(--cs-shadow-sm)">
|
|
16
17
|
<div style="background:var(--cs-accent-strong);padding:22px 32px;display:flex;align-items:center;gap:12px">
|
|
17
18
|
<x-import component-from-global-scope="CyberSkillDS.Logo" size="28" hint-size="28px,28px"></x-import>
|
|
18
|
-
<span style="color
|
|
19
|
+
<span style="color:var(--cs-accent-on-strong);font-weight:800;font-size:16px">CyberSkill · Team news</span>
|
|
19
20
|
</div>
|
|
20
21
|
<div style="padding:32px">
|
|
21
22
|
<sc-if value="{{ isEN }}" hint-placeholder-val="{{ true }}">
|
|
@@ -33,13 +34,13 @@
|
|
|
33
34
|
<sc-if value="{{ isEN }}" hint-placeholder-val="{{ true }}">
|
|
34
35
|
<p style="font-size:16px;line-height:1.7;margin:0 0 16px">An joins us on <b>01 September</b> from a decade of product work across web and mobile. She'll help ship the token pipeline and the next wave of design-system releases.</p>
|
|
35
36
|
<p style="font-size:16px;line-height:1.7;margin:0 0 22px">Say hello in <span style="font-family:var(--cs-font-family-mono);font-size:14px">#welcome</span> — and if you're on Platform, expect a coffee invite. Warm welcomes make warm teams.</p>
|
|
36
|
-
<a href="#" style="display:inline-block;background:var(--cs-accent-strong);color:var(--cs-accent-on);font-weight:700;font-size:15px;text-decoration:none;padding:13px 24px;border-radius:var(--cs-radius-full)">Say hi to An →</a>
|
|
37
|
+
<a href="#" style="display:inline-block;background:var(--cs-accent-strong);color:var(--cs-accent-on-strong);font-weight:700;font-size:15px;text-decoration:none;padding:13px 24px;border-radius:var(--cs-radius-full)">Say hi to An →</a>
|
|
37
38
|
</sc-if>
|
|
38
39
|
<sc-if value="{{ isVN }}"><div lang="vi" style="display:contents">
|
|
39
40
|
<sc-if value="{{ isBoth }}"><div style="border-top:1px solid var(--cs-color-border-default);margin:22px 0 20px"></div></sc-if>
|
|
40
41
|
<p style="font-size:16px;line-height:1.75;margin:0 0 16px">An gia nhập cùng chúng tôi từ <b>01 tháng 9</b>, mang theo một thập kỷ làm sản phẩm trên web và di động. Bạn ấy sẽ giúp hoàn thiện quy trình token và những bản phát hành design system tiếp theo.</p>
|
|
41
42
|
<p style="font-size:16px;line-height:1.75;margin:0 0 22px">Hãy chào bạn ấy ở <span style="font-family:var(--cs-font-family-mono);font-size:14px">#welcome</span> — và nếu bạn ở nhóm Platform, hãy sẵn sàng cho một lời mời cà phê. Chào đón ấm áp tạo nên đội ngũ ấm áp.</p>
|
|
42
|
-
<a href="#" style="display:inline-block;background:var(--cs-accent-strong);color:var(--cs-accent-on);font-weight:700;font-size:15px;text-decoration:none;padding:13px 24px;border-radius:var(--cs-radius-full)">Chào An nào →</a>
|
|
43
|
+
<a href="#" style="display:inline-block;background:var(--cs-accent-strong);color:var(--cs-accent-on-strong);font-weight:700;font-size:15px;text-decoration:none;padding:13px 24px;border-radius:var(--cs-radius-full)">Chào An nào →</a>
|
|
43
44
|
</div></sc-if>
|
|
44
45
|
</div>
|
|
45
46
|
<div style="border-top:1px solid var(--cs-color-border-default);padding:18px 32px;background:var(--cs-color-surface-raised);font-size:12px;color:var(--cs-color-text-muted)">CyberSkill · People team · Hiện Thực Hoá Ý Chí</div>
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
// Loads this design system into the template. In a consuming project, point
|
|
2
2
|
// base at the bound DS folder relative to this file (e.g. '_ds/<folder>' at
|
|
3
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.
|
|
4
5
|
(() => {
|
|
5
6
|
const base = '../..';
|
|
6
|
-
for (const p of ['styles.css']) {
|
|
7
|
+
for (const p of ['dist/styles.min.css']) {
|
|
7
8
|
const l = document.createElement('link');
|
|
8
9
|
l.rel = 'stylesheet'; l.href = base + '/' + p;
|
|
9
10
|
document.head.appendChild(l);
|
|
@@ -20,4 +21,35 @@
|
|
|
20
21
|
};
|
|
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');
|
|
22
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
|
+
}
|
|
23
55
|
})();
|
|
@@ -1070,16 +1070,15 @@
|
|
|
1070
1070
|
}
|
|
1071
1071
|
|
|
1072
1072
|
// src/cdn.ts
|
|
1073
|
-
var
|
|
1074
|
-
var
|
|
1075
|
-
var
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
function cdnScriptFor(url, sri) {
|
|
1073
|
+
var REACT_LOCAL = "../../_vendor/react/react.production.min.js";
|
|
1074
|
+
var REACT_DOM_LOCAL = "../../_vendor/react/react-dom.production.min.js";
|
|
1075
|
+
var BABEL_LOCAL = "../../_vendor/babel/babel.min.js";
|
|
1076
|
+
// Product surfaces are offline-first (UX-026 / D4): no third-party script origins.
|
|
1077
|
+
// Host editors may still remap via window.__resources[localPath].
|
|
1078
|
+
function localScriptFor(path) {
|
|
1080
1079
|
const res = window.__resources;
|
|
1081
|
-
const v = res ? res[
|
|
1082
|
-
return typeof v === "string" && v ?
|
|
1080
|
+
const v = res ? res[path] : void 0;
|
|
1081
|
+
return typeof v === "string" && v ? v : path;
|
|
1083
1082
|
}
|
|
1084
1083
|
|
|
1085
1084
|
// src/external.ts
|
|
@@ -1106,16 +1105,12 @@
|
|
|
1106
1105
|
function ensureBabel() {
|
|
1107
1106
|
if (window.Babel) return Promise.resolve();
|
|
1108
1107
|
if (babelLoading) return babelLoading;
|
|
1109
|
-
const
|
|
1108
|
+
const src = localScriptFor(BABEL_LOCAL);
|
|
1110
1109
|
babelLoading = new Promise((res, rej) => {
|
|
1111
1110
|
const s = document.createElement("script");
|
|
1112
|
-
s.src =
|
|
1113
|
-
if (babel.integrity) {
|
|
1114
|
-
s.integrity = babel.integrity;
|
|
1115
|
-
s.crossOrigin = "anonymous";
|
|
1116
|
-
}
|
|
1111
|
+
s.src = src;
|
|
1117
1112
|
s.onload = () => res();
|
|
1118
|
-
s.onerror = rej;
|
|
1113
|
+
s.onerror = () => rej(new Error("failed to load local Babel: " + src));
|
|
1119
1114
|
document.head.appendChild(s);
|
|
1120
1115
|
});
|
|
1121
1116
|
return babelLoading;
|
|
@@ -1768,11 +1763,9 @@
|
|
|
1768
1763
|
function loadReactUmd() {
|
|
1769
1764
|
const w = window;
|
|
1770
1765
|
if (w.React && w.ReactDOM) return Promise.resolve();
|
|
1771
|
-
const react = cdnScriptFor(REACT_URL, REACT_SRI);
|
|
1772
|
-
const reactDom = cdnScriptFor(REACT_DOM_URL, REACT_DOM_SRI);
|
|
1773
1766
|
return Promise.all([
|
|
1774
|
-
loadScript(
|
|
1775
|
-
loadScript(
|
|
1767
|
+
loadScript(localScriptFor(REACT_LOCAL)),
|
|
1768
|
+
loadScript(localScriptFor(REACT_DOM_LOCAL))
|
|
1776
1769
|
]).then(() => void 0);
|
|
1777
1770
|
}
|
|
1778
1771
|
function init() {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
2
|
+
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
+
<title>HR · Interview kit · CyberSkill</title>
|
|
4
5
|
<meta charset="utf-8">
|
|
5
6
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
7
|
<meta name="omelette-owns-print" content="1">
|
|
@@ -48,7 +49,7 @@
|
|
|
48
49
|
</tbody>
|
|
49
50
|
</table>
|
|
50
51
|
<div class="cs-avoid" style="display:flex;align-items:center;gap:20px;background:var(--cs-accent-strong);border-radius:12px;padding:16px 22px">
|
|
51
|
-
<div style="flex:1;color
|
|
52
|
+
<div style="flex:1;color:var(--cs-accent-on-strong);font-size:13px;line-height:1.6"><b style="color:var(--cs-accent-on-strong)">Decision</b> · Strong yes / Yes / No — with one sentence of why. Submit within 24h, before you talk to the other panelist.</div>
|
|
52
53
|
</div>
|
|
53
54
|
</sc-if>
|
|
54
55
|
<sc-if value="{{ isVN }}"><div lang="vi" style="display:contents">
|
|
@@ -79,7 +80,7 @@
|
|
|
79
80
|
</tbody>
|
|
80
81
|
</table>
|
|
81
82
|
<div class="cs-avoid" style="display:flex;align-items:center;gap:20px;background:var(--cs-accent-strong);border-radius:12px;padding:16px 22px">
|
|
82
|
-
<div style="flex:1;color
|
|
83
|
+
<div style="flex:1;color:var(--cs-accent-on-strong);font-size:13px;line-height:1.65"><b style="color:var(--cs-accent-on-strong)">Quyết định</b> · Rất nên tuyển / Nên tuyển / Không — kèm một câu lý do. Nộp trong 24h, trước khi trao đổi với người phỏng vấn còn lại.</div>
|
|
83
84
|
</div>
|
|
84
85
|
</div></sc-if>
|
|
85
86
|
</div>
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
// Loads this design system into the template. In a consuming project, point
|
|
2
2
|
// base at the bound DS folder relative to this file (e.g. '_ds/<folder>' at
|
|
3
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.
|
|
4
5
|
(() => {
|
|
5
6
|
const base = '../..';
|
|
6
|
-
for (const p of ['styles.css']) {
|
|
7
|
+
for (const p of ['dist/styles.min.css']) {
|
|
7
8
|
const l = document.createElement('link');
|
|
8
9
|
l.rel = 'stylesheet'; l.href = base + '/' + p;
|
|
9
10
|
document.head.appendChild(l);
|
|
@@ -20,4 +21,35 @@
|
|
|
20
21
|
};
|
|
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');
|
|
22
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
|
+
}
|
|
23
55
|
})();
|
|
@@ -1070,16 +1070,15 @@
|
|
|
1070
1070
|
}
|
|
1071
1071
|
|
|
1072
1072
|
// src/cdn.ts
|
|
1073
|
-
var
|
|
1074
|
-
var
|
|
1075
|
-
var
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
function cdnScriptFor(url, sri) {
|
|
1073
|
+
var REACT_LOCAL = "../../_vendor/react/react.production.min.js";
|
|
1074
|
+
var REACT_DOM_LOCAL = "../../_vendor/react/react-dom.production.min.js";
|
|
1075
|
+
var BABEL_LOCAL = "../../_vendor/babel/babel.min.js";
|
|
1076
|
+
// Product surfaces are offline-first (UX-026 / D4): no third-party script origins.
|
|
1077
|
+
// Host editors may still remap via window.__resources[localPath].
|
|
1078
|
+
function localScriptFor(path) {
|
|
1080
1079
|
const res = window.__resources;
|
|
1081
|
-
const v = res ? res[
|
|
1082
|
-
return typeof v === "string" && v ?
|
|
1080
|
+
const v = res ? res[path] : void 0;
|
|
1081
|
+
return typeof v === "string" && v ? v : path;
|
|
1083
1082
|
}
|
|
1084
1083
|
|
|
1085
1084
|
// src/external.ts
|
|
@@ -1106,16 +1105,12 @@
|
|
|
1106
1105
|
function ensureBabel() {
|
|
1107
1106
|
if (window.Babel) return Promise.resolve();
|
|
1108
1107
|
if (babelLoading) return babelLoading;
|
|
1109
|
-
const
|
|
1108
|
+
const src = localScriptFor(BABEL_LOCAL);
|
|
1110
1109
|
babelLoading = new Promise((res, rej) => {
|
|
1111
1110
|
const s = document.createElement("script");
|
|
1112
|
-
s.src =
|
|
1113
|
-
if (babel.integrity) {
|
|
1114
|
-
s.integrity = babel.integrity;
|
|
1115
|
-
s.crossOrigin = "anonymous";
|
|
1116
|
-
}
|
|
1111
|
+
s.src = src;
|
|
1117
1112
|
s.onload = () => res();
|
|
1118
|
-
s.onerror = rej;
|
|
1113
|
+
s.onerror = () => rej(new Error("failed to load local Babel: " + src));
|
|
1119
1114
|
document.head.appendChild(s);
|
|
1120
1115
|
});
|
|
1121
1116
|
return babelLoading;
|
|
@@ -1768,11 +1763,9 @@
|
|
|
1768
1763
|
function loadReactUmd() {
|
|
1769
1764
|
const w = window;
|
|
1770
1765
|
if (w.React && w.ReactDOM) return Promise.resolve();
|
|
1771
|
-
const react = cdnScriptFor(REACT_URL, REACT_SRI);
|
|
1772
|
-
const reactDom = cdnScriptFor(REACT_DOM_URL, REACT_DOM_SRI);
|
|
1773
1766
|
return Promise.all([
|
|
1774
|
-
loadScript(
|
|
1775
|
-
loadScript(
|
|
1767
|
+
loadScript(localScriptFor(REACT_LOCAL)),
|
|
1768
|
+
loadScript(localScriptFor(REACT_DOM_LOCAL))
|
|
1776
1769
|
]).then(() => void 0);
|
|
1777
1770
|
}
|
|
1778
1771
|
function init() {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
// Loads this design system into the template. In a consuming project, point
|
|
2
2
|
// base at the bound DS folder relative to this file (e.g. '_ds/<folder>' at
|
|
3
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.
|
|
4
5
|
(() => {
|
|
5
6
|
const base = '../..';
|
|
6
|
-
for (const p of ['styles.css']) {
|
|
7
|
+
for (const p of ['dist/styles.min.css']) {
|
|
7
8
|
const l = document.createElement('link');
|
|
8
9
|
l.rel = 'stylesheet'; l.href = base + '/' + p;
|
|
9
10
|
document.head.appendChild(l);
|
|
@@ -20,4 +21,35 @@
|
|
|
20
21
|
};
|
|
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');
|
|
22
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
|
+
}
|
|
23
55
|
})();
|
|
@@ -1070,16 +1070,15 @@
|
|
|
1070
1070
|
}
|
|
1071
1071
|
|
|
1072
1072
|
// src/cdn.ts
|
|
1073
|
-
var
|
|
1074
|
-
var
|
|
1075
|
-
var
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
function cdnScriptFor(url, sri) {
|
|
1073
|
+
var REACT_LOCAL = "../../_vendor/react/react.production.min.js";
|
|
1074
|
+
var REACT_DOM_LOCAL = "../../_vendor/react/react-dom.production.min.js";
|
|
1075
|
+
var BABEL_LOCAL = "../../_vendor/babel/babel.min.js";
|
|
1076
|
+
// Product surfaces are offline-first (UX-026 / D4): no third-party script origins.
|
|
1077
|
+
// Host editors may still remap via window.__resources[localPath].
|
|
1078
|
+
function localScriptFor(path) {
|
|
1080
1079
|
const res = window.__resources;
|
|
1081
|
-
const v = res ? res[
|
|
1082
|
-
return typeof v === "string" && v ?
|
|
1080
|
+
const v = res ? res[path] : void 0;
|
|
1081
|
+
return typeof v === "string" && v ? v : path;
|
|
1083
1082
|
}
|
|
1084
1083
|
|
|
1085
1084
|
// src/external.ts
|
|
@@ -1106,16 +1105,12 @@
|
|
|
1106
1105
|
function ensureBabel() {
|
|
1107
1106
|
if (window.Babel) return Promise.resolve();
|
|
1108
1107
|
if (babelLoading) return babelLoading;
|
|
1109
|
-
const
|
|
1108
|
+
const src = localScriptFor(BABEL_LOCAL);
|
|
1110
1109
|
babelLoading = new Promise((res, rej) => {
|
|
1111
1110
|
const s = document.createElement("script");
|
|
1112
|
-
s.src =
|
|
1113
|
-
if (babel.integrity) {
|
|
1114
|
-
s.integrity = babel.integrity;
|
|
1115
|
-
s.crossOrigin = "anonymous";
|
|
1116
|
-
}
|
|
1111
|
+
s.src = src;
|
|
1117
1112
|
s.onload = () => res();
|
|
1118
|
-
s.onerror = rej;
|
|
1113
|
+
s.onerror = () => rej(new Error("failed to load local Babel: " + src));
|
|
1119
1114
|
document.head.appendChild(s);
|
|
1120
1115
|
});
|
|
1121
1116
|
return babelLoading;
|
|
@@ -1768,11 +1763,9 @@
|
|
|
1768
1763
|
function loadReactUmd() {
|
|
1769
1764
|
const w = window;
|
|
1770
1765
|
if (w.React && w.ReactDOM) return Promise.resolve();
|
|
1771
|
-
const react = cdnScriptFor(REACT_URL, REACT_SRI);
|
|
1772
|
-
const reactDom = cdnScriptFor(REACT_DOM_URL, REACT_DOM_SRI);
|
|
1773
1766
|
return Promise.all([
|
|
1774
|
-
loadScript(
|
|
1775
|
-
loadScript(
|
|
1767
|
+
loadScript(localScriptFor(REACT_LOCAL)),
|
|
1768
|
+
loadScript(localScriptFor(REACT_DOM_LOCAL))
|
|
1776
1769
|
]).then(() => void 0);
|
|
1777
1770
|
}
|
|
1778
1771
|
function init() {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
// Loads this design system into the template. In a consuming project, point
|
|
2
2
|
// base at the bound DS folder relative to this file (e.g. '_ds/<folder>' at
|
|
3
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.
|
|
4
5
|
(() => {
|
|
5
6
|
const base = '../..';
|
|
6
|
-
for (const p of ['styles.css']) {
|
|
7
|
+
for (const p of ['dist/styles.min.css']) {
|
|
7
8
|
const l = document.createElement('link');
|
|
8
9
|
l.rel = 'stylesheet'; l.href = base + '/' + p;
|
|
9
10
|
document.head.appendChild(l);
|
|
@@ -20,4 +21,35 @@
|
|
|
20
21
|
};
|
|
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');
|
|
22
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
|
+
}
|
|
23
55
|
})();
|
|
@@ -1070,16 +1070,15 @@
|
|
|
1070
1070
|
}
|
|
1071
1071
|
|
|
1072
1072
|
// src/cdn.ts
|
|
1073
|
-
var
|
|
1074
|
-
var
|
|
1075
|
-
var
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
function cdnScriptFor(url, sri) {
|
|
1073
|
+
var REACT_LOCAL = "../../_vendor/react/react.production.min.js";
|
|
1074
|
+
var REACT_DOM_LOCAL = "../../_vendor/react/react-dom.production.min.js";
|
|
1075
|
+
var BABEL_LOCAL = "../../_vendor/babel/babel.min.js";
|
|
1076
|
+
// Product surfaces are offline-first (UX-026 / D4): no third-party script origins.
|
|
1077
|
+
// Host editors may still remap via window.__resources[localPath].
|
|
1078
|
+
function localScriptFor(path) {
|
|
1080
1079
|
const res = window.__resources;
|
|
1081
|
-
const v = res ? res[
|
|
1082
|
-
return typeof v === "string" && v ?
|
|
1080
|
+
const v = res ? res[path] : void 0;
|
|
1081
|
+
return typeof v === "string" && v ? v : path;
|
|
1083
1082
|
}
|
|
1084
1083
|
|
|
1085
1084
|
// src/external.ts
|
|
@@ -1106,16 +1105,12 @@
|
|
|
1106
1105
|
function ensureBabel() {
|
|
1107
1106
|
if (window.Babel) return Promise.resolve();
|
|
1108
1107
|
if (babelLoading) return babelLoading;
|
|
1109
|
-
const
|
|
1108
|
+
const src = localScriptFor(BABEL_LOCAL);
|
|
1110
1109
|
babelLoading = new Promise((res, rej) => {
|
|
1111
1110
|
const s = document.createElement("script");
|
|
1112
|
-
s.src =
|
|
1113
|
-
if (babel.integrity) {
|
|
1114
|
-
s.integrity = babel.integrity;
|
|
1115
|
-
s.crossOrigin = "anonymous";
|
|
1116
|
-
}
|
|
1111
|
+
s.src = src;
|
|
1117
1112
|
s.onload = () => res();
|
|
1118
|
-
s.onerror = rej;
|
|
1113
|
+
s.onerror = () => rej(new Error("failed to load local Babel: " + src));
|
|
1119
1114
|
document.head.appendChild(s);
|
|
1120
1115
|
});
|
|
1121
1116
|
return babelLoading;
|
|
@@ -1768,11 +1763,9 @@
|
|
|
1768
1763
|
function loadReactUmd() {
|
|
1769
1764
|
const w = window;
|
|
1770
1765
|
if (w.React && w.ReactDOM) return Promise.resolve();
|
|
1771
|
-
const react = cdnScriptFor(REACT_URL, REACT_SRI);
|
|
1772
|
-
const reactDom = cdnScriptFor(REACT_DOM_URL, REACT_DOM_SRI);
|
|
1773
1766
|
return Promise.all([
|
|
1774
|
-
loadScript(
|
|
1775
|
-
loadScript(
|
|
1767
|
+
loadScript(localScriptFor(REACT_LOCAL)),
|
|
1768
|
+
loadScript(localScriptFor(REACT_DOM_LOCAL))
|
|
1776
1769
|
]).then(() => void 0);
|
|
1777
1770
|
}
|
|
1778
1771
|
function init() {
|