@player-ui/reference-assets-plugin-react 0.8.0--canary.307.9621 → 0.8.0-next.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 (76) hide show
  1. package/dist/cjs/index.cjs +581 -0
  2. package/dist/cjs/index.cjs.map +1 -0
  3. package/dist/index.css +703 -0
  4. package/dist/index.legacy-esm.js +529 -0
  5. package/dist/index.mjs +529 -0
  6. package/dist/index.mjs.map +1 -0
  7. package/package.json +34 -63
  8. package/src/__tests__/integration.test.tsx +158 -0
  9. package/src/assets/action/Action.tsx +10 -14
  10. package/src/assets/action/hooks.tsx +6 -6
  11. package/src/assets/action/index.ts +2 -2
  12. package/src/assets/choice/Choice.tsx +52 -0
  13. package/src/assets/choice/hooks.tsx +34 -0
  14. package/src/assets/choice/index.ts +2 -0
  15. package/src/assets/collection/Collection.tsx +6 -9
  16. package/src/assets/collection/index.tsx +1 -1
  17. package/src/assets/image/Image.tsx +4 -4
  18. package/src/assets/image/index.tsx +1 -1
  19. package/src/assets/index.tsx +7 -6
  20. package/src/assets/info/Info.tsx +26 -29
  21. package/src/assets/info/index.tsx +1 -1
  22. package/src/assets/input/Input.tsx +27 -19
  23. package/src/assets/input/hooks.tsx +35 -35
  24. package/src/assets/input/index.tsx +2 -2
  25. package/src/assets/input/types.ts +2 -2
  26. package/src/assets/text/Text.tsx +13 -7
  27. package/src/assets/text/hooks.tsx +6 -6
  28. package/src/assets/text/index.tsx +2 -2
  29. package/src/components/Button.tsx +56 -0
  30. package/src/components/ChoiceItem.tsx +31 -0
  31. package/src/components/Input.tsx +26 -0
  32. package/src/components/Label.tsx +26 -0
  33. package/src/components/Separator.tsx +30 -0
  34. package/src/global.css +83 -0
  35. package/src/index.tsx +4 -2
  36. package/src/intro.stories.mdx +9 -9
  37. package/src/plugin.tsx +22 -43
  38. package/src/utils.ts +6 -0
  39. package/types/assets/action/Action.d.ts +7 -0
  40. package/types/assets/action/hooks.d.ts +9 -0
  41. package/types/assets/action/index.d.ts +3 -0
  42. package/types/assets/choice/Choice.d.ts +6 -0
  43. package/types/assets/choice/hooks.d.ts +5 -0
  44. package/types/assets/choice/index.d.ts +3 -0
  45. package/types/assets/collection/Collection.d.ts +4 -0
  46. package/types/assets/collection/index.d.ts +2 -0
  47. package/types/assets/image/Image.d.ts +4 -0
  48. package/types/assets/image/index.d.ts +2 -0
  49. package/types/assets/index.d.ts +8 -0
  50. package/types/assets/info/Info.d.ts +5 -0
  51. package/types/assets/info/index.d.ts +2 -0
  52. package/types/assets/input/Input.d.ts +6 -0
  53. package/types/assets/input/hooks.d.ts +40 -0
  54. package/types/assets/input/index.d.ts +3 -0
  55. package/types/assets/input/types.d.ts +3 -0
  56. package/types/assets/text/Text.d.ts +7 -0
  57. package/types/assets/text/hooks.d.ts +9 -0
  58. package/types/assets/text/index.d.ts +3 -0
  59. package/types/components/Button.d.ts +12 -0
  60. package/types/components/ChoiceItem.d.ts +7 -0
  61. package/types/components/Input.d.ts +6 -0
  62. package/types/components/Label.d.ts +6 -0
  63. package/types/components/Separator.d.ts +5 -0
  64. package/types/index.d.ts +4 -0
  65. package/types/plugin.d.ts +19 -0
  66. package/types/utils.d.ts +3 -0
  67. package/dist/index.cjs.js +0 -501
  68. package/dist/index.d.ts +0 -94
  69. package/dist/index.esm.js +0 -479
  70. package/dist/xlr/ActionAsset.json +0 -126
  71. package/dist/xlr/CollectionAsset.json +0 -40
  72. package/dist/xlr/InfoAsset.json +0 -58
  73. package/dist/xlr/InputAsset.json +0 -109
  74. package/dist/xlr/TextAsset.json +0 -125
  75. package/dist/xlr/manifest.js +0 -16
  76. package/dist/xlr/manifest.json +0 -22
