@cyberskill/design 1.4.0 → 1.5.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/DESIGN.md +1 -1
- package/README.md +4 -4
- package/SKILL.md +2 -2
- package/VERSION +1 -1
- package/_ds_bundle.js +2 -2
- package/_esm/cs.mjs +2 -2
- package/docs/contrast-report.md +1 -1
- package/docs/conventions.md +1 -1
- package/docs/hr-suite-sources.md +1 -1
- package/docs/quality-gates.md +3 -0
- package/docs/release-notes.md +1 -1
- package/docs/vi/contrast-report.md +1 -1
- package/docs/vi/conventions.md +1 -1
- package/docs/vi/hr-suite-sources.md +1 -1
- package/docs/vi/quality-gates.md +3 -0
- package/docs/vi/release-notes.md +1 -1
- package/llms.txt +3 -3
- package/package.json +4 -2
- package/templates/_vendor/support.js +1860 -0
- package/templates/app-shell/support.js +41 -15
- package/templates/article/support.js +41 -15
- package/templates/auth/support.js +41 -15
- package/templates/bod-deck/support.js +41 -15
- package/templates/bod-investor-update/support.js +41 -15
- package/templates/bod-memo/support.js +41 -15
- package/templates/bod-minutes/support.js +41 -15
- package/templates/bod-report/support.js +41 -15
- package/templates/bod-resolution/support.js +41 -15
- package/templates/culture-event-invite/support.js +41 -15
- package/templates/dashboard/support.js +41 -15
- package/templates/delivery-change-note/support.js +41 -15
- package/templates/delivery-kickoff/support.js +41 -15
- package/templates/delivery-qbr-deck/support.js +41 -15
- package/templates/delivery-runbook/support.js +41 -15
- package/templates/delivery-status-email/support.js +41 -15
- package/templates/doc-style-guide/support.js +41 -15
- package/templates/doc-suite-index/DocSuiteIndex.dc.html +5 -1
- package/templates/doc-suite-index/support.js +41 -15
- package/templates/doc-templates/support.js +41 -15
- package/templates/email/support.js +41 -15
- package/templates/finance-dunning-email/support.js +41 -15
- package/templates/finance-expense-report/support.js +41 -15
- package/templates/finance-invoice/support.js +41 -15
- package/templates/finance-quote/support.js +41 -15
- package/templates/hr-announcement/support.js +41 -15
- package/templates/hr-interview-kit/support.js +41 -15
- package/templates/hr-offboarding/support.js +41 -15
- package/templates/hr-performance-review/support.js +41 -15
- package/templates/hr-pip/support.js +41 -15
- package/templates/legal-msa/support.js +41 -15
- package/templates/legal-sow/support.js +41 -15
- package/templates/marketing-campaign-brief/support.js +41 -15
- package/templates/marketing-case-study/support.js +41 -15
- package/templates/marketing-launch/support.js +41 -15
- package/templates/marketing-newsletter/support.js +41 -15
- package/templates/marketing-page/support.js +41 -15
- package/templates/marketing-press-release/support.js +41 -15
- package/templates/marketing-social-kit/support.js +41 -15
- package/templates/sales-one-pager/support.js +41 -15
- package/templates/sales-proposal-deck/support.js +41 -15
- package/templates/settings/support.js +41 -15
- package/templates/slide-deck/support.js +41 -15
- package/templates/team-meeting-agenda/support.js +41 -15
- package/templates/tech-incident-report/support.js +41 -15
- package/templates/tech-release-notes/support.js +41 -15
- package/templates/tech-retro/support.js +41 -15
- package/templates/tech-rfc/support.js +41 -15
- package/templates/vn-appointment-transfer/support.js +41 -15
- package/templates/vn-certificate-of-employment/support.js +41 -15
- package/templates/vn-code-of-conduct/support.js +41 -15
- package/templates/vn-compensation-regulation/support.js +41 -15
- package/templates/vn-contract-amendment/support.js +41 -15
- package/templates/vn-contractor-agreement/support.js +41 -15
- package/templates/vn-data-protection-policy/support.js +41 -15
- package/templates/vn-disciplinary-case-file/support.js +41 -15
- package/templates/vn-disciplinary-schedule/support.js +41 -15
- package/templates/vn-employee-request/support.js +41 -15
- package/templates/vn-exit-handover/support.js +41 -15
- package/templates/vn-foreign-employee-pack/support.js +41 -15
- package/templates/vn-framework-agreement/support.js +41 -15
- package/templates/vn-grassroots-democracy/support.js +41 -15
- package/templates/vn-infosec-policy/support.js +41 -15
- package/templates/vn-internal-labor-regulations/support.js +41 -15
- package/templates/vn-internship-agreement/support.js +41 -15
- package/templates/vn-job-description/support.js +41 -15
- package/templates/vn-labor-contract/support.js +41 -15
- package/templates/vn-labour-management-book/support.js +41 -15
- package/templates/vn-mutual-nda/support.js +41 -15
- package/templates/vn-ndnca-ip/support.js +41 -15
- package/templates/vn-offer-letter/support.js +41 -15
- package/templates/vn-onboarding-checklist/support.js +41 -15
- package/templates/vn-pdpl-consent/support.js +41 -15
- package/templates/vn-performance-evaluation-regulation/support.js +41 -15
- package/templates/vn-performance-review-form/support.js +41 -15
- package/templates/vn-phantom-stock/support.js +41 -15
- package/templates/vn-probation-contract/support.js +41 -15
- package/templates/vn-receipt-acknowledgement/support.js +41 -15
- package/templates/vn-remote-work-policy/support.js +41 -15
- package/templates/vn-resignation-letter/support.js +41 -15
- package/templates/vn-salary-scale/support.js +41 -15
- package/templates/vn-sow-appendix/support.js +41 -15
- package/templates/vn-termination-decision/support.js +41 -15
- package/templates/vn-total-rewards-appendix/support.js +41 -15
- package/templates/vn-training-commitment/support.js +41 -15
- package/templates/vn-travel-expense-policy/support.js +41 -15
- 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
|
@@ -769,15 +769,32 @@
|
|
|
769
769
|
return {};
|
|
770
770
|
}
|
|
771
771
|
};
|
|
772
|
+
/**
|
|
773
|
+
* Evaluate DC class source without Function-constructor / eval call sites
|
|
774
|
+
* (site CSP forbids unsafe-eval; 'unsafe-inline' still allows a synchronous
|
|
775
|
+
* classic script).
|
|
776
|
+
*/
|
|
772
777
|
function evalDcLogic(src) {
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
778
|
+
const key = "__dcEvalResult_" + Math.random().toString(36).slice(2);
|
|
779
|
+
window.__DCLogic = StreamableLogic;
|
|
780
|
+
window.__DCReactForEval = getReact();
|
|
781
|
+
const safeSrc = String(src).replace(/<\/(script)/gi, "<\\/$1");
|
|
782
|
+
const el = document.createElement("script");
|
|
783
|
+
el.text =
|
|
784
|
+
"var DCLogic=window.__DCLogic,StreamableLogic=window.__DCLogic,React=window.__DCReactForEval;\n" +
|
|
785
|
+
safeSrc +
|
|
786
|
+
"\n;window[" +
|
|
787
|
+
JSON.stringify(key) +
|
|
788
|
+
']=(typeof Component!=="undefined"&&Component)||undefined;';
|
|
789
|
+
(document.documentElement || document.head).appendChild(el);
|
|
790
|
+
el.remove();
|
|
791
|
+
const result = window[key];
|
|
792
|
+
try {
|
|
793
|
+
delete window[key];
|
|
794
|
+
} catch (_) {
|
|
795
|
+
window[key] = void 0;
|
|
796
|
+
}
|
|
797
|
+
return result;
|
|
781
798
|
}
|
|
782
799
|
|
|
783
800
|
// src/component.ts
|
|
@@ -1139,13 +1156,22 @@
|
|
|
1139
1156
|
}).code : src;
|
|
1140
1157
|
const module = { exports: {} };
|
|
1141
1158
|
const before = new Set(Object.keys(window));
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1159
|
+
// CSP-safe: run Babel output via inline classic script (no Function ctor).
|
|
1160
|
+
window.__DCReactForEval = getReact();
|
|
1161
|
+
window.__DCModuleTmp = module;
|
|
1162
|
+
const safeCode = String(code).replace(/<\/(script)/gi, "<\\/$1");
|
|
1163
|
+
const el = document.createElement("script");
|
|
1164
|
+
el.text =
|
|
1165
|
+
"(function(React,module,exports,require){\n" +
|
|
1166
|
+
safeCode +
|
|
1167
|
+
"\n})(window.__DCReactForEval,window.__DCModuleTmp,window.__DCModuleTmp.exports,function(){return{};});";
|
|
1168
|
+
(document.documentElement || document.head).appendChild(el);
|
|
1169
|
+
el.remove();
|
|
1170
|
+
try {
|
|
1171
|
+
delete window.__DCModuleTmp;
|
|
1172
|
+
} catch (_) {
|
|
1173
|
+
window.__DCModuleTmp = void 0;
|
|
1174
|
+
}
|
|
1149
1175
|
const globals = {};
|
|
1150
1176
|
for (const k of Object.keys(window)) {
|
|
1151
1177
|
if (!before.has(k) && typeof window[k] === "function") {
|
|
@@ -769,15 +769,32 @@
|
|
|
769
769
|
return {};
|
|
770
770
|
}
|
|
771
771
|
};
|
|
772
|
+
/**
|
|
773
|
+
* Evaluate DC class source without Function-constructor / eval call sites
|
|
774
|
+
* (site CSP forbids unsafe-eval; 'unsafe-inline' still allows a synchronous
|
|
775
|
+
* classic script).
|
|
776
|
+
*/
|
|
772
777
|
function evalDcLogic(src) {
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
778
|
+
const key = "__dcEvalResult_" + Math.random().toString(36).slice(2);
|
|
779
|
+
window.__DCLogic = StreamableLogic;
|
|
780
|
+
window.__DCReactForEval = getReact();
|
|
781
|
+
const safeSrc = String(src).replace(/<\/(script)/gi, "<\\/$1");
|
|
782
|
+
const el = document.createElement("script");
|
|
783
|
+
el.text =
|
|
784
|
+
"var DCLogic=window.__DCLogic,StreamableLogic=window.__DCLogic,React=window.__DCReactForEval;\n" +
|
|
785
|
+
safeSrc +
|
|
786
|
+
"\n;window[" +
|
|
787
|
+
JSON.stringify(key) +
|
|
788
|
+
']=(typeof Component!=="undefined"&&Component)||undefined;';
|
|
789
|
+
(document.documentElement || document.head).appendChild(el);
|
|
790
|
+
el.remove();
|
|
791
|
+
const result = window[key];
|
|
792
|
+
try {
|
|
793
|
+
delete window[key];
|
|
794
|
+
} catch (_) {
|
|
795
|
+
window[key] = void 0;
|
|
796
|
+
}
|
|
797
|
+
return result;
|
|
781
798
|
}
|
|
782
799
|
|
|
783
800
|
// src/component.ts
|
|
@@ -1139,13 +1156,22 @@
|
|
|
1139
1156
|
}).code : src;
|
|
1140
1157
|
const module = { exports: {} };
|
|
1141
1158
|
const before = new Set(Object.keys(window));
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1159
|
+
// CSP-safe: run Babel output via inline classic script (no Function ctor).
|
|
1160
|
+
window.__DCReactForEval = getReact();
|
|
1161
|
+
window.__DCModuleTmp = module;
|
|
1162
|
+
const safeCode = String(code).replace(/<\/(script)/gi, "<\\/$1");
|
|
1163
|
+
const el = document.createElement("script");
|
|
1164
|
+
el.text =
|
|
1165
|
+
"(function(React,module,exports,require){\n" +
|
|
1166
|
+
safeCode +
|
|
1167
|
+
"\n})(window.__DCReactForEval,window.__DCModuleTmp,window.__DCModuleTmp.exports,function(){return{};});";
|
|
1168
|
+
(document.documentElement || document.head).appendChild(el);
|
|
1169
|
+
el.remove();
|
|
1170
|
+
try {
|
|
1171
|
+
delete window.__DCModuleTmp;
|
|
1172
|
+
} catch (_) {
|
|
1173
|
+
window.__DCModuleTmp = void 0;
|
|
1174
|
+
}
|
|
1149
1175
|
const globals = {};
|
|
1150
1176
|
for (const k of Object.keys(window)) {
|
|
1151
1177
|
if (!before.has(k) && typeof window[k] === "function") {
|
|
@@ -769,15 +769,32 @@
|
|
|
769
769
|
return {};
|
|
770
770
|
}
|
|
771
771
|
};
|
|
772
|
+
/**
|
|
773
|
+
* Evaluate DC class source without Function-constructor / eval call sites
|
|
774
|
+
* (site CSP forbids unsafe-eval; 'unsafe-inline' still allows a synchronous
|
|
775
|
+
* classic script).
|
|
776
|
+
*/
|
|
772
777
|
function evalDcLogic(src) {
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
778
|
+
const key = "__dcEvalResult_" + Math.random().toString(36).slice(2);
|
|
779
|
+
window.__DCLogic = StreamableLogic;
|
|
780
|
+
window.__DCReactForEval = getReact();
|
|
781
|
+
const safeSrc = String(src).replace(/<\/(script)/gi, "<\\/$1");
|
|
782
|
+
const el = document.createElement("script");
|
|
783
|
+
el.text =
|
|
784
|
+
"var DCLogic=window.__DCLogic,StreamableLogic=window.__DCLogic,React=window.__DCReactForEval;\n" +
|
|
785
|
+
safeSrc +
|
|
786
|
+
"\n;window[" +
|
|
787
|
+
JSON.stringify(key) +
|
|
788
|
+
']=(typeof Component!=="undefined"&&Component)||undefined;';
|
|
789
|
+
(document.documentElement || document.head).appendChild(el);
|
|
790
|
+
el.remove();
|
|
791
|
+
const result = window[key];
|
|
792
|
+
try {
|
|
793
|
+
delete window[key];
|
|
794
|
+
} catch (_) {
|
|
795
|
+
window[key] = void 0;
|
|
796
|
+
}
|
|
797
|
+
return result;
|
|
781
798
|
}
|
|
782
799
|
|
|
783
800
|
// src/component.ts
|
|
@@ -1139,13 +1156,22 @@
|
|
|
1139
1156
|
}).code : src;
|
|
1140
1157
|
const module = { exports: {} };
|
|
1141
1158
|
const before = new Set(Object.keys(window));
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1159
|
+
// CSP-safe: run Babel output via inline classic script (no Function ctor).
|
|
1160
|
+
window.__DCReactForEval = getReact();
|
|
1161
|
+
window.__DCModuleTmp = module;
|
|
1162
|
+
const safeCode = String(code).replace(/<\/(script)/gi, "<\\/$1");
|
|
1163
|
+
const el = document.createElement("script");
|
|
1164
|
+
el.text =
|
|
1165
|
+
"(function(React,module,exports,require){\n" +
|
|
1166
|
+
safeCode +
|
|
1167
|
+
"\n})(window.__DCReactForEval,window.__DCModuleTmp,window.__DCModuleTmp.exports,function(){return{};});";
|
|
1168
|
+
(document.documentElement || document.head).appendChild(el);
|
|
1169
|
+
el.remove();
|
|
1170
|
+
try {
|
|
1171
|
+
delete window.__DCModuleTmp;
|
|
1172
|
+
} catch (_) {
|
|
1173
|
+
window.__DCModuleTmp = void 0;
|
|
1174
|
+
}
|
|
1149
1175
|
const globals = {};
|
|
1150
1176
|
for (const k of Object.keys(window)) {
|
|
1151
1177
|
if (!before.has(k) && typeof window[k] === "function") {
|
|
@@ -769,15 +769,32 @@
|
|
|
769
769
|
return {};
|
|
770
770
|
}
|
|
771
771
|
};
|
|
772
|
+
/**
|
|
773
|
+
* Evaluate DC class source without Function-constructor / eval call sites
|
|
774
|
+
* (site CSP forbids unsafe-eval; 'unsafe-inline' still allows a synchronous
|
|
775
|
+
* classic script).
|
|
776
|
+
*/
|
|
772
777
|
function evalDcLogic(src) {
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
778
|
+
const key = "__dcEvalResult_" + Math.random().toString(36).slice(2);
|
|
779
|
+
window.__DCLogic = StreamableLogic;
|
|
780
|
+
window.__DCReactForEval = getReact();
|
|
781
|
+
const safeSrc = String(src).replace(/<\/(script)/gi, "<\\/$1");
|
|
782
|
+
const el = document.createElement("script");
|
|
783
|
+
el.text =
|
|
784
|
+
"var DCLogic=window.__DCLogic,StreamableLogic=window.__DCLogic,React=window.__DCReactForEval;\n" +
|
|
785
|
+
safeSrc +
|
|
786
|
+
"\n;window[" +
|
|
787
|
+
JSON.stringify(key) +
|
|
788
|
+
']=(typeof Component!=="undefined"&&Component)||undefined;';
|
|
789
|
+
(document.documentElement || document.head).appendChild(el);
|
|
790
|
+
el.remove();
|
|
791
|
+
const result = window[key];
|
|
792
|
+
try {
|
|
793
|
+
delete window[key];
|
|
794
|
+
} catch (_) {
|
|
795
|
+
window[key] = void 0;
|
|
796
|
+
}
|
|
797
|
+
return result;
|
|
781
798
|
}
|
|
782
799
|
|
|
783
800
|
// src/component.ts
|
|
@@ -1139,13 +1156,22 @@
|
|
|
1139
1156
|
}).code : src;
|
|
1140
1157
|
const module = { exports: {} };
|
|
1141
1158
|
const before = new Set(Object.keys(window));
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1159
|
+
// CSP-safe: run Babel output via inline classic script (no Function ctor).
|
|
1160
|
+
window.__DCReactForEval = getReact();
|
|
1161
|
+
window.__DCModuleTmp = module;
|
|
1162
|
+
const safeCode = String(code).replace(/<\/(script)/gi, "<\\/$1");
|
|
1163
|
+
const el = document.createElement("script");
|
|
1164
|
+
el.text =
|
|
1165
|
+
"(function(React,module,exports,require){\n" +
|
|
1166
|
+
safeCode +
|
|
1167
|
+
"\n})(window.__DCReactForEval,window.__DCModuleTmp,window.__DCModuleTmp.exports,function(){return{};});";
|
|
1168
|
+
(document.documentElement || document.head).appendChild(el);
|
|
1169
|
+
el.remove();
|
|
1170
|
+
try {
|
|
1171
|
+
delete window.__DCModuleTmp;
|
|
1172
|
+
} catch (_) {
|
|
1173
|
+
window.__DCModuleTmp = void 0;
|
|
1174
|
+
}
|
|
1149
1175
|
const globals = {};
|
|
1150
1176
|
for (const k of Object.keys(window)) {
|
|
1151
1177
|
if (!before.has(k) && typeof window[k] === "function") {
|
|
@@ -769,15 +769,32 @@
|
|
|
769
769
|
return {};
|
|
770
770
|
}
|
|
771
771
|
};
|
|
772
|
+
/**
|
|
773
|
+
* Evaluate DC class source without Function-constructor / eval call sites
|
|
774
|
+
* (site CSP forbids unsafe-eval; 'unsafe-inline' still allows a synchronous
|
|
775
|
+
* classic script).
|
|
776
|
+
*/
|
|
772
777
|
function evalDcLogic(src) {
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
778
|
+
const key = "__dcEvalResult_" + Math.random().toString(36).slice(2);
|
|
779
|
+
window.__DCLogic = StreamableLogic;
|
|
780
|
+
window.__DCReactForEval = getReact();
|
|
781
|
+
const safeSrc = String(src).replace(/<\/(script)/gi, "<\\/$1");
|
|
782
|
+
const el = document.createElement("script");
|
|
783
|
+
el.text =
|
|
784
|
+
"var DCLogic=window.__DCLogic,StreamableLogic=window.__DCLogic,React=window.__DCReactForEval;\n" +
|
|
785
|
+
safeSrc +
|
|
786
|
+
"\n;window[" +
|
|
787
|
+
JSON.stringify(key) +
|
|
788
|
+
']=(typeof Component!=="undefined"&&Component)||undefined;';
|
|
789
|
+
(document.documentElement || document.head).appendChild(el);
|
|
790
|
+
el.remove();
|
|
791
|
+
const result = window[key];
|
|
792
|
+
try {
|
|
793
|
+
delete window[key];
|
|
794
|
+
} catch (_) {
|
|
795
|
+
window[key] = void 0;
|
|
796
|
+
}
|
|
797
|
+
return result;
|
|
781
798
|
}
|
|
782
799
|
|
|
783
800
|
// src/component.ts
|
|
@@ -1139,13 +1156,22 @@
|
|
|
1139
1156
|
}).code : src;
|
|
1140
1157
|
const module = { exports: {} };
|
|
1141
1158
|
const before = new Set(Object.keys(window));
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1159
|
+
// CSP-safe: run Babel output via inline classic script (no Function ctor).
|
|
1160
|
+
window.__DCReactForEval = getReact();
|
|
1161
|
+
window.__DCModuleTmp = module;
|
|
1162
|
+
const safeCode = String(code).replace(/<\/(script)/gi, "<\\/$1");
|
|
1163
|
+
const el = document.createElement("script");
|
|
1164
|
+
el.text =
|
|
1165
|
+
"(function(React,module,exports,require){\n" +
|
|
1166
|
+
safeCode +
|
|
1167
|
+
"\n})(window.__DCReactForEval,window.__DCModuleTmp,window.__DCModuleTmp.exports,function(){return{};});";
|
|
1168
|
+
(document.documentElement || document.head).appendChild(el);
|
|
1169
|
+
el.remove();
|
|
1170
|
+
try {
|
|
1171
|
+
delete window.__DCModuleTmp;
|
|
1172
|
+
} catch (_) {
|
|
1173
|
+
window.__DCModuleTmp = void 0;
|
|
1174
|
+
}
|
|
1149
1175
|
const globals = {};
|
|
1150
1176
|
for (const k of Object.keys(window)) {
|
|
1151
1177
|
if (!before.has(k) && typeof window[k] === "function") {
|
|
@@ -769,15 +769,32 @@
|
|
|
769
769
|
return {};
|
|
770
770
|
}
|
|
771
771
|
};
|
|
772
|
+
/**
|
|
773
|
+
* Evaluate DC class source without Function-constructor / eval call sites
|
|
774
|
+
* (site CSP forbids unsafe-eval; 'unsafe-inline' still allows a synchronous
|
|
775
|
+
* classic script).
|
|
776
|
+
*/
|
|
772
777
|
function evalDcLogic(src) {
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
778
|
+
const key = "__dcEvalResult_" + Math.random().toString(36).slice(2);
|
|
779
|
+
window.__DCLogic = StreamableLogic;
|
|
780
|
+
window.__DCReactForEval = getReact();
|
|
781
|
+
const safeSrc = String(src).replace(/<\/(script)/gi, "<\\/$1");
|
|
782
|
+
const el = document.createElement("script");
|
|
783
|
+
el.text =
|
|
784
|
+
"var DCLogic=window.__DCLogic,StreamableLogic=window.__DCLogic,React=window.__DCReactForEval;\n" +
|
|
785
|
+
safeSrc +
|
|
786
|
+
"\n;window[" +
|
|
787
|
+
JSON.stringify(key) +
|
|
788
|
+
']=(typeof Component!=="undefined"&&Component)||undefined;';
|
|
789
|
+
(document.documentElement || document.head).appendChild(el);
|
|
790
|
+
el.remove();
|
|
791
|
+
const result = window[key];
|
|
792
|
+
try {
|
|
793
|
+
delete window[key];
|
|
794
|
+
} catch (_) {
|
|
795
|
+
window[key] = void 0;
|
|
796
|
+
}
|
|
797
|
+
return result;
|
|
781
798
|
}
|
|
782
799
|
|
|
783
800
|
// src/component.ts
|
|
@@ -1139,13 +1156,22 @@
|
|
|
1139
1156
|
}).code : src;
|
|
1140
1157
|
const module = { exports: {} };
|
|
1141
1158
|
const before = new Set(Object.keys(window));
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1159
|
+
// CSP-safe: run Babel output via inline classic script (no Function ctor).
|
|
1160
|
+
window.__DCReactForEval = getReact();
|
|
1161
|
+
window.__DCModuleTmp = module;
|
|
1162
|
+
const safeCode = String(code).replace(/<\/(script)/gi, "<\\/$1");
|
|
1163
|
+
const el = document.createElement("script");
|
|
1164
|
+
el.text =
|
|
1165
|
+
"(function(React,module,exports,require){\n" +
|
|
1166
|
+
safeCode +
|
|
1167
|
+
"\n})(window.__DCReactForEval,window.__DCModuleTmp,window.__DCModuleTmp.exports,function(){return{};});";
|
|
1168
|
+
(document.documentElement || document.head).appendChild(el);
|
|
1169
|
+
el.remove();
|
|
1170
|
+
try {
|
|
1171
|
+
delete window.__DCModuleTmp;
|
|
1172
|
+
} catch (_) {
|
|
1173
|
+
window.__DCModuleTmp = void 0;
|
|
1174
|
+
}
|
|
1149
1175
|
const globals = {};
|
|
1150
1176
|
for (const k of Object.keys(window)) {
|
|
1151
1177
|
if (!before.has(k) && typeof window[k] === "function") {
|
|
@@ -769,15 +769,32 @@
|
|
|
769
769
|
return {};
|
|
770
770
|
}
|
|
771
771
|
};
|
|
772
|
+
/**
|
|
773
|
+
* Evaluate DC class source without Function-constructor / eval call sites
|
|
774
|
+
* (site CSP forbids unsafe-eval; 'unsafe-inline' still allows a synchronous
|
|
775
|
+
* classic script).
|
|
776
|
+
*/
|
|
772
777
|
function evalDcLogic(src) {
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
778
|
+
const key = "__dcEvalResult_" + Math.random().toString(36).slice(2);
|
|
779
|
+
window.__DCLogic = StreamableLogic;
|
|
780
|
+
window.__DCReactForEval = getReact();
|
|
781
|
+
const safeSrc = String(src).replace(/<\/(script)/gi, "<\\/$1");
|
|
782
|
+
const el = document.createElement("script");
|
|
783
|
+
el.text =
|
|
784
|
+
"var DCLogic=window.__DCLogic,StreamableLogic=window.__DCLogic,React=window.__DCReactForEval;\n" +
|
|
785
|
+
safeSrc +
|
|
786
|
+
"\n;window[" +
|
|
787
|
+
JSON.stringify(key) +
|
|
788
|
+
']=(typeof Component!=="undefined"&&Component)||undefined;';
|
|
789
|
+
(document.documentElement || document.head).appendChild(el);
|
|
790
|
+
el.remove();
|
|
791
|
+
const result = window[key];
|
|
792
|
+
try {
|
|
793
|
+
delete window[key];
|
|
794
|
+
} catch (_) {
|
|
795
|
+
window[key] = void 0;
|
|
796
|
+
}
|
|
797
|
+
return result;
|
|
781
798
|
}
|
|
782
799
|
|
|
783
800
|
// src/component.ts
|
|
@@ -1139,13 +1156,22 @@
|
|
|
1139
1156
|
}).code : src;
|
|
1140
1157
|
const module = { exports: {} };
|
|
1141
1158
|
const before = new Set(Object.keys(window));
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1159
|
+
// CSP-safe: run Babel output via inline classic script (no Function ctor).
|
|
1160
|
+
window.__DCReactForEval = getReact();
|
|
1161
|
+
window.__DCModuleTmp = module;
|
|
1162
|
+
const safeCode = String(code).replace(/<\/(script)/gi, "<\\/$1");
|
|
1163
|
+
const el = document.createElement("script");
|
|
1164
|
+
el.text =
|
|
1165
|
+
"(function(React,module,exports,require){\n" +
|
|
1166
|
+
safeCode +
|
|
1167
|
+
"\n})(window.__DCReactForEval,window.__DCModuleTmp,window.__DCModuleTmp.exports,function(){return{};});";
|
|
1168
|
+
(document.documentElement || document.head).appendChild(el);
|
|
1169
|
+
el.remove();
|
|
1170
|
+
try {
|
|
1171
|
+
delete window.__DCModuleTmp;
|
|
1172
|
+
} catch (_) {
|
|
1173
|
+
window.__DCModuleTmp = void 0;
|
|
1174
|
+
}
|
|
1149
1175
|
const globals = {};
|
|
1150
1176
|
for (const k of Object.keys(window)) {
|
|
1151
1177
|
if (!before.has(k) && typeof window[k] === "function") {
|
|
@@ -769,15 +769,32 @@
|
|
|
769
769
|
return {};
|
|
770
770
|
}
|
|
771
771
|
};
|
|
772
|
+
/**
|
|
773
|
+
* Evaluate DC class source without Function-constructor / eval call sites
|
|
774
|
+
* (site CSP forbids unsafe-eval; 'unsafe-inline' still allows a synchronous
|
|
775
|
+
* classic script).
|
|
776
|
+
*/
|
|
772
777
|
function evalDcLogic(src) {
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
778
|
+
const key = "__dcEvalResult_" + Math.random().toString(36).slice(2);
|
|
779
|
+
window.__DCLogic = StreamableLogic;
|
|
780
|
+
window.__DCReactForEval = getReact();
|
|
781
|
+
const safeSrc = String(src).replace(/<\/(script)/gi, "<\\/$1");
|
|
782
|
+
const el = document.createElement("script");
|
|
783
|
+
el.text =
|
|
784
|
+
"var DCLogic=window.__DCLogic,StreamableLogic=window.__DCLogic,React=window.__DCReactForEval;\n" +
|
|
785
|
+
safeSrc +
|
|
786
|
+
"\n;window[" +
|
|
787
|
+
JSON.stringify(key) +
|
|
788
|
+
']=(typeof Component!=="undefined"&&Component)||undefined;';
|
|
789
|
+
(document.documentElement || document.head).appendChild(el);
|
|
790
|
+
el.remove();
|
|
791
|
+
const result = window[key];
|
|
792
|
+
try {
|
|
793
|
+
delete window[key];
|
|
794
|
+
} catch (_) {
|
|
795
|
+
window[key] = void 0;
|
|
796
|
+
}
|
|
797
|
+
return result;
|
|
781
798
|
}
|
|
782
799
|
|
|
783
800
|
// src/component.ts
|
|
@@ -1139,13 +1156,22 @@
|
|
|
1139
1156
|
}).code : src;
|
|
1140
1157
|
const module = { exports: {} };
|
|
1141
1158
|
const before = new Set(Object.keys(window));
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1159
|
+
// CSP-safe: run Babel output via inline classic script (no Function ctor).
|
|
1160
|
+
window.__DCReactForEval = getReact();
|
|
1161
|
+
window.__DCModuleTmp = module;
|
|
1162
|
+
const safeCode = String(code).replace(/<\/(script)/gi, "<\\/$1");
|
|
1163
|
+
const el = document.createElement("script");
|
|
1164
|
+
el.text =
|
|
1165
|
+
"(function(React,module,exports,require){\n" +
|
|
1166
|
+
safeCode +
|
|
1167
|
+
"\n})(window.__DCReactForEval,window.__DCModuleTmp,window.__DCModuleTmp.exports,function(){return{};});";
|
|
1168
|
+
(document.documentElement || document.head).appendChild(el);
|
|
1169
|
+
el.remove();
|
|
1170
|
+
try {
|
|
1171
|
+
delete window.__DCModuleTmp;
|
|
1172
|
+
} catch (_) {
|
|
1173
|
+
window.__DCModuleTmp = void 0;
|
|
1174
|
+
}
|
|
1149
1175
|
const globals = {};
|
|
1150
1176
|
for (const k of Object.keys(window)) {
|
|
1151
1177
|
if (!before.has(k) && typeof window[k] === "function") {
|
|
@@ -769,15 +769,32 @@
|
|
|
769
769
|
return {};
|
|
770
770
|
}
|
|
771
771
|
};
|
|
772
|
+
/**
|
|
773
|
+
* Evaluate DC class source without Function-constructor / eval call sites
|
|
774
|
+
* (site CSP forbids unsafe-eval; 'unsafe-inline' still allows a synchronous
|
|
775
|
+
* classic script).
|
|
776
|
+
*/
|
|
772
777
|
function evalDcLogic(src) {
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
778
|
+
const key = "__dcEvalResult_" + Math.random().toString(36).slice(2);
|
|
779
|
+
window.__DCLogic = StreamableLogic;
|
|
780
|
+
window.__DCReactForEval = getReact();
|
|
781
|
+
const safeSrc = String(src).replace(/<\/(script)/gi, "<\\/$1");
|
|
782
|
+
const el = document.createElement("script");
|
|
783
|
+
el.text =
|
|
784
|
+
"var DCLogic=window.__DCLogic,StreamableLogic=window.__DCLogic,React=window.__DCReactForEval;\n" +
|
|
785
|
+
safeSrc +
|
|
786
|
+
"\n;window[" +
|
|
787
|
+
JSON.stringify(key) +
|
|
788
|
+
']=(typeof Component!=="undefined"&&Component)||undefined;';
|
|
789
|
+
(document.documentElement || document.head).appendChild(el);
|
|
790
|
+
el.remove();
|
|
791
|
+
const result = window[key];
|
|
792
|
+
try {
|
|
793
|
+
delete window[key];
|
|
794
|
+
} catch (_) {
|
|
795
|
+
window[key] = void 0;
|
|
796
|
+
}
|
|
797
|
+
return result;
|
|
781
798
|
}
|
|
782
799
|
|
|
783
800
|
// src/component.ts
|
|
@@ -1139,13 +1156,22 @@
|
|
|
1139
1156
|
}).code : src;
|
|
1140
1157
|
const module = { exports: {} };
|
|
1141
1158
|
const before = new Set(Object.keys(window));
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1159
|
+
// CSP-safe: run Babel output via inline classic script (no Function ctor).
|
|
1160
|
+
window.__DCReactForEval = getReact();
|
|
1161
|
+
window.__DCModuleTmp = module;
|
|
1162
|
+
const safeCode = String(code).replace(/<\/(script)/gi, "<\\/$1");
|
|
1163
|
+
const el = document.createElement("script");
|
|
1164
|
+
el.text =
|
|
1165
|
+
"(function(React,module,exports,require){\n" +
|
|
1166
|
+
safeCode +
|
|
1167
|
+
"\n})(window.__DCReactForEval,window.__DCModuleTmp,window.__DCModuleTmp.exports,function(){return{};});";
|
|
1168
|
+
(document.documentElement || document.head).appendChild(el);
|
|
1169
|
+
el.remove();
|
|
1170
|
+
try {
|
|
1171
|
+
delete window.__DCModuleTmp;
|
|
1172
|
+
} catch (_) {
|
|
1173
|
+
window.__DCModuleTmp = void 0;
|
|
1174
|
+
}
|
|
1149
1175
|
const globals = {};
|
|
1150
1176
|
for (const k of Object.keys(window)) {
|
|
1151
1177
|
if (!before.has(k) && typeof window[k] === "function") {
|