@player-ui/reference-assets-plugin-react 0.15.0 → 0.15.1--canary.802.31569

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.
@@ -39,6 +39,7 @@ __export(src_exports, {
39
39
  ReferenceAssetsPlugin: () => ReferenceAssetsPlugin,
40
40
  Text: () => Text,
41
41
  TextModifierContext: () => TextModifierContext,
42
+ Throwing: () => Throwing,
42
43
  getConfig: () => getConfig,
43
44
  getLinkModifier: () => getLinkModifier,
44
45
  useAction: () => useAction,
@@ -544,6 +545,15 @@ var Choice = (props) => {
544
545
  ), note && /* @__PURE__ */ import_react19.default.createElement(Label, { className: "player-text-[0.8rem] player-text-muted-foreground" }, /* @__PURE__ */ import_react19.default.createElement(import_react20.ReactAsset, { ...note })));
545
546
  };
546
547
 
548
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/throwing/Throwing.tsx
549
+ var import_react21 = __toESM(require("react"));
550
+ var Throwing = (props) => {
551
+ if (props.timing === "render") {
552
+ throw new Error(props.message);
553
+ }
554
+ return /* @__PURE__ */ import_react21.default.createElement("p", null, "Something is configured wrong if you are seeing this");
555
+ };
556
+
547
557
  // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/plugin.tsx
548
558
  var ReferenceAssetsPlugin = class {
549
559
  constructor() {
@@ -558,7 +568,8 @@ var ReferenceAssetsPlugin = class {
558
568
  ["info", Info],
559
569
  ["collection", Collection],
560
570
  ["image", Image],
561
- ["choice", Choice]
571
+ ["choice", Choice],
572
+ ["throwing", Throwing]
562
573
  ])
563
574
  );
564
575
  }
