@plasmicpkgs/plasmic-basic-components 0.0.9 → 0.0.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/dist/Data.d.ts +21 -14
- package/dist/Embed.d.ts +0 -1
- package/dist/EmbedCss.d.ts +0 -1
- package/dist/Iframe.d.ts +0 -1
- package/dist/plasmic-basic-components.cjs.development.js +85 -142
- package/dist/plasmic-basic-components.cjs.development.js.map +1 -1
- package/dist/plasmic-basic-components.cjs.production.min.js +1 -1
- package/dist/plasmic-basic-components.cjs.production.min.js.map +1 -1
- package/dist/plasmic-basic-components.esm.js +88 -144
- package/dist/plasmic-basic-components.esm.js.map +1 -1
- package/package.json +5 -4
package/dist/Data.d.ts
CHANGED
|
@@ -1,19 +1,26 @@
|
|
|
1
|
-
import { ComponentMeta } from "@plasmicapp/host";
|
|
1
|
+
import { ComponentMeta, SelectorDict, useSelectors as _useSelectors, useSelector as _useSelector, DataProvider as _DataProvider, DataProviderProps, applySelector as _applySelector, useDataEnv as _useDataEnv } from "@plasmicapp/host";
|
|
2
2
|
import registerComponent from "@plasmicapp/host/registerComponent";
|
|
3
3
|
import React, { ComponentProps, ReactNode } from "react";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated This should be imported from @plasmicapp/host instead.
|
|
6
|
+
*/
|
|
7
|
+
export declare const applySelector: typeof _applySelector;
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated This should be imported from @plasmicapp/host instead.
|
|
10
|
+
*/
|
|
11
|
+
export declare const useSelector: typeof _useSelector;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated This should be imported from @plasmicapp/host instead.
|
|
14
|
+
*/
|
|
15
|
+
export declare const useSelectors: typeof _useSelectors;
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated This should be imported from @plasmicapp/host instead.
|
|
18
|
+
*/
|
|
19
|
+
export declare const useDataEnv: typeof _useDataEnv;
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated This should be imported from @plasmicapp/host instead.
|
|
22
|
+
*/
|
|
23
|
+
export declare const DataProvider: typeof _DataProvider;
|
|
17
24
|
export interface CommonDynamicProps {
|
|
18
25
|
className?: string;
|
|
19
26
|
tag?: string;
|
package/dist/Embed.d.ts
CHANGED
package/dist/EmbedCss.d.ts
CHANGED
package/dist/Iframe.d.ts
CHANGED
|
@@ -42,138 +42,70 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
42
42
|
return target;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
49
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
50
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
51
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function _arrayLikeToArray(arr, len) {
|
|
55
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
56
|
-
|
|
57
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
58
|
-
|
|
59
|
-
return arr2;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
|
63
|
-
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
64
|
-
if (it) return (it = it.call(o)).next.bind(it);
|
|
65
|
-
|
|
66
|
-
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
67
|
-
if (it) o = it;
|
|
68
|
-
var i = 0;
|
|
69
|
-
return function () {
|
|
70
|
-
if (i >= o.length) return {
|
|
71
|
-
done: true
|
|
72
|
-
};
|
|
73
|
-
return {
|
|
74
|
-
done: false,
|
|
75
|
-
value: o[i++]
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
var tuple = function tuple() {
|
|
84
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
85
|
-
args[_key] = arguments[_key];
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
return args;
|
|
89
|
-
};
|
|
90
|
-
function ensure(x) {
|
|
91
|
-
if (x === null || x === undefined) {
|
|
92
|
-
debugger;
|
|
93
|
-
throw new Error("Value must not be undefined or null");
|
|
94
|
-
} else {
|
|
95
|
-
return x;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
var DataContext = /*#__PURE__*/React.createContext(undefined);
|
|
45
|
+
var _excluded = ["tag", "className", "children", "propSelectors"],
|
|
46
|
+
_excluded2 = ["selector", "propSelectors"],
|
|
47
|
+
_excluded3 = ["selector", "propSelectors"];
|
|
100
48
|
var thisModule = "@plasmicpkgs/plasmic-basic-components";
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
var curData = rawData;
|
|
49
|
+
/**
|
|
50
|
+
* @deprecated This should be imported from @plasmicapp/host instead.
|
|
51
|
+
*/
|
|
107
52
|
|
|
108
|
-
|
|
109
|
-
|
|
53
|
+
var applySelector = function applySelector() {
|
|
54
|
+
console.warn("DEPRECATED: Import applySelector from @plasmicapp/host instead.");
|
|
55
|
+
return host.applySelector.apply(void 0, arguments);
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* @deprecated This should be imported from @plasmicapp/host instead.
|
|
59
|
+
*/
|
|
110
60
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
61
|
+
var useSelector = function useSelector() {
|
|
62
|
+
console.warn("DEPRECATED: Import useSelector from @plasmicapp/host instead.");
|
|
63
|
+
return host.useSelector.apply(void 0, arguments);
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* @deprecated This should be imported from @plasmicapp/host instead.
|
|
67
|
+
*/
|
|
114
68
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
if (selectors === void 0) {
|
|
123
|
-
selectors = {};
|
|
124
|
-
}
|
|
69
|
+
var useSelectors = function useSelectors() {
|
|
70
|
+
console.warn("DEPRECATED: Import useSelectors from @plasmicapp/host instead.");
|
|
71
|
+
return host.useSelectors.apply(void 0, arguments);
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* @deprecated This should be imported from @plasmicapp/host instead.
|
|
75
|
+
*/
|
|
125
76
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
selector = _ref2[1];
|
|
134
|
-
return tuple(key, applySelector(rawData, selector));
|
|
135
|
-
}));
|
|
136
|
-
}
|
|
137
|
-
function useDataEnv() {
|
|
138
|
-
return React.useContext(DataContext);
|
|
139
|
-
}
|
|
140
|
-
function DataProvider(_ref3) {
|
|
141
|
-
var _useDataEnv;
|
|
77
|
+
var useDataEnv = function useDataEnv() {
|
|
78
|
+
console.warn("DEPRECATED: Import useDataEnv from @plasmicapp/host instead.");
|
|
79
|
+
return host.useDataEnv.apply(void 0, arguments);
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* @deprecated This should be imported from @plasmicapp/host instead.
|
|
83
|
+
*/
|
|
142
84
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
85
|
+
var DataProvider = function DataProvider() {
|
|
86
|
+
console.warn("DEPRECATED: Import DataProvider from @plasmicapp/host instead.");
|
|
87
|
+
return host.DataProvider.apply(void 0, arguments);
|
|
88
|
+
};
|
|
89
|
+
function DynamicElement(_ref) {
|
|
90
|
+
var _ref$tag = _ref.tag,
|
|
91
|
+
tag = _ref$tag === void 0 ? "div" : _ref$tag,
|
|
92
|
+
className = _ref.className,
|
|
93
|
+
children = _ref.children,
|
|
94
|
+
propSelectors = _ref.propSelectors,
|
|
95
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
147
96
|
|
|
148
|
-
|
|
149
|
-
return React__default.createElement(React__default.Fragment, null, children);
|
|
150
|
-
} else {
|
|
151
|
-
var _extends2;
|
|
97
|
+
var computed = host.useSelectors(propSelectors);
|
|
152
98
|
|
|
153
|
-
return React__default.createElement(DataContext.Provider, {
|
|
154
|
-
value: _extends({}, existingEnv, (_extends2 = {}, _extends2[name] = data, _extends2))
|
|
155
|
-
}, children);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
function DynamicElement(_ref4) {
|
|
159
|
-
var _ref4$tag = _ref4.tag,
|
|
160
|
-
tag = _ref4$tag === void 0 ? "div" : _ref4$tag,
|
|
161
|
-
className = _ref4.className,
|
|
162
|
-
children = _ref4.children,
|
|
163
|
-
propSelectors = _ref4.propSelectors,
|
|
164
|
-
props = _objectWithoutPropertiesLoose(_ref4, ["tag", "className", "children", "propSelectors"]);
|
|
165
|
-
|
|
166
|
-
var computed = useSelectors(propSelectors);
|
|
167
99
|
return React.createElement(tag, _extends({
|
|
168
100
|
children: children
|
|
169
101
|
}, props, computed, {
|
|
170
102
|
className: className + " " + computed.className
|
|
171
103
|
}));
|
|
172
104
|
}
|
|
173
|
-
function DynamicText(
|
|
174
|
-
var selector =
|
|
175
|
-
propSelectors =
|
|
176
|
-
props = _objectWithoutPropertiesLoose(
|
|
105
|
+
function DynamicText(_ref2) {
|
|
106
|
+
var selector = _ref2.selector,
|
|
107
|
+
propSelectors = _ref2.propSelectors,
|
|
108
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
177
109
|
|
|
178
110
|
return React__default.createElement(DynamicElement, Object.assign({}, props, {
|
|
179
111
|
propSelectors: _extends({}, propSelectors, {
|
|
@@ -181,10 +113,10 @@ function DynamicText(_ref5) {
|
|
|
181
113
|
})
|
|
182
114
|
}), "(DynamicText requires a selector)");
|
|
183
115
|
}
|
|
184
|
-
function DynamicImage(
|
|
185
|
-
var selector =
|
|
186
|
-
propSelectors =
|
|
187
|
-
props = _objectWithoutPropertiesLoose(
|
|
116
|
+
function DynamicImage(_ref3) {
|
|
117
|
+
var selector = _ref3.selector,
|
|
118
|
+
propSelectors = _ref3.propSelectors,
|
|
119
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded3);
|
|
188
120
|
|
|
189
121
|
return React__default.createElement(DynamicElement, Object.assign({
|
|
190
122
|
tag: "img",
|
|
@@ -200,21 +132,21 @@ function DynamicImage(_ref6) {
|
|
|
200
132
|
src: "https://studio.plasmic.app/static/img/placeholder.png"
|
|
201
133
|
}));
|
|
202
134
|
}
|
|
203
|
-
function DynamicRepeater(
|
|
204
|
-
var
|
|
205
|
-
|
|
206
|
-
var children =
|
|
207
|
-
loopItemName =
|
|
208
|
-
keySelector =
|
|
209
|
-
selector =
|
|
210
|
-
data =
|
|
135
|
+
function DynamicRepeater(_ref4) {
|
|
136
|
+
var _ref5;
|
|
137
|
+
|
|
138
|
+
var children = _ref4.children,
|
|
139
|
+
loopItemName = _ref4.loopItemName,
|
|
140
|
+
keySelector = _ref4.keySelector,
|
|
141
|
+
selector = _ref4.selector,
|
|
142
|
+
data = _ref4.data;
|
|
211
143
|
// Defaults to an array of three items.
|
|
212
|
-
var finalData = (
|
|
144
|
+
var finalData = (_ref5 = data != null ? data : host.useSelector(selector)) != null ? _ref5 : [1, 2, 3];
|
|
213
145
|
return React__default.createElement(React__default.Fragment, null, finalData == null ? void 0 : finalData.map == null ? void 0 : finalData.map(function (item, index) {
|
|
214
|
-
var
|
|
146
|
+
var _applySelector2;
|
|
215
147
|
|
|
216
|
-
return React__default.createElement(DataProvider, {
|
|
217
|
-
key: (
|
|
148
|
+
return React__default.createElement(host.DataProvider, {
|
|
149
|
+
key: (_applySelector2 = host.applySelector(item, keySelector)) != null ? _applySelector2 : index,
|
|
218
150
|
name: loopItemName,
|
|
219
151
|
data: item
|
|
220
152
|
}, host.repeatedElement(index === 0, children));
|
|
@@ -290,9 +222,9 @@ var dataProviderMeta = {
|
|
|
290
222
|
};
|
|
291
223
|
function registerDataProvider(loader, customDataProviderMeta) {
|
|
292
224
|
if (loader) {
|
|
293
|
-
loader.registerComponent(DataProvider, customDataProviderMeta != null ? customDataProviderMeta : dataProviderMeta);
|
|
225
|
+
loader.registerComponent(host.DataProvider, customDataProviderMeta != null ? customDataProviderMeta : dataProviderMeta);
|
|
294
226
|
} else {
|
|
295
|
-
registerComponent(DataProvider, customDataProviderMeta != null ? customDataProviderMeta : dataProviderMeta);
|
|
227
|
+
registerComponent(host.DataProvider, customDataProviderMeta != null ? customDataProviderMeta : dataProviderMeta);
|
|
296
228
|
}
|
|
297
229
|
}
|
|
298
230
|
var dynamicPropsWithoutTag = {
|
|
@@ -367,6 +299,15 @@ function registerDynamicImage(loader, customDynamicImageMeta) {
|
|
|
367
299
|
}
|
|
368
300
|
}
|
|
369
301
|
|
|
302
|
+
function ensure(x) {
|
|
303
|
+
if (x === null || x === undefined) {
|
|
304
|
+
debugger;
|
|
305
|
+
throw new Error("Value must not be undefined or null");
|
|
306
|
+
} else {
|
|
307
|
+
return x;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
370
311
|
function Embed(_ref) {
|
|
371
312
|
var className = _ref.className,
|
|
372
313
|
code = _ref.code,
|
|
@@ -403,8 +344,10 @@ var embedMeta = {
|
|
|
403
344
|
importPath: "@plasmicpkgs/plasmic-basic-components",
|
|
404
345
|
props: {
|
|
405
346
|
code: {
|
|
406
|
-
type: "
|
|
407
|
-
|
|
347
|
+
type: "code",
|
|
348
|
+
lang: "html",
|
|
349
|
+
defaultValueHint: "<!-- HTML snippet -->",
|
|
350
|
+
description: "The HTML code to be embedded"
|
|
408
351
|
},
|
|
409
352
|
hideInEditor: {
|
|
410
353
|
type: "boolean",
|
|
@@ -663,13 +606,14 @@ function EmbedCss(_ref) {
|
|
|
663
606
|
}
|
|
664
607
|
var embedCssMeta = {
|
|
665
608
|
name: "hostless-embed-css",
|
|
666
|
-
displayName: "
|
|
609
|
+
displayName: "Embed Css",
|
|
667
610
|
importName: "EmbedCss",
|
|
668
611
|
importPath: "@plasmicpkgs/plasmic-basic-components",
|
|
669
612
|
props: {
|
|
670
613
|
css: {
|
|
671
|
-
type: "
|
|
672
|
-
|
|
614
|
+
type: "code",
|
|
615
|
+
lang: "css",
|
|
616
|
+
defaultValueHint: "/* CSS snippet */",
|
|
673
617
|
description: "CSS rules to be inserted"
|
|
674
618
|
}
|
|
675
619
|
}
|
|
@@ -682,7 +626,6 @@ function registerEmbedCss(loader, customEmbedCssMeta) {
|
|
|
682
626
|
}
|
|
683
627
|
}
|
|
684
628
|
|
|
685
|
-
exports.DataContext = DataContext;
|
|
686
629
|
exports.DataProvider = DataProvider;
|
|
687
630
|
exports.DynamicElement = DynamicElement;
|
|
688
631
|
exports.DynamicImage = DynamicImage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plasmic-basic-components.cjs.development.js","sources":["../src/common.ts","../src/Data.tsx","../src/Embed.tsx","../src/Iframe.tsx","../src/ScrollRevealer.tsx","../src/Video.tsx","../src/EmbedCss.tsx"],"sourcesContent":["export const tuple = <T extends any[]>(...args: T): T => args;\n\nexport function ensure<T>(x: T | null | undefined): T {\n if (x === null || x === undefined) {\n debugger;\n throw new Error(`Value must not be undefined or null`);\n } else {\n return x;\n }\n}\n","import { ComponentMeta, repeatedElement } from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, {\n ComponentProps,\n createContext,\n createElement,\n ReactNode,\n useContext,\n} from \"react\";\nimport { tuple } from \"./common\";\n\nexport type DataDict = Record<string, any>;\n\nexport const DataContext = createContext<DataDict | undefined>(undefined);\n\nconst thisModule = \"@plasmicpkgs/plasmic-basic-components\";\n\nexport function applySelector(\n rawData: DataDict | undefined,\n selector: string | undefined\n): any {\n if (!selector) {\n return undefined;\n }\n let curData = rawData;\n for (const key of selector.split(\".\")) {\n curData = curData?.[key];\n }\n return curData;\n}\n\nexport type SelectorDict = Record<string, string | undefined>;\n\nexport function useSelector(selector: string | undefined): any {\n const rawData = useDataEnv();\n return applySelector(rawData, selector);\n}\n\nexport function useSelectors(selectors: SelectorDict = {}): any {\n const rawData = useDataEnv();\n return Object.fromEntries(\n Object.entries(selectors)\n .filter(([key, selector]) => !!key && !!selector)\n .map(([key, selector]) => tuple(key, applySelector(rawData, selector)))\n );\n}\n\nexport function useDataEnv() {\n return useContext(DataContext);\n}\n\nexport interface DataProviderProps {\n name?: string;\n data?: any;\n children?: ReactNode;\n}\n\nexport function DataProvider({ name, data, children }: DataProviderProps) {\n const existingEnv = useDataEnv() ?? {};\n if (!name) {\n return <>{children}</>;\n } else {\n return (\n <DataContext.Provider value={{ ...existingEnv, [name]: data }}>\n {children}\n </DataContext.Provider>\n );\n }\n}\n\nexport interface CommonDynamicProps {\n className?: string;\n tag?: string;\n propSelectors?: SelectorDict;\n}\n\nexport function DynamicElement<\n Tag extends keyof JSX.IntrinsicElements = \"div\"\n>({\n tag = \"div\",\n className,\n children,\n propSelectors,\n ...props\n}: CommonDynamicProps & ComponentProps<Tag>) {\n const computed = useSelectors(propSelectors);\n return createElement(tag, {\n children,\n ...props,\n ...computed,\n className: className + \" \" + computed.className,\n });\n}\n\nexport interface DynamicTextProps extends CommonDynamicProps {\n selector?: string;\n}\n\nexport function DynamicText({\n selector,\n propSelectors,\n ...props\n}: DynamicTextProps) {\n return (\n <DynamicElement\n {...props}\n propSelectors={{ ...propSelectors, children: selector }}\n >\n {/*This is the default text*/}\n (DynamicText requires a selector)\n </DynamicElement>\n );\n}\n\nexport interface DynamicImageProps\n extends CommonDynamicProps,\n ComponentProps<\"img\"> {\n selector?: string;\n}\n\nexport function DynamicImage({\n selector,\n propSelectors,\n ...props\n}: DynamicImageProps) {\n return (\n <DynamicElement<\"img\">\n tag={\"img\"}\n loading={\"lazy\"}\n style={{\n objectFit: \"cover\",\n }}\n {...props}\n propSelectors={{ ...propSelectors, src: selector }}\n // Default image placeholder\n src=\"https://studio.plasmic.app/static/img/placeholder.png\"\n />\n );\n}\n\nexport interface DynamicRepeaterProps {\n children?: ReactNode;\n loopItemName?: string;\n keySelector?: string;\n selector?: string;\n data?: any;\n}\n\nexport function DynamicRepeater({\n children,\n loopItemName,\n keySelector,\n selector,\n data,\n}: DynamicRepeaterProps) {\n // Defaults to an array of three items.\n const finalData = data ?? useSelector(selector) ?? [1, 2, 3];\n return (\n <>\n {finalData?.map?.((item: any, index: number) => (\n <DataProvider\n key={applySelector(item, keySelector) ?? index}\n name={loopItemName}\n data={item}\n >\n {repeatedElement(index === 0, children)}\n </DataProvider>\n ))}\n </>\n );\n}\n\nexport const dynamicRepeaterProps = {\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the array of data to loop over, such as: someVariable.0.someField\",\n },\n loopItemName: {\n type: \"string\",\n defaultValue: \"item\",\n description:\n \"The name of the variable to use to store the current item in the loop\",\n },\n children: \"slot\",\n} as const;\n\nexport const dynamicRepeaterMeta: ComponentMeta<DynamicRepeaterProps> = {\n name: \"hostless-dynamic-repeater\",\n displayName: \"Dynamic Repeater\",\n importName: \"DynamicRepeater\",\n importPath: thisModule,\n props: dynamicRepeaterProps,\n};\n\nexport function registerDynamicRepeater(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicRepeaterMeta?: ComponentMeta<DynamicRepeaterProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicRepeater,\n customDynamicRepeaterMeta ?? dynamicRepeaterMeta\n );\n } else {\n registerComponent(\n DynamicRepeater,\n customDynamicRepeaterMeta ?? dynamicRepeaterMeta\n );\n }\n}\n\nexport const dataProviderMeta: ComponentMeta<DataProviderProps> = {\n name: \"hostless-data-provider\",\n displayName: \"Data Provider\",\n importName: \"DataProvider\",\n importPath: thisModule,\n // description: \"Makes some specified data available to the subtree in a context\",\n props: {\n name: {\n type: \"string\",\n defaultValue: \"celebrities\",\n description: \"The name of the variable to store the data in\",\n },\n data: {\n type: \"object\",\n defaultValue: [\n {\n name: \"Fill Murray\",\n birthYear: 1950,\n profilePicture: [\"https://www.fillmurray.com/200/300\"],\n },\n {\n name: \"Place Cage\",\n birthYear: 1950,\n profilePicture: [\"https://www.placecage.com/200/300\"],\n },\n ],\n },\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"component\",\n name: \"hostless-dynamic-text\",\n props: {\n selector: \"celebrities.0.name\",\n },\n },\n {\n type: \"component\",\n name: \"hostless-dynamic-image\",\n props: {\n selector: \"celebrities.0.profilePicture\",\n },\n },\n ],\n },\n },\n};\n\nexport function registerDataProvider(\n loader?: { registerComponent: typeof registerComponent },\n customDataProviderMeta?: ComponentMeta<DataProviderProps>\n) {\n if (loader) {\n loader.registerComponent(\n DataProvider,\n customDataProviderMeta ?? dataProviderMeta\n );\n } else {\n registerComponent(DataProvider, customDataProviderMeta ?? dataProviderMeta);\n }\n}\n\nconst dynamicPropsWithoutTag = {\n propSelectors: {\n type: \"object\",\n defaultValueHint: {},\n description:\n \"An object whose keys are prop names and values are selector expressions. Use this to set any prop to a dynamic value.\",\n },\n} as const;\n\nconst dynamicProps = {\n ...dynamicPropsWithoutTag,\n tag: {\n type: \"string\",\n defaultValueHint: \"div\",\n description: \"The HTML tag to use\",\n },\n} as const;\n\n// TODO Eventually we'll want to expose all the base HTML properties, but in the nicer way that we do within the studio.\n\nexport const dynamicElementMeta: ComponentMeta<CommonDynamicProps> = {\n name: \"hostless-dynamic-element\",\n displayName: \"Dynamic Element\",\n importName: \"DynamicElement\",\n importPath: thisModule,\n props: { ...dynamicProps, children: \"slot\" },\n};\n\nexport function registerDynamicElement(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicElementMeta?: ComponentMeta<CommonDynamicProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicElement,\n customDynamicElementMeta ?? dynamicElementMeta\n );\n } else {\n registerComponent(\n DynamicElement,\n customDynamicElementMeta ?? dynamicElementMeta\n );\n }\n}\n\nexport const dynamicTextMeta: ComponentMeta<DynamicTextProps> = {\n name: \"hostless-dynamic-text\",\n importName: \"DynamicText\",\n displayName: \"Dynamic Text\",\n importPath: thisModule,\n props: {\n ...dynamicProps,\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the text, such as: someVariable.0.someField\",\n },\n },\n};\n\nexport function registerDynamicText(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicTextMeta?: ComponentMeta<DynamicTextProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicText,\n customDynamicTextMeta ?? dynamicTextMeta\n );\n } else {\n registerComponent(DynamicText, customDynamicTextMeta ?? dynamicTextMeta);\n }\n}\n\nexport const dynamicImageMeta: ComponentMeta<DynamicImageProps> = {\n name: \"hostless-dynamic-image\",\n displayName: \"Dynamic Image\",\n importName: \"DynamicImage\",\n importPath: thisModule,\n props: {\n ...dynamicPropsWithoutTag,\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the image source URL, such as: someVariable.0.someField\",\n },\n },\n};\n\nexport function registerDynamicImage(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicImageMeta?: ComponentMeta<DynamicImageProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicImage,\n customDynamicImageMeta ?? dynamicImageMeta\n );\n } else {\n registerComponent(DynamicImage, customDynamicImageMeta ?? dynamicImageMeta);\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React, { useEffect, useRef } from \"react\";\nimport { ensure } from \"./common\";\n\nexport interface EmbedProps {\n className?: string;\n code: string;\n hideInEditor?: boolean;\n}\n\nexport default function Embed({\n className,\n code,\n hideInEditor = false,\n}: EmbedProps) {\n const rootElt = useRef<HTMLDivElement>(null);\n useEffect(() => {\n if (hideInEditor) {\n return;\n }\n Array.from(ensure(rootElt.current).querySelectorAll(\"script\")).forEach(\n (oldScript) => {\n const newScript = document.createElement(\"script\");\n Array.from(oldScript.attributes).forEach((attr) =>\n newScript.setAttribute(attr.name, attr.value)\n );\n newScript.appendChild(document.createTextNode(oldScript.innerHTML));\n ensure(oldScript.parentNode).replaceChild(newScript, oldScript);\n }\n );\n }, [code, hideInEditor]);\n const effectiveCode = hideInEditor ? \"\" : code;\n return (\n <div\n ref={rootElt}\n className={className}\n dangerouslySetInnerHTML={{ __html: effectiveCode }}\n />\n );\n}\n\nexport const embedMeta: ComponentMeta<EmbedProps> = {\n name: \"hostless-embed\",\n displayName: \"Embed HTML\",\n importName: \"Embed\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n code: {\n type: \"string\",\n defaultValue: \"https://www.example.com\",\n },\n hideInEditor: {\n type: \"boolean\",\n displayName: \"Hide in editor\",\n description:\n \"Disable running the code while editing in Plasmic Studio (may require reload)\",\n editOnly: true,\n },\n },\n defaultStyles: {\n maxWidth: \"100%\",\n },\n};\n\nexport function registerEmbed(\n loader?: { registerComponent: typeof registerComponent },\n customEmbedMeta?: ComponentMeta<EmbedProps>\n) {\n if (loader) {\n loader.registerComponent(Embed, customEmbedMeta ?? embedMeta);\n } else {\n registerComponent(Embed, customEmbedMeta ?? embedMeta);\n }\n}\n","import { ComponentMeta, PlasmicCanvasContext } from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, { useContext } from \"react\";\n\nexport interface IframeProps {\n src: string;\n preview?: boolean;\n className?: string;\n}\n\nexport default function Iframe({ preview, src, className }: IframeProps) {\n const isEditing = useContext(PlasmicCanvasContext);\n if (isEditing && !preview) {\n return (\n <div className={className}>\n <div\n style={{\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n background: \"#eee\",\n color: \"#888\",\n fontSize: \"36px\",\n fontFamily: \"sans-serif\",\n fontWeight: \"bold\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n overflow: \"hidden\",\n }}\n >\n Iframe placeholder\n </div>\n </div>\n );\n }\n return <iframe src={src} className={className} />;\n}\n\nexport const iframeMeta: ComponentMeta<IframeProps> = {\n name: \"hostless-iframe\",\n displayName: \"Iframe\",\n importName: \"Iframe\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n src: {\n type: \"string\",\n defaultValue: \"https://www.example.com\",\n },\n preview: {\n type: \"boolean\",\n description: \"Load the iframe while editing in Plasmic Studio\",\n },\n },\n defaultStyles: {\n width: \"300px\",\n height: \"150px\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerIframe(\n loader?: { registerComponent: typeof registerComponent },\n customIframeMeta?: ComponentMeta<IframeProps>\n) {\n if (loader) {\n loader.registerComponent(Iframe, customIframeMeta ?? iframeMeta);\n } else {\n registerComponent(Iframe, customIframeMeta ?? iframeMeta);\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React, {\n ReactNode,\n RefObject,\n useEffect,\n useRef,\n useState,\n} from \"react\";\n\nexport function useDirectionalIntersection({\n ref,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: {\n ref: RefObject<HTMLElement>;\n scrollDownThreshold?: number;\n scrollUpThreshold?: number;\n}) {\n const [revealed, setRevealed] = useState(false);\n useEffect(() => {\n if (ref.current && typeof IntersectionObserver === \"function\") {\n const handler = (entries: IntersectionObserverEntry[]) => {\n if (entries[0].intersectionRatio >= scrollDownThreshold) {\n setRevealed(true);\n } else if (entries[0].intersectionRatio <= scrollUpThreshold) {\n setRevealed(false);\n }\n };\n\n const observer = new IntersectionObserver(handler, {\n root: null,\n rootMargin: \"0%\",\n threshold: [scrollUpThreshold, scrollDownThreshold],\n });\n observer.observe(ref.current);\n\n return () => {\n setRevealed(false);\n observer.disconnect();\n };\n }\n return () => {};\n }, [ref.current, scrollDownThreshold, scrollUpThreshold]);\n return revealed;\n}\n\nexport interface ScrollRevealerProps {\n children?: ReactNode;\n className?: string;\n scrollUpThreshold?: number;\n scrollDownThreshold?: number;\n}\n\n/**\n * Unlike react-awesome-reveal, ScrollRevealer:\n *\n * - has configurable thresholds\n * - triggers arbitrary render/unrender animations\n *\n * TODO: Merge this inta a general Reveal component, perhaps forking react-awesome-reveal, so that we don't have two different reveal components for users.\n */\nexport default function ScrollRevealer({\n children,\n className,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: ScrollRevealerProps) {\n const intersectionRef = useRef<HTMLDivElement>(null);\n const revealed = useDirectionalIntersection({\n ref: intersectionRef,\n scrollUpThreshold,\n scrollDownThreshold,\n });\n return (\n <div className={className} ref={intersectionRef}>\n {revealed ? children : null}\n </div>\n );\n}\n\nexport const scrollRevealerMeta: ComponentMeta<ScrollRevealerProps> = {\n name: \"hostless-scroll-revealer\",\n importName: \"ScrollRevealer\",\n displayName: \"Scroll Revealer\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n children: \"slot\",\n scrollDownThreshold: {\n type: \"number\",\n displayName: \"Scroll down threshold\",\n defaultValueHint: 0.5,\n description:\n \"How much of the element (as a fraction) must you scroll into view for it to appear (defaults to 0.5)\",\n },\n scrollUpThreshold: {\n type: \"number\",\n displayName: \"Scroll up threshold\",\n defaultValueHint: 0,\n description:\n \"While scrolling up, how much of the element (as a fraction) can still be scrolled in view before it disappears (defaults to 0, meaning you must scroll up until it's completely out of view)\",\n },\n },\n defaultStyles: {\n width: \"stretch\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerScrollRevealer(\n loader?: { registerComponent: typeof registerComponent },\n customScrollRevealerMeta?: ComponentMeta<ScrollRevealerProps>\n) {\n if (loader) {\n loader.registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n } else {\n registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport type VideoProps = Pick<\n React.ComponentProps<\"video\">,\n | \"autoPlay\"\n | \"controls\"\n | \"loop\"\n | \"muted\"\n | \"playsInline\"\n | \"poster\"\n | \"preload\"\n | \"src\"\n>;\n\nconst Video = React.forwardRef<HTMLVideoElement, VideoProps>(\n (props: VideoProps, ref) => {\n return <video ref={ref} {...props} />;\n }\n);\n\nexport default Video;\n\nexport const videoMeta: ComponentMeta<VideoProps> = {\n name: \"hostless-html-video\",\n importName: \"Video\",\n displayName: \"HTML Video\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n src: {\n type: \"string\",\n defaultValue:\n \"https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm\",\n displayName: \"Source URL\",\n description: \"URL to a video file.\",\n },\n autoPlay: {\n type: \"boolean\",\n displayName: \"Auto Play\",\n description:\n \"Whether the video show automatically start playing when the player loads\",\n },\n controls: {\n type: \"boolean\",\n displayName: \"Show Controls\",\n description: \"Whether the video player controls should be displayed\",\n },\n playsInline: {\n type: \"boolean\",\n displayName: \"Plays inline\",\n description:\n \"Usually on mobile, when tilted landscape, videos can play fullscreen. Turn this on to prevent that.\",\n },\n loop: {\n type: \"boolean\",\n displayName: \"Loop\",\n description: \"Whether the video should be played again after it finishes\",\n },\n muted: {\n type: \"boolean\",\n displayName: \"Muted\",\n description: \"Whether audio should be muted\",\n },\n poster: {\n type: \"imageUrl\",\n displayName: \"Poster (placeholder) image\",\n description: \"Image to show while video is downloading\",\n },\n preload: {\n type: \"choice\",\n options: [\"none\", \"metadata\", \"auto\"],\n displayName: \"Preload\",\n description:\n \"Whether to preload nothing, metadata only, or the full video\",\n },\n },\n defaultStyles: {\n height: \"hug\",\n width: \"640px\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerVideo(\n loader?: { registerComponent: typeof registerComponent },\n customVideoMeta?: ComponentMeta<VideoProps>\n) {\n if (loader) {\n loader.registerComponent(Video, customVideoMeta ?? videoMeta);\n } else {\n registerComponent(Video, customVideoMeta ?? videoMeta);\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport interface EmbedCssProps {\n css: string;\n}\n\nexport default function EmbedCss({\n css\n}: EmbedCssProps) {\n return (\n <style\n dangerouslySetInnerHTML={{ __html: css }}\n />\n );\n}\n\nexport const embedCssMeta: ComponentMeta<EmbedCssProps> = { \n name: \"hostless-embed-css\",\n displayName: \"EmbedCss\",\n importName: \"EmbedCss\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n css: {\n type: \"string\",\n defaultValueHint: \"Some CSS snippet\",\n description: \"CSS rules to be inserted\",\n },\n },\n};\n\nexport function registerEmbedCss(\n loader?: { registerComponent: typeof registerComponent },\n customEmbedCssMeta?: ComponentMeta<EmbedCssProps>\n) {\n if (loader) {\n loader.registerComponent(EmbedCss, customEmbedCssMeta ?? embedCssMeta);\n } else {\n registerComponent(EmbedCss, customEmbedCssMeta ?? embedCssMeta);\n }\n}\n"],"names":["tuple","args","ensure","x","undefined","Error","DataContext","createContext","thisModule","applySelector","rawData","selector","curData","split","key","useSelector","useDataEnv","useSelectors","selectors","Object","fromEntries","entries","filter","map","useContext","DataProvider","name","data","children","existingEnv","React","Provider","value","DynamicElement","tag","className","propSelectors","props","computed","createElement","DynamicText","DynamicImage","loading","style","objectFit","src","DynamicRepeater","loopItemName","keySelector","finalData","item","index","repeatedElement","dynamicRepeaterProps","type","description","defaultValue","dynamicRepeaterMeta","displayName","importName","importPath","registerDynamicRepeater","loader","customDynamicRepeaterMeta","registerComponent","dataProviderMeta","birthYear","profilePicture","registerDataProvider","customDataProviderMeta","dynamicPropsWithoutTag","defaultValueHint","dynamicProps","dynamicElementMeta","registerDynamicElement","customDynamicElementMeta","dynamicTextMeta","registerDynamicText","customDynamicTextMeta","dynamicImageMeta","registerDynamicImage","customDynamicImageMeta","Embed","code","hideInEditor","rootElt","useRef","useEffect","Array","from","current","querySelectorAll","forEach","oldScript","newScript","document","attributes","attr","setAttribute","appendChild","createTextNode","innerHTML","parentNode","replaceChild","effectiveCode","ref","dangerouslySetInnerHTML","__html","embedMeta","editOnly","defaultStyles","maxWidth","registerEmbed","customEmbedMeta","Iframe","preview","isEditing","PlasmicCanvasContext","position","top","left","right","bottom","background","color","fontSize","fontFamily","fontWeight","display","alignItems","justifyContent","overflow","iframeMeta","width","height","registerIframe","customIframeMeta","useDirectionalIntersection","scrollDownThreshold","scrollUpThreshold","useState","revealed","setRevealed","IntersectionObserver","handler","intersectionRatio","observer","root","rootMargin","threshold","observe","disconnect","ScrollRevealer","intersectionRef","scrollRevealerMeta","registerScrollRevealer","customScrollRevealerMeta","Video","forwardRef","videoMeta","autoPlay","controls","playsInline","loop","muted","poster","preload","options","registerVideo","customVideoMeta","EmbedCss","css","embedCssMeta","registerEmbedCss","customEmbedCssMeta"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,KAAK,GAAG,SAARA,KAAQ;AAAA,oCAAqBC,IAArB;AAAqBA,IAAAA,IAArB;AAAA;;AAAA,SAAoCA,IAApC;AAAA,CAAd;SAESC,OAAUC;AACxB,MAAIA,CAAC,KAAK,IAAN,IAAcA,CAAC,KAAKC,SAAxB,EAAmC;AACjC;AACA,UAAM,IAAIC,KAAJ,uCAAN;AACD,GAHD,MAGO;AACL,WAAOF,CAAP;AACD;AACF;;ICIYG,WAAW,gBAAGC,mBAAa,CAAuBH,SAAvB,CAAjC;AAEP,IAAMI,UAAU,GAAG,uCAAnB;AAEA,SAAgBC,cACdC,SACAC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A,iBAAiB,CAAC6F,KAAD,EAAQY,eAAR,WAAQA,eAAR,GAA2BV,SAA3B,CAAjB;AACD;AACF;;SCrFuBW;MACtBC,WAAAA;AAEA,SACE7I,4BAAA,QAAA;AACE4E,IAAAA,uBAAuB,EAAE;AAAEC,MAAAA,MAAM,EAAEgE;AAAV;GAD3B,CADF;AAKD;AAED,IAAaC,YAAY,GAAiC;AACxDlJ,EAAAA,IAAI,EAAE,oBADkD;AAExDgC,EAAAA,WAAW,EAAE,UAF2C;AAGxDC,EAAAA,UAAU,EAAE,UAH4C;AAIxDC,EAAAA,UAAU,EAAE,uCAJ4C;AAKxDvB,EAAAA,KAAK,EAAE;AACLsI,IAAAA,GAAG,EAAE;AACHrH,MAAAA,IAAI,EAAE,QADH;AAEHiB,MAAAA,gBAAgB,EAAE,kBAFf;AAGHhB,MAAAA,WAAW,EAAE;AAHV;AADA;AALiD,CAAnD;AAcP,SAAgBsH,iBACd/G,QACAgH;AAEA,MAAIhH,MAAJ,EAAY;AACVA,IAAAA,MAAM,CAACE,iBAAP,CAAyB0G,QAAzB,EAAmCI,kBAAnC,WAAmCA,kBAAnC,GAAyDF,YAAzD;AACD,GAFD,MAEO;AACL5G,IAAAA,iBAAiB,CAAC0G,QAAD,EAAWI,kBAAX,WAAWA,kBAAX,GAAiCF,YAAjC,CAAjB;AACD;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plasmic-basic-components.cjs.development.js","sources":["../src/Data.tsx","../src/common.ts","../src/Embed.tsx","../src/Iframe.tsx","../src/ScrollRevealer.tsx","../src/Video.tsx","../src/EmbedCss.tsx"],"sourcesContent":["import {\n ComponentMeta,\n repeatedElement,\n SelectorDict,\n useSelectors as _useSelectors,\n useSelector as _useSelector,\n DataProvider as _DataProvider,\n DataProviderProps,\n applySelector as _applySelector,\n useDataEnv as _useDataEnv,\n} from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, { ComponentProps, createElement, ReactNode } from \"react\";\n\nconst thisModule = \"@plasmicpkgs/plasmic-basic-components\";\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const applySelector: typeof _applySelector = function(...args) {\n console.warn(\n \"DEPRECATED: Import applySelector from @plasmicapp/host instead.\"\n );\n return _applySelector(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useSelector: typeof _useSelector = function(...args) {\n console.warn(\"DEPRECATED: Import useSelector from @plasmicapp/host instead.\");\n return _useSelector(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useSelectors: typeof _useSelectors = function(...args) {\n console.warn(\n \"DEPRECATED: Import useSelectors from @plasmicapp/host instead.\"\n );\n return _useSelectors(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const useDataEnv: typeof _useDataEnv = function(...args) {\n console.warn(\"DEPRECATED: Import useDataEnv from @plasmicapp/host instead.\");\n return _useDataEnv(...args);\n};\n\n/**\n * @deprecated This should be imported from @plasmicapp/host instead.\n */\nexport const DataProvider: typeof _DataProvider = function(...args) {\n console.warn(\n \"DEPRECATED: Import DataProvider from @plasmicapp/host instead.\"\n );\n return _DataProvider(...args);\n};\n\nexport interface CommonDynamicProps {\n className?: string;\n tag?: string;\n propSelectors?: SelectorDict;\n}\n\nexport function DynamicElement<\n Tag extends keyof JSX.IntrinsicElements = \"div\"\n>({\n tag = \"div\",\n className,\n children,\n propSelectors,\n ...props\n}: CommonDynamicProps & ComponentProps<Tag>) {\n const computed = _useSelectors(propSelectors);\n return createElement(tag, {\n children,\n ...props,\n ...computed,\n className: className + \" \" + computed.className,\n });\n}\n\nexport interface DynamicTextProps extends CommonDynamicProps {\n selector?: string;\n}\n\nexport function DynamicText({\n selector,\n propSelectors,\n ...props\n}: DynamicTextProps) {\n return (\n <DynamicElement\n {...props}\n propSelectors={{ ...propSelectors, children: selector }}\n >\n {/*This is the default text*/}\n (DynamicText requires a selector)\n </DynamicElement>\n );\n}\n\nexport interface DynamicImageProps\n extends CommonDynamicProps,\n ComponentProps<\"img\"> {\n selector?: string;\n}\n\nexport function DynamicImage({\n selector,\n propSelectors,\n ...props\n}: DynamicImageProps) {\n return (\n <DynamicElement<\"img\">\n tag={\"img\"}\n loading={\"lazy\"}\n style={{\n objectFit: \"cover\",\n }}\n {...props}\n propSelectors={{ ...propSelectors, src: selector }}\n // Default image placeholder\n src=\"https://studio.plasmic.app/static/img/placeholder.png\"\n />\n );\n}\n\nexport interface DynamicRepeaterProps {\n children?: ReactNode;\n loopItemName?: string;\n keySelector?: string;\n selector?: string;\n data?: any;\n}\n\nexport function DynamicRepeater({\n children,\n loopItemName,\n keySelector,\n selector,\n data,\n}: DynamicRepeaterProps) {\n // Defaults to an array of three items.\n const finalData = data ?? _useSelector(selector) ?? [1, 2, 3];\n return (\n <>\n {finalData?.map?.((item: any, index: number) => (\n <_DataProvider\n key={_applySelector(item, keySelector) ?? index}\n name={loopItemName}\n data={item}\n >\n {repeatedElement(index === 0, children)}\n </_DataProvider>\n ))}\n </>\n );\n}\n\nexport const dynamicRepeaterProps = {\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the array of data to loop over, such as: someVariable.0.someField\",\n },\n loopItemName: {\n type: \"string\",\n defaultValue: \"item\",\n description:\n \"The name of the variable to use to store the current item in the loop\",\n },\n children: \"slot\",\n} as const;\n\nexport const dynamicRepeaterMeta: ComponentMeta<DynamicRepeaterProps> = {\n name: \"hostless-dynamic-repeater\",\n displayName: \"Dynamic Repeater\",\n importName: \"DynamicRepeater\",\n importPath: thisModule,\n props: dynamicRepeaterProps,\n};\n\nexport function registerDynamicRepeater(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicRepeaterMeta?: ComponentMeta<DynamicRepeaterProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicRepeater,\n customDynamicRepeaterMeta ?? dynamicRepeaterMeta\n );\n } else {\n registerComponent(\n DynamicRepeater,\n customDynamicRepeaterMeta ?? dynamicRepeaterMeta\n );\n }\n}\n\nexport const dataProviderMeta: ComponentMeta<DataProviderProps> = {\n name: \"hostless-data-provider\",\n displayName: \"Data Provider\",\n importName: \"DataProvider\",\n importPath: thisModule,\n // description: \"Makes some specified data available to the subtree in a context\",\n props: {\n name: {\n type: \"string\",\n defaultValue: \"celebrities\",\n description: \"The name of the variable to store the data in\",\n },\n data: {\n type: \"object\",\n defaultValue: [\n {\n name: \"Fill Murray\",\n birthYear: 1950,\n profilePicture: [\"https://www.fillmurray.com/200/300\"],\n },\n {\n name: \"Place Cage\",\n birthYear: 1950,\n profilePicture: [\"https://www.placecage.com/200/300\"],\n },\n ],\n },\n children: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"component\",\n name: \"hostless-dynamic-text\",\n props: {\n selector: \"celebrities.0.name\",\n },\n },\n {\n type: \"component\",\n name: \"hostless-dynamic-image\",\n props: {\n selector: \"celebrities.0.profilePicture\",\n },\n },\n ],\n },\n },\n};\n\nexport function registerDataProvider(\n loader?: { registerComponent: typeof registerComponent },\n customDataProviderMeta?: ComponentMeta<DataProviderProps>\n) {\n if (loader) {\n loader.registerComponent(\n _DataProvider,\n customDataProviderMeta ?? dataProviderMeta\n );\n } else {\n registerComponent(\n _DataProvider,\n customDataProviderMeta ?? dataProviderMeta\n );\n }\n}\n\nconst dynamicPropsWithoutTag = {\n propSelectors: {\n type: \"object\",\n defaultValueHint: {},\n description:\n \"An object whose keys are prop names and values are selector expressions. Use this to set any prop to a dynamic value.\",\n },\n} as const;\n\nconst dynamicProps = {\n ...dynamicPropsWithoutTag,\n tag: {\n type: \"string\",\n defaultValueHint: \"div\",\n description: \"The HTML tag to use\",\n },\n} as const;\n\n// TODO Eventually we'll want to expose all the base HTML properties, but in the nicer way that we do within the studio.\n\nexport const dynamicElementMeta: ComponentMeta<CommonDynamicProps> = {\n name: \"hostless-dynamic-element\",\n displayName: \"Dynamic Element\",\n importName: \"DynamicElement\",\n importPath: thisModule,\n props: { ...dynamicProps, children: \"slot\" },\n};\n\nexport function registerDynamicElement(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicElementMeta?: ComponentMeta<CommonDynamicProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicElement,\n customDynamicElementMeta ?? dynamicElementMeta\n );\n } else {\n registerComponent(\n DynamicElement,\n customDynamicElementMeta ?? dynamicElementMeta\n );\n }\n}\n\nexport const dynamicTextMeta: ComponentMeta<DynamicTextProps> = {\n name: \"hostless-dynamic-text\",\n importName: \"DynamicText\",\n displayName: \"Dynamic Text\",\n importPath: thisModule,\n props: {\n ...dynamicProps,\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the text, such as: someVariable.0.someField\",\n },\n },\n};\n\nexport function registerDynamicText(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicTextMeta?: ComponentMeta<DynamicTextProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicText,\n customDynamicTextMeta ?? dynamicTextMeta\n );\n } else {\n registerComponent(DynamicText, customDynamicTextMeta ?? dynamicTextMeta);\n }\n}\n\nexport const dynamicImageMeta: ComponentMeta<DynamicImageProps> = {\n name: \"hostless-dynamic-image\",\n displayName: \"Dynamic Image\",\n importName: \"DynamicImage\",\n importPath: thisModule,\n props: {\n ...dynamicPropsWithoutTag,\n selector: {\n type: \"string\",\n description:\n \"The selector expression to use to get the image source URL, such as: someVariable.0.someField\",\n },\n },\n};\n\nexport function registerDynamicImage(\n loader?: { registerComponent: typeof registerComponent },\n customDynamicImageMeta?: ComponentMeta<DynamicImageProps>\n) {\n if (loader) {\n loader.registerComponent(\n DynamicImage,\n customDynamicImageMeta ?? dynamicImageMeta\n );\n } else {\n registerComponent(DynamicImage, customDynamicImageMeta ?? dynamicImageMeta);\n }\n}\n","export const tuple = <T extends any[]>(...args: T): T => args;\n\nexport function ensure<T>(x: T | null | undefined): T {\n if (x === null || x === undefined) {\n debugger;\n throw new Error(`Value must not be undefined or null`);\n } else {\n return x;\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React, { useEffect, useRef } from \"react\";\nimport { ensure } from \"./common\";\n\nexport interface EmbedProps {\n className?: string;\n code: string;\n hideInEditor?: boolean;\n}\n\nexport default function Embed({\n className,\n code,\n hideInEditor = false,\n}: EmbedProps) {\n const rootElt = useRef<HTMLDivElement>(null);\n useEffect(() => {\n if (hideInEditor) {\n return;\n }\n Array.from(ensure(rootElt.current).querySelectorAll(\"script\")).forEach(\n (oldScript) => {\n const newScript = document.createElement(\"script\");\n Array.from(oldScript.attributes).forEach((attr) =>\n newScript.setAttribute(attr.name, attr.value)\n );\n newScript.appendChild(document.createTextNode(oldScript.innerHTML));\n ensure(oldScript.parentNode).replaceChild(newScript, oldScript);\n }\n );\n }, [code, hideInEditor]);\n const effectiveCode = hideInEditor ? \"\" : code;\n return (\n <div\n ref={rootElt}\n className={className}\n dangerouslySetInnerHTML={{ __html: effectiveCode }}\n />\n );\n}\n\nexport const embedMeta: ComponentMeta<EmbedProps> = {\n name: \"hostless-embed\",\n displayName: \"Embed HTML\",\n importName: \"Embed\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n code: {\n type: \"code\",\n lang: \"html\",\n defaultValueHint: \"<!-- HTML snippet -->\",\n description: \"The HTML code to be embedded\",\n },\n hideInEditor: {\n type: \"boolean\",\n displayName: \"Hide in editor\",\n description:\n \"Disable running the code while editing in Plasmic Studio (may require reload)\",\n editOnly: true,\n },\n },\n defaultStyles: {\n maxWidth: \"100%\",\n },\n};\n\nexport function registerEmbed(\n loader?: { registerComponent: typeof registerComponent },\n customEmbedMeta?: ComponentMeta<EmbedProps>\n) {\n if (loader) {\n loader.registerComponent(Embed, customEmbedMeta ?? embedMeta);\n } else {\n registerComponent(Embed, customEmbedMeta ?? embedMeta);\n }\n}\n","import { ComponentMeta, PlasmicCanvasContext } from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, { useContext } from \"react\";\n\nexport interface IframeProps {\n src: string;\n preview?: boolean;\n className?: string;\n}\n\nexport default function Iframe({ preview, src, className }: IframeProps) {\n const isEditing = useContext(PlasmicCanvasContext);\n if (isEditing && !preview) {\n return (\n <div className={className}>\n <div\n style={{\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n background: \"#eee\",\n color: \"#888\",\n fontSize: \"36px\",\n fontFamily: \"sans-serif\",\n fontWeight: \"bold\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n overflow: \"hidden\",\n }}\n >\n Iframe placeholder\n </div>\n </div>\n );\n }\n return <iframe src={src} className={className} />;\n}\n\nexport const iframeMeta: ComponentMeta<IframeProps> = {\n name: \"hostless-iframe\",\n displayName: \"Iframe\",\n importName: \"Iframe\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n src: {\n type: \"string\",\n defaultValue: \"https://www.example.com\",\n },\n preview: {\n type: \"boolean\",\n description: \"Load the iframe while editing in Plasmic Studio\",\n },\n },\n defaultStyles: {\n width: \"300px\",\n height: \"150px\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerIframe(\n loader?: { registerComponent: typeof registerComponent },\n customIframeMeta?: ComponentMeta<IframeProps>\n) {\n if (loader) {\n loader.registerComponent(Iframe, customIframeMeta ?? iframeMeta);\n } else {\n registerComponent(Iframe, customIframeMeta ?? iframeMeta);\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React, {\n ReactNode,\n RefObject,\n useEffect,\n useRef,\n useState,\n} from \"react\";\n\nexport function useDirectionalIntersection({\n ref,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: {\n ref: RefObject<HTMLElement>;\n scrollDownThreshold?: number;\n scrollUpThreshold?: number;\n}) {\n const [revealed, setRevealed] = useState(false);\n useEffect(() => {\n if (ref.current && typeof IntersectionObserver === \"function\") {\n const handler = (entries: IntersectionObserverEntry[]) => {\n if (entries[0].intersectionRatio >= scrollDownThreshold) {\n setRevealed(true);\n } else if (entries[0].intersectionRatio <= scrollUpThreshold) {\n setRevealed(false);\n }\n };\n\n const observer = new IntersectionObserver(handler, {\n root: null,\n rootMargin: \"0%\",\n threshold: [scrollUpThreshold, scrollDownThreshold],\n });\n observer.observe(ref.current);\n\n return () => {\n setRevealed(false);\n observer.disconnect();\n };\n }\n return () => {};\n }, [ref.current, scrollDownThreshold, scrollUpThreshold]);\n return revealed;\n}\n\nexport interface ScrollRevealerProps {\n children?: ReactNode;\n className?: string;\n scrollUpThreshold?: number;\n scrollDownThreshold?: number;\n}\n\n/**\n * Unlike react-awesome-reveal, ScrollRevealer:\n *\n * - has configurable thresholds\n * - triggers arbitrary render/unrender animations\n *\n * TODO: Merge this inta a general Reveal component, perhaps forking react-awesome-reveal, so that we don't have two different reveal components for users.\n */\nexport default function ScrollRevealer({\n children,\n className,\n scrollDownThreshold = 0.5,\n scrollUpThreshold = 0,\n}: ScrollRevealerProps) {\n const intersectionRef = useRef<HTMLDivElement>(null);\n const revealed = useDirectionalIntersection({\n ref: intersectionRef,\n scrollUpThreshold,\n scrollDownThreshold,\n });\n return (\n <div className={className} ref={intersectionRef}>\n {revealed ? children : null}\n </div>\n );\n}\n\nexport const scrollRevealerMeta: ComponentMeta<ScrollRevealerProps> = {\n name: \"hostless-scroll-revealer\",\n importName: \"ScrollRevealer\",\n displayName: \"Scroll Revealer\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n children: \"slot\",\n scrollDownThreshold: {\n type: \"number\",\n displayName: \"Scroll down threshold\",\n defaultValueHint: 0.5,\n description:\n \"How much of the element (as a fraction) must you scroll into view for it to appear (defaults to 0.5)\",\n },\n scrollUpThreshold: {\n type: \"number\",\n displayName: \"Scroll up threshold\",\n defaultValueHint: 0,\n description:\n \"While scrolling up, how much of the element (as a fraction) can still be scrolled in view before it disappears (defaults to 0, meaning you must scroll up until it's completely out of view)\",\n },\n },\n defaultStyles: {\n width: \"stretch\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerScrollRevealer(\n loader?: { registerComponent: typeof registerComponent },\n customScrollRevealerMeta?: ComponentMeta<ScrollRevealerProps>\n) {\n if (loader) {\n loader.registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n } else {\n registerComponent(\n ScrollRevealer,\n customScrollRevealerMeta ?? scrollRevealerMeta\n );\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport type VideoProps = Pick<\n React.ComponentProps<\"video\">,\n | \"autoPlay\"\n | \"controls\"\n | \"loop\"\n | \"muted\"\n | \"playsInline\"\n | \"poster\"\n | \"preload\"\n | \"src\"\n>;\n\nconst Video = React.forwardRef<HTMLVideoElement, VideoProps>(\n (props: VideoProps, ref) => {\n return <video ref={ref} {...props} />;\n }\n);\n\nexport default Video;\n\nexport const videoMeta: ComponentMeta<VideoProps> = {\n name: \"hostless-html-video\",\n importName: \"Video\",\n displayName: \"HTML Video\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n src: {\n type: \"string\",\n defaultValue:\n \"https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm\",\n displayName: \"Source URL\",\n description: \"URL to a video file.\",\n },\n autoPlay: {\n type: \"boolean\",\n displayName: \"Auto Play\",\n description:\n \"Whether the video show automatically start playing when the player loads\",\n },\n controls: {\n type: \"boolean\",\n displayName: \"Show Controls\",\n description: \"Whether the video player controls should be displayed\",\n },\n playsInline: {\n type: \"boolean\",\n displayName: \"Plays inline\",\n description:\n \"Usually on mobile, when tilted landscape, videos can play fullscreen. Turn this on to prevent that.\",\n },\n loop: {\n type: \"boolean\",\n displayName: \"Loop\",\n description: \"Whether the video should be played again after it finishes\",\n },\n muted: {\n type: \"boolean\",\n displayName: \"Muted\",\n description: \"Whether audio should be muted\",\n },\n poster: {\n type: \"imageUrl\",\n displayName: \"Poster (placeholder) image\",\n description: \"Image to show while video is downloading\",\n },\n preload: {\n type: \"choice\",\n options: [\"none\", \"metadata\", \"auto\"],\n displayName: \"Preload\",\n description:\n \"Whether to preload nothing, metadata only, or the full video\",\n },\n },\n defaultStyles: {\n height: \"hug\",\n width: \"640px\",\n maxWidth: \"100%\",\n },\n};\n\nexport function registerVideo(\n loader?: { registerComponent: typeof registerComponent },\n customVideoMeta?: ComponentMeta<VideoProps>\n) {\n if (loader) {\n loader.registerComponent(Video, customVideoMeta ?? videoMeta);\n } else {\n registerComponent(Video, customVideoMeta ?? videoMeta);\n }\n}\n","import registerComponent, {\n ComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport interface EmbedCssProps {\n css: string;\n}\n\nexport default function EmbedCss({\n css\n}: EmbedCssProps) {\n return (\n <style\n dangerouslySetInnerHTML={{ __html: css }}\n />\n );\n}\n\nexport const embedCssMeta: ComponentMeta<EmbedCssProps> = { \n name: \"hostless-embed-css\",\n displayName: \"Embed Css\",\n importName: \"EmbedCss\",\n importPath: \"@plasmicpkgs/plasmic-basic-components\",\n props: {\n css: {\n type: \"code\",\n lang: \"css\",\n defaultValueHint: \"/* CSS snippet */\",\n description: \"CSS rules to be inserted\",\n },\n },\n};\n\nexport function registerEmbedCss(\n loader?: { registerComponent: typeof registerComponent },\n customEmbedCssMeta?: ComponentMeta<EmbedCssProps>\n) {\n if (loader) {\n loader.registerComponent(EmbedCss, customEmbedCssMeta ?? embedCssMeta);\n } else {\n registerComponent(EmbedCss, customEmbedCssMeta ?? embedCssMeta);\n }\n}\n"],"names":["thisModule","applySelector","console","warn","_applySelector","useSelector","_useSelector","useSelectors","_useSelectors","useDataEnv","_useDataEnv","DataProvider","_DataProvider","DynamicElement","tag","className","children","propSelectors","props","computed","createElement","DynamicText","selector","React","DynamicImage","loading","style","objectFit","src","DynamicRepeater","loopItemName","keySelector","data","finalData","map","item","index","key","name","repeatedElement","dynamicRepeaterProps","type","description","defaultValue","dynamicRepeaterMeta","displayName","importName","importPath","registerDynamicRepeater","loader","customDynamicRepeaterMeta","registerComponent","dataProviderMeta","birthYear","profilePicture","registerDataProvider","customDataProviderMeta","dynamicPropsWithoutTag","defaultValueHint","dynamicProps","dynamicElementMeta","registerDynamicElement","customDynamicElementMeta","dynamicTextMeta","registerDynamicText","customDynamicTextMeta","dynamicImageMeta","registerDynamicImage","customDynamicImageMeta","ensure","x","undefined","Error","Embed","code","hideInEditor","rootElt","useRef","useEffect","Array","from","current","querySelectorAll","forEach","oldScript","newScript","document","attributes","attr","setAttribute","value","appendChild","createTextNode","innerHTML","parentNode","replaceChild","effectiveCode","ref","dangerouslySetInnerHTML","__html","embedMeta","lang","editOnly","defaultStyles","maxWidth","registerEmbed","customEmbedMeta","Iframe","preview","isEditing","useContext","PlasmicCanvasContext","position","top","left","right","bottom","background","color","fontSize","fontFamily","fontWeight","display","alignItems","justifyContent","overflow","iframeMeta","width","height","registerIframe","customIframeMeta","useDirectionalIntersection","scrollDownThreshold","scrollUpThreshold","useState","revealed","setRevealed","IntersectionObserver","handler","entries","intersectionRatio","observer","root","rootMargin","threshold","observe","disconnect","ScrollRevealer","intersectionRef","scrollRevealerMeta","registerScrollRevealer","customScrollRevealerMeta","Video","forwardRef","videoMeta","autoPlay","controls","playsInline","loop","muted","poster","preload","options","registerVideo","customVideoMeta","EmbedCss","css","embedCssMeta","registerEmbedCss","customEmbedCssMeta"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,IAAMA,UAAU,GAAG,uCAAnB;AAEA;;;;IAGaC,aAAa,GAA0B,SAAvCA,aAAuC;AAClDC,EAAAA,OAAO,CAACC,IAAR,CACE,iEADF;AAGA,SAAOC,kBAAc,MAAd,mBAAP;AACD;AAED;;;;IAGaC,WAAW,GAAwB,SAAnCA,WAAmC;AAC9CH,EAAAA,OAAO,CAACC,IAAR,CAAa,+DAAb;AACA,SAAOG,gBAAY,MAAZ,mBAAP;AACD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AAiCF,YAAjC,CAAjB;AACD;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@plasmicapp/host"),r=e(require("@plasmicapp/host/registerComponent")),o=require("react"),n=e(o);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e}).apply(this,arguments)}function i(e,t){if(null==e)return{};var r,o,n={},a=Object.keys(e);for(o=0;o<a.length;o++)t.indexOf(r=a[o])>=0||(n[r]=e[r]);return n}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function l(e){if(null==e)throw new Error("Value must not be undefined or null");return e}var c=o.createContext(void 0),p="@plasmicpkgs/plasmic-basic-components";function m(e,t){if(t){for(var r,o=e,n=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return s(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,void 0):void 0}}(e))){r&&(e=r);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(t.split("."));!(r=n()).done;){var a;o=null==(a=o)?void 0:a[r.value]}return o}}function d(e){return m(h(),e)}function u(e){void 0===e&&(e={});var t=h();return Object.fromEntries(Object.entries(e).filter((function(e){return!!e[0]&&!!e[1]})).map((function(e){return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t}(e[0],m(t,e[1]))})))}function h(){return o.useContext(c)}function f(e){var t,r,o=e.name,i=e.data,s=e.children,l=null!=(t=h())?t:{};return o?n.createElement(c.Provider,{value:a({},l,(r={},r[o]=i,r))},s):n.createElement(n.Fragment,null,s)}function y(e){var t=e.tag,r=void 0===t?"div":t,n=e.className,s=e.children,l=e.propSelectors,c=i(e,["tag","className","children","propSelectors"]),p=u(l);return o.createElement(r,a({children:s},c,p,{className:n+" "+p.className}))}function v(e){var t=e.selector,r=e.propSelectors,o=i(e,["selector","propSelectors"]);return n.createElement(y,Object.assign({},o,{propSelectors:a({},r,{children:t})}),"(DynamicText requires a selector)")}function g(e){var t=e.selector,r=e.propSelectors,o=i(e,["selector","propSelectors"]);return n.createElement(y,Object.assign({tag:"img",loading:"lazy",style:{objectFit:"cover"}},o,{propSelectors:a({},r,{src:t}),src:"https://studio.plasmic.app/static/img/placeholder.png"}))}function b(e){var r,o=e.children,a=e.loopItemName,i=e.keySelector,s=e.data,l=null!=(r=null!=s?s:d(e.selector))?r:[1,2,3];return n.createElement(n.Fragment,null,null==l||null==l.map?void 0:l.map((function(e,r){var s;return n.createElement(f,{key:null!=(s=m(e,i))?s:r,name:a,data:e},t.repeatedElement(0===r,o))})))}var x={selector:{type:"string",description:"The selector expression to use to get the array of data to loop over, such as: someVariable.0.someField"},loopItemName:{type:"string",defaultValue:"item",description:"The name of the variable to use to store the current item in the loop"},children:"slot"},w={name:"hostless-dynamic-repeater",displayName:"Dynamic Repeater",importName:"DynamicRepeater",importPath:p,props:x},N={name:"hostless-data-provider",displayName:"Data Provider",importName:"DataProvider",importPath:p,props:{name:{type:"string",defaultValue:"celebrities",description:"The name of the variable to store the data in"},data:{type:"object",defaultValue:[{name:"Fill Murray",birthYear:1950,profilePicture:["https://www.fillmurray.com/200/300"]},{name:"Place Cage",birthYear:1950,profilePicture:["https://www.placecage.com/200/300"]}]},children:{type:"slot",defaultValue:[{type:"component",name:"hostless-dynamic-text",props:{selector:"celebrities.0.name"}},{type:"component",name:"hostless-dynamic-image",props:{selector:"celebrities.0.profilePicture"}}]}}},S={propSelectors:{type:"object",defaultValueHint:{},description:"An object whose keys are prop names and values are selector expressions. Use this to set any prop to a dynamic value."}},E=a({},S,{tag:{type:"string",defaultValueHint:"div",description:"The HTML tag to use"}}),P={name:"hostless-dynamic-element",displayName:"Dynamic Element",importName:"DynamicElement",importPath:p,props:a({},E,{children:"slot"})},C={name:"hostless-dynamic-text",importName:"DynamicText",displayName:"Dynamic Text",importPath:p,props:a({},E,{selector:{type:"string",description:"The selector expression to use to get the text, such as: someVariable.0.someField"}})},D={name:"hostless-dynamic-image",displayName:"Dynamic Image",importName:"DynamicImage",importPath:p,props:a({},S,{selector:{type:"string",description:"The selector expression to use to get the image source URL, such as: someVariable.0.someField"}})};function T(e){var t=e.className,r=e.code,a=e.hideInEditor,i=void 0!==a&&a,s=o.useRef(null);return o.useEffect((function(){i||Array.from(l(s.current).querySelectorAll("script")).forEach((function(e){var t=document.createElement("script");Array.from(e.attributes).forEach((function(e){return t.setAttribute(e.name,e.value)})),t.appendChild(document.createTextNode(e.innerHTML)),l(e.parentNode).replaceChild(t,e)}))}),[r,i]),n.createElement("div",{ref:s,className:t,dangerouslySetInnerHTML:{__html:i?"":r}})}var I={name:"hostless-embed",displayName:"Embed HTML",importName:"Embed",importPath:"@plasmicpkgs/plasmic-basic-components",props:{code:{type:"string",defaultValue:"https://www.example.com"},hideInEditor:{type:"boolean",displayName:"Hide in editor",description:"Disable running the code while editing in Plasmic Studio (may require reload)",editOnly:!0}},defaultStyles:{maxWidth:"100%"}};function M(e){var r=e.preview,a=e.src,i=e.className;return o.useContext(t.PlasmicCanvasContext)&&!r?n.createElement("div",{className:i},n.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,background:"#eee",color:"#888",fontSize:"36px",fontFamily:"sans-serif",fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"}},"Iframe placeholder")):n.createElement("iframe",{src:a,className:i})}var V={name:"hostless-iframe",displayName:"Iframe",importName:"Iframe",importPath:"@plasmicpkgs/plasmic-basic-components",props:{src:{type:"string",defaultValue:"https://www.example.com"},preview:{type:"boolean",description:"Load the iframe while editing in Plasmic Studio"}},defaultStyles:{width:"300px",height:"150px",maxWidth:"100%"}};function R(e){var t=e.ref,r=e.scrollDownThreshold,n=void 0===r?.5:r,a=e.scrollUpThreshold,i=void 0===a?0:a,s=o.useState(!1),l=s[0],c=s[1];return o.useEffect((function(){if(t.current&&"function"==typeof IntersectionObserver){var e=new IntersectionObserver((function(e){e[0].intersectionRatio>=n?c(!0):e[0].intersectionRatio<=i&&c(!1)}),{root:null,rootMargin:"0%",threshold:[i,n]});return e.observe(t.current),function(){c(!1),e.disconnect()}}return function(){}}),[t.current,n,i]),l}function j(e){var t=e.children,r=e.className,a=e.scrollDownThreshold,i=void 0===a?.5:a,s=e.scrollUpThreshold,l=void 0===s?0:s,c=o.useRef(null),p=R({ref:c,scrollUpThreshold:l,scrollDownThreshold:i});return n.createElement("div",{className:r,ref:c},p?t:null)}var O={name:"hostless-scroll-revealer",importName:"ScrollRevealer",displayName:"Scroll Revealer",importPath:"@plasmicpkgs/plasmic-basic-components",props:{children:"slot",scrollDownThreshold:{type:"number",displayName:"Scroll down threshold",defaultValueHint:.5,description:"How much of the element (as a fraction) must you scroll into view for it to appear (defaults to 0.5)"},scrollUpThreshold:{type:"number",displayName:"Scroll up threshold",defaultValueHint:0,description:"While scrolling up, how much of the element (as a fraction) can still be scrolled in view before it disappears (defaults to 0, meaning you must scroll up until it's completely out of view)"}},defaultStyles:{width:"stretch",maxWidth:"100%"}},A=n.forwardRef((function(e,t){return n.createElement("video",Object.assign({ref:t},e))})),H={name:"hostless-html-video",importName:"Video",displayName:"HTML Video",importPath:"@plasmicpkgs/plasmic-basic-components",props:{src:{type:"string",defaultValue:"https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm",displayName:"Source URL",description:"URL to a video file."},autoPlay:{type:"boolean",displayName:"Auto Play",description:"Whether the video show automatically start playing when the player loads"},controls:{type:"boolean",displayName:"Show Controls",description:"Whether the video player controls should be displayed"},playsInline:{type:"boolean",displayName:"Plays inline",description:"Usually on mobile, when tilted landscape, videos can play fullscreen. Turn this on to prevent that."},loop:{type:"boolean",displayName:"Loop",description:"Whether the video should be played again after it finishes"},muted:{type:"boolean",displayName:"Muted",description:"Whether audio should be muted"},poster:{type:"imageUrl",displayName:"Poster (placeholder) image",description:"Image to show while video is downloading"},preload:{type:"choice",options:["none","metadata","auto"],displayName:"Preload",description:"Whether to preload nothing, metadata only, or the full video"}},defaultStyles:{height:"hug",width:"640px",maxWidth:"100%"}};function k(e){return n.createElement("style",{dangerouslySetInnerHTML:{__html:e.css}})}var L={name:"hostless-embed-css",displayName:"EmbedCss",importName:"EmbedCss",importPath:"@plasmicpkgs/plasmic-basic-components",props:{css:{type:"string",defaultValueHint:"Some CSS snippet",description:"CSS rules to be inserted"}}};exports.DataContext=c,exports.DataProvider=f,exports.DynamicElement=y,exports.DynamicImage=g,exports.DynamicRepeater=b,exports.DynamicText=v,exports.Embed=T,exports.EmbedCss=k,exports.Iframe=M,exports.ScrollRevealer=j,exports.Video=A,exports.applySelector=m,exports.dataProviderMeta=N,exports.dynamicElementMeta=P,exports.dynamicImageMeta=D,exports.dynamicRepeaterMeta=w,exports.dynamicRepeaterProps=x,exports.dynamicTextMeta=C,exports.embedCssMeta=L,exports.embedMeta=I,exports.iframeMeta=V,exports.registerDataProvider=function(e,t){e?e.registerComponent(f,null!=t?t:N):r(f,null!=t?t:N)},exports.registerDynamicElement=function(e,t){e?e.registerComponent(y,null!=t?t:P):r(y,null!=t?t:P)},exports.registerDynamicImage=function(e,t){e?e.registerComponent(g,null!=t?t:D):r(g,null!=t?t:D)},exports.registerDynamicRepeater=function(e,t){e?e.registerComponent(b,null!=t?t:w):r(b,null!=t?t:w)},exports.registerDynamicText=function(e,t){e?e.registerComponent(v,null!=t?t:C):r(v,null!=t?t:C)},exports.registerEmbed=function(e,t){e?e.registerComponent(T,null!=t?t:I):r(T,null!=t?t:I)},exports.registerEmbedCss=function(e,t){e?e.registerComponent(k,null!=t?t:L):r(k,null!=t?t:L)},exports.registerIframe=function(e,t){e?e.registerComponent(M,null!=t?t:V):r(M,null!=t?t:V)},exports.registerScrollRevealer=function(e,t){e?e.registerComponent(j,null!=t?t:O):r(j,null!=t?t:O)},exports.registerVideo=function(e,t){e?e.registerComponent(A,null!=t?t:H):r(A,null!=t?t:H)},exports.scrollRevealerMeta=O,exports.useDataEnv=h,exports.useDirectionalIntersection=R,exports.useSelector=d,exports.useSelectors=u,exports.videoMeta=H;
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@plasmicapp/host"),r=e(require("@plasmicapp/host/registerComponent")),o=require("react"),a=e(o);function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e}).apply(this,arguments)}function n(e,t){if(null==e)return{};var r,o,a={},s=Object.keys(e);for(o=0;o<s.length;o++)t.indexOf(r=s[o])>=0||(a[r]=e[r]);return a}var i=["tag","className","children","propSelectors"],l=["selector","propSelectors"],p=["selector","propSelectors"],c="@plasmicpkgs/plasmic-basic-components";function m(e){var r=e.tag,a=void 0===r?"div":r,l=e.className,p=e.children,c=e.propSelectors,m=n(e,i),d=t.useSelectors(c);return o.createElement(a,s({children:p},m,d,{className:l+" "+d.className}))}function d(e){var t=e.selector,r=e.propSelectors,o=n(e,l);return a.createElement(m,Object.assign({},o,{propSelectors:s({},r,{children:t})}),"(DynamicText requires a selector)")}function u(e){var t=e.selector,r=e.propSelectors,o=n(e,p);return a.createElement(m,Object.assign({tag:"img",loading:"lazy",style:{objectFit:"cover"}},o,{propSelectors:s({},r,{src:t}),src:"https://studio.plasmic.app/static/img/placeholder.png"}))}function h(e){var r,o=e.children,s=e.loopItemName,n=e.keySelector,i=e.data,l=null!=(r=null!=i?i:t.useSelector(e.selector))?r:[1,2,3];return a.createElement(a.Fragment,null,null==l||null==l.map?void 0:l.map((function(e,r){var i;return a.createElement(t.DataProvider,{key:null!=(i=t.applySelector(e,n))?i:r,name:s,data:e},t.repeatedElement(0===r,o))})))}var y={selector:{type:"string",description:"The selector expression to use to get the array of data to loop over, such as: someVariable.0.someField"},loopItemName:{type:"string",defaultValue:"item",description:"The name of the variable to use to store the current item in the loop"},children:"slot"},f={name:"hostless-dynamic-repeater",displayName:"Dynamic Repeater",importName:"DynamicRepeater",importPath:c,props:y},v={name:"hostless-data-provider",displayName:"Data Provider",importName:"DataProvider",importPath:c,props:{name:{type:"string",defaultValue:"celebrities",description:"The name of the variable to store the data in"},data:{type:"object",defaultValue:[{name:"Fill Murray",birthYear:1950,profilePicture:["https://www.fillmurray.com/200/300"]},{name:"Place Cage",birthYear:1950,profilePicture:["https://www.placecage.com/200/300"]}]},children:{type:"slot",defaultValue:[{type:"component",name:"hostless-dynamic-text",props:{selector:"celebrities.0.name"}},{type:"component",name:"hostless-dynamic-image",props:{selector:"celebrities.0.profilePicture"}}]}}},g={propSelectors:{type:"object",defaultValueHint:{},description:"An object whose keys are prop names and values are selector expressions. Use this to set any prop to a dynamic value."}},b=s({},g,{tag:{type:"string",defaultValueHint:"div",description:"The HTML tag to use"}}),x={name:"hostless-dynamic-element",displayName:"Dynamic Element",importName:"DynamicElement",importPath:c,props:s({},b,{children:"slot"})},E={name:"hostless-dynamic-text",importName:"DynamicText",displayName:"Dynamic Text",importPath:c,props:s({},b,{selector:{type:"string",description:"The selector expression to use to get the text, such as: someVariable.0.someField"}})},w={name:"hostless-dynamic-image",displayName:"Dynamic Image",importName:"DynamicImage",importPath:c,props:s({},g,{selector:{type:"string",description:"The selector expression to use to get the image source URL, such as: someVariable.0.someField"}})};function N(e){if(null==e)throw new Error("Value must not be undefined or null");return e}function D(e){var t=e.className,r=e.code,s=e.hideInEditor,n=void 0!==s&&s,i=o.useRef(null);return o.useEffect((function(){n||Array.from(N(i.current).querySelectorAll("script")).forEach((function(e){var t=document.createElement("script");Array.from(e.attributes).forEach((function(e){return t.setAttribute(e.name,e.value)})),t.appendChild(document.createTextNode(e.innerHTML)),N(e.parentNode).replaceChild(t,e)}))}),[r,n]),a.createElement("div",{ref:i,className:t,dangerouslySetInnerHTML:{__html:n?"":r}})}var S={name:"hostless-embed",displayName:"Embed HTML",importName:"Embed",importPath:"@plasmicpkgs/plasmic-basic-components",props:{code:{type:"code",lang:"html",defaultValueHint:"\x3c!-- HTML snippet --\x3e",description:"The HTML code to be embedded"},hideInEditor:{type:"boolean",displayName:"Hide in editor",description:"Disable running the code while editing in Plasmic Studio (may require reload)",editOnly:!0}},defaultStyles:{maxWidth:"100%"}};function P(e){var r=e.preview,s=e.src,n=e.className;return o.useContext(t.PlasmicCanvasContext)&&!r?a.createElement("div",{className:n},a.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,background:"#eee",color:"#888",fontSize:"36px",fontFamily:"sans-serif",fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"}},"Iframe placeholder")):a.createElement("iframe",{src:s,className:n})}var T={name:"hostless-iframe",displayName:"Iframe",importName:"Iframe",importPath:"@plasmicpkgs/plasmic-basic-components",props:{src:{type:"string",defaultValue:"https://www.example.com"},preview:{type:"boolean",description:"Load the iframe while editing in Plasmic Studio"}},defaultStyles:{width:"300px",height:"150px",maxWidth:"100%"}};function C(e){var t=e.ref,r=e.scrollDownThreshold,a=void 0===r?.5:r,s=e.scrollUpThreshold,n=void 0===s?0:s,i=o.useState(!1),l=i[0],p=i[1];return o.useEffect((function(){if(t.current&&"function"==typeof IntersectionObserver){var e=new IntersectionObserver((function(e){e[0].intersectionRatio>=a?p(!0):e[0].intersectionRatio<=n&&p(!1)}),{root:null,rootMargin:"0%",threshold:[n,a]});return e.observe(t.current),function(){p(!1),e.disconnect()}}return function(){}}),[t.current,a,n]),l}function I(e){var t=e.children,r=e.className,s=e.scrollDownThreshold,n=void 0===s?.5:s,i=e.scrollUpThreshold,l=void 0===i?0:i,p=o.useRef(null),c=C({ref:p,scrollUpThreshold:l,scrollDownThreshold:n});return a.createElement("div",{className:r,ref:p},c?t:null)}var R={name:"hostless-scroll-revealer",importName:"ScrollRevealer",displayName:"Scroll Revealer",importPath:"@plasmicpkgs/plasmic-basic-components",props:{children:"slot",scrollDownThreshold:{type:"number",displayName:"Scroll down threshold",defaultValueHint:.5,description:"How much of the element (as a fraction) must you scroll into view for it to appear (defaults to 0.5)"},scrollUpThreshold:{type:"number",displayName:"Scroll up threshold",defaultValueHint:0,description:"While scrolling up, how much of the element (as a fraction) can still be scrolled in view before it disappears (defaults to 0, meaning you must scroll up until it's completely out of view)"}},defaultStyles:{width:"stretch",maxWidth:"100%"}},M=a.forwardRef((function(e,t){return a.createElement("video",Object.assign({ref:t},e))})),V={name:"hostless-html-video",importName:"Video",displayName:"HTML Video",importPath:"@plasmicpkgs/plasmic-basic-components",props:{src:{type:"string",defaultValue:"https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm",displayName:"Source URL",description:"URL to a video file."},autoPlay:{type:"boolean",displayName:"Auto Play",description:"Whether the video show automatically start playing when the player loads"},controls:{type:"boolean",displayName:"Show Controls",description:"Whether the video player controls should be displayed"},playsInline:{type:"boolean",displayName:"Plays inline",description:"Usually on mobile, when tilted landscape, videos can play fullscreen. Turn this on to prevent that."},loop:{type:"boolean",displayName:"Loop",description:"Whether the video should be played again after it finishes"},muted:{type:"boolean",displayName:"Muted",description:"Whether audio should be muted"},poster:{type:"imageUrl",displayName:"Poster (placeholder) image",description:"Image to show while video is downloading"},preload:{type:"choice",options:["none","metadata","auto"],displayName:"Preload",description:"Whether to preload nothing, metadata only, or the full video"}},defaultStyles:{height:"hug",width:"640px",maxWidth:"100%"}};function H(e){return a.createElement("style",{dangerouslySetInnerHTML:{__html:e.css}})}var j={name:"hostless-embed-css",displayName:"Embed Css",importName:"EmbedCss",importPath:"@plasmicpkgs/plasmic-basic-components",props:{css:{type:"code",lang:"css",defaultValueHint:"/* CSS snippet */",description:"CSS rules to be inserted"}}};exports.DataProvider=function(){return console.warn("DEPRECATED: Import DataProvider from @plasmicapp/host instead."),t.DataProvider.apply(void 0,arguments)},exports.DynamicElement=m,exports.DynamicImage=u,exports.DynamicRepeater=h,exports.DynamicText=d,exports.Embed=D,exports.EmbedCss=H,exports.Iframe=P,exports.ScrollRevealer=I,exports.Video=M,exports.applySelector=function(){return console.warn("DEPRECATED: Import applySelector from @plasmicapp/host instead."),t.applySelector.apply(void 0,arguments)},exports.dataProviderMeta=v,exports.dynamicElementMeta=x,exports.dynamicImageMeta=w,exports.dynamicRepeaterMeta=f,exports.dynamicRepeaterProps=y,exports.dynamicTextMeta=E,exports.embedCssMeta=j,exports.embedMeta=S,exports.iframeMeta=T,exports.registerDataProvider=function(e,o){e?e.registerComponent(t.DataProvider,null!=o?o:v):r(t.DataProvider,null!=o?o:v)},exports.registerDynamicElement=function(e,t){e?e.registerComponent(m,null!=t?t:x):r(m,null!=t?t:x)},exports.registerDynamicImage=function(e,t){e?e.registerComponent(u,null!=t?t:w):r(u,null!=t?t:w)},exports.registerDynamicRepeater=function(e,t){e?e.registerComponent(h,null!=t?t:f):r(h,null!=t?t:f)},exports.registerDynamicText=function(e,t){e?e.registerComponent(d,null!=t?t:E):r(d,null!=t?t:E)},exports.registerEmbed=function(e,t){e?e.registerComponent(D,null!=t?t:S):r(D,null!=t?t:S)},exports.registerEmbedCss=function(e,t){e?e.registerComponent(H,null!=t?t:j):r(H,null!=t?t:j)},exports.registerIframe=function(e,t){e?e.registerComponent(P,null!=t?t:T):r(P,null!=t?t:T)},exports.registerScrollRevealer=function(e,t){e?e.registerComponent(I,null!=t?t:R):r(I,null!=t?t:R)},exports.registerVideo=function(e,t){e?e.registerComponent(M,null!=t?t:V):r(M,null!=t?t:V)},exports.scrollRevealerMeta=R,exports.useDataEnv=function(){return console.warn("DEPRECATED: Import useDataEnv from @plasmicapp/host instead."),t.useDataEnv.apply(void 0,arguments)},exports.useDirectionalIntersection=C,exports.useSelector=function(){return console.warn("DEPRECATED: Import useSelector from @plasmicapp/host instead."),t.useSelector.apply(void 0,arguments)},exports.useSelectors=function(){return console.warn("DEPRECATED: Import useSelectors from @plasmicapp/host instead."),t.useSelectors.apply(void 0,arguments)},exports.videoMeta=V;
|
|
2
2
|
//# sourceMappingURL=plasmic-basic-components.cjs.production.min.js.map
|