@dashspec/renderer 0.1.13 → 0.1.14
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/CHANGELOG.md +10 -1
- package/dist/{chunk-42YQDK6L.js → chunk-LPALJPKV.js} +6 -2
- package/dist/chunk-LPALJPKV.js.map +1 -0
- package/dist/{core-C6GFuH_O.d.ts → core-EeMWUITQ.d.ts} +72 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/index.d.ts +7 -3
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/schema.json +4 -0
- package/docs/data.md +1 -0
- package/docs/theming.md +2 -1
- package/package.json +1 -1
- package/dist/chunk-42YQDK6L.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -116,7 +116,7 @@ import {
|
|
|
116
116
|
translator,
|
|
117
117
|
validateDocument,
|
|
118
118
|
widgetChecks
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-LPALJPKV.js";
|
|
120
120
|
import {
|
|
121
121
|
createStateProxy,
|
|
122
122
|
getPath,
|
|
@@ -1702,8 +1702,9 @@ ${Object.entries(vars).filter(([k, v]) => SAFE_NAME.test(k) && !UNSAFE_CSS.test(
|
|
|
1702
1702
|
function widgetThemeCss(theme, scope2) {
|
|
1703
1703
|
const out = [];
|
|
1704
1704
|
for (const [kind, w] of Object.entries(theme.widgets ?? {})) {
|
|
1705
|
-
|
|
1706
|
-
|
|
1705
|
+
const m = /^([A-Za-z][\w.-]*)(?::([A-Za-z][\w-]*))?$/.exec(kind);
|
|
1706
|
+
if (!m || !w) continue;
|
|
1707
|
+
const sel = `${scope2} .ds-panel[data-kind="${m[1]}"]${m[2] ? `[data-variant="${m[2]}"]` : ""}`;
|
|
1707
1708
|
const vars = Object.entries(w.vars ?? {}).filter(([k, v]) => SAFE_NAME.test(k) && !UNSAFE_CSS.test(String(v)));
|
|
1708
1709
|
if (vars.length) out.push(`${sel} { ${vars.map(([k, v]) => `${k}: ${v};`).join(" ")} }`);
|
|
1709
1710
|
if (w.css && !/<\/?\s*style/i.test(w.css))
|
|
@@ -4180,6 +4181,7 @@ function PanelFrameInner({ id, nested }) {
|
|
|
4180
4181
|
"data-tone": tone2,
|
|
4181
4182
|
"data-panel": id,
|
|
4182
4183
|
"data-kind": def.kind,
|
|
4184
|
+
"data-variant": def.style?.variant || void 0,
|
|
4183
4185
|
"data-selected": selected || void 0,
|
|
4184
4186
|
"data-nested": nested || void 0,
|
|
4185
4187
|
"aria-label": title ?? id,
|