@syntrologie/adapt-faq 2.8.0-canary.580 → 2.8.0-canary.581
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/dist/cdn.js +2 -2
- package/dist/{chunk-P6CEBXHB.js → chunk-2MFRUYFN.js} +42 -1
- package/dist/{chunk-P6CEBXHB.js.map → chunk-2MFRUYFN.js.map} +3 -3
- package/dist/{chunk-52I4JONS.js → chunk-4XMEZWJ3.js} +7 -8
- package/dist/chunk-4XMEZWJ3.js.map +7 -0
- package/dist/faq-styles.d.ts +1 -1
- package/dist/faq-styles.d.ts.map +1 -1
- package/dist/runtime.js +2 -2
- package/dist/schema.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-52I4JONS.js.map +0 -7
package/dist/cdn.js
CHANGED
|
@@ -4348,6 +4348,46 @@ function n(n2) {
|
|
|
4348
4348
|
// ../../sdk-contracts/dist/canvas-context.js
|
|
4349
4349
|
var canvasRuntimeContext = n("syntrologie:canvas-runtime");
|
|
4350
4350
|
|
|
4351
|
+
// ../../sdk-contracts/dist/color-scheme.js
|
|
4352
|
+
function normalize(value) {
|
|
4353
|
+
const scheme = (value || "").trim().toLowerCase();
|
|
4354
|
+
return scheme === "dark" || scheme === "light" ? scheme : null;
|
|
4355
|
+
}
|
|
4356
|
+
function declaredByDocument() {
|
|
4357
|
+
if (typeof document === "undefined")
|
|
4358
|
+
return null;
|
|
4359
|
+
const root = document.documentElement;
|
|
4360
|
+
if (!root)
|
|
4361
|
+
return null;
|
|
4362
|
+
if (typeof getComputedStyle === "function") {
|
|
4363
|
+
const computed = normalize(getComputedStyle(root).colorScheme);
|
|
4364
|
+
if (computed)
|
|
4365
|
+
return computed;
|
|
4366
|
+
}
|
|
4367
|
+
const inline = normalize(root.style?.colorScheme);
|
|
4368
|
+
if (inline)
|
|
4369
|
+
return inline;
|
|
4370
|
+
const attr = normalize(root.getAttribute?.("data-theme"));
|
|
4371
|
+
if (attr)
|
|
4372
|
+
return attr;
|
|
4373
|
+
if (root.classList?.contains("dark"))
|
|
4374
|
+
return "dark";
|
|
4375
|
+
return null;
|
|
4376
|
+
}
|
|
4377
|
+
function resolveColorScheme(declared) {
|
|
4378
|
+
if (declared === "dark")
|
|
4379
|
+
return "dark";
|
|
4380
|
+
if (declared === "light")
|
|
4381
|
+
return "light";
|
|
4382
|
+
const fromDocument = declaredByDocument();
|
|
4383
|
+
if (fromDocument)
|
|
4384
|
+
return fromDocument;
|
|
4385
|
+
if (typeof window !== "undefined" && typeof window.matchMedia === "function") {
|
|
4386
|
+
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
4387
|
+
}
|
|
4388
|
+
return "light";
|
|
4389
|
+
}
|
|
4390
|
+
|
|
4351
4391
|
// ../../sdk-contracts/dist/detector-events.js
|
|
4352
4392
|
var DETECTOR_EVENT_NAMES = [
|
|
4353
4393
|
"ui.hover",
|
|
@@ -4553,6 +4593,7 @@ var TELEMETRY_EVENTS = {
|
|
|
4553
4593
|
var TELEMETRY_EVENT_NAMES = Object.keys(TELEMETRY_EVENTS);
|
|
4554
4594
|
|
|
4555
4595
|
export {
|
|
4596
|
+
resolveColorScheme,
|
|
4556
4597
|
dispatchDiveDeeper,
|
|
4557
4598
|
stripMountPlumbing,
|
|
4558
4599
|
external_exports,
|
|
@@ -4590,4 +4631,4 @@ export {
|
|
|
4590
4631
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
4591
4632
|
*)
|
|
4592
4633
|
*/
|
|
4593
|
-
//# sourceMappingURL=chunk-
|
|
4634
|
+
//# sourceMappingURL=chunk-2MFRUYFN.js.map
|