@webround/core 0.1.8 → 0.3.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 (104) hide show
  1. package/dist/base-css.d.ts +8 -0
  2. package/dist/base-css.js +19 -0
  3. package/dist/components/WrAltcha.d.ts +5 -0
  4. package/dist/components/WrAltcha.js +7 -0
  5. package/dist/components/WrButton.js +19 -0
  6. package/dist/components/WrForm.d.ts +7 -0
  7. package/dist/components/WrForm.js +15 -0
  8. package/dist/components/WrFormPrivacy.d.ts +4 -0
  9. package/dist/components/WrFormPrivacy.js +6 -0
  10. package/dist/components/WrFormSuccess.d.ts +4 -0
  11. package/dist/components/WrFormSuccess.js +6 -0
  12. package/dist/components/WrIframe.d.ts +8 -0
  13. package/dist/components/WrIframe.js +13 -0
  14. package/dist/components/WrImage.d.ts +9 -0
  15. package/dist/components/WrImage.js +13 -0
  16. package/dist/components/WrInput.d.ts +8 -0
  17. package/dist/components/WrInput.js +10 -0
  18. package/dist/components/WrLangSelector.d.ts +17 -0
  19. package/dist/components/WrLangSelector.js +27 -0
  20. package/dist/components/WrLangSync.d.ts +6 -0
  21. package/dist/components/WrLangSync.js +12 -0
  22. package/dist/components/WrLink.js +23 -0
  23. package/dist/components/WrNav.d.ts +26 -0
  24. package/dist/components/WrNav.js +15 -0
  25. package/dist/{WrSection.d.ts → components/WrSection.d.ts} +3 -3
  26. package/dist/components/WrShared.d.ts +22 -0
  27. package/dist/components/WrShared.js +18 -0
  28. package/dist/components/WrText.d.ts +11 -0
  29. package/dist/components/WrText.js +14 -0
  30. package/dist/components/WrThemeToggle.d.ts +9 -0
  31. package/dist/components/WrThemeToggle.js +43 -0
  32. package/dist/components/WrVideo.js +61 -0
  33. package/dist/context/WrAppContext.d.ts +40 -0
  34. package/dist/context/WrAppContext.js +95 -0
  35. package/dist/context/WrLayout.d.ts +23 -0
  36. package/dist/context/WrLayout.js +18 -0
  37. package/dist/context/WrPageContext.d.ts +10 -0
  38. package/dist/context/WrPageContext.js +13 -0
  39. package/dist/form-react.d.ts +82 -0
  40. package/dist/form-react.js +165 -0
  41. package/dist/form.d.ts +83 -0
  42. package/dist/form.js +175 -0
  43. package/dist/index.css +651 -0
  44. package/dist/index.d.ts +20 -8
  45. package/dist/index.js +20 -8
  46. package/dist/kinds.d.ts +109 -0
  47. package/dist/kinds.js +35 -0
  48. package/dist/lang-codes.d.ts +366 -0
  49. package/dist/lang-codes.js +166 -0
  50. package/dist/localized.d.ts +36 -0
  51. package/dist/localized.js +71 -0
  52. package/dist/not-found.d.ts +9 -0
  53. package/dist/not-found.js +13 -0
  54. package/dist/routing.d.ts +122 -0
  55. package/dist/routing.js +198 -0
  56. package/dist/seo-react.d.ts +20 -0
  57. package/dist/seo-react.js +37 -0
  58. package/dist/seo.d.ts +167 -0
  59. package/dist/seo.js +221 -0
  60. package/dist/site-env.d.ts +25 -0
  61. package/dist/site-env.js +37 -0
  62. package/dist/style.d.ts +456 -0
  63. package/dist/style.js +1081 -0
  64. package/dist/text-react.d.ts +11 -0
  65. package/dist/text-react.js +5 -0
  66. package/dist/theme.d.ts +22 -0
  67. package/dist/theme.js +45 -0
  68. package/dist/types.d.ts +37 -21
  69. package/package.json +93 -7
  70. package/dist/WrButton.d.ts.map +0 -1
  71. package/dist/WrButton.js +0 -7
  72. package/dist/WrButton.js.map +0 -1
  73. package/dist/WrImage.d.ts +0 -8
  74. package/dist/WrImage.d.ts.map +0 -1
  75. package/dist/WrImage.js +0 -7
  76. package/dist/WrImage.js.map +0 -1
  77. package/dist/WrLink.d.ts.map +0 -1
  78. package/dist/WrLink.js +0 -15
  79. package/dist/WrLink.js.map +0 -1
  80. package/dist/WrPageContext.d.ts +0 -8
  81. package/dist/WrPageContext.d.ts.map +0 -1
  82. package/dist/WrPageContext.js +0 -11
  83. package/dist/WrPageContext.js.map +0 -1
  84. package/dist/WrSection.d.ts.map +0 -1
  85. package/dist/WrSection.js.map +0 -1
  86. package/dist/WrText.d.ts +0 -11
  87. package/dist/WrText.d.ts.map +0 -1
  88. package/dist/WrText.js +0 -7
  89. package/dist/WrText.js.map +0 -1
  90. package/dist/WrVideo.d.ts.map +0 -1
  91. package/dist/WrVideo.js +0 -42
  92. package/dist/WrVideo.js.map +0 -1
  93. package/dist/bridge.d.ts +0 -2
  94. package/dist/bridge.d.ts.map +0 -1
  95. package/dist/bridge.js +0 -110
  96. package/dist/bridge.js.map +0 -1
  97. package/dist/index.d.ts.map +0 -1
  98. package/dist/index.js.map +0 -1
  99. package/dist/types.d.ts.map +0 -1
  100. package/dist/types.js.map +0 -1
  101. /package/dist/{WrButton.d.ts → components/WrButton.d.ts} +0 -0
  102. /package/dist/{WrLink.d.ts → components/WrLink.d.ts} +0 -0
  103. /package/dist/{WrSection.js → components/WrSection.js} +0 -0
  104. /package/dist/{WrVideo.d.ts → components/WrVideo.d.ts} +0 -0
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import type { WrTextTag } from './kinds.js';
3
+ export interface WrTextViewProps extends Omit<React.HTMLAttributes<HTMLElement>, 'id' | 'dangerouslySetInnerHTML' | 'children'> {
4
+ id: string;
5
+ /** The container: `div` (default) or `span`. */
6
+ tag?: WrTextTag;
7
+ /** The HTML of the text, as it is to be drawn. */
8
+ html: string;
9
+ }
10
+ export declare function WrTextView({ id, tag: Tag, html, style, ...props }: WrTextViewProps): React.JSX.Element;
11
+ //# sourceMappingURL=text-react.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export function WrTextView({ id, tag: Tag = 'div', html, style, ...props }) {
3
+ return (_jsx(Tag, { ...props, "data-wr-id": id, "data-wr-type": "text", dangerouslySetInnerHTML: { __html: html }, style: { wordBreak: 'break-word', ...style } }));
4
+ }
5
+ //# sourceMappingURL=text-react.js.map
@@ -0,0 +1,22 @@
1
+ /** Where the visitor's choice is kept. */
2
+ export declare const WR_THEME_STORAGE_KEY = "wr-theme";
3
+ /** The class on <html> that switches the dark values on. */
4
+ export declare const WR_THEME_DARK_CLASS = "dark";
5
+ /** The custom property of `theme.css` that says a visitor with no choice of their own starts from their system's theme (`system`); absent, the site starts light. */
6
+ export declare const WR_THEME_START_PROPERTY = "--wr-theme-start";
7
+ export declare const WR_THEME_START_SYSTEM = "system";
8
+ export type WrThemeName = 'light' | 'dark';
9
+ /** The theme the page starts with: what the visitor chose, else (if the site says so) their system's, else light. */
10
+ export declare function wrThemeStart(stored: string | null, fromSystem: boolean, systemIsDark: boolean): WrThemeName;
11
+ /**
12
+ * The script that sets the theme BEFORE the first paint (so a dark page never flashes light). It goes in the HTML as a script of its own, and says the same as `wrThemeStart` (a test
13
+ * runs both). Nothing but this and the toggle knows the storage key.
14
+ */
15
+ export declare function wrThemeStartScript(fromSystem: boolean): string;
16
+ /** Whether a stylesheet says the site has a dark theme: a rule whose selector is `.dark`. */
17
+ export declare function wrThemeHasDark(css: string): boolean;
18
+ /** Whether a stylesheet says a visitor with no choice of their own starts from their system's theme. */
19
+ export declare function wrThemeStartsFromSystem(css: string): boolean;
20
+ /** Whether the page's stylesheets have a `.dark` rule: the same definition as `wrThemeHasDark`, read from the page the visitor has (the toggle is only there when it can do something). */
21
+ export declare function wrThemeSiteHasDark(doc: Document): boolean;
22
+ //# sourceMappingURL=theme.d.ts.map
package/dist/theme.js ADDED
@@ -0,0 +1,45 @@
1
+ // The site's light/dark theme, in one place: what the page, the toggle and the plugin that starts the page all agree on. A site has two themes when its `theme.css` has a `.dark`
2
+ // block (the same names with other values, switched by the `dark` class on <html>), and one when it has not: that is the whole definition, nothing else says it.
3
+ /** Where the visitor's choice is kept. */
4
+ export const WR_THEME_STORAGE_KEY = 'wr-theme';
5
+ /** The class on <html> that switches the dark values on. */
6
+ export const WR_THEME_DARK_CLASS = 'dark';
7
+ /** The custom property of `theme.css` that says a visitor with no choice of their own starts from their system's theme (`system`); absent, the site starts light. */
8
+ export const WR_THEME_START_PROPERTY = '--wr-theme-start';
9
+ export const WR_THEME_START_SYSTEM = 'system';
10
+ /** The theme the page starts with: what the visitor chose, else (if the site says so) their system's, else light. */
11
+ export function wrThemeStart(stored, fromSystem, systemIsDark) {
12
+ if (stored === 'dark' || stored === 'light')
13
+ return stored;
14
+ return fromSystem && systemIsDark ? 'dark' : 'light';
15
+ }
16
+ /**
17
+ * The script that sets the theme BEFORE the first paint (so a dark page never flashes light). It goes in the HTML as a script of its own, and says the same as `wrThemeStart` (a test
18
+ * runs both). Nothing but this and the toggle knows the storage key.
19
+ */
20
+ export function wrThemeStartScript(fromSystem) {
21
+ return `try{var s=localStorage.getItem('${WR_THEME_STORAGE_KEY}');var d=s==='dark'||s==='light'?s==='dark':${fromSystem ? "matchMedia('(prefers-color-scheme: dark)').matches" : 'false'};document.documentElement.classList.toggle('${WR_THEME_DARK_CLASS}',d)}catch(e){}`;
22
+ }
23
+ /** Whether a stylesheet says the site has a dark theme: a rule whose selector is `.dark`. */
24
+ export function wrThemeHasDark(css) {
25
+ return /(^|[}\s,])\.dark\s*[,{]/.test(css.replace(/\/\*[\s\S]*?\*\//g, ''));
26
+ }
27
+ /** Whether a stylesheet says a visitor with no choice of their own starts from their system's theme. */
28
+ export function wrThemeStartsFromSystem(css) {
29
+ return new RegExp(`${WR_THEME_START_PROPERTY}\\s*:\\s*['"]?${WR_THEME_START_SYSTEM}['"]?\\s*[;}]`).test(css.replace(/\/\*[\s\S]*?\*\//g, ''));
30
+ }
31
+ /** Whether the page's stylesheets have a `.dark` rule: the same definition as `wrThemeHasDark`, read from the page the visitor has (the toggle is only there when it can do something). */
32
+ export function wrThemeSiteHasDark(doc) {
33
+ const has = (rules) => Array.from(rules).some(rule => {
34
+ if (rule instanceof CSSStyleRule)
35
+ return rule.selectorText.split(',').some(selector => selector.trim() === `.${WR_THEME_DARK_CLASS}`);
36
+ return 'cssRules' in rule ? has(rule.cssRules) : false;
37
+ });
38
+ return Array.from(doc.styleSheets).some(sheet => { try {
39
+ return has(sheet.cssRules);
40
+ }
41
+ catch {
42
+ return false;
43
+ } });
44
+ }
45
+ //# sourceMappingURL=theme.js.map
package/dist/types.d.ts CHANGED
@@ -1,34 +1,50 @@
1
1
  export type WrFieldType = 'text' | 'richtext' | 'image' | 'video' | 'url' | 'select' | 'boolean';
2
- export interface WrFieldSchema {
3
- type: WrFieldType;
4
- label?: string;
5
- options?: string[];
6
- }
7
- export type WrSectionSchema = Record<string, WrFieldSchema>;
8
2
  export interface WrFieldConfig {
9
3
  [key: string]: unknown;
10
4
  }
11
5
  export type WrPageConfig = Record<string, WrFieldConfig>;
12
6
  export type WrElementConfig = WrFieldConfig;
13
- export interface WrTextConfig {
14
- content: string;
7
+ export interface WrCommonFields {
8
+ /** A string, or `{ default, en… }` when it is translated (see wrLocalized). */
9
+ ariaLabel?: string | Record<string, string>;
10
+ hidden?: boolean;
11
+ }
12
+ export interface WrTextConfig extends WrCommonFields {
13
+ content: Record<string, string>;
14
+ [key: string]: unknown;
15
15
  }
16
- export interface WrImageConfig {
17
- src: string;
18
- alt?: string;
16
+ export interface WrImageConfig extends WrCommonFields {
17
+ alt?: Record<string, string>;
18
+ [key: string]: unknown;
19
19
  }
20
- export interface WrVideoConfig {
21
- src: string;
20
+ export interface WrVideoConfig extends WrCommonFields {
21
+ [key: string]: unknown;
22
22
  }
23
- export interface WrLinkConfig {
24
- content: string;
25
- href?: string;
23
+ export interface WrIframeConfig extends WrCommonFields {
24
+ [key: string]: unknown;
26
25
  }
27
- export interface WrButtonConfig {
28
- content: string;
26
+ export interface WrLinkConfig extends WrCommonFields {
27
+ content: Record<string, string>;
28
+ [key: string]: unknown;
29
29
  }
30
- export type WrSectionData = Record<string, unknown>;
31
- export interface WrPageData {
32
- [sectionId: string]: WrSectionData;
30
+ export interface WrButtonConfig extends WrCommonFields {
31
+ content: Record<string, string>;
32
+ [key: string]: unknown;
33
+ }
34
+ export interface WrFormConfig extends WrCommonFields {
35
+ [key: string]: unknown;
36
+ }
37
+ export interface WrInputConfig extends WrCommonFields {
38
+ label?: string | Record<string, string>;
39
+ placeholder?: string | Record<string, string>;
40
+ [key: string]: unknown;
41
+ }
42
+ export interface WrNavItem {
43
+ label: Record<string, string>;
44
+ href: string;
45
+ }
46
+ export interface WrNavConfig extends WrCommonFields {
47
+ items: WrNavItem[];
48
+ [key: string]: unknown;
33
49
  }
34
50
  //# sourceMappingURL=types.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webround/core",
3
- "version": "0.1.8",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -8,18 +8,102 @@
8
8
  "exports": {
9
9
  ".": {
10
10
  "import": "./dist/index.js",
11
- "types": "./dist/index.d.ts"
11
+ "types": "./dist/index.d.ts",
12
+ "development": "./src/index.ts"
13
+ },
14
+ "./types": {
15
+ "import": "./dist/types.js",
16
+ "types": "./dist/types.d.ts",
17
+ "development": "./src/types.ts"
18
+ },
19
+ "./routing": {
20
+ "import": "./dist/routing.js",
21
+ "types": "./dist/routing.d.ts",
22
+ "development": "./src/routing.ts"
23
+ },
24
+ "./lang-codes": {
25
+ "import": "./dist/lang-codes.js",
26
+ "types": "./dist/lang-codes.d.ts",
27
+ "development": "./src/lang-codes.ts"
28
+ },
29
+ "./kinds": {
30
+ "import": "./dist/kinds.js",
31
+ "types": "./dist/kinds.d.ts",
32
+ "development": "./src/kinds.ts"
33
+ },
34
+ "./seo": {
35
+ "import": "./dist/seo.js",
36
+ "types": "./dist/seo.d.ts",
37
+ "development": "./src/seo.ts"
38
+ },
39
+ "./style": {
40
+ "import": "./dist/style.js",
41
+ "types": "./dist/style.d.ts",
42
+ "development": "./src/style.ts"
43
+ },
44
+ "./base-css": {
45
+ "import": "./dist/base-css.js",
46
+ "types": "./dist/base-css.d.ts",
47
+ "development": "./src/base-css.ts"
48
+ },
49
+ "./theme": {
50
+ "import": "./dist/theme.js",
51
+ "types": "./dist/theme.d.ts",
52
+ "development": "./src/theme.ts"
53
+ },
54
+ "./theme-toggle": {
55
+ "import": "./dist/components/WrThemeToggle.js",
56
+ "types": "./dist/components/WrThemeToggle.d.ts",
57
+ "development": "./src/components/WrThemeToggle.tsx"
58
+ },
59
+ "./seo-react": {
60
+ "import": "./dist/seo-react.js",
61
+ "types": "./dist/seo-react.d.ts",
62
+ "development": "./src/seo-react.tsx"
63
+ },
64
+ "./not-found": {
65
+ "import": "./dist/not-found.js",
66
+ "types": "./dist/not-found.d.ts",
67
+ "development": "./src/not-found.tsx"
68
+ },
69
+ "./localized": {
70
+ "import": "./dist/localized.js",
71
+ "types": "./dist/localized.d.ts",
72
+ "development": "./src/localized.ts"
73
+ },
74
+ "./site-env": {
75
+ "import": "./dist/site-env.js",
76
+ "types": "./dist/site-env.d.ts",
77
+ "development": "./src/site-env.ts"
78
+ },
79
+ "./form-react": {
80
+ "import": "./dist/form-react.js",
81
+ "types": "./dist/form-react.d.ts",
82
+ "development": "./src/form-react.tsx"
83
+ },
84
+ "./text-react": {
85
+ "import": "./dist/text-react.js",
86
+ "types": "./dist/text-react.d.ts",
87
+ "development": "./src/text-react.tsx"
88
+ },
89
+ "./form": {
90
+ "import": "./dist/form.js",
91
+ "types": "./dist/form.d.ts",
92
+ "development": "./src/form.ts"
12
93
  }
13
94
  },
14
95
  "files": [
15
- "dist"
96
+ "dist",
97
+ "!dist/**/*.map"
16
98
  ],
17
99
  "scripts": {
18
- "build": "tsc",
100
+ "build": "tsc && cp src/index.css dist/index.css",
19
101
  "dev": "tsc --watch"
20
102
  },
21
103
  "dependencies": {
22
- "hls.js": "^1.5.0"
104
+ "altcha": "^2.3.0",
105
+ "hls.js": "^1.5.0",
106
+ "react-router-dom": "^7.18.4"
23
107
  },
24
108
  "peerDependencies": {
25
109
  "react": ">=19",
@@ -28,7 +112,9 @@
28
112
  "devDependencies": {
29
113
  "@types/react": "^19.0.0",
30
114
  "react": "^19.0.0",
31
- "react-router": "^8.0.0",
32
115
  "typescript": "^5.5.0"
116
+ },
117
+ "publishConfig": {
118
+ "access": "public"
33
119
  }
34
- }
120
+ }
@@ -1 +0,0 @@
1
- {"version":3,"file":"WrButton.d.ts","sourceRoot":"","sources":["../src/WrButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,gBAAgB;IACtB,EAAE,EAAE,MAAM,CAAC;CACd;AAED,KAAK,aAAa,GAAG,gBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,CAAC;AAE7F,wBAAgB,QAAQ,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,GAAG,KAAK,CAAC,YAAY,CAQtF"}
package/dist/WrButton.js DELETED
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useWrPage } from './WrPageContext';
3
- export function WrButton({ id, children, ...props }) {
4
- const config = useWrPage(id);
5
- return (_jsx("button", { "data-wr-id": id, "data-wr-type": "button", ...props, children: config?.content ?? children }));
6
- }
7
- //# sourceMappingURL=WrButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WrButton.js","sourceRoot":"","sources":["../src/WrButton.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAS5C,MAAM,UAAU,QAAQ,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAiB;IAC9D,MAAM,MAAM,GAAG,SAAS,CAAC,EAAE,CAA+B,CAAC;IAE3D,OAAO,CACH,+BAAoB,EAAE,kBAAe,QAAQ,KAAK,KAAK,YAClD,MAAM,EAAE,OAAO,IAAI,QAAQ,GACvB,CACZ,CAAC;AACN,CAAC"}
package/dist/WrImage.d.ts DELETED
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- interface WrImageOwnProps {
3
- id: string;
4
- }
5
- type WrImageProps = WrImageOwnProps & Omit<React.ComponentPropsWithoutRef<'img'>, 'id'>;
6
- export declare function WrImage({ id, ...props }: WrImageProps): React.ReactElement;
7
- export {};
8
- //# sourceMappingURL=WrImage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WrImage.d.ts","sourceRoot":"","sources":["../src/WrImage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,eAAe;IAAG,EAAE,EAAE,MAAM,CAAC;CAAE;AACzC,KAAK,YAAY,GAAG,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAC;AAExF,wBAAgB,OAAO,CAAC,EAAE,EAAE,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,GAAG,KAAK,CAAC,YAAY,CAG1E"}
package/dist/WrImage.js DELETED
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useWrPage } from './WrPageContext';
3
- export function WrImage({ id, ...props }) {
4
- const config = useWrPage(id);
5
- return _jsx("img", { src: config?.src, alt: config?.alt ?? '', "data-wr-id": id, "data-wr-type": "image", ...props });
6
- }
7
- //# sourceMappingURL=WrImage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WrImage.js","sourceRoot":"","sources":["../src/WrImage.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAM5C,MAAM,UAAU,OAAO,CAAC,EAAE,EAAE,EAAE,GAAG,KAAK,EAAgB;IAClD,MAAM,MAAM,GAAG,SAAS,CAAC,EAAE,CAA8B,CAAC;IAC1D,OAAO,cAAK,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,gBAAc,EAAE,kBAAe,OAAO,KAAK,KAAK,GAAI,CAAC;AAC7G,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"WrLink.d.ts","sourceRoot":"","sources":["../src/WrLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,UAAU,cAAc;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,KAAK,WAAW,GAAG,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;AAEpF,wBAAgB,MAAM,CAAC,EAAE,EAAE,EAAE,IAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,GAAG,KAAK,CAAC,YAAY,CAoB3G"}
package/dist/WrLink.js DELETED
@@ -1,15 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Link } from 'react-router';
3
- import { useWrPage } from './WrPageContext';
4
- export function WrLink({ id, href = '#', children, target, rel, ...props }) {
5
- const config = useWrPage(id);
6
- const resolvedHref = config?.href ?? href ?? '#';
7
- const content = config?.content;
8
- const inner = content ? _jsx("span", { dangerouslySetInnerHTML: { __html: content } }) : children;
9
- const external = !!target || resolvedHref.startsWith('http');
10
- if (external) {
11
- return (_jsx("a", { href: resolvedHref, target: target, rel: rel, "data-wr-id": id, "data-wr-type": "link", ...props, children: inner }));
12
- }
13
- return (_jsx(Link, { to: resolvedHref, "data-wr-id": id, "data-wr-type": "link", ...props, children: inner }));
14
- }
15
- //# sourceMappingURL=WrLink.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WrLink.js","sourceRoot":"","sources":["../src/WrLink.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAW5C,MAAM,UAAU,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,GAAG,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,EAAe;IACnF,MAAM,MAAM,GAAG,SAAS,CAAC,EAAE,CAA6B,CAAC;IACzD,MAAM,YAAY,GAAG,MAAM,EAAE,IAAI,IAAI,IAAI,IAAI,GAAG,CAAC;IACjD,MAAM,OAAO,GAAG,MAAM,EAAE,OAAO,CAAC;IAEhC,MAAM,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,eAAM,uBAAuB,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,GAAI,CAAC,CAAC,CAAC,QAAQ,CAAC;IAE1F,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,IAAI,YAAY,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAC7D,IAAI,QAAQ,EAAE,CAAC;QACX,OAAO,CACH,YAAG,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,gBAAc,EAAE,kBAAe,MAAM,KAAK,KAAK,YACzF,KAAK,GACN,CACP,CAAC;IACN,CAAC;IACD,OAAO,CACH,KAAC,IAAI,IAAC,EAAE,EAAE,YAAY,gBAAc,EAAE,kBAAe,MAAM,KAAK,KAAK,YAChE,KAAK,GACH,CACV,CAAC;AACN,CAAC"}
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import type { WrPageConfig, WrElementConfig } from './types.js';
3
- export declare function WrPageProvider({ config, children }: {
4
- config: WrPageConfig;
5
- children: React.ReactNode;
6
- }): React.JSX.Element;
7
- export declare function useWrPage(id: string): WrElementConfig | undefined;
8
- //# sourceMappingURL=WrPageContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WrPageContext.d.ts","sourceRoot":"","sources":["../src/WrPageContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAIhE,wBAAgB,cAAc,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE;IAAE,MAAM,EAAE,YAAY,CAAC;IAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,qBAEvG;AAED,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAGjE"}
@@ -1,11 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { createContext, useContext } from 'react';
3
- const WrPageContext = createContext(null);
4
- export function WrPageProvider({ config, children }) {
5
- return _jsx(WrPageContext.Provider, { value: config, children: children });
6
- }
7
- export function useWrPage(id) {
8
- const ctx = useContext(WrPageContext);
9
- return ctx?.[id];
10
- }
11
- //# sourceMappingURL=WrPageContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WrPageContext.js","sourceRoot":"","sources":["../src/WrPageContext.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGzD,MAAM,aAAa,GAAG,aAAa,CAAsB,IAAI,CAAC,CAAC;AAE/D,MAAM,UAAU,cAAc,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAuD;IACpG,OAAO,KAAC,aAAa,CAAC,QAAQ,IAAC,KAAK,EAAE,MAAM,YAAG,QAAQ,GAA0B,CAAC;AACtF,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,EAAU;IAChC,MAAM,GAAG,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;IACtC,OAAO,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;AACrB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"WrSection.d.ts","sourceRoot":"","sources":["../src/WrSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,KAAK,UAAU,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAC;AAEjG,UAAU,iBAAiB;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,CAAC,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,KAAK,cAAc,GAAG,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,CAAC;AAExF,wBAAgB,SAAS,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,GAAe,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,GAAG,KAAK,CAAC,YAAY,CAO9G"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"WrSection.js","sourceRoot":"","sources":["../src/WrSection.tsx"],"names":[],"mappings":";AAYA,MAAM,UAAU,SAAS,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,GAAG,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAkB;IAEtF,OAAO,CACH,KAAC,GAAG,kBAAa,EAAE,kBAAe,SAAS,KAAK,KAAK,YAChD,QAAQ,GACP,CACT,CAAC;AACN,CAAC"}
package/dist/WrText.d.ts DELETED
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- type AllowedTag = 'div' | 'span' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'label';
3
- interface WrTextOwnProps {
4
- id: string;
5
- tag?: AllowedTag;
6
- html?: string;
7
- }
8
- type WrTextProps = WrTextOwnProps & Omit<React.HTMLAttributes<HTMLElement>, 'id' | 'dangerouslySetInnerHTML'>;
9
- export declare function WrText({ id, tag: Tag, html: fallback, ...props }: WrTextProps): React.ReactElement;
10
- export {};
11
- //# sourceMappingURL=WrText.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WrText.d.ts","sourceRoot":"","sources":["../src/WrText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,KAAK,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,GAAG,GAAG,OAAO,CAAC;AAE3F,UAAU,cAAc;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,CAAC,EAAE,UAAU,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,KAAK,WAAW,GAAG,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,IAAI,GAAG,yBAAyB,CAAC,CAAC;AAE9G,wBAAgB,MAAM,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,GAAW,EAAE,IAAI,EAAE,QAAa,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,GAAG,KAAK,CAAC,YAAY,CAK/G"}
package/dist/WrText.js DELETED
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useWrPage } from './WrPageContext';
3
- export function WrText({ id, tag: Tag = 'div', html: fallback = '', ...props }) {
4
- const config = useWrPage(id);
5
- return (_jsx(Tag, { "data-wr-id": id, "data-wr-type": "text", dangerouslySetInnerHTML: { __html: config?.content ?? fallback }, ...props }));
6
- }
7
- //# sourceMappingURL=WrText.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WrText.js","sourceRoot":"","sources":["../src/WrText.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAa5C,MAAM,UAAU,MAAM,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,GAAG,KAAK,EAAE,IAAI,EAAE,QAAQ,GAAG,EAAE,EAAE,GAAG,KAAK,EAAe;IACvF,MAAM,MAAM,GAAG,SAAS,CAAC,EAAE,CAA6B,CAAC;IACzD,OAAO,CACH,KAAC,GAAG,kBAAa,EAAE,kBAAe,MAAM,EAAC,uBAAuB,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,IAAI,QAAQ,EAAE,KAAM,KAAK,GAAI,CAC3H,CAAC;AACN,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"WrVideo.d.ts","sourceRoot":"","sources":["../src/WrVideo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAKjD,UAAU,eAAe;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,KAAK,YAAY,GAAG,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC;AAE1F,wBAAgB,OAAO,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,QAAgB,EAAE,KAAa,EAAE,IAAY,EAAE,QAAgB,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,GAAG,KAAK,CAAC,YAAY,CAmDvJ"}
package/dist/WrVideo.js DELETED
@@ -1,42 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useEffect, useRef } from 'react';
3
- import Hls from 'hls.js';
4
- import { useWrPage } from './WrPageContext';
5
- export function WrVideo({ id, src, autoPlay = false, muted = false, loop = false, controls = false, style, ...props }) {
6
- const config = useWrPage(id);
7
- const resolvedSrc = config?.src ?? src;
8
- const videoRef = useRef(null);
9
- useEffect(() => {
10
- const video = videoRef.current;
11
- if (!video || !resolvedSrc)
12
- return;
13
- const onEnded = () => {
14
- if (loop) {
15
- video.currentTime = 0;
16
- video.play().catch(() => { });
17
- }
18
- };
19
- video.addEventListener('ended', onEnded);
20
- if (Hls.isSupported()) {
21
- const hls = new Hls({ enableWorker: true });
22
- hls.loadSource(resolvedSrc);
23
- hls.attachMedia(video);
24
- hls.on(Hls.Events.MANIFEST_PARSED, () => {
25
- if (autoPlay)
26
- video.play().catch(() => { });
27
- });
28
- return () => {
29
- hls.destroy();
30
- video.removeEventListener('ended', onEnded);
31
- };
32
- }
33
- if (video.canPlayType('application/vnd.apple.mpegurl')) {
34
- video.src = resolvedSrc;
35
- if (autoPlay)
36
- video.play().catch(() => { });
37
- }
38
- return () => video.removeEventListener('ended', onEnded);
39
- }, [resolvedSrc, autoPlay, loop]);
40
- return (_jsx("video", { ref: videoRef, ...props, muted: muted, controls: controls, "data-wr-id": id, "data-wr-type": "video", style: style }));
41
- }
42
- //# sourceMappingURL=WrVideo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WrVideo.js","sourceRoot":"","sources":["../src/WrVideo.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,GAAG,MAAM,QAAQ,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAU5C,MAAM,UAAU,OAAO,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,QAAQ,GAAG,KAAK,EAAE,KAAK,GAAG,KAAK,EAAE,IAAI,GAAG,KAAK,EAAE,QAAQ,GAAG,KAAK,EAAE,KAAK,EAAE,GAAG,KAAK,EAAgB;IAC/H,MAAM,MAAM,GAAG,SAAS,CAAC,EAAE,CAA8B,CAAC;IAC1D,MAAM,WAAW,GAAG,MAAM,EAAE,GAAG,IAAI,GAAG,CAAC;IAEvC,MAAM,QAAQ,GAAG,MAAM,CAAmB,IAAI,CAAC,CAAC;IAEhD,SAAS,CAAC,GAAG,EAAE;QACX,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC;QAC/B,IAAI,CAAC,KAAK,IAAI,CAAC,WAAW;YAAE,OAAO;QAEnC,MAAM,OAAO,GAAG,GAAG,EAAE;YACjB,IAAI,IAAI,EAAE,CAAC;gBACP,KAAK,CAAC,WAAW,GAAG,CAAC,CAAC;gBACtB,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;YAClC,CAAC;QACL,CAAC,CAAC;QAEF,KAAK,CAAC,gBAAgB,CAAC,OA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ridge(editorOrigin: string): void;
2
- //# sourceMappingURL=bridge.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../src/bridge.ts"],"names":[],"mappings":"AA0CA,wBAAgB,YAAY,CAAC,YAAY,EAAE,MAAM,QA+FhD"}
package/dist/bridge.js DELETED
@@ -1,110 +0,0 @@
1
- // packages/core/src/bridge.ts
2
- function getRect(el) {
3
- const r = el.getBoundingClientRect();
4
- return {
5
- top: r.top + window.scrollY,
6
- left: r.left + window.scrollX,
7
- width: r.width,
8
- height: r.height,
9
- };
10
- }
11
- function parseEl(el) {
12
- return {
13
- type: el.getAttribute("data-wr-type") ?? "unknown",
14
- id: el.getAttribute("data-wr-id"),
15
- };
16
- }
17
- function post(editorOrigin, data) {
18
- window.parent.postMessage(data, editorOrigin);
19
- }
20
- function scan(editorOrigin) {
21
- const elements = Array.from(document.querySelectorAll("[data-wr-id]")).map(parseEl);
22
- post(editorOrigin, { type: "wr:scan", elements });
23
- }
24
- export function initWrBridge(editorOrigin) {
25
- if (window === window.parent)
26
- return; // non è in un iframe
27
- function onClick(e) {
28
- const el = e.target.closest("[data-wr-id]");
29
- if (!el)
30
- return;
31
- e.preventDefault();
32
- post(editorOrigin, {
33
- type: "wr:select",
34
- element: parseEl(el),
35
- rect: getRect(el),
36
- });
37
- }
38
- function onMouseOver(e) {
39
- const el = e.target.closest("[data-wr-id]");
40
- if (!el)
41
- return;
42
- post(editorOrigin, {
43
- type: "wr:hover",
44
- element: parseEl(el),
45
- rect: getRect(el),
46
- });
47
- }
48
- function onMouseLeave() {
49
- post(editorOrigin, { type: "wr:hover:leave" });
50
- }
51
- function onMessage(e) {
52
- if (e.origin !== editorOrigin)
53
- return;
54
- const { type, element } = e.data ?? {};
55
- if (type === "wr:highlight") {
56
- document
57
- .querySelectorAll("[data-wr-highlighted]")
58
- .forEach((el) => el.removeAttribute("data-wr-highlighted"));
59
- if (element?.id) {
60
- const target = document.querySelector(`[data-wr-id="${element.id}"]`);
61
- if (target) {
62
- target.setAttribute("data-wr-highlighted", "true");
63
- post(editorOrigin, {
64
- type: "wr:select",
65
- element: parseEl(target),
66
- rect: getRect(target),
67
- });
68
- }
69
- }
70
- }
71
- if (type === "wr:highlight:clear") {
72
- document
73
- .querySelectorAll("[data-wr-highlighted]")
74
- .forEach((el) => el.removeAttribute("data-wr-highlighted"));
75
- }
76
- if (type === "wr:hover:panel" && element?.id) {
77
- const target = document.querySelector(`[data-wr-id="${element.id}"]`);
78
- target?.scrollIntoView({ behavior: "smooth", block: "nearest" });
79
- }
80
- if (type === "wr:navigate:push" && typeof e.data.pathname === "string") {
81
- history.pushState({}, "", e.data.pathname);
82
- sendNav();
83
- }
84
- }
85
- scan(editorOrigin);
86
- const observer = new MutationObserver(() => scan(editorOrigin));
87
- observer.observe(document.body, { childList: true, subtree: true });
88
- document.addEventListener("click", onClick);
89
- document.addEventListener("mouseover", onMouseOver);
90
- document.addEventListener("mouseleave", onMouseLeave);
91
- window.addEventListener("message", onMessage);
92
- function sendNav() {
93
- const pathname = window.location.pathname.replace(/^\/preview/, "") || "/";
94
- post(editorOrigin, { type: "wr:navigate", pathname });
95
- }
96
- // monkey-patch history to catch React Router
97
- const _push = history.pushState.bind(history);
98
- const _replace = history.replaceState.bind(history);
99
- history.pushState = (...args) => {
100
- _push(...args);
101
- sendNav();
102
- };
103
- history.replaceState = (...args) => {
104
- _replace(...args);
105
- sendNav();
106
- };
107
- window.addEventListener("popstate", sendNav);
108
- sendNav();
109
- }
110
- //# sourceMappingURL=bridge.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bridge.js","sourceRoot":"","sources":["../src/bridge.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAc9B,SAAS,OAAO,CAAC,EAAW;IACxB,MAAM,CAAC,GAAG,EAAE,CAAC,qBAAqB,EAAE,CAAC;IACrC,OAAO;QACH,GAAG,EAAE,CAAC,CAAC,GAAG,GAAG,MAAM,CAAC,OAAO;QAC3B,IAA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{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEjG,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAE5D,MAAM,WAAW,aAAa;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAEzD,MAAM,MAAM,eAAe,GAAG,aAAa,CAAC;AAG5C,MAAM,WAAW,YAAY;IAAG,OAAO,EAAE,MAAM,CAAC;CAAE;AAClD,MAAM,WAAW,aAAa;IAAG,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CAAE;AAC7D,MAAM,WAAW,aAAa;IAAG,GAAG,EAAE,MAAM,CAAC;CAAE;AAC/C,MAAM,WAAW,YAAY;IAAG,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CAAE;AACjE,MAAM,WAAW,cAAc;IAAG,OAAO,EAAE,MAAM,CAAC;CAAE;AAGpD,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACpD,MAAM,WAAW,UAAU;IACvB,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa,CAAC;CACtC"}
package/dist/types.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
File without changes
File without changes