@@ -577,6 +588,7 @@ var ReferenceAssetsPlugin = class {
577
588
  ReferenceAssetsPlugin,
578
589
  Text,
579
590
  TextModifierContext,
591
+ Throwing,
580
592
  getConfig,
581
593
  getLinkModifier,
582
594
  useAction,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/index.tsx","../../../../../../../../../../../../../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 \"./global.css\";\n\nexport * from \"./plugin\";\nexport * from \"./assets\";\n","import 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): void {\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): void {\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=\"player-grid player-w-full player-max-w-sm player-items-center player-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=\"player-text-[0.8rem] player-font-medium player-text-destructive\"\n >\n {validation.message}\n </Label>\n )}\n {note && (\n <Label className=\"player-text-[0.8rem] player-text-muted-foreground\">\n <ReactAsset {...note} />\n </Label>\n )}\n </div>\n );\n};\n\nexport default Input;\n","/* eslint-disable @typescript-eslint/no-empty-object-type */\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 \"player-flex player-h-9 player-w-full player-rounded-md player-border player-border-input player-bg-transparent player-px-3 player-py-1 player-text-sm player-shadow-sm player-transition-colors file:player-border-0 file:player-bg-transparent file:player-text-sm file:player-font-medium placeholder:player-text-muted-foreground focus-visible:player-outline-none focus-visible:player-ring-1 focus-visible:player-ring-ring player-disabled:player-cursor-not-allowed disabled:player-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 \"player-text-sm player-font-medium player-leading-none peer-disabled:player-cursor-not-allowed peer-disabled:player-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=\"player-underline player-text-blue-600 hover:player-text-blue-800 visited:player-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=\"player-flex player-flex-col player-gap-4\">\n {props.label && (\n <h3>\n <ReactAsset {...props.label} />\n </h3>\n )}\n {props.values?.map((a) => (\n <ReactAsset key={a.asset.id} {...a} />\n ))}\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 \"player-inline-flex player-items-center player-justify-center player-whitespace-nowrap player-rounded-md player-text-sm player-font-medium player-transition-colors focus-visible:player-outline-none focus-visible:player-ring-1 focus-visible:player-ring-ring disabled:player-pointer-events-none disabled:player-opacity-50\",\n {\n variants: {\n variant: {\n default:\n \"player-bg-primary player-text-primary-foreground player-shadow hover:player-bg-primary/90\",\n destructive:\n \"player-bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90\",\n outline:\n \"player-border player-border-input player-bg-primary player-text-primary-foreground player-shadow-sm hover:player-bg-accent hover:player-text-accent-foreground\",\n secondary:\n \"player-bg-secondary player-text-secondary-foreground player-shadow-sm hover:player-bg-secondary/80\",\n ghost: \"hover:player-bg-accent hover:player-text-accent-foreground\",\n link: \"player-text-primary player-underline-offset-4 hover:player-underline\",\n },\n size: {\n default: \"player-h-9 player-px-4 player-py-2\",\n sm: \"player-h-8 player-rounded-md player-px-3 player-text-xs\",\n lg: \"player-h-10 player-rounded-md player-px-8\",\n icon: \"player-h-9 player-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=\"player-max-w-full\">\n <div className=\"player-flex player-flex-col player-gap-4\">\n {props.title && (\n <h1 className=\"player-scroll-m-20 player-text-4xl player-font-extrabold player-tracking-tight lg:player-text-5xl\">\n <ReactAsset {...props.title} />\n </h1>\n )}\n {props.subTitle && (\n <h3 className=\"player-scroll-m-20 player-text-2xl player-font-semibold player-tracking-tight\">\n <ReactAsset {...props.subTitle} />\n </h3>\n )}\n {props.primaryInfo && (\n <div>\n <ReactAsset {...props.primaryInfo} />\n </div>\n )}\n <div className=\"player-flex player-flex-col player-gap-4\">\n {props?.segmentedActions && <Separator />}\n <div className=\"player-flex player-justify-between sm:player-flex-row player-flex-col-reverse player-gap-4\">\n <div className=\"player-flex player-gap-4\">\n {props?.segmentedActions?.prev?.map((a) => (\n <ReactAsset key={a.asset.id} {...a} />\n ))}\n </div>\n <div className=\"player-flex player-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 \"player-shrink-0 player-bg-border\",\n orientation === \"horizontal\"\n ? \"player-h-[1px] player-w-full\"\n : \"player-h-full player-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=\"player-figure\">\n <img\n className=\"player-figure-img player-img-fluid\"\n src={metaData.ref}\n alt={altText}\n />\n {caption && (\n <figcaption className=\"player-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=\"player-grid player-w-full player-max-w-sm player-items-center player-gap-3\">\n {title && (\n <Label htmlFor={id}>\n <ReactAsset {...title} />\n </Label>\n )}\n <div\n id={props.id}\n className=\"player-grid player-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=\"player-text-[0.8rem] player-font-medium player-text-destructive\"\n >\n {validation.message}\n </Label>\n )}\n {note && (\n <Label className=\"player-text-[0.8rem] player-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=\"player-flex player-items-center player-gap-1.5\">\n <InputComp\n type=\"radio\"\n className=\"player-h-fit player-w-fit player-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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACMA,yCAAoC;AASpC,IAAAC,kCAAmE;;;ACfnE,IAAAC,gBAAkB;AAClB,IAAAA,gBAA2B;;;ACA3B,YAAuB;;;ACDvB,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ADGA,IAAM,QAAc;AAAA,EAClB,CAAC,EAAE,WAAW,MAAM,GAAG,MAAM,GAAG,QAAQ;AACtC,WACE;AAAA,MA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AA,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,+BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,IAAI,GAAG,EAAE;AAAA,MACT,WAAU;AAAA;AAAA,IAET,WAAW;AAAA,EACd,GAED,QACC,+BAAAA,QAAA,cAAC,SAAM,WAAU,uDACf,+BAAAA,QAAA,cAAC,6BAAY,GAAG,MAAM,CACxB,CAEJ;AAEJ;;;Af5BO,IAAM,wBAAN,MAOP;AAAA,EAPO;AAQL,gBAAO;AAAA;AAAA,EAEP,WAAW,aAAgC;AACzC,gBAAY;AAAA,MACV,IAAI,uDAAoB;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,QAAsB;AAC1B,WAAO,eAAe,IAAI,gCAAAC,sBAA0B,CAAC;AAAA,EACvD;AACF;","names":["Input","import_reference_assets_plugin","import_react","React","React","Input","React","import_react","import_react","import_clsx","React","makeClass","React","import_react","React","import_react","import_react","import_beacon_plugin_react","React","React","import_class_variance_authority","React","import_react","React","React","import_react","React","import_react","import_react","React","import_beacon_plugin_react","React","Input","ReferenceAssetsCorePlugin"]}