package/dist/index.mjs ADDED
@@ -0,0 +1,529 @@
1
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/plugin.tsx
2
+ import { AssetProviderPlugin } from "@player-ui/asset-provider-plugin-react";
3
+ import { ReferenceAssetsPlugin as ReferenceAssetsCorePlugin } from "@player-ui/reference-assets-plugin";
4
+
5
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/input/Input.tsx
6
+ import React4 from "react";
7
+ import { ReactAsset } from "@player-ui/react";
8
+
9
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/components/Input.tsx
10
+ import * as React from "react";
11
+
12
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/utils.ts
13
+ import { clsx } from "clsx";
14
+ import { twMerge } from "tailwind-merge";
15
+ function cn(...inputs) {
16
+ return twMerge(clsx(inputs));
17
+ }
18
+
19
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/components/Input.tsx
20
+ var Input = React.forwardRef(
21
+ ({ className, type, ...props }, ref) => {
22
+ return /* @__PURE__ */ React.createElement(
23
+ "input",
24
+ {
25
+ type,
26
+ className: cn(
27
+ "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
28
+ className
29
+ ),
30
+ ref,
31
+ ...props
32
+ }
33
+ );
34
+ }
35
+ );
36
+ Input.displayName = "Input";
37
+
38
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/components/Label.tsx
39
+ import * as React2 from "react";
40
+ import * as LabelPrimitive from "@radix-ui/react-label";
41
+ import { cva } from "class-variance-authority";
42
+ var labelVariants = cva(
43
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
44
+ );
45
+ var Label = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
46
+ LabelPrimitive.Root,
47
+ {
48
+ ref,
49
+ className: cn(labelVariants(), className),
50
+ ...props
51
+ }
52
+ ));
53
+ Label.displayName = LabelPrimitive.Root.displayName;
54
+
55
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/input/hooks.tsx
56
+ import React3 from "react";
57
+ import { useBeacon } from "@player-ui/beacon-plugin-react";
58
+ var defaultKeyStrings = [
59
+ "Delete",
60
+ "Backspace",
61
+ "Tab",
62
+ "Home",
63
+ "End",
64
+ "ArrowLeft",
65
+ "ArrowRight",
66
+ "ArrowUp",
67
+ "ArrowDown",
68
+ "Escape"
69
+ ];
70
+ var getConfig = (userConfig = {}) => {
71
+ return {
72
+ liveFormat: true,
73
+ suppressBeacons: false,
74
+ quickFormatDelay: 200,
75
+ slowFormatDelay: 1e3,
76
+ slowFormatKeys: defaultKeyStrings,
77
+ decimalSymbol: ".",
78
+ prefix: "",
79
+ suffix: "",
80
+ ...userConfig
81
+ };
82
+ };
83
+ var useInputBeacon = (props) => {
84
+ const beaconHandler = useBeacon({ element: "text_input", asset: props });
85
+ return (newValue) => {
86
+ let action = "modified";
87
+ if (newValue === props.value) {
88
+ return;
89
+ }
90
+ if (newValue && !props.value) {
91
+ action = "added";
92
+ } else if (!newValue && props.value) {
93
+ action = "deleted";
94
+ }
95
+ beaconHandler({ action });
96
+ };
97
+ };
98
+ var useInputAsset = (props, config) => {
99
+ const [localValue, setLocalValue] = React3.useState(props.value ?? "");
100
+ const formatTimerRef = React3.useRef(void 0);
101
+ const inputBeacon = useInputBeacon(props);
102
+ const {
103
+ liveFormat,
104
+ suppressBeacons,
105
+ quickFormatDelay,
106
+ slowFormatDelay,
107
+ slowFormatKeys,
108
+ decimalSymbol,
109
+ prefix,
110
+ suffix
111
+ } = getConfig(config);
112
+ function clearPending() {
113
+ if (formatTimerRef.current) {
114
+ clearTimeout(formatTimerRef.current);
115
+ formatTimerRef.current = void 0;
116
+ }
117
+ }
118
+ function getFormatDelaySpeed(e) {
119
+ const key = slowFormatKeys.every((k) => typeof k === "number") ? e.which : e.key;
120
+ return slowFormatKeys.includes(key) ? slowFormatDelay : quickFormatDelay;
121
+ }
122
+ function handleAffixOnFocus(target) {
123
+ let val = target.value;
124
+ if (suffix)
125
+ val = val.substring(0, val.indexOf(suffix));
126
+ if (prefix && !val.includes(prefix)) {
127
+ val = `${prefix}${val}`;
128
+ }
129
+ return val;
130
+ }
131
+ function handlePrefixEdgeCases(e) {
132
+ const target = e.target;
133
+ const start = target.selectionStart;
134
+ const end = target.selectionEnd;
135
+ const pl = prefix.length;
136
+ const atStart = start === pl;
137
+ const atEnd = end === pl;
138
+ if (start && end && start < pl) {
139
+ e.preventDefault();
140
+ target.setSelectionRange(pl, end - start + pl);
141
+ } else if (e.key === "ArrowLeft" && atStart || e.key === "Backspace" && atStart && atEnd || e.key === "Home") {
142
+ e.preventDefault();
143
+ target.setSelectionRange(prefix.length, prefix.length);
144
+ }
145
+ }
146
+ function formatValueWithAffix(value) {
147
+ if (!value)
148
+ return "";
149
+ return `${prefix}${value}${suffix}`;
150
+ }
151
+ const onKeyDownHandler = (currentValue) => {
152
+ const symbolPosition = currentValue.indexOf(decimalSymbol);
153
+ const newValue = props.format(currentValue) ?? "";
154
+ const newSymbolPosition = newValue.indexOf(decimalSymbol);
155
+ if ((symbolPosition === -1 || symbolPosition === 0) && newSymbolPosition > 0) {
156
+ return {
157
+ newValue: newValue.includes(prefix) ? `${newValue}` : `${prefix}${newValue}`,
158
+ newCursorPosition: newValue.includes(prefix) ? newSymbolPosition : newSymbolPosition + prefix.length
159
+ };
160
+ }
161
+ return {
162
+ newValue: newValue.includes(prefix) ? `${newValue}` : `${prefix}${newValue}`
163
+ };
164
+ };
165
+ const onBlur = (e) => {
166
+ clearPending();
167
+ const formatted = (prefix ? e.target.value.replace(prefix, "") : props.format(e.target.value)) ?? "";
168
+ if (formatted) {
169
+ props.set(formatted);
170
+ setLocalValue(formatValueWithAffix(formatted));
171
+ } else {
172
+ props.set("");
173
+ setLocalValue("");
174
+ }
175
+ if (!suppressBeacons) {
176
+ inputBeacon(formatted);
177
+ }
178
+ };
179
+ const onChange = (e) => {
180
+ setLocalValue(e.target.value);
181
+ };
182
+ const onKeyDown = (e) => {
183
+ clearPending();
184
+ if (prefix)
185
+ handlePrefixEdgeCases(e);
186
+ const target = e.target;
187
+ if (liveFormat) {
188
+ formatTimerRef.current = setTimeout(() => {
189
+ const cursorPosition = target.selectionStart;
190
+ const currentValue = target.value;
191
+ if (cursorPosition !== currentValue.length) {
192
+ return;
193
+ }
194
+ const obj = onKeyDownHandler(currentValue);
195
+ setLocalValue(obj.newValue);
196
+ target.selectionStart = obj.newCursorPosition ?? target.selectionStart;
197
+ target.selectionEnd = obj.newCursorPosition ?? target.selectionEnd;
198
+ }, getFormatDelaySpeed(e));
199
+ }
200
+ };
201
+ const onFocus = (e) => {
202
+ const target = e.target;
203
+ const inputEmpty = target.value === "";
204
+ if (!inputEmpty && suffix || inputEmpty && prefix) {
205
+ setLocalValue(handleAffixOnFocus(target));
206
+ }
207
+ };
208
+ const propsValue = props.value;
209
+ React3.useEffect(() => {
210
+ setLocalValue(formatValueWithAffix(propsValue));
211
+ }, [propsValue]);
212
+ React3.useEffect(() => clearPending, []);
213
+ return {
214
+ onBlur,
215
+ onChange,
216
+ onKeyDown,
217
+ onFocus,
218
+ value: localValue
219
+ };
220
+ };
221
+
222
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/input/Input.tsx
223
+ var Input2 = (props) => {
224
+ const { validation, label, id, note } = props;
225
+ const inputProps = useInputAsset(props);
226
+ return /* @__PURE__ */ React4.createElement("div", { className: "grid w-full max-w-sm items-center gap-1.5" }, label && /* @__PURE__ */ React4.createElement(Label, { htmlFor: id }, /* @__PURE__ */ React4.createElement(ReactAsset, { ...label })), /* @__PURE__ */ React4.createElement(
227
+ Input,
228
+ {
229
+ id,
230
+ "aria-invalid": Boolean(validation),
231
+ "aria-describedby": validation ? `${id}-validation` : void 0,
232
+ ...inputProps
233
+ }
234
+ ), validation && /* @__PURE__ */ React4.createElement(
235
+ Label,
236
+ {
237
+ id: `${id}-validation`,
238
+ className: "text-[0.8rem] font-medium text-destructive"
239
+ },
240
+ validation.message
241
+ ), note && /* @__PURE__ */ React4.createElement(Label, { className: "text-[0.8rem] text-muted-foreground" }, /* @__PURE__ */ React4.createElement(ReactAsset, { ...note })));
242
+ };
243
+
244
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/text/Text.tsx
245
+ import React6 from "react";
246
+
247
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/text/hooks.tsx
248
+ import React5, { useContext } from "react";
249
+ import makeClass from "clsx";
250
+ import { useAssetProps } from "@player-ui/react";
251
+ var TextModifierContext = React5.createContext(void 0);
252
+ var useText = (props) => {
253
+ let className;
254
+ const modifierContext = useContext(TextModifierContext);
255
+ if (props.modifiers && modifierContext?.getClassForModifier) {
256
+ className = makeClass(
257
+ ...props.modifiers.map(modifierContext.getClassForModifier)
258
+ );
259
+ }
260
+ return {
261
+ ...useAssetProps(props),
262
+ className,
263
+ children: props.value
264
+ };
265
+ };
266
+
267
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/text/Text.tsx
268
+ var getLinkModifier = (asset) => {
269
+ return asset.modifiers?.find(
270
+ (mod) => mod.type === "link" && mod.metaData?.ref !== void 0
271
+ );
272
+ };
273
+ var Text = (props) => {
274
+ const spanProps = useText(props);
275
+ const linkModifier = getLinkModifier(props);
276
+ const { value } = props;
277
+ if (linkModifier) {
278
+ return /* @__PURE__ */ React6.createElement(
279
+ "a",
280
+ {
281
+ className: "underline text-blue-600 hover:text-blue-800 visited:text-purple-600",
282
+ href: linkModifier.metaData.ref
283
+ },
284
+ value
285
+ );
286
+ }
287
+ return /* @__PURE__ */ React6.createElement("span", { ...spanProps }, value);
288
+ };
289
+
290
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/collection/Collection.tsx
291
+ import React7 from "react";
292
+ import { ReactAsset as ReactAsset2 } from "@player-ui/react";
293
+ var Collection = (props) => {
294
+ return /* @__PURE__ */ React7.createElement("div", { className: "flex flex-col gap-4" }, props.label && /* @__PURE__ */ React7.createElement("h3", null, /* @__PURE__ */ React7.createElement(ReactAsset2, { ...props.label })), props.values?.map((a) => /* @__PURE__ */ React7.createElement(ReactAsset2, { key: a.asset.id, ...a })));
295
+ };
296
+
297
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/action/Action.tsx
298
+ import React10 from "react";
299
+ import { ReactAsset as ReactAsset4 } from "@player-ui/react";
300
+ import { ChevronLeftIcon } from "lucide-react";
301
+ import { isBackAction } from "@player-ui/reference-assets-plugin";
302
+
303
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/action/hooks.tsx
304
+ import React8 from "react";
305
+ import { ReactAsset as ReactAsset3 } from "@player-ui/react";
306
+ import { useBeacon as useBeacon2 } from "@player-ui/beacon-plugin-react";
307
+ var useAction = (props) => {
308
+ const { label } = props;
309
+ const beacon = useBeacon2({
310
+ asset: props,
311
+ action: "clicked",
312
+ element: "button"
313
+ });
314
+ return {
315
+ id: props.id,
316
+ onClick: () => {
317
+ beacon();
318
+ props.run();
319
+ },
320
+ children: label?.asset ? /* @__PURE__ */ React8.createElement(ReactAsset3, { ...label?.asset }) : null
321
+ };
322
+ };
323
+
324
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/components/Button.tsx
325
+ import * as React9 from "react";
326
+ import { Slot } from "@radix-ui/react-slot";
327
+ import { cva as cva2 } from "class-variance-authority";
328
+ var buttonVariants = cva2(
329
+ "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
330
+ {
331
+ variants: {
332
+ variant: {
333
+ default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
334
+ destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
335
+ outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
336
+ secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
337
+ ghost: "hover:bg-accent hover:text-accent-foreground",
338
+ link: "text-primary underline-offset-4 hover:underline"
339
+ },
340
+ size: {
341
+ default: "h-9 px-4 py-2",
342
+ sm: "h-8 rounded-md px-3 text-xs",
343
+ lg: "h-10 rounded-md px-8",
344
+ icon: "h-9 w-9"
345
+ }
346
+ },
347
+ defaultVariants: {
348
+ variant: "default",
349
+ size: "default"
350
+ }
351
+ }
352
+ );
353
+ var Button = React9.forwardRef(
354
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
355
+ const Comp = asChild ? Slot : "button";
356
+ return /* @__PURE__ */ React9.createElement(
357
+ Comp,
358
+ {
359
+ className: cn(buttonVariants({ variant, size, className })),
360
+ ref,
361
+ ...props
362
+ }
363
+ );
364
+ }
365
+ );
366
+ Button.displayName = "Button";
367
+
368
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/action/Action.tsx
369
+ var Action = (props) => {
370
+ const { label } = props;
371
+ const buttonProps = useAction(props);
372
+ return /* @__PURE__ */ React10.createElement("div", null, /* @__PURE__ */ React10.createElement(
373
+ Button,
374
+ {
375
+ variant: isBackAction(props) ? "outline" : void 0,
376
+ ...buttonProps
377
+ },
378
+ props?.metaData?.role === "back" && /* @__PURE__ */ React10.createElement(ChevronLeftIcon, null),
379
+ label && /* @__PURE__ */ React10.createElement(ReactAsset4, { ...label })
380
+ ));
381
+ };
382
+
383
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/info/Info.tsx
384
+ import React12 from "react";
385
+ import { ReactAsset as ReactAsset5 } from "@player-ui/react";
386
+
387
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/components/Separator.tsx
388
+ import * as React11 from "react";
389
+ import * as SeparatorPrimitive from "@radix-ui/react-separator";
390
+ var Separator = React11.forwardRef(
391
+ ({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ React11.createElement(
392
+ SeparatorPrimitive.Root,
393
+ {
394
+ ref,
395
+ decorative,
396
+ orientation,
397
+ className: cn(
398
+ "shrink-0 bg-border",
399
+ orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
400
+ className
401
+ ),
402
+ ...props
403
+ }
404
+ )
405
+ );
406
+ Separator.displayName = SeparatorPrimitive.Root.displayName;
407
+
408
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/info/Info.tsx
409
+ var Info = (props) => {
410
+ return /* @__PURE__ */ React12.createElement("div", { className: "max-w-full" }, /* @__PURE__ */ React12.createElement("div", { className: "flex flex-col gap-4" }, props.title && /* @__PURE__ */ React12.createElement("h1", { className: "scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl" }, /* @__PURE__ */ React12.createElement(ReactAsset5, { ...props.title })), props.subTitle && /* @__PURE__ */ React12.createElement("h3", { className: "scroll-m-20 text-2xl font-semibold tracking-tight" }, /* @__PURE__ */ React12.createElement(ReactAsset5, { ...props.subTitle })), props.primaryInfo && /* @__PURE__ */ React12.createElement("div", null, /* @__PURE__ */ React12.createElement(ReactAsset5, { ...props.primaryInfo })), /* @__PURE__ */ React12.createElement("div", { className: "flex flex-col gap-4" }, props?.segmentedActions && /* @__PURE__ */ React12.createElement(Separator, null), /* @__PURE__ */ React12.createElement("div", { className: "flex justify-between sm:flex-row flex-col-reverse gap-4" }, /* @__PURE__ */ React12.createElement("div", { className: "flex gap-4" }, props?.segmentedActions?.prev?.map((a) => /* @__PURE__ */ React12.createElement(ReactAsset5, { key: a.asset.id, ...a }))), /* @__PURE__ */ React12.createElement("div", { className: "flex gap-4" }, props?.segmentedActions?.next?.map((a) => /* @__PURE__ */ React12.createElement(ReactAsset5, { key: a.asset.id, ...a })))))));
411
+ };
412
+
413
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/image/Image.tsx
414
+ import React13 from "react";
415
+ import { ReactAsset as ReactAsset6 } from "@player-ui/react";
416
+ var Image = (props) => {
417
+ const { metaData, caption, altText } = props;
418
+ return /* @__PURE__ */ React13.createElement("figure", { className: "figure" }, /* @__PURE__ */ React13.createElement("img", { className: "figure-img img-fluid", src: metaData.ref, alt: altText }), caption && /* @__PURE__ */ React13.createElement("figcaption", { className: "figure-caption", style: { marginTop: 15 } }, /* @__PURE__ */ React13.createElement(ReactAsset6, { ...caption })));
419
+ };
420
+
421
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/choice/Choice.tsx
422
+ import React15 from "react";
423
+ import { ReactAsset as ReactAsset8 } from "@player-ui/react";
424
+
425
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/components/ChoiceItem.tsx
426
+ import React14 from "react";
427
+ import { ReactAsset as ReactAsset7 } from "@player-ui/react";
428
+ var ChoiceItem = (props) => {
429
+ const { label, id, ...rest } = props;
430
+ return /* @__PURE__ */ React14.createElement("div", { className: "flex items-center gap-1.5" }, /* @__PURE__ */ React14.createElement(
431
+ Input,
432
+ {
433
+ type: "radio",
434
+ className: "h-fit w-fit shadow-none",
435
+ id,
436
+ ...rest
437
+ }
438
+ ), label && /* @__PURE__ */ React14.createElement(Label, { htmlFor: id }, /* @__PURE__ */ React14.createElement(ReactAsset7, { ...label })));
439
+ };
440
+
441
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/choice/hooks.tsx
442
+ import { useBeacon as useBeacon3 } from "@player-ui/beacon-plugin-react";
443
+ var useChoiceItems = (props) => {
444
+ const beacon = useBeacon3({
445
+ asset: props,
446
+ action: "clicked",
447
+ element: "choice"
448
+ });
449
+ return props.items?.map((item) => {
450
+ const { id, value, label } = item;
451
+ return {
452
+ id,
453
+ label,
454
+ name: props.id,
455
+ value: (value ?? "").toString(),
456
+ checked: value === props.value,
457
+ onChange: () => {
458
+ beacon();
459
+ item.select();
460
+ }
461
+ };
462
+ }) ?? [];
463
+ };
464
+
465
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/choice/Choice.tsx
466
+ var Choice = (props) => {
467
+ const { validation, title, id, note } = props;
468
+ const choiceItemProps = useChoiceItems(props);
469
+ const renderChoices = () => choiceItemProps.map((choiceItemProp) => /* @__PURE__ */ React15.createElement(ChoiceItem, { key: choiceItemProp.id, ...choiceItemProp }));
470
+ return /* @__PURE__ */ React15.createElement("div", { className: "grid w-full max-w-sm items-center gap-3" }, title && /* @__PURE__ */ React15.createElement(Label, { htmlFor: id }, /* @__PURE__ */ React15.createElement(ReactAsset8, { ...title })), /* @__PURE__ */ React15.createElement(
471
+ "div",
472
+ {
473
+ id: props.id,
474
+ className: "grid gap-2",
475
+ "aria-invalid": Boolean(validation),
476
+ "aria-describedby": validation ? `${id}-validation` : void 0
477
+ },
478
+ renderChoices()
479
+ ), validation && /* @__PURE__ */ React15.createElement(
480
+ Label,
481
+ {
482
+ id: `${id}-validation`,
483
+ className: "text-[0.8rem] font-medium text-destructive"
484
+ },
485
+ validation.message
486
+ ), note && /* @__PURE__ */ React15.createElement(Label, { className: "text-[0.8rem] text-muted-foreground" }, /* @__PURE__ */ React15.createElement(ReactAsset8, { ...note })));
487
+ };
488
+
489
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/plugin.tsx
490
+ var ReferenceAssetsPlugin = class {
491
+ constructor() {
492
+ this.name = "reference-assets-web-plugin";
493
+ }
494
+ applyReact(reactPlayer) {
495
+ reactPlayer.registerPlugin(
496
+ new AssetProviderPlugin([
497
+ ["input", Input2],
498
+ ["text", Text],
499
+ ["action", Action],
500
+ ["info", Info],
501
+ ["collection", Collection],
502
+ ["image", Image],
503
+ ["choice", Choice]
504
+ ])
505
+ );
506
+ }
507
+ apply(player) {
508
+ player.registerPlugin(new ReferenceAssetsCorePlugin());
509
+ }
510
+ };
511
+ export {
512
+ Action,
513
+ Choice,
514
+ Collection,
515
+ Image,
516
+ Info,
517
+ Input2 as Input,
518
+ ReferenceAssetsPlugin,
519
+ Text,
520
+ TextModifierContext,
521
+ getConfig,
522
+ getLinkModifier,
523
+ useAction,
524
+ useChoiceItems,
525
+ useInputAsset,
526
+ useInputBeacon,
527
+ useText
528
+ };
529
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/plugin.tsx","../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/input/Input.tsx","../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/components/Input.tsx","../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/utils.ts","../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/components/Label.tsx","../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/input/hooks.tsx","../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/text/Text.tsx","../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/text/hooks.tsx","../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/collection/Collection.tsx","../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/action/Action.tsx","../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/action/hooks.tsx","../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/components/Button.tsx","../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/info/Info.tsx","../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/components/Separator.tsx","../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/image/Image.tsx","../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/choice/Choice.tsx","../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/components/ChoiceItem.tsx","../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/choice/hooks.tsx"],"sourcesContent":["import React from \"react\";\nimport type {\n ReactPlayer,\n ReactPlayerPlugin,\n Player,\n ExtendedPlayerPlugin,\n} from \"@player-ui/react\";\nimport { AssetProviderPlugin } from \"@player-ui/asset-provider-plugin-react\";\nimport type {\n InputAsset,\n TextAsset,\n CollectionAsset,\n ActionAsset,\n InfoAsset,\n ChoiceAsset,\n} from \"@player-ui/reference-assets-plugin\";\nimport { ReferenceAssetsPlugin as ReferenceAssetsCorePlugin } from \"@player-ui/reference-assets-plugin\";\nimport { Input, Text, Collection, Action, Info, Image, Choice } from \"./assets\";\n\n/**\n * A plugin to register the base reference assets\n */\nexport class ReferenceAssetsPlugin\n implements\n ReactPlayerPlugin,\n ExtendedPlayerPlugin<\n [InputAsset, TextAsset, ActionAsset, CollectionAsset, ChoiceAsset],\n [InfoAsset]\n >\n{\n name = \"reference-assets-web-plugin\";\n\n applyReact(reactPlayer: ReactPlayer) {\n reactPlayer.registerPlugin(\n new AssetProviderPlugin([\n [\"input\", Input],\n [\"text\", Text],\n [\"action\", Action],\n [\"info\", Info],\n [\"collection\", Collection],\n [\"image\", Image],\n [\"choice\", Choice],\n ]),\n );\n }\n\n apply(player: Player) {\n player.registerPlugin(new ReferenceAssetsCorePlugin());\n }\n}\n","import React from \"react\";\nimport { ReactAsset } from \"@player-ui/react\";\nimport type { TransformedInput } from \"@player-ui/reference-assets-plugin\";\nimport { Input as InputComp } from \"../../components/Input\";\nimport { Label } from \"../../components/Label\";\n\nimport { useInputAsset } from \"./hooks\";\n\n/** An Input */\nexport const Input = (props: TransformedInput) => {\n const { validation, label, id, note } = props;\n const inputProps = useInputAsset(props);\n\n return (\n <div className=\"grid w-full max-w-sm items-center gap-1.5\">\n {label && (\n <Label htmlFor={id}>\n <ReactAsset {...label} />\n </Label>\n )}\n <InputComp\n id={id}\n aria-invalid={Boolean(validation)}\n aria-describedby={validation ? `${id}-validation` : undefined}\n {...inputProps}\n />\n {validation && (\n <Label\n id={`${id}-validation`}\n className=\"text-[0.8rem] font-medium text-destructive\"\n >\n {validation.message}\n </Label>\n )}\n {note && (\n <Label className=\"text-[0.8rem] text-muted-foreground\">\n <ReactAsset {...note} />\n </Label>\n )}\n </div>\n );\n};\n\nexport default Input;\n","/* eslint-disable @typescript-eslint/no-empty-interface */\nimport * as React from \"react\";\n\nimport { cn } from \"../utils\";\n\nexport interface InputProps\n extends React.InputHTMLAttributes<HTMLInputElement> {}\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n ref={ref}\n {...props}\n />\n );\n },\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../utils\";\n\nconst labelVariants = cva(\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\",\n);\n\nconst Label = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &\n VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n <LabelPrimitive.Root\n ref={ref}\n className={cn(labelVariants(), className)}\n {...props}\n />\n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label };\n","import React from \"react\";\nimport { useBeacon } from \"@player-ui/beacon-plugin-react\";\nimport type { TransformedInput } from \"@player-ui/reference-assets-plugin\";\nimport type { KeyDownHandler } from \"./types\";\n\nexport interface InputHookConfig {\n /** Format the input as the user keys down */\n liveFormat?: boolean;\n\n /** Skip sending beacon events for this input */\n suppressBeacons?: boolean;\n\n /** Time (ms) to wait before formatting the user input for normal keys */\n quickFormatDelay?: number;\n\n /** Time (ms) to wait before formatting the input after the user types a special _slow_ format key */\n slowFormatDelay?: number;\n\n /** Keys to use a slower formatter for. Usually reserved for backspace, arrows, tabs, etc */\n slowFormatKeys?: Array<number | string>;\n\n /** Symbol to be used for decimal point */\n decimalSymbol?: string;\n\n /** Affix to append to value - does not save to model and is only for display on input */\n prefix?: string;\n\n /** Affix to prepend to value - does not save to model and is only for display on input */\n suffix?: string;\n}\n\nconst defaultKeyStrings = [\n \"Delete\",\n \"Backspace\",\n \"Tab\",\n \"Home\",\n \"End\",\n \"ArrowLeft\",\n \"ArrowRight\",\n \"ArrowUp\",\n \"ArrowDown\",\n \"Escape\",\n];\n\n/** Create a valid config mixing in defaults and user overrides */\nexport const getConfig = (\n userConfig: InputHookConfig = {},\n): Required<InputHookConfig> => {\n return {\n liveFormat: true,\n suppressBeacons: false,\n quickFormatDelay: 200,\n slowFormatDelay: 1000,\n slowFormatKeys: defaultKeyStrings,\n decimalSymbol: \".\",\n prefix: \"\",\n suffix: \"\",\n ...userConfig,\n };\n};\n\n/** A hook to manage beacon changes for input assets */\nexport const useInputBeacon = (props: TransformedInput) => {\n const beaconHandler = useBeacon({ element: \"text_input\", asset: props });\n\n return (newValue: string) => {\n let action = \"modified\";\n\n if (newValue === props.value) {\n return;\n }\n\n if (newValue && !props.value) {\n action = \"added\";\n } else if (!newValue && props.value) {\n action = \"deleted\";\n }\n\n beaconHandler({ action });\n };\n};\n\n/**\n * A hook to manage an input html element as an asset.\n * The hook returns an object containing props that are expected to reside on any html input.\n * It will handle formatting, setting values, beaconing, aria-labels, etc.\n *\n * @param props - The output of the input transform\n * @param config - Local config to manage user interaction overrides\n */\nexport const useInputAsset = (\n props: TransformedInput,\n config?: InputHookConfig,\n) => {\n const [localValue, setLocalValue] = React.useState(props.value ?? \"\");\n const formatTimerRef = React.useRef<NodeJS.Timeout | undefined>(undefined);\n const inputBeacon = useInputBeacon(props);\n\n const {\n liveFormat,\n suppressBeacons,\n quickFormatDelay,\n slowFormatDelay,\n slowFormatKeys,\n decimalSymbol,\n prefix,\n suffix,\n } = getConfig(config);\n\n /** Reset and pending format timers */\n function clearPending() {\n if (formatTimerRef.current) {\n clearTimeout(formatTimerRef.current);\n formatTimerRef.current = undefined;\n }\n }\n\n /** Determines whether pressed key should trigger slow format or quick format delay */\n function getFormatDelaySpeed(e: React.KeyboardEvent<HTMLInputElement>) {\n const key = slowFormatKeys.every((k) => typeof k === \"number\")\n ? e.which\n : e.key;\n\n return slowFormatKeys.includes(key) ? slowFormatDelay : quickFormatDelay;\n }\n\n /** Affix handling logic on focus */\n function handleAffixOnFocus(target: HTMLInputElement) {\n let val = target.value;\n\n if (suffix) val = val.substring(0, val.indexOf(suffix));\n\n if (prefix && !val.includes(prefix)) {\n val = `${prefix}${val}`;\n }\n\n return val;\n }\n\n /** Edge cases handling for prefix */\n function handlePrefixEdgeCases(e: React.KeyboardEvent<HTMLInputElement>) {\n const target = e.target as HTMLInputElement;\n const start = target.selectionStart;\n const end = target.selectionEnd;\n const pl = prefix.length;\n const atStart = start === pl;\n const atEnd = end === pl;\n\n if (start && end && start < pl) {\n e.preventDefault();\n target.setSelectionRange(pl, end - start + pl);\n } else if (\n (e.key === \"ArrowLeft\" && atStart) ||\n (e.key === \"Backspace\" && atStart && atEnd) ||\n e.key === \"Home\"\n ) {\n e.preventDefault();\n target.setSelectionRange(prefix.length, prefix.length);\n }\n }\n\n /** Helper to add affixes to value where appropriate */\n function formatValueWithAffix(value: string | undefined) {\n if (!value) return \"\";\n\n return `${prefix}${value}${suffix}`;\n }\n\n /** Value handling logic on key down */\n const onKeyDownHandler: KeyDownHandler = (currentValue: string) => {\n const symbolPosition = currentValue.indexOf(decimalSymbol);\n const newValue = props.format(currentValue) ?? \"\";\n const newSymbolPosition = newValue.indexOf(decimalSymbol);\n\n if (\n (symbolPosition === -1 || symbolPosition === 0) &&\n newSymbolPosition > 0\n ) {\n // formatting added dot, so set cursor before dot\n return {\n newValue: newValue.includes(prefix)\n ? `${newValue}`\n : `${prefix}${newValue}`,\n newCursorPosition: newValue.includes(prefix)\n ? newSymbolPosition\n : newSymbolPosition + prefix.length,\n };\n }\n\n return {\n newValue: newValue.includes(prefix)\n ? `${newValue}`\n : `${prefix}${newValue}`,\n };\n };\n\n /** On blur, commit the value to the model */\n const onBlur: React.FocusEventHandler<HTMLInputElement> = (e) => {\n clearPending();\n\n const formatted =\n (prefix\n ? e.target.value.replace(prefix, \"\")\n : props.format(e.target.value)) ?? \"\";\n\n if (formatted) {\n props.set(formatted);\n setLocalValue(formatValueWithAffix(formatted));\n } else {\n props.set(\"\");\n setLocalValue(\"\");\n }\n\n if (!suppressBeacons) {\n inputBeacon(formatted);\n }\n };\n\n /** Keep track of any user changes */\n const onChange: React.ChangeEventHandler<HTMLInputElement> = (e) => {\n setLocalValue(e.target.value);\n };\n\n /** Schedule a format of the current input in the future */\n const onKeyDown: React.KeyboardEventHandler<HTMLInputElement> = (e) => {\n clearPending();\n\n if (prefix) handlePrefixEdgeCases(e);\n\n const target = e.target as HTMLInputElement;\n\n if (liveFormat) {\n formatTimerRef.current = setTimeout(() => {\n const cursorPosition = target.selectionStart;\n const currentValue = target.value;\n\n /** Skip formatting if we're in the middle of the input */\n if (cursorPosition !== currentValue.length) {\n return;\n }\n\n const obj = onKeyDownHandler(currentValue);\n\n setLocalValue(obj.newValue);\n target.selectionStart = obj.newCursorPosition ?? target.selectionStart;\n target.selectionEnd = obj.newCursorPosition ?? target.selectionEnd;\n }, getFormatDelaySpeed(e));\n }\n };\n\n /** Format value onFocus if affixes exist */\n const onFocus: React.FocusEventHandler<HTMLInputElement> = (e) => {\n const target = e.target as HTMLInputElement;\n const inputEmpty = target.value === \"\";\n\n if ((!inputEmpty && suffix) || (inputEmpty && prefix)) {\n setLocalValue(handleAffixOnFocus(target));\n }\n };\n\n // Update the stored value if data changes\n const propsValue = props.value;\n React.useEffect(() => {\n setLocalValue(formatValueWithAffix(propsValue));\n }, [propsValue]);\n\n /** clear anything pending on unmount of input */\n React.useEffect(() => clearPending, []);\n\n return {\n onBlur,\n onChange,\n onKeyDown,\n onFocus,\n value: localValue,\n };\n};\n","import React from \"react\";\nimport type {\n TextAsset,\n LinkModifier,\n} from \"@player-ui/reference-assets-plugin\";\nimport { useText } from \"./hooks\";\n\n/** Find any link modifiers on the text */\nexport const getLinkModifier = (asset: TextAsset): LinkModifier | undefined => {\n return asset.modifiers?.find(\n (mod) =>\n mod.type === \"link\" &&\n (mod.metaData as LinkModifier[\"metaData\"])?.ref !== undefined,\n ) as LinkModifier;\n};\n\n/** A text asset */\nexport const Text = (props: TextAsset) => {\n const spanProps = useText(props);\n const linkModifier = getLinkModifier(props);\n const { value } = props;\n\n if (linkModifier) {\n return (\n <a\n className=\"underline text-blue-600 hover:text-blue-800 visited:text-purple-600\"\n href={linkModifier.metaData.ref}\n >\n {value}\n </a>\n );\n }\n\n return <span {...spanProps}>{value}</span>;\n};\n","import React, { useContext } from \"react\";\nimport makeClass from \"clsx\";\nimport { useAssetProps } from \"@player-ui/react\";\nimport type { TextAsset } from \"@player-ui/reference-assets-plugin\";\n\nexport interface TextModifierContextType {\n getClassForModifier?<T>(modifier: T): string | undefined;\n}\n\nexport const TextModifierContext = React.createContext<\n TextModifierContextType | undefined\n>(undefined);\n\n/** Get the props for a basic text element */\nexport const useText = (props: TextAsset): JSX.IntrinsicElements[\"span\"] => {\n let className: string | undefined;\n\n const modifierContext = useContext(TextModifierContext);\n\n if (props.modifiers && modifierContext?.getClassForModifier) {\n className = makeClass(\n ...props.modifiers.map(modifierContext.getClassForModifier),\n );\n }\n\n return {\n ...useAssetProps(props),\n className,\n children: props.value,\n };\n};\n","import React from \"react\";\nimport { ReactAsset } from \"@player-ui/react\";\nimport type { CollectionAsset } from \"@player-ui/reference-assets-plugin\";\n\nexport const Collection = (props: CollectionAsset) => {\n return (\n <div className=\"flex flex-col gap-4\">\n {props.label && (\n <h3>\n <ReactAsset {...props.label} />\n </h3>\n )}\n {props.values?.map((a) => <ReactAsset key={a.asset.id} {...a} />)}\n </div>\n );\n};\n","import React from \"react\";\nimport { ReactAsset } from \"@player-ui/react\";\nimport { ChevronLeftIcon } from \"lucide-react\";\nimport type { TransformedAction } from \"@player-ui/reference-assets-plugin\";\nimport { isBackAction } from \"@player-ui/reference-assets-plugin\";\nimport { useAction } from \"./hooks\";\nimport { Button } from \"../../components/Button\";\n\n/**\n * An action that a user can take\n */\nexport const Action = (props: TransformedAction) => {\n const { label } = props;\n const buttonProps = useAction(props);\n\n return (\n <div>\n <Button\n variant={isBackAction(props) ? \"outline\" : undefined}\n {...buttonProps}\n >\n {props?.metaData?.role === \"back\" && <ChevronLeftIcon />}\n {label && <ReactAsset {...label} />}\n </Button>\n </div>\n );\n};\n","import React from \"react\";\nimport { ReactAsset } from \"@player-ui/react\";\nimport { useBeacon } from \"@player-ui/beacon-plugin-react\";\nimport type { TransformedAction } from \"@player-ui/reference-assets-plugin\";\n\n/** Hook to get all the props for a button */\nexport const useAction = (props: TransformedAction) => {\n const { label } = props;\n const beacon = useBeacon({\n asset: props,\n action: \"clicked\",\n element: \"button\",\n });\n\n return {\n id: props.id,\n onClick: () => {\n beacon();\n props.run();\n },\n children: label?.asset ? <ReactAsset {...label?.asset} /> : null,\n } as const;\n};\n","import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default:\n \"bg-primary text-primary-foreground shadow hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-9 px-4 py-2\",\n sm: \"h-8 rounded-md px-3 text-xs\",\n lg: \"h-10 rounded-md px-8\",\n icon: \"h-9 w-9\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n },\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import React from \"react\";\nimport type { InfoAssetTransform } from \"@player-ui/reference-assets-plugin\";\nimport { ReactAsset } from \"@player-ui/react\";\nimport { Separator } from \"../../components/Separator\";\n\n/** The info view type is used to show information to the user */\nexport const Info = (props: InfoAssetTransform) => {\n return (\n <div className=\"max-w-full\">\n <div className=\"flex flex-col gap-4\">\n {props.title && (\n <h1 className=\"scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl\">\n <ReactAsset {...props.title} />\n </h1>\n )}\n {props.subTitle && (\n <h3 className=\"scroll-m-20 text-2xl font-semibold tracking-tight\">\n <ReactAsset {...props.subTitle} />\n </h3>\n )}\n {props.primaryInfo && (\n <div>\n <ReactAsset {...props.primaryInfo} />\n </div>\n )}\n <div className=\"flex flex-col gap-4\">\n {props?.segmentedActions && <Separator />}\n <div className=\"flex justify-between sm:flex-row flex-col-reverse gap-4\">\n <div className=\"flex gap-4\">\n {props?.segmentedActions?.prev?.map((a) => (\n <ReactAsset key={a.asset.id} {...a} />\n ))}\n </div>\n <div className=\"flex gap-4\">\n {props?.segmentedActions?.next?.map((a) => (\n <ReactAsset key={a.asset.id} {...a} />\n ))}\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n};\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\";\nimport { cn } from \"../utils\";\n\nconst Separator = React.forwardRef<\n React.ElementRef<typeof SeparatorPrimitive.Root>,\n SeparatorPrimitive.SeparatorProps\n>(\n (\n { className, orientation = \"horizontal\", decorative = true, ...props },\n ref,\n ) => (\n <SeparatorPrimitive.Root\n ref={ref}\n decorative={decorative}\n orientation={orientation}\n className={cn(\n \"shrink-0 bg-border\",\n orientation === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\",\n className,\n )}\n {...props}\n />\n ),\n);\nSeparator.displayName = SeparatorPrimitive.Root.displayName;\n\nexport { Separator };\n","import React from \"react\";\nimport { ReactAsset } from \"@player-ui/react\";\nimport type { TransformedImage } from \"@player-ui/reference-assets-plugin\";\n\nexport const Image = (props: TransformedImage) => {\n const { metaData, caption, altText } = props;\n\n return (\n <figure className=\"figure\">\n <img className=\"figure-img img-fluid\" src={metaData.ref} alt={altText} />\n {caption && (\n <figcaption className=\"figure-caption\" style={{ marginTop: 15 }}>\n <ReactAsset {...caption} />\n </figcaption>\n )}\n </figure>\n );\n};\n","import React from \"react\";\nimport { ReactAsset } from \"@player-ui/react\";\nimport type { TransformedChoice } from \"@player-ui/reference-assets-plugin\";\nimport { ChoiceItem } from \"../../components/ChoiceItem\";\nimport { Label } from \"../../components/Label\";\nimport type { ChoiceItemProps } from \"../../components/ChoiceItem\";\n\nimport { useChoiceItems } from \"./hooks\";\n\n/** A Choice */\nexport const Choice = (props: TransformedChoice) => {\n const { validation, title, id, note } = props;\n const choiceItemProps: Array<ChoiceItemProps> = useChoiceItems(props);\n\n const renderChoices = () =>\n choiceItemProps.map((choiceItemProp) => (\n <ChoiceItem key={choiceItemProp.id} {...choiceItemProp} />\n ));\n\n return (\n <div className=\"grid w-full max-w-sm items-center gap-3\">\n {title && (\n <Label htmlFor={id}>\n <ReactAsset {...title} />\n </Label>\n )}\n <div\n id={props.id}\n className=\"grid gap-2\"\n aria-invalid={Boolean(validation)}\n aria-describedby={validation ? `${id}-validation` : undefined}\n >\n {renderChoices()}\n </div>\n {validation && (\n <Label\n id={`${id}-validation`}\n className=\"text-[0.8rem] font-medium text-destructive\"\n >\n {validation.message}\n </Label>\n )}\n {note && (\n <Label className=\"text-[0.8rem] text-muted-foreground\">\n <ReactAsset {...note} />\n </Label>\n )}\n </div>\n );\n};\n\nexport default Choice;\n","import React from \"react\";\nimport { ReactAsset } from \"@player-ui/react\";\nimport { Input as InputComp } from \"./Input\";\nimport { Label } from \"./Label\";\nimport type { ChoiceItem as ChoiceItemType } from \"@player-ui/reference-assets-plugin\";\n\nexport type ChoiceItemProps = React.InputHTMLAttributes<HTMLInputElement> &\n Pick<ChoiceItemType, \"label\">;\n\n/** A choice item */\nexport const ChoiceItem = (props: ChoiceItemProps) => {\n const { label, id, ...rest } = props;\n\n return (\n <div className=\"flex items-center gap-1.5\">\n <InputComp\n type=\"radio\"\n className=\"h-fit w-fit shadow-none\"\n id={id}\n {...rest}\n />\n {label && (\n <Label htmlFor={id}>\n <ReactAsset {...label} />\n </Label>\n )}\n </div>\n );\n};\n\nexport default ChoiceItem;\n","import { useBeacon } from \"@player-ui/beacon-plugin-react\";\nimport type {\n TransformedChoice,\n TransformedChoiceItem,\n} from \"@player-ui/reference-assets-plugin\";\nimport type { ChoiceItemProps } from \"../../components/ChoiceItem\";\n\n/** Hook to get the props for all choice asset items */\nexport const useChoiceItems = (\n props: TransformedChoice,\n): Array<ChoiceItemProps> => {\n const beacon = useBeacon({\n asset: props,\n action: \"clicked\",\n element: \"choice\",\n });\n\n return (\n props.items?.map((item: TransformedChoiceItem) => {\n const { id, value, label } = item;\n return {\n id,\n label,\n name: props.id,\n value: (value ?? \"\").toString(),\n checked: value === props.value,\n onChange: () => {\n beacon();\n item.select();\n },\n };\n }) ?? []\n );\n};\n"],"mappings":";AAOA,SAAS,2BAA2B;AASpC,SAAS,yBAAyB,iCAAiC;;;AChBnE,OAAOA,YAAW;AAClB,SAAS,kBAAkB;;;ACA3B,YAAY,WAAW;;;ACDvB,SAAS,YAA6B;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADGA,IAAM,QAAc;AAAA,EAClB,CAAC,EAAE,WAAW,MAAM,GAAG,MAAM,GAAG,QAAQ;AACtC,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,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,GAEF,gBAAAD,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,IAAI,MAAM;AAAA,MACV,WAAU;AAAA,MACV,gBAAc,QAAQ,UAAU;AAAA,MAChC,oBAAkB,aAAa,GAAG,EAAE,gBAAgB;AAAA;AAAA,IAEnD,cAAc;AAAA,EACjB,GACC,cACC,gBAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,IAAI,GAAG,EAAE;AAAA,MACT,WAAU;AAAA;AAAA,IAET,WAAW;AAAA,EACd,GAED,QACC,gBAAAA,QAAA,cAAC,SAAM,WAAU,yCACf,gBAAAA,QAAA,cAACC,aAAA,EAAY,GAAG,MAAM,CACxB,CAEJ;AAEJ;;;Af3BO,IAAM,wBAAN,MAOP;AAAA,EAPO;AAQL,gBAAO;AAAA;AAAA,EAEP,WAAW,aAA0B;AACnC,gBAAY;AAAA,MACV,IAAI,oBAAoB;AAAA,QACtB,CAAC,SAASC,MAAK;AAAA,QACf,CAAC,QAAQ,IAAI;AAAA,QACb,CAAC,UAAU,MAAM;AAAA,QACjB,CAAC,QAAQ,IAAI;AAAA,QACb,CAAC,cAAc,UAAU;AAAA,QACzB,CAAC,SAAS,KAAK;AAAA,QACf,CAAC,UAAU,MAAM;AAAA,MACnB,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,MAAM,QAAgB;AACpB,WAAO,eAAe,IAAI,0BAA0B,CAAC;AAAA,EACvD;AACF;","names":["React","React","React","Input","React","React","React","React","React","ReactAsset","React","ReactAsset","React","ReactAsset","useBeacon","React","cva","cva","React","ReactAsset","React","ReactAsset","React","React","ReactAsset","React","ReactAsset","React","ReactAsset","React","ReactAsset","React","ReactAsset","useBeacon","React","ReactAsset","Input"]}