@pie-lib/mask-markup 0.1.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.
Files changed (77) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +4 -0
  2. package/dist/choices/choice.d.ts +24 -0
  3. package/dist/choices/choice.d.ts.map +1 -0
  4. package/dist/choices/choice.js +77 -0
  5. package/dist/choices/index.d.ts +26 -0
  6. package/dist/choices/index.d.ts.map +1 -0
  7. package/dist/choices/index.js +49 -0
  8. package/dist/componentize.d.ts +13 -0
  9. package/dist/componentize.d.ts.map +1 -0
  10. package/dist/componentize.js +4 -0
  11. package/dist/components/blank.d.ts +39 -0
  12. package/dist/components/blank.d.ts.map +1 -0
  13. package/dist/components/blank.js +236 -0
  14. package/dist/components/correct-input.d.ts +11 -0
  15. package/dist/components/correct-input.d.ts.map +1 -0
  16. package/dist/components/dropdown.d.ts +38 -0
  17. package/dist/components/dropdown.d.ts.map +1 -0
  18. package/dist/components/dropdown.js +309 -0
  19. package/dist/components/input.d.ts +37 -0
  20. package/dist/components/input.d.ts.map +1 -0
  21. package/dist/constructed-response.d.ts +24 -0
  22. package/dist/constructed-response.d.ts.map +1 -0
  23. package/dist/constructed-response.js +55 -0
  24. package/dist/customizable.d.ts +24 -0
  25. package/dist/customizable.d.ts.map +1 -0
  26. package/dist/customizable.js +8 -0
  27. package/dist/drag-in-the-blank.d.ts +38 -0
  28. package/dist/drag-in-the-blank.d.ts.map +1 -0
  29. package/dist/drag-in-the-blank.js +164 -0
  30. package/dist/index.d.ts +16 -0
  31. package/dist/index.d.ts.map +1 -0
  32. package/dist/index.js +7 -0
  33. package/dist/inline-dropdown.d.ts +24 -0
  34. package/dist/inline-dropdown.d.ts.map +1 -0
  35. package/dist/inline-dropdown.js +24 -0
  36. package/dist/mask.d.ts +31 -0
  37. package/dist/mask.d.ts.map +1 -0
  38. package/dist/mask.js +98 -0
  39. package/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/index.js +17 -0
  40. package/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/cssPrefix.js +9 -0
  41. package/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/cssUnitless.js +26 -0
  42. package/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/hasOwn.js +11 -0
  43. package/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/isFunction.js +11 -0
  44. package/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/isObject.js +11 -0
  45. package/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/prefixInfo.js +24 -0
  46. package/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/prefixProperties.js +32 -0
  47. package/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/prefixer.js +29 -0
  48. package/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/camelize.js +14 -0
  49. package/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/hyphenRe.js +8 -0
  50. package/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/hyphenate.js +12 -0
  51. package/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/separate.js +11 -0
  52. package/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/toLowerFirst.js +10 -0
  53. package/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/toUpperFirst.js +10 -0
  54. package/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/toStyleObject.js +55 -0
  55. package/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/toStyleString.js +16 -0
  56. package/dist/serialization.d.ts +35 -0
  57. package/dist/serialization.d.ts.map +1 -0
  58. package/dist/serialization.js +132 -0
  59. package/dist/with-mask.d.ts +35 -0
  60. package/dist/with-mask.d.ts.map +1 -0
  61. package/dist/with-mask.js +45 -0
  62. package/package.json +44 -0
  63. package/src/choices/choice.tsx +107 -0
  64. package/src/choices/index.tsx +74 -0
  65. package/src/componentize.tsx +23 -0
  66. package/src/components/blank.tsx +396 -0
  67. package/src/components/correct-input.tsx +92 -0
  68. package/src/components/dropdown.tsx +448 -0
  69. package/src/components/input.tsx +58 -0
  70. package/src/constructed-response.tsx +91 -0
  71. package/src/customizable.tsx +44 -0
  72. package/src/drag-in-the-blank.tsx +251 -0
  73. package/src/index.ts +26 -0
  74. package/src/inline-dropdown.tsx +39 -0
  75. package/src/mask.tsx +178 -0
  76. package/src/serialization.ts +270 -0
  77. package/src/with-mask.tsx +85 -0
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/mask-markup/src/index.js
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import { buildLayoutFromMarkup, withMask } from './with-mask.js';
10
+ import DragInTheBlank from './drag-in-the-blank.js';
11
+ import ConstructedResponse from './constructed-response.js';
12
+ import Customizable from './customizable.js';
13
+ import InlineDropdown from './inline-dropdown.js';
14
+ import componentize from './componentize.js';
15
+ export { withMask, buildLayoutFromMarkup, DragInTheBlank, ConstructedResponse, InlineDropdown, componentize, Customizable, };
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,cAAc,MAAM,wBAAwB,CAAC;AACpD,OAAO,mBAAmB,MAAM,2BAA2B,CAAC;AAC5D,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAAO,cAAc,MAAM,sBAAsB,CAAC;AAClD,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EACL,QAAQ,EACR,qBAAqB,EACrB,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,YAAY,GACb,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,7 @@
1
+ import e from "./componentize.js";
2
+ import { buildLayoutFromMarkup as t, withMask as n } from "./with-mask.js";
3
+ import r from "./drag-in-the-blank.js";
4
+ import i from "./constructed-response.js";
5
+ import a from "./customizable.js";
6
+ import o from "./inline-dropdown.js";
7
+ export { i as ConstructedResponse, a as Customizable, r as DragInTheBlank, o as InlineDropdown, t as buildLayoutFromMarkup, e as componentize, n as withMask };
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/mask-markup/src/inline-dropdown.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ declare const _default: {
10
+ new (props: any): {
11
+ componentDidUpdate(prevProps: any): void;
12
+ render(): JSX.Element;
13
+ };
14
+ propTypes: {
15
+ markup: import("prop-types").Requireable<string>;
16
+ layout: import("prop-types").Requireable<object>;
17
+ value: import("prop-types").Requireable<object>;
18
+ onChange: import("prop-types").Requireable<(...args: any[]) => any>;
19
+ customMarkMarkupComponent: import("prop-types").Requireable<(...args: any[]) => any>;
20
+ elementType: import("prop-types").Requireable<string>;
21
+ };
22
+ };
23
+ export default _default;
24
+ //# sourceMappingURL=inline-dropdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline-dropdown.d.ts","sourceRoot":"","sources":["../src/inline-dropdown.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;;;;;;;;;;;;;;;AAOH,wBAuBG"}
@@ -0,0 +1,24 @@
1
+ import { withMask as e } from "./with-mask.js";
2
+ import t from "./components/dropdown.js";
3
+ import "react";
4
+ import { jsx as n } from "react/jsx-runtime";
5
+ //#region src/inline-dropdown.tsx
6
+ var r = e("dropdown", (e) => (r, i, a) => {
7
+ let o = r.data && r.data.dataset || {};
8
+ if (o.component === "dropdown") {
9
+ let { choices: s, disabled: c, feedback: l, showCorrectAnswer: u } = e, d = s && s[o.id] && s[o.id].find((e) => e.correct), f = u ? d && d.value : i[o.id];
10
+ return /* @__PURE__ */ n(t, {
11
+ correct: l && l[o.id] && l[o.id] === "correct",
12
+ disabled: c || u,
13
+ value: f,
14
+ correctValue: u ? d && d.label : void 0,
15
+ id: o.id,
16
+ onChange: a,
17
+ choices: s[o.id],
18
+ showCorrectAnswer: u,
19
+ singleQuery: Object.keys(s).length == 1
20
+ }, `${r.type}-dropdown-${o.id}`);
21
+ }
22
+ });
23
+ //#endregion
24
+ export { r as default };
package/dist/mask.d.ts ADDED
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/mask-markup/src/mask.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ import PropTypes from 'prop-types';
11
+ export declare const renderChildren: (layout: any, value: any, onChange: any, rootRenderChildren: any, parentNode: any, elementType: any) => any[] | null;
12
+ /**
13
+ * Renders a layout that uses the slate.js Value model structure.
14
+ */
15
+ export default class Mask extends React.Component {
16
+ constructor(props: any);
17
+ static propTypes: {
18
+ renderChildren: PropTypes.Requireable<(...args: any[]) => any>;
19
+ layout: PropTypes.Requireable<object>;
20
+ value: PropTypes.Requireable<object>;
21
+ onChange: PropTypes.Requireable<(...args: any[]) => any>;
22
+ elementType: PropTypes.Requireable<string>;
23
+ containerRef: PropTypes.Requireable<NonNullable<((...args: any[]) => any) | PropTypes.InferProps<{
24
+ current: PropTypes.Requireable<Element>;
25
+ }> | null | undefined>>;
26
+ };
27
+ componentDidMount(): void;
28
+ handleChange: any;
29
+ render(): JSX.Element;
30
+ }
31
+ //# sourceMappingURL=mask.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mask.d.ts","sourceRoot":"","sources":["../src/mask.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAuCnC,eAAO,MAAM,cAAc,GAAI,WAAM,EAAE,UAAK,EAAE,aAAQ,EAAE,uBAAkB,EAAE,eAAU,EAAE,gBAAW,iBA4ElG,CAAC;AAcF;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,KAAK,CAAC,SAAS;gBACnC,KAAK,KAAA;IAKjB,MAAM,CAAC,SAAS;;;;;;;;;MAOd;IAEF,iBAAiB;IAOjB,YAAY,EAAE,GAAG,CAGf;IAEF,MAAM;CAOP"}
package/dist/mask.js ADDED
@@ -0,0 +1,98 @@
1
+ import { MARK_TAGS as e } from "./serialization.js";
2
+ import t from "react";
3
+ import n from "prop-types";
4
+ import { get as r } from "lodash-es";
5
+ import { styled as i } from "@mui/material/styles";
6
+ import { renderMath as a } from "@pie-element/shared-math-rendering-mathjax";
7
+ import { jsx as o } from "react/jsx-runtime";
8
+ //#region src/mask.tsx
9
+ var s = i("div")(({ theme: e }) => ({
10
+ paddingTop: e.spacing(.5),
11
+ paddingBottom: e.spacing(.5)
12
+ })), c = i("span")(() => ({
13
+ display: "inline-block",
14
+ width: ".75em"
15
+ })), l = ["tbody", "tr"], u = (e, t) => {
16
+ let n = t.trim() === "", r = e && e.type;
17
+ if (!(n && l.includes(r))) return t;
18
+ }, d = (e) => {
19
+ let t = e.leaves.find((e) => r(e, "marks", []).length);
20
+ return t ? t.marks[0] : null;
21
+ }, f = (t, n, r, i, a, l) => {
22
+ if (!n) return null;
23
+ let p = [];
24
+ return (t.nodes || []).forEach((t, m) => {
25
+ let h = t.type ? `${t.type}-${m}` : `${m}`;
26
+ if (t.isMath) return p.push(/* @__PURE__ */ o("span", { dangerouslySetInnerHTML: { __html: `<math displaystyle="true">${t.nodes[0].innerHTML}</math>` } })), p;
27
+ if (i) {
28
+ let e = i(t, n, r);
29
+ if (e) {
30
+ p.push(e), a?.type !== "td" && l === "drag-in-the-blank" && p.push(/* @__PURE__ */ o(c, {}, `spacer-${m}`));
31
+ return;
32
+ }
33
+ }
34
+ if (t.object === "text") {
35
+ let n = t.leaves.reduce((e, t) => {
36
+ let n = t.text, r = u(a, n);
37
+ return r ? e + r : e;
38
+ }, ""), r = d(t);
39
+ if (r) {
40
+ let t;
41
+ for (t in e) if (e[t] === r.type) {
42
+ let e = t;
43
+ p.push(/* @__PURE__ */ o(e, { children: n }, h));
44
+ break;
45
+ }
46
+ } else n.length > 0 && (p.push(n), a?.type !== "td" && l === "drag-in-the-blank" && p.push(/* @__PURE__ */ o(c, {}, `spacer-${m}`)));
47
+ } else {
48
+ let e = f(t, n, r, i, t, l);
49
+ if (t.type === "p" || t.type === "paragraph") p.push(/* @__PURE__ */ o(s, { children: e }, h));
50
+ else {
51
+ let n = t.type;
52
+ t.nodes && t.nodes.length > 0 ? p.push(/* @__PURE__ */ o(n, {
53
+ ...t.data.attributes,
54
+ children: e
55
+ }, h)) : p.push(/* @__PURE__ */ o(n, { ...t.data.attributes }, h));
56
+ }
57
+ }
58
+ }), p;
59
+ }, p = i("div")(() => ({
60
+ display: "initial",
61
+ "&:not(.MathJax) table": { borderCollapse: "collapse" },
62
+ "&:not(.MathJax) table td, &:not(.MathJax) table th": {
63
+ padding: "8px 12px",
64
+ textAlign: "left"
65
+ }
66
+ })), m = class extends t.Component {
67
+ constructor(e) {
68
+ super(e), this.internalContainerRef = t.createRef();
69
+ }
70
+ static propTypes = {
71
+ renderChildren: n.func,
72
+ layout: n.object,
73
+ value: n.object,
74
+ onChange: n.func,
75
+ elementType: n.string,
76
+ containerRef: n.oneOfType([n.func, n.shape({ current: n.instanceOf(Element) })])
77
+ };
78
+ componentDidMount() {
79
+ let e = this.props.containerRef || this.internalContainerRef;
80
+ e.current && typeof a == "function" && a(e.current);
81
+ }
82
+ handleChange = (e, t) => {
83
+ let n = {
84
+ ...this.props.value,
85
+ [e]: t
86
+ };
87
+ this.props.onChange(n);
88
+ };
89
+ render() {
90
+ let { value: e, layout: t, elementType: n, containerRef: r } = this.props, i = f(t, e, this.handleChange, this.props.renderChildren, null, n);
91
+ return /* @__PURE__ */ o(p, {
92
+ ref: r || this.internalContainerRef,
93
+ children: i
94
+ });
95
+ }
96
+ };
97
+ //#endregion
98
+ export { m as default };
@@ -0,0 +1,17 @@
1
+ import { __commonJSMin as e } from "../../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_prefixProperties as t } from "./src/prefixProperties.js";
3
+ import { require_cssUnitless as n } from "./src/cssUnitless.js";
4
+ import { require_toStyleObject as r } from "./src/toStyleObject.js";
5
+ import { require_toStyleString as i } from "./src/toStyleString.js";
6
+ //#region ../../../node_modules/.bun/to-style@1.3.3/node_modules/to-style/index.js
7
+ var a = /* @__PURE__ */ e(((e, a) => {
8
+ a.exports = {
9
+ prefixProperties: t(),
10
+ cssUnitless: n(),
11
+ object: r(),
12
+ string: i()
13
+ };
14
+ }));
15
+ //#endregion
16
+ export default a();
17
+ export { a as require_to_style };
@@ -0,0 +1,9 @@
1
+ import { __commonJSMin as e } from "../../../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_prefixer as t } from "./prefixer.js";
3
+ //#region ../../../node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/cssPrefix.js
4
+ var n = /* @__PURE__ */ e(((e, n) => {
5
+ n.exports = t()();
6
+ }));
7
+ //#endregion
8
+ export default n();
9
+ export { n as require_cssPrefix };
@@ -0,0 +1,26 @@
1
+ "use exports";
2
+ import { __commonJSMin as e } from "../../../../../../_virtual/_rolldown/runtime.js";
3
+ //#region ../../../node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/cssUnitless.js
4
+ var t = /* @__PURE__ */ e(((e, t) => {
5
+ t.exports = {
6
+ animation: 1,
7
+ "column-count": 1,
8
+ columns: 1,
9
+ "font-weight": 1,
10
+ opacity: 1,
11
+ "order ": 1,
12
+ "z-index": 1,
13
+ zoom: 1,
14
+ flex: 1,
15
+ "box-flex": 1,
16
+ transform: 1,
17
+ perspective: 1,
18
+ "box-pack": 1,
19
+ "box-align": 1,
20
+ colspan: 1,
21
+ rowspan: 1
22
+ };
23
+ }));
24
+ //#endregion
25
+ export default t();
26
+ export { t as require_cssUnitless };
@@ -0,0 +1,11 @@
1
+ import { __commonJSMin as e } from "../../../../../../_virtual/_rolldown/runtime.js";
2
+ //#region ../../../node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/hasOwn.js
3
+ var t = /* @__PURE__ */ e(((e, t) => {
4
+ var n = Object.prototype.hasOwnProperty;
5
+ t.exports = function(e, t) {
6
+ return n.call(e, t);
7
+ };
8
+ }));
9
+ //#endregion
10
+ export default t();
11
+ export { t as require_hasOwn };
@@ -0,0 +1,11 @@
1
+ import { __commonJSMin as e } from "../../../../../../_virtual/_rolldown/runtime.js";
2
+ //#region ../../../node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/isFunction.js
3
+ var t = /* @__PURE__ */ e(((e, t) => {
4
+ var n = Object.prototype.toString;
5
+ t.exports = function(e) {
6
+ return n.apply(e) === "[object Function]";
7
+ };
8
+ }));
9
+ //#endregion
10
+ export default t();
11
+ export { t as require_isFunction };
@@ -0,0 +1,11 @@
1
+ import { __commonJSMin as e } from "../../../../../../_virtual/_rolldown/runtime.js";
2
+ //#region ../../../node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/isObject.js
3
+ var t = /* @__PURE__ */ e(((e, t) => {
4
+ var n = Object.prototype.toString;
5
+ t.exports = function(e) {
6
+ return !!e && n.call(e) === "[object Object]";
7
+ };
8
+ }));
9
+ //#endregion
10
+ export default t();
11
+ export { t as require_isObject };
@@ -0,0 +1,24 @@
1
+ import { __commonJSMin as e } from "../../../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_toUpperFirst as t } from "./stringUtils/toUpperFirst.js";
3
+ //#region ../../../node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/prefixInfo.js
4
+ var n = /* @__PURE__ */ e(((e, n) => {
5
+ var r = t(), i = /^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/, a = typeof document > "u" ? {} : document.documentElement.style;
6
+ n.exports = (function() {
7
+ var e = (function() {
8
+ for (var e in a) if (i.test(e)) return e.match(i)[0];
9
+ return "WebkitOpacity" in a ? "Webkit" : "KhtmlOpacity" in a ? "Khtml" : "";
10
+ })();
11
+ return {
12
+ style: e,
13
+ css: "-" + e.toLowerCase() + "-",
14
+ dom: {
15
+ Webkit: "WebKit",
16
+ ms: "MS",
17
+ o: "WebKit"
18
+ }[e] || r(e)
19
+ };
20
+ })();
21
+ }));
22
+ //#endregion
23
+ export default n();
24
+ export { n as require_prefixInfo };
@@ -0,0 +1,32 @@
1
+ import { __commonJSMin as e } from "../../../../../../_virtual/_rolldown/runtime.js";
2
+ //#region ../../../node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/prefixProperties.js
3
+ var t = /* @__PURE__ */ e(((e, t) => {
4
+ t.exports = {
5
+ "border-radius": 1,
6
+ "border-top-left-radius": 1,
7
+ "border-top-right-radius": 1,
8
+ "border-bottom-left-radius": 1,
9
+ "border-bottom-right-radius": 1,
10
+ "box-shadow": 1,
11
+ order: 1,
12
+ flex: function(e, t) {
13
+ return [t + "box-flex"];
14
+ },
15
+ "box-flex": 1,
16
+ "box-align": 1,
17
+ animation: 1,
18
+ "animation-duration": 1,
19
+ "animation-name": 1,
20
+ transition: 1,
21
+ "transition-duration": 1,
22
+ transform: 1,
23
+ "transform-style": 1,
24
+ "transform-origin": 1,
25
+ "backface-visibility": 1,
26
+ perspective: 1,
27
+ "box-pack": 1
28
+ };
29
+ }));
30
+ //#endregion
31
+ export default t();
32
+ export { t as require_prefixProperties };
@@ -0,0 +1,29 @@
1
+ import { __commonJSMin as e } from "../../../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_prefixProperties as t } from "./prefixProperties.js";
3
+ import { require_toUpperFirst as n } from "./stringUtils/toUpperFirst.js";
4
+ import { require_prefixInfo as r } from "./prefixInfo.js";
5
+ import { require_camelize as i } from "./stringUtils/camelize.js";
6
+ import { require_hyphenate as a } from "./stringUtils/hyphenate.js";
7
+ import { require_toLowerFirst as o } from "./stringUtils/toLowerFirst.js";
8
+ //#region ../../../node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/prefixer.js
9
+ var s = /* @__PURE__ */ e(((e, s) => {
10
+ var c = i(), l = a(), u = o(), d = n(), f = r(), p = t(), m = typeof document > "u" ? {} : document.documentElement.style;
11
+ s.exports = function(e) {
12
+ return function(t, n) {
13
+ n ||= {};
14
+ var r = u(c(t)), i = l(t), a = e ? r : i, o = f.style ? e ? f.style : f.css : "";
15
+ if (r in m) return n.asString ? a : [a];
16
+ var s = a, h = p[i], g = [];
17
+ if (e && (s = d(a)), typeof h == "function") {
18
+ var _ = h(a, o) || [];
19
+ _ && !Array.isArray(_) && (_ = [_]), _.length && (_ = _.map(function(t) {
20
+ return e ? u(c(t)) : l(t);
21
+ })), g = g.concat(_);
22
+ }
23
+ return o && g.push(o + s), g.push(a), n.asString || g.length == 1 ? g[0] : g;
24
+ };
25
+ };
26
+ }));
27
+ //#endregion
28
+ export default s();
29
+ export { s as require_prefixer };
@@ -0,0 +1,14 @@
1
+ import { __commonJSMin as e } from "../../../../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_hyphenRe as t } from "./hyphenRe.js";
3
+ //#region ../../../node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/camelize.js
4
+ var n = /* @__PURE__ */ e(((e, n) => {
5
+ var r = function(e, t) {
6
+ return t ? t.toUpperCase() : "";
7
+ }, i = t();
8
+ n.exports = function(e) {
9
+ return e ? e.replace(i, r) : "";
10
+ };
11
+ }));
12
+ //#endregion
13
+ export default n();
14
+ export { n as require_camelize };
@@ -0,0 +1,8 @@
1
+ import { __commonJSMin as e } from "../../../../../../../_virtual/_rolldown/runtime.js";
2
+ //#region ../../../node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/hyphenRe.js
3
+ var t = /* @__PURE__ */ e(((e, t) => {
4
+ t.exports = /[-\s]+(.)?/g;
5
+ }));
6
+ //#endregion
7
+ export default t();
8
+ export { t as require_hyphenRe };
@@ -0,0 +1,12 @@
1
+ import { __commonJSMin as e } from "../../../../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_separate as t } from "./separate.js";
3
+ //#region ../../../node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/hyphenate.js
4
+ var n = /* @__PURE__ */ e(((e, n) => {
5
+ var r = t();
6
+ n.exports = function(e) {
7
+ return r(e).toLowerCase();
8
+ };
9
+ }));
10
+ //#endregion
11
+ export default n();
12
+ export { n as require_hyphenate };
@@ -0,0 +1,11 @@
1
+ import { __commonJSMin as e } from "../../../../../../../_virtual/_rolldown/runtime.js";
2
+ //#region ../../../node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/separate.js
3
+ var t = /* @__PURE__ */ e(((e, t) => {
4
+ var n = /::/g, r = /([A-Z]+)([A-Z][a-z])/g, i = /([a-z\d])([A-Z])/g, a = /_/g;
5
+ t.exports = function(e, t) {
6
+ return e ? e.replace(n, "/").replace(r, "$1_$2").replace(i, "$1_$2").replace(a, t || "-") : "";
7
+ };
8
+ }));
9
+ //#endregion
10
+ export default t();
11
+ export { t as require_separate };
@@ -0,0 +1,10 @@
1
+ import { __commonJSMin as e } from "../../../../../../../_virtual/_rolldown/runtime.js";
2
+ //#region ../../../node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/toLowerFirst.js
3
+ var t = /* @__PURE__ */ e(((e, t) => {
4
+ t.exports = function(e) {
5
+ return e.length ? e.charAt(0).toLowerCase() + e.substring(1) : e;
6
+ };
7
+ }));
8
+ //#endregion
9
+ export default t();
10
+ export { t as require_toLowerFirst };
@@ -0,0 +1,10 @@
1
+ import { __commonJSMin as e } from "../../../../../../../_virtual/_rolldown/runtime.js";
2
+ //#region ../../../node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/toUpperFirst.js
3
+ var t = /* @__PURE__ */ e(((e, t) => {
4
+ t.exports = function(e) {
5
+ return e.length ? e.charAt(0).toUpperCase() + e.substring(1) : e;
6
+ };
7
+ }));
8
+ //#endregion
9
+ export default t();
10
+ export { t as require_toUpperFirst };
@@ -0,0 +1,55 @@
1
+ import { __commonJSMin as e } from "../../../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_cssUnitless as t } from "./cssUnitless.js";
3
+ import { require_prefixInfo as n } from "./prefixInfo.js";
4
+ import { require_camelize as r } from "./stringUtils/camelize.js";
5
+ import { require_hyphenate as i } from "./stringUtils/hyphenate.js";
6
+ import { require_cssPrefix as a } from "./cssPrefix.js";
7
+ import { require_hasOwn as o } from "./hasOwn.js";
8
+ import { require_isObject as s } from "./isObject.js";
9
+ import { require_isFunction as c } from "./isFunction.js";
10
+ //#region ../../../node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/toStyleObject.js
11
+ var l = /* @__PURE__ */ e(((e, l) => {
12
+ n();
13
+ var u = a(), d = i(), f = r(), p = o(), m = s(), h = c(), g = function(e, t, n, r) {
14
+ u(t).forEach(function(t) {
15
+ e[r ? r(t) : t] = n;
16
+ });
17
+ }, _ = function(e) {
18
+ e = (e || "").split(";");
19
+ var t = {};
20
+ return e.forEach(function(e) {
21
+ var n = e.split(":");
22
+ n.length == 2 && (t[n[0].trim()] = n[1].trim());
23
+ }), t;
24
+ }, v = { cssUnitless: t() }, y = function(e, t, n, r) {
25
+ typeof e == "string" && (e = _(e)), t ||= v, t.cssUnitless = t.cssUnitless || v.cssUnitless, r ||= {};
26
+ var i = t.scope || {}, a = t.addUnits == null ? i && i.addUnits != null ? i.addUnits : !0 : t.addUnits, o = (t.cssUnitless == null ? i ? i.cssUnitless : null : t.cssUnitless) || {}, s = (t.cssUnit || i ? i.cssUnit : null) || "px", c = t.prefixProperties || (i ? i.prefixProperties : null) || {}, l = t.camelize ? f : d, u, b, x, S, C, w, T, E;
27
+ for (x in e) if (p(e, x)) {
28
+ if (S = e[x], b = d(n ? n + x : x), u = !1, E = !1, h(S) && (T = S.call(i || e, S, x, b, e), m(T) && T.value != null ? (S = T.value, E = T.prefix, b = T.name ? d(T.name) : b) : S = T), C = typeof S, w = C == "number" || C == "string" && S != "" && S * 1 == S, S == null || b == null || b === "") continue;
29
+ if ((w || C == "string") && (u = !0), !u && S.value != null && S.prefix && (u = !0, E = S.prefix, S = S.value), u) {
30
+ if (E ||= !!c[b], w && (S = a && !(b in o) ? S + s : S + ""), (b == "border" || !b.indexOf("border") && !~b.indexOf("radius") && !~b.indexOf("width")) && w && (b += "-width"), !b.indexOf("border-radius-") && (b.replace(/border(-radius)(-(.*))/, function(e, t, n) {
31
+ var r = {
32
+ "-top": ["-top-left", "-top-right"],
33
+ "-left": ["-top-left", "-bottom-left"],
34
+ "-right": ["-top-right", "-bottom-right"],
35
+ "-bottom": ["-bottom-left", "-bottom-right"]
36
+ };
37
+ n in r ? (b = [], r[n].forEach(function(e) {
38
+ b.push("border" + e + t);
39
+ })) : b = "border" + n + t;
40
+ }), Array.isArray(b))) {
41
+ b.forEach(function(e) {
42
+ E ? g(r, e, S, l) : r[l(e)] = S;
43
+ });
44
+ continue;
45
+ }
46
+ E ? g(r, b, S, l) : r[l(b)] = S;
47
+ } else y(S, t, b + "-", r);
48
+ }
49
+ return r;
50
+ };
51
+ l.exports = y;
52
+ }));
53
+ //#endregion
54
+ export default l();
55
+ export { l as require_toStyleObject };
@@ -0,0 +1,16 @@
1
+ import { __commonJSMin as e } from "../../../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_hasOwn as t } from "./hasOwn.js";
3
+ import { require_toStyleObject as n } from "./toStyleObject.js";
4
+ //#region ../../../node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/toStyleString.js
5
+ var r = /* @__PURE__ */ e(((e, r) => {
6
+ var i = n(), a = t();
7
+ r.exports = function(e, t) {
8
+ e = i(e, t);
9
+ var n = [], r;
10
+ for (r in e) a(e, r) && n.push(r + ": " + e[r]);
11
+ return n.join("; ");
12
+ };
13
+ }));
14
+ //#endregion
15
+ export default r();
16
+ export { r as require_toStyleString };
@@ -0,0 +1,35 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/mask-markup/src/serialization.js
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ export declare const parseStyleString: (s: any) => {};
10
+ export declare const reactAttributes: (o: any) => any;
11
+ /**
12
+ * Tags to marks.
13
+ *
14
+ * @type {Object}
15
+ */
16
+ export declare const MARK_TAGS: {
17
+ b: string;
18
+ em: string;
19
+ u: string;
20
+ s: string;
21
+ code: string;
22
+ strong: string;
23
+ };
24
+ /**
25
+ * Deserialize HTML string to Slate JSON format
26
+ */
27
+ export declare const deserialize: (htmlString: any) => {
28
+ object: string;
29
+ document: {
30
+ object: string;
31
+ data: {};
32
+ nodes: any;
33
+ };
34
+ };
35
+ //# sourceMappingURL=serialization.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serialization.d.ts","sourceRoot":"","sources":["../src/serialization.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAuCH,eAAO,MAAM,gBAAgB,GAAI,MAAC,OAQjC,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,MAAC,QAA0D,CAAC;AA0C5F;;;;GAIG;AAEH,eAAO,MAAM,SAAS;;;;;;;CAOrB,CAAC;AA0FF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,eAAU;;;;;;;CAgErC,CAAC"}