1
+ {"version":3,"sources":["../../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/index.tsx","../../../../../../../../../../../../../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","../../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/throwing/Throwing.tsx"],"sourcesContent":["import \"./global.css\";\n\nexport * from \"./plugin\";\nexport * from \"./assets\";\n","import 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 ThrowingAsset,\n} from \"@player-ui/reference-assets-plugin\";\nimport { ReferenceAssetsPlugin as ReferenceAssetsCorePlugin } from \"@player-ui/reference-assets-plugin\";\nimport {\n Input,\n Text,\n Collection,\n Action,\n Info,\n Image,\n Choice,\n Throwing,\n} from \"./assets\";\n\n/**\n * A plugin to register the base reference assets\n */\nexport class ReferenceAssetsPlugin\n implements\n ReactPlayerPlugin,\n ExtendedPlayerPlugin<\n [\n InputAsset,\n TextAsset,\n ActionAsset,\n CollectionAsset,\n ChoiceAsset,\n ThrowingAsset,\n ],\n [InfoAsset]\n >\n{\n name = \"reference-assets-web-plugin\";\n\n applyReact(reactPlayer: ReactPlayer): void {\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 [\"throwing\", Throwing],\n ]),\n );\n }\n\n apply(player: Player): void {\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=\"player-grid player-w-full player-max-w-sm player-items-center player-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=\"player-text-[0.8rem] player-font-medium player-text-destructive\"\n >\n {validation.message}\n </Label>\n )}\n {note && (\n <Label className=\"player-text-[0.8rem] player-text-muted-foreground\">\n <ReactAsset {...note} />\n </Label>\n )}\n </div>\n );\n};\n\nexport default Input;\n","/* eslint-disable @typescript-eslint/no-empty-object-type */\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 \"player-flex player-h-9 player-w-full player-rounded-md player-border player-border-input player-bg-transparent player-px-3 player-py-1 player-text-sm player-shadow-sm player-transition-colors file:player-border-0 file:player-bg-transparent file:player-text-sm file:player-font-medium placeholder:player-text-muted-foreground focus-visible:player-outline-none focus-visible:player-ring-1 focus-visible:player-ring-ring player-disabled:player-cursor-not-allowed disabled:player-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 \"player-text-sm player-font-medium player-leading-none peer-disabled:player-cursor-not-allowed peer-disabled:player-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=\"player-underline player-text-blue-600 hover:player-text-blue-800 visited:player-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=\"player-flex player-flex-col player-gap-4\">\n {props.label && (\n <h3>\n <ReactAsset {...props.label} />\n </h3>\n )}\n {props.values?.map((a) => (\n <ReactAsset key={a.asset.id} {...a} />\n ))}\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 \"player-inline-flex player-items-center player-justify-center player-whitespace-nowrap player-rounded-md player-text-sm player-font-medium player-transition-colors focus-visible:player-outline-none focus-visible:player-ring-1 focus-visible:player-ring-ring disabled:player-pointer-events-none disabled:player-opacity-50\",\n {\n variants: {\n variant: {\n default:\n \"player-bg-primary player-text-primary-foreground player-shadow hover:player-bg-primary/90\",\n destructive:\n \"player-bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90\",\n outline:\n \"player-border player-border-input player-bg-primary player-text-primary-foreground player-shadow-sm hover:player-bg-accent hover:player-text-accent-foreground\",\n secondary:\n \"player-bg-secondary player-text-secondary-foreground player-shadow-sm hover:player-bg-secondary/80\",\n ghost: \"hover:player-bg-accent hover:player-text-accent-foreground\",\n link: \"player-text-primary player-underline-offset-4 hover:player-underline\",\n },\n size: {\n default: \"player-h-9 player-px-4 player-py-2\",\n sm: \"player-h-8 player-rounded-md player-px-3 player-text-xs\",\n lg: \"player-h-10 player-rounded-md player-px-8\",\n icon: \"player-h-9 player-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=\"player-max-w-full\">\n <div className=\"player-flex player-flex-col player-gap-4\">\n {props.title && (\n <h1 className=\"player-scroll-m-20 player-text-4xl player-font-extrabold player-tracking-tight lg:player-text-5xl\">\n <ReactAsset {...props.title} />\n </h1>\n )}\n {props.subTitle && (\n <h3 className=\"player-scroll-m-20 player-text-2xl player-font-semibold player-tracking-tight\">\n <ReactAsset {...props.subTitle} />\n </h3>\n )}\n {props.primaryInfo && (\n <div>\n <ReactAsset {...props.primaryInfo} />\n </div>\n )}\n <div className=\"player-flex player-flex-col player-gap-4\">\n {props?.segmentedActions && <Separator />}\n <div className=\"player-flex player-justify-between sm:player-flex-row player-flex-col-reverse player-gap-4\">\n <div className=\"player-flex player-gap-4\">\n {props?.segmentedActions?.prev?.map((a) => (\n <ReactAsset key={a.asset.id} {...a} />\n ))}\n </div>\n <div className=\"player-flex player-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 \"player-shrink-0 player-bg-border\",\n orientation === \"horizontal\"\n ? \"player-h-[1px] player-w-full\"\n : \"player-h-full player-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=\"player-figure\">\n <img\n className=\"player-figure-img player-img-fluid\"\n src={metaData.ref}\n alt={altText}\n />\n {caption && (\n <figcaption className=\"player-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=\"player-grid player-w-full player-max-w-sm player-items-center player-gap-3\">\n {title && (\n <Label htmlFor={id}>\n <ReactAsset {...title} />\n </Label>\n )}\n <div\n id={props.id}\n className=\"player-grid player-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=\"player-text-[0.8rem] player-font-medium player-text-destructive\"\n >\n {validation.message}\n </Label>\n )}\n {note && (\n <Label className=\"player-text-[0.8rem] player-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=\"player-flex player-items-center player-gap-1.5\">\n <InputComp\n type=\"radio\"\n className=\"player-h-fit player-w-fit player-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","import React from \"react\";\nimport type { ThrowingAsset } from \"@player-ui/reference-assets-plugin\";\n\n/** A text asset */\nexport const Throwing = (props: ThrowingAsset): React.ReactElement => {\n if (props.timing === \"render\") {\n throw new Error(props.message);\n }\n\n return <p>Something is configured wrong if you are seeing this</p>;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACMA,yCAAoC;AAUpC,IAAAC,kCAAmE;;;AChBnE,IAAAC,gBAAkB;AAClB,IAAAA,gBAA2B;;;ACA3B,YAAuB;;;ACDvB,kBAAsC;AACtC,4B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AAAA,EACvD;AACF;","names":["Input","import_reference_assets_plugin","import_react","React","React","Input","React","import_react","import_react","import_clsx","React","makeClass","React","import_react","React","import_react","import_react","import_beacon_plugin_react","React","React","import_class_variance_authority","React","import_react","React","React","import_react","React","import_react","import_react","React","import_beacon_plugin_react","React","import_react","React","Input","ReferenceAssetsCorePlugin"]}
@@ -493,6 +493,15 @@ var Choice = (props) => {
493
493
  ), note && /* @__PURE__ */ React15.createElement(Label, { className: "player-text-[0.8rem] player-text-muted-foreground" }, /* @__PURE__ */ React15.createElement(ReactAsset8, { ...note })));
