@webstudio-is/sdk-components-react 0.198.0 → 0.199.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/lib/__generated__/head-link.props.js +620 -0
- package/lib/__generated__/head-meta.props.js +532 -0
- package/lib/__generated__/head-title.props.js +508 -0
- package/lib/__generated__/head.props.js +508 -0
- package/lib/code-text.ws.js +1 -1
- package/lib/components.js +52 -44
- package/lib/head-link.js +23 -0
- package/lib/head-link.ws.js +20 -0
- package/lib/head-meta.js +23 -0
- package/lib/head-meta.ws.js +20 -0
- package/lib/head-slot.js +54 -0
- package/lib/head-slot.template.js +15 -0
- package/lib/head-slot.ws.js +26 -0
- package/lib/head-title.js +23 -0
- package/lib/head-title.ws.js +19 -0
- package/lib/hooks.js +3 -2
- package/lib/html-embed.ws.js +1 -1
- package/lib/metas.js +50 -42
- package/lib/props.js +40 -32
- package/lib/separator.ws.js +1 -1
- package/lib/slot.ws.js +1 -1
- package/lib/templates.js +18 -16
- package/lib/types/__generated__/head-link.props.d.ts +2 -0
- package/lib/types/__generated__/head-meta.props.d.ts +2 -0
- package/lib/types/__generated__/head-slot.props.d.ts +2 -0
- package/lib/types/__generated__/head-title.props.d.ts +2 -0
- package/lib/types/__generated__/head.props.d.ts +2 -0
- package/lib/types/components.d.ts +4 -0
- package/lib/types/head-link.d.ts +8 -0
- package/lib/types/head-link.ws.d.ts +3 -0
- package/lib/types/head-meta.d.ts +2 -0
- package/lib/types/head-meta.ws.d.ts +3 -0
- package/lib/types/head-slot.d.ts +9 -0
- package/lib/types/head-slot.template.d.ts +2 -0
- package/lib/types/head-slot.ws.d.ts +3 -0
- package/lib/types/head-title.d.ts +2 -0
- package/lib/types/head-title.ws.d.ts +3 -0
- package/lib/types/metas.d.ts +4 -0
- package/lib/types/props.d.ts +4 -0
- package/lib/types/templates.d.ts +1 -0
- package/lib/xml-node.js +51 -39
- package/lib/youtube.ws.js +1 -1
- package/package.json +7 -7
package/lib/xml-node.js
CHANGED
|
@@ -1,48 +1,60 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { ReactSdkContext as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
const
|
|
5
|
-
({ tag:
|
|
6
|
-
const { renderer:
|
|
7
|
-
([
|
|
8
|
-
).filter(([
|
|
9
|
-
if (
|
|
10
|
-
const
|
|
11
|
-
return
|
|
12
|
-
`${
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { jsxs as t, jsx as r, Fragment as u } from "react/jsx-runtime";
|
|
2
|
+
import { ReactSdkContext as g, xmlNodeTagSuffix as x } from "@webstudio-is/react-sdk/runtime";
|
|
3
|
+
import { forwardRef as b, useContext as N, createElement as C, Children as F } from "react";
|
|
4
|
+
const j = b(
|
|
5
|
+
({ tag: c = "", children: l, ...i }, d) => {
|
|
6
|
+
const { renderer: p } = N(g), o = Object.entries(i).filter(
|
|
7
|
+
([e]) => e.startsWith("data-") === !1 && e.startsWith("aria-") === !1
|
|
8
|
+
).filter(([e]) => e.toLowerCase() !== "tabindex").filter(([, e]) => typeof e != "function"), s = c.replace(/^[^\p{L}_]+/u, "").replaceAll(/[^\p{L}\p{N}\-._:]+/gu, "").trim();
|
|
9
|
+
if (p === void 0) {
|
|
10
|
+
const e = Object.fromEntries(o);
|
|
11
|
+
return C(
|
|
12
|
+
`${s}${x}`,
|
|
13
|
+
e,
|
|
14
|
+
l
|
|
15
15
|
);
|
|
16
16
|
}
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
"
|
|
17
|
+
const n = F.toArray(l), a = n.length > 0 && n.every((e) => typeof e == "string"), m = (e) => e.map(([f, h], y) => /* @__PURE__ */ t("span", { children: [
|
|
18
|
+
" ",
|
|
19
|
+
/* @__PURE__ */ r("span", { style: { color: "#FF0000" }, children: f }),
|
|
20
|
+
/* @__PURE__ */ r("span", { style: { color: "#000000" }, children: "=" }),
|
|
21
|
+
/* @__PURE__ */ t("span", { style: { color: "#0000FF" }, children: [
|
|
22
|
+
'"',
|
|
23
|
+
h,
|
|
24
|
+
'"'
|
|
25
|
+
] })
|
|
26
|
+
] }, y));
|
|
27
|
+
return /* @__PURE__ */ t("div", { ...i, children: [
|
|
28
|
+
/* @__PURE__ */ t("span", { children: [
|
|
29
|
+
/* @__PURE__ */ t("span", { style: { color: "#800000" }, children: [
|
|
30
|
+
"<",
|
|
31
|
+
s
|
|
32
|
+
] }),
|
|
33
|
+
o.length > 0 && m(o),
|
|
34
|
+
n.length === 0 ? /* @__PURE__ */ r("span", { style: { color: "#800000" }, children: "/>" }) : /* @__PURE__ */ r("span", { style: { color: "#800000" }, children: ">" })
|
|
25
35
|
] }),
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
n.length > 0 && /* @__PURE__ */ t(u, { children: [
|
|
37
|
+
/* @__PURE__ */ r(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
ref: d,
|
|
41
|
+
style: {
|
|
42
|
+
display: a ? "inline" : "block",
|
|
43
|
+
marginLeft: a ? 0 : "1rem"
|
|
44
|
+
},
|
|
45
|
+
children: l
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
/* @__PURE__ */ t("span", { style: { color: "#800000" }, children: [
|
|
49
|
+
"</",
|
|
50
|
+
s,
|
|
51
|
+
">"
|
|
52
|
+
] })
|
|
41
53
|
] })
|
|
42
54
|
] });
|
|
43
55
|
}
|
|
44
56
|
);
|
|
45
|
-
|
|
57
|
+
j.displayName = "XmlNode";
|
|
46
58
|
export {
|
|
47
|
-
|
|
59
|
+
j as XmlNode
|
|
48
60
|
};
|
package/lib/youtube.ws.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { YoutubeIcon as o } from "@webstudio-is/icons/svg";
|
|
2
2
|
import { defaultStates as t } from "@webstudio-is/sdk";
|
|
3
3
|
import { div as e } from "@webstudio-is/sdk/normalize.css";
|
|
4
4
|
import { props as n } from "./__generated__/youtube.props.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webstudio-is/sdk-components-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.199.0",
|
|
4
4
|
"description": "Webstudio default library for react",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -49,10 +49,10 @@
|
|
|
49
49
|
"colord": "^2.9.3",
|
|
50
50
|
"micromark": "^4.0.1",
|
|
51
51
|
"micromark-extension-gfm-table": "^2.1.0",
|
|
52
|
-
"@webstudio-is/icons": "0.
|
|
53
|
-
"@webstudio-is/react-sdk": "0.
|
|
54
|
-
"@webstudio-is/
|
|
55
|
-
"@webstudio-is/
|
|
52
|
+
"@webstudio-is/icons": "0.199.0",
|
|
53
|
+
"@webstudio-is/react-sdk": "0.199.0",
|
|
54
|
+
"@webstudio-is/image": "0.199.0",
|
|
55
|
+
"@webstudio-is/sdk": "0.199.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@testing-library/react": "^14.2.2",
|
|
@@ -60,10 +60,10 @@
|
|
|
60
60
|
"@types/react-dom": "^18.2.25",
|
|
61
61
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
62
62
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
63
|
-
"vitest": "^
|
|
63
|
+
"vitest": "^3.0.2",
|
|
64
64
|
"@webstudio-is/generate-arg-types": "0.0.0",
|
|
65
65
|
"@webstudio-is/sdk-cli": "0.94.0",
|
|
66
|
-
"@webstudio-is/template": "0.
|
|
66
|
+
"@webstudio-is/template": "0.199.0",
|
|
67
67
|
"@webstudio-is/tsconfig": "1.0.7"
|
|
68
68
|
},
|
|
69
69
|
"scripts": {
|