494
494
  };
495
495
 
496
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/throwing/Throwing.tsx
497
+ import React16 from "react";
498
+ var Throwing = (props) => {
499
+ if (props.timing === "render") {
500
+ throw new Error(props.message);
501
+ }
502
+ return /* @__PURE__ */ React16.createElement("p", null, "Something is configured wrong if you are seeing this");
503
+ };
504
+
496
505
  // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/plugin.tsx
497
506
  var ReferenceAssetsPlugin = class {
498
507
  constructor() {
@@ -507,7 +516,8 @@ var ReferenceAssetsPlugin = class {
507
516
  ["info", Info],
508
517
  ["collection", Collection],
509
518
  ["image", Image],
510
- ["choice", Choice]
519
+ ["choice", Choice],
520
+ ["throwing", Throwing]
511
521
  ])
512
522
  );
513
523
  }
@@ -525,6 +535,7 @@ export {
525
535
  ReferenceAssetsPlugin,
526
536
  Text,
527
537
  TextModifierContext,
538
+ Throwing,
528
539
  getConfig,
529
540
  getLinkModifier,
530
541
  useAction,
package/dist/index.mjs CHANGED
@@ -493,6 +493,15 @@ var Choice = (props) => {
493
493
  ), note && /* @__PURE__ */ React15.createElement(Label, { className: "player-text-[0.8rem] player-text-muted-foreground" }, /* @__PURE__ */ React15.createElement(ReactAsset8, { ...note })));
494
494
  };
495
495
 
496
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/throwing/Throwing.tsx
497
+ import React16 from "react";
498
+ var Throwing = (props) => {
499
+ if (props.timing === "render") {
500
+ throw new Error(props.message);
501
+ }
502
+ return /* @__PURE__ */ React16.createElement("p", null, "Something is configured wrong if you are seeing this");
503
+ };
504
+
496
505
  // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/plugin.tsx
497
506
  var ReferenceAssetsPlugin = class {
498
507
  constructor() {
@@ -507,7 +516,8 @@ var ReferenceAssetsPlugin = class {
507
516
  ["info", Info],
508
517
  ["collection", Collection],
509
518
  ["image", Image],
510
- ["choice", Choice]
519
+ ["choice", Choice],
520
+ ["throwing", Throwing]
511
521
  ])
512
522
  );
513
523
  }
@@ -525,6 +535,7 @@ export {
525
535
  ReferenceAssetsPlugin,
526
536
  Text,
527
537
  TextModifierContext,
538
+ Throwing,
528
539
  getConfig,
529
540
  getLinkModifier,
530
541
  useAction,
@@ -1 +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 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): void {\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): void {\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=\"player-grid player-w-full player-max-w-sm player-items-center player-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=\"player-text-[0.8rem] player-font-medium player-text-destructive\"\n >\n {validation.message}\n </Label>\n )}\n {note && (\n <Label className=\"player-text-[0.8rem] player-text-muted-foreground\">\n <ReactAsset {...note} />\n </Label>\n )}\n </div>\n );\n};\n\nexport default Input;\n","/* eslint-disable @typescript-eslint/no-empty-object-type */\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 \"player-flex player-h-9 player-w-full player-rounded-md player-border player-border-input player-bg-transparent player-px-3 player-py-1 player-text-sm player-shadow-sm player-transition-colors file:player-border-0 file:player-bg-transparent file:player-text-sm file:player-font-medium placeholder:player-text-muted-foreground focus-visible:player-outline-none focus-visible:player-ring-1 focus-visible:player-ring-ring player-disabled:player-cursor-not-allowed disabled:player-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 \"player-text-sm player-font-medium player-leading-none peer-disabled:player-cursor-not-allowed peer-disabled:player-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=\"player-underline player-text-blue-600 hover:player-text-blue-800 visited:player-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=\"player-flex player-flex-col player-gap-4\">\n {props.label && (\n <h3>\n <ReactAsset {...props.label} />\n </h3>\n )}\n {props.values?.map((a) => (\n <ReactAsset key={a.asset.id} {...a} />\n ))}\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 \"player-inline-flex player-items-center player-justify-center player-whitespace-nowrap player-rounded-md player-text-sm player-font-medium player-transition-colors focus-visible:player-outline-none focus-visible:player-ring-1 focus-visible:player-ring-ring disabled:player-pointer-events-none disabled:player-opacity-50\",\n {\n variants: {\n variant: {\n default:\n \"player-bg-primary player-text-primary-foreground player-shadow hover:player-bg-primary/90\",\n destructive:\n \"player-bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90\",\n outline:\n \"player-border player-border-input player-bg-primary player-text-primary-foreground player-shadow-sm hover:player-bg-accent hover:player-text-accent-foreground\",\n secondary:\n \"player-bg-secondary player-text-secondary-foreground player-shadow-sm hover:player-bg-secondary/80\",\n ghost: \"hover:player-bg-accent hover:player-text-accent-foreground\",\n link: \"player-text-primary player-underline-offset-4 hover:player-underline\",\n },\n size: {\n default: \"player-h-9 player-px-4 player-py-2\",\n sm: \"player-h-8 player-rounded-md player-px-3 player-text-xs\",\n lg: \"player-h-10 player-rounded-md player-px-8\",\n icon: \"player-h-9 player-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=\"player-max-w-full\">\n <div className=\"player-flex player-flex-col player-gap-4\">\n {props.title && (\n <h1 className=\"player-scroll-m-20 player-text-4xl player-font-extrabold player-tracking-tight lg:player-text-5xl\">\n <ReactAsset {...props.title} />\n </h1>\n )}\n {props.subTitle && (\n <h3 className=\"player-scroll-m-20 player-text-2xl player-font-semibold player-tracking-tight\">\n <ReactAsset {...props.subTitle} />\n </h3>\n )}\n {props.primaryInfo && (\n <div>\n <ReactAsset {...props.primaryInfo} />\n </div>\n )}\n <div className=\"player-flex player-flex-col player-gap-4\">\n {props?.segmentedActions && <Separator />}\n <div className=\"player-flex player-justify-between sm:player-flex-row player-flex-col-reverse player-gap-4\">\n <div className=\"player-flex player-gap-4\">\n {props?.segmentedActions?.prev?.map((a) => (\n <ReactAsset key={a.asset.id} {...a} />\n ))}\n </div>\n <div className=\"player-flex player-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 \"player-shrink-0 player-bg-border\",\n orientation === \"horizontal\"\n ? \"player-h-[1px] player-w-full\"\n : \"player-h-full player-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=\"player-figure\">\n <img\n className=\"player-figure-img player-img-fluid\"\n src={metaData.ref}\n alt={altText}\n />\n {caption && (\n <figcaption className=\"player-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=\"player-grid player-w-full player-max-w-sm player-items-center player-gap-3\">\n {title && (\n <Label htmlFor={id}>\n <ReactAsset {...title} />\n </Label>\n )}\n <div\n id={props.id}\n className=\"player-grid player-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=\"player-text-[0.8rem] player-font-medium player-text-destructive\"\n >\n {validation.message}\n </Label>\n )}\n {note && (\n <Label className=\"player-text-[0.8rem] player-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=\"player-flex player-items-center player-gap-1.5\">\n <InputComp\n type=\"radio\"\n className=\"player-h-fit player-w-fit player-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 };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,MAAM,QAAsB;AAC1B,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"]}
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","../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/react/src/assets/throwing/Throwing.tsx"],"sourcesContent":["import 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 ThrowingAsset,\n} from \"@player-ui/reference-assets-plugin\";\nimport { ReferenceAssetsPlugin as ReferenceAssetsCorePlugin } from \"@player-ui/reference-assets-plugin\";\nimport {\n Input,\n Text,\n Collection,\n Action,\n Info,\n Image,\n Choice,\n Throwing,\n} from \"./assets\";\n\n/**\n * A plugin to register the base reference assets\n */\nexport class ReferenceAssetsPlugin\n implements\n ReactPlayerPlugin,\n ExtendedPlayerPlugin<\n [\n InputAsset,\n TextAsset,\n ActionAsset,\n CollectionAsset,\n ChoiceAsset,\n ThrowingAsset,\n ],\n [InfoAsset]\n >\n{\n name = \"reference-assets-web-plugin\";\n\n applyReact(reactPlayer: ReactPlayer): void {\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 [\"throwing\", Throwing],\n ]),\n );\n }\n\n apply(player: Player): void {\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=\"player-grid player-w-full player-max-w-sm player-items-center player-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=\"player-text-[0.8rem] player-font-medium player-text-destructive\"\n >\n {validation.message}\n </Label>\n )}\n {note && (\n <Label className=\"player-text-[0.8rem] player-text-muted-foreground\">\n <ReactAsset {...note} />\n </Label>\n )}\n </div>\n );\n};\n\nexport default Input;\n","/* eslint-disable @typescript-eslint/no-empty-object-type */\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 \"player-flex player-h-9 player-w-full player-rounded-md player-border player-border-input player-bg-transparent player-px-3 player-py-1 player-text-sm player-shadow-sm player-transition-colors file:player-border-0 file:player-bg-transparent file:player-text-sm file:player-font-medium placeholder:player-text-muted-foreground focus-visible:player-outline-none focus-visible:player-ring-1 focus-visible:player-ring-ring player-disabled:player-cursor-not-allowed disabled:player-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 \"player-text-sm player-font-medium player-leading-none peer-disabled:player-cursor-not-allowed peer-disabled:player-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=\"player-underline player-text-blue-600 hover:player-text-blue-800 visited:player-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=\"player-flex player-flex-col player-gap-4\">\n {props.label && (\n <h3>\n <ReactAsset {...props.label} />\n </h3>\n )}\n {props.values?.map((a) => (\n <ReactAsset key={a.asset.id} {...a} />\n ))}\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 \"player-inline-flex player-items-center player-justify-center player-whitespace-nowrap player-rounded-md player-text-sm player-font-medium player-transition-colors focus-visible:player-outline-none focus-visible:player-ring-1 focus-visible:player-ring-ring disabled:player-pointer-events-none disabled:player-opacity-50\",\n {\n variants: {\n variant: {\n default:\n \"player-bg-primary player-text-primary-foreground player-shadow hover:player-bg-primary/90\",\n destructive:\n \"player-bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90\",\n outline:\n \"player-border player-border-input player-bg-primary player-text-primary-foreground player-shadow-sm hover:player-bg-accent hover:player-text-accent-foreground\",\n secondary:\n \"player-bg-secondary player-text-secondary-foreground player-shadow-sm hover:player-bg-secondary/80\",\n ghost: \"hover:player-bg-accent hover:player-text-accent-foreground\",\n link: \"player-text-primary player-underline-offset-4 hover:player-underline\",\n },\n size: {\n default: \"player-h-9 player-px-4 player-py-2\",\n sm: \"player-h-8 player-rounded-md player-px-3 player-text-xs\",\n lg: \"player-h-10 player-rounded-md player-px-8\",\n icon: \"player-h-9 player-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=\"player-max-w-full\">\n <div className=\"player-flex player-flex-col player-gap-4\">\n {props.title && (\n <h1 className=\"player-scroll-m-20 player-text-4xl player-font-extrabold player-tracking-tight lg:player-text-5xl\">\n <ReactAsset {...props.title} />\n </h1>\n )}\n {props.subTitle && (\n <h3 className=\"player-scroll-m-20 player-text-2xl player-font-semibold player-tracking-tight\">\n <ReactAsset {...props.subTitle} />\n </h3>\n )}\n {props.primaryInfo && (\n <div>\n <ReactAsset {...props.primaryInfo} />\n </div>\n )}\n <div className=\"player-flex player-flex-col player-gap-4\">\n {props?.segmentedActions && <Separator />}\n <div className=\"player-flex player-justify-between sm:player-flex-row player-flex-col-reverse player-gap-4\">\n <div className=\"player-flex player-gap-4\">\n {props?.segmentedActions?.prev?.map((a) => (\n <ReactAsset key={a.asset.id} {...a} />\n ))}\n </div>\n <div className=\"player-flex player-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 \"player-shrink-0 player-bg-border\",\n orientation === \"horizontal\"\n ? \"player-h-[1px] player-w-full\"\n : \"player-h-full player-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=\"player-figure\">\n <img\n className=\"player-figure-img player-img-fluid\"\n src={metaData.ref}\n alt={altText}\n />\n {caption && (\n <figcaption className=\"player-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=\"player-grid player-w-full player-max-w-sm player-items-center player-gap-3\">\n {title && (\n <Label htmlFor={id}>\n <ReactAsset {...title} />\n </Label>\n )}\n <div\n id={props.id}\n className=\"player-grid player-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=\"player-text-[0.8rem] player-font-medium player-text-destructive\"\n >\n {validation.message}\n </Label>\n )}\n {note && (\n <Label className=\"player-text-[0.8rem] player-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=\"player-flex player-items-center player-gap-1.5\">\n <InputComp\n type=\"radio\"\n className=\"player-h-fit player-w-fit player-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","import React from \"react\";\nimport type { ThrowingAsset } from \"@player-ui/reference-assets-plugin\";\n\n/** A text asset */\nexport const Throwing = (props: ThrowingAsset): React.ReactElement => {\n if (props.timing === \"render\") {\n throw new Error(props.message);\n }\n\n return <p>Something is configured wrong if you are seeing this</p>;\n};\n"],"mappings":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ACjB,CAAC,QAAQ,IAAI;AAAA,QACb,CAAC,cAAc,UAAU;AAAA,QACzB,CAAC,SAAS,KAAK;AAAA,QACf,CAAC,UAAU,MAAM;AAAA,QACjB,CAAC,YAAY,QAAQ;AAAA,MACvB,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,MAAM,QAAsB;AAC1B,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","React","Input"]}
package/package.json CHANGED
@@ -6,13 +6,13 @@
6
6
  "types"
7
7
  ],
8
8
  "name": "@player-ui/reference-assets-plugin-react",
9
- "version": "0.15.0",
9
+ "version": "0.15.1--canary.802.31569",
10
10
  "main": "dist/cjs/index.cjs",
11
11
  "dependencies": {
12
- "@player-ui/asset-provider-plugin-react": "0.15.0",
13
- "@player-ui/beacon-plugin-react": "0.15.0",
14
- "@player-ui/partial-match-registry": "0.15.0",
15
- "@player-ui/reference-assets-plugin": "0.15.0",
12
+ "@player-ui/asset-provider-plugin-react": "0.15.1--canary.802.31569",
13
+ "@player-ui/beacon-plugin-react": "0.15.1--canary.802.31569",
14
+ "@player-ui/partial-match-registry": "0.15.1--canary.802.31569",
15
+ "@player-ui/reference-assets-plugin": "0.15.1--canary.802.31569",
16
16
  "@radix-ui/react-label": "^2.0.2",
17
17
  "@radix-ui/react-separator": "^1.0.3",
18
18
  "@radix-ui/react-slot": "^1.0.2",
@@ -26,7 +26,7 @@
26
26
  "@player-ui/make-flow": "workspace:*"
27
27
  },
28
28
  "peerDependencies": {
29
- "@player-ui/react": "0.15.0",
29
+ "@player-ui/react": "0.15.1--canary.802.31569",
30
30
  "react": "^18.2.0",
31
31
  "@types/react": "^18.2.39"
32
32
  },
@@ -5,3 +5,4 @@ export * from "./action";
5
5
  export * from "./info";
6
6
  export * from "./image";
7
7
  export * from "./choice";
8
+ export * from "./throwing";
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import type { ThrowingAsset } from "@player-ui/reference-assets-plugin";
3
+
4
+ /** A text asset */
5
+ export const Throwing = (props: ThrowingAsset): React.ReactElement => {
6
+ if (props.timing === "render") {
7
+ throw new Error(props.message);
8
+ }
9
+
10
+ return <p>Something is configured wrong if you are seeing this</p>;
11
+ };
@@ -0,0 +1 @@
1
+ export * from "./Throwing";
package/src/plugin.tsx CHANGED
@@ -12,9 +12,19 @@ import type {
12
12
  ActionAsset,
13
13
  InfoAsset,
14
14
  ChoiceAsset,
15
+ ThrowingAsset,
15
16
  } from "@player-ui/reference-assets-plugin";
16
17
  import { ReferenceAssetsPlugin as ReferenceAssetsCorePlugin } from "@player-ui/reference-assets-plugin";
17
- import { Input, Text, Collection, Action, Info, Image, Choice } from "./assets";
18
+ import {
19
+ Input,
20
+ Text,
21
+ Collection,
22
+ Action,
23
+ Info,
24
+ Image,
25
+ Choice,
26
+ Throwing,
27
+ } from "./assets";
18
28
 
19
29
  /**
20
30
  * A plugin to register the base reference assets
@@ -23,7 +33,14 @@ export class ReferenceAssetsPlugin
23
33
  implements
24
34
  ReactPlayerPlugin,
25
35
  ExtendedPlayerPlugin<
26
- [InputAsset, TextAsset, ActionAsset, CollectionAsset, ChoiceAsset],
36
+ [
37
+ InputAsset,
38
+ TextAsset,
39
+ ActionAsset,
40
+ CollectionAsset,
41
+ ChoiceAsset,
42
+ ThrowingAsset,
43
+ ],
27
44
  [InfoAsset]
28
45
  >
29
46
  {
@@ -39,6 +56,7 @@ export class ReferenceAssetsPlugin
39
56
  ["collection", Collection],
40
57
  ["image", Image],
41
58
  ["choice", Choice],
59
+ ["throwing", Throwing],
42
60
  ]),
43
61
  );
44
62
  }
@@ -5,4 +5,5 @@ export * from "./action";
5
5
  export * from "./info";
6
6
  export * from "./image";
7
7
  export * from "./choice";
8
+ export * from "./throwing";
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import type { ThrowingAsset } from "@player-ui/reference-assets-plugin";
3
+ /** A text asset */
4
+ export declare const Throwing: (props: ThrowingAsset) => React.ReactElement;
5
+ //# sourceMappingURL=Throwing.d.ts.map
@@ -0,0 +1,2 @@
1
+ export * from "./Throwing";
2
+ //# sourceMappingURL=index.d.ts.map
package/types/plugin.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { ReactPlayer, ReactPlayerPlugin, Player, ExtendedPlayerPlugin } from "@player-ui/react";
2
- import type { InputAsset, TextAsset, CollectionAsset, ActionAsset, InfoAsset, ChoiceAsset } from "@player-ui/reference-assets-plugin";
2
+ import type { InputAsset, TextAsset, CollectionAsset, ActionAsset, InfoAsset, ChoiceAsset, ThrowingAsset } from "@player-ui/reference-assets-plugin";
3
3
  /**
4
4
  * A plugin to register the base reference assets
5
5
  */
@@ -8,7 +8,8 @@ export declare class ReferenceAssetsPlugin implements ReactPlayerPlugin, Extende
8
8
  TextAsset,
9
9
  ActionAsset,
10
10
  CollectionAsset,
11
- ChoiceAsset
11
+ ChoiceAsset,
12
+ ThrowingAsset
12
13
  ], [
13
14
  InfoAsset
14
15
  ]> {