@player-ui/reference-assets-plugin 0.8.0--canary.307.9621 → 0.8.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/ReferenceAssetsPlugin.native.js +821 -0
  2. package/dist/ReferenceAssetsPlugin.native.js.map +1 -0
  3. package/dist/cjs/index.cjs +215 -0
  4. package/dist/cjs/index.cjs.map +1 -0
  5. package/dist/index.legacy-esm.js +181 -0
  6. package/dist/index.mjs +181 -0
  7. package/dist/index.mjs.map +1 -0
  8. package/dist/xlr/ActionAsset.json +126 -0
  9. package/dist/xlr/ChoiceAsset.json +191 -0
  10. package/dist/xlr/CollectionAsset.json +40 -0
  11. package/dist/xlr/ImageAsset.json +65 -0
  12. package/dist/xlr/InfoAsset.json +58 -0
  13. package/dist/xlr/InputAsset.json +109 -0
  14. package/dist/xlr/TextAsset.json +125 -0
  15. package/dist/xlr/manifest.js +18 -0
  16. package/dist/xlr/manifest.json +24 -0
  17. package/package.json +27 -60
  18. package/src/assets/action/__tests__/transform.test.ts +118 -0
  19. package/src/assets/action/index.ts +2 -2
  20. package/src/assets/action/transform.ts +10 -10
  21. package/src/assets/action/types.ts +3 -3
  22. package/src/assets/choice/__tests__/transform.test.ts +145 -0
  23. package/src/assets/choice/index.ts +2 -0
  24. package/src/assets/choice/transform.ts +55 -0
  25. package/src/assets/choice/types.ts +73 -0
  26. package/src/assets/collection/index.ts +1 -1
  27. package/src/assets/collection/types.ts +2 -2
  28. package/src/assets/image/__tests__/transform.test.ts +35 -0
  29. package/src/assets/image/index.ts +2 -2
  30. package/src/assets/image/transform.ts +4 -4
  31. package/src/assets/image/types.ts +3 -3
  32. package/src/assets/index.ts +7 -6
  33. package/src/assets/info/__tests__/transform.test.ts +143 -0
  34. package/src/assets/info/index.ts +2 -2
  35. package/src/assets/info/transform.ts +8 -8
  36. package/src/assets/info/types.ts +3 -3
  37. package/src/assets/input/index.ts +2 -2
  38. package/src/assets/input/transform.ts +4 -4
  39. package/src/assets/input/types.ts +3 -3
  40. package/src/assets/text/index.ts +1 -1
  41. package/src/assets/text/types.ts +4 -4
  42. package/src/index.ts +2 -2
  43. package/src/plugin.ts +34 -10
  44. package/types/assets/action/index.d.ts +3 -0
  45. package/types/assets/action/transform.d.ts +14 -0
  46. package/types/assets/action/types.d.ts +32 -0
  47. package/types/assets/choice/index.d.ts +3 -0
  48. package/types/assets/choice/transform.d.ts +7 -0
  49. package/types/assets/choice/types.d.ts +51 -0
  50. package/types/assets/collection/index.d.ts +2 -0
  51. package/types/assets/collection/types.d.ts +8 -0
  52. package/types/assets/image/index.d.ts +3 -0
  53. package/types/assets/image/transform.d.ts +7 -0
  54. package/types/assets/image/types.d.ts +21 -0
  55. package/types/assets/index.d.ts +8 -0
  56. package/types/assets/info/index.d.ts +3 -0
  57. package/types/assets/info/transform.d.ts +8 -0
  58. package/types/assets/info/types.d.ts +28 -0
  59. package/types/assets/input/index.d.ts +3 -0
  60. package/types/assets/input/transform.d.ts +7 -0
  61. package/types/assets/input/types.d.ts +34 -0
  62. package/types/assets/text/index.d.ts +2 -0
  63. package/types/assets/text/types.d.ts +31 -0
  64. package/types/index.d.ts +3 -0
  65. package/types/plugin.d.ts +19 -0
  66. package/dist/index.cjs.js +0 -204
  67. package/dist/index.d.ts +0 -185
  68. package/dist/index.esm.js +0 -194
  69. package/dist/reference-assets-plugin.dev.js +0 -675
  70. package/dist/reference-assets-plugin.prod.js +0 -1
@@ -0,0 +1,145 @@
1
+ import { describe, it, expect } from "vitest";
2
+ import { runTransform } from "@player-ui/asset-testing-library";
3
+ import { CommonTypesPlugin } from "@player-ui/common-types-plugin";
4
+ import { choiceTransform } from "..";
5
+
6
+ describe("choice transform", () => {
7
+ it("adds a clearSelection method that clears choice selection", async () => {
8
+ const choice = {
9
+ views: [
10
+ {
11
+ id: "choice",
12
+ type: "choice",
13
+ binding: "foo.bar",
14
+ items: [
15
+ {
16
+ id: "item-1",
17
+ value: "item-1",
18
+ },
19
+ ],
20
+ },
21
+ ],
22
+ data: {
23
+ foo: {
24
+ bar: "item-1",
25
+ },
26
+ },
27
+ };
28
+
29
+ const ref = runTransform("choice", choiceTransform, choice);
30
+
31
+ expect(ref.controllers?.data.get("foo.bar")).toBe("item-1");
32
+ ref.current?.clearSelection();
33
+ expect(ref.controllers?.data.get("foo.bar")).toBe(null);
34
+ });
35
+
36
+ it("adds a select method to each choice", async () => {
37
+ const choice = {
38
+ id: "choice",
39
+ type: "choice",
40
+ binding: "foo.bar",
41
+ items: [
42
+ {
43
+ id: "item-1",
44
+ value: "item-1",
45
+ },
46
+ {
47
+ id: "item-2",
48
+ value: "item-2",
49
+ },
50
+ ],
51
+ };
52
+
53
+ const ref = runTransform("choice", choiceTransform, choice);
54
+
55
+ expect(ref.controllers?.data.get("foo.bar")).toBeUndefined();
56
+
57
+ ref.current?.items[0].select();
58
+ expect(ref.controllers?.data.get("foo.bar")).toBe("item-1");
59
+
60
+ ref.current?.items[1].select();
61
+ expect(ref.controllers?.data.get("foo.bar")).toBe("item-2");
62
+ });
63
+
64
+ it("adds an unselect method to each choice", async () => {
65
+ const choice = {
66
+ id: "choice",
67
+ type: "choice",
68
+ binding: "foo.bar",
69
+ items: [
70
+ {
71
+ id: "item-1",
72
+ value: "item-1",
73
+ },
74
+ {
75
+ id: "item-2",
76
+ value: "item-2",
77
+ },
78
+ ],
79
+ };
80
+
81
+ const ref = runTransform("choice", choiceTransform, choice);
82
+
83
+ ref.current?.items[0].select();
84
+ expect(ref.controllers?.data.get("foo.bar")).toBe("item-1");
85
+ ref.current?.items[0].unselect();
86
+ expect(ref.controllers?.data.get("foo.bar")).toBe(null);
87
+
88
+ ref.current?.items[1].select();
89
+ expect(ref.controllers?.data.get("foo.bar")).toBe("item-2");
90
+ ref.current?.items[1].unselect();
91
+ expect(ref.controllers?.data.get("foo.bar")).toBe(null);
92
+ });
93
+
94
+ it("exposes validations", async () => {
95
+ const validations = [
96
+ {
97
+ type: "required",
98
+ },
99
+ ];
100
+
101
+ const choice = {
102
+ views: [
103
+ {
104
+ id: "choice",
105
+ type: "choice",
106
+ binding: "foo.bar",
107
+ items: [
108
+ {
109
+ id: "item-1",
110
+ value: "item-1",
111
+ },
112
+ {
113
+ id: "item-2",
114
+ value: "item-2",
115
+ },
116
+ ],
117
+ },
118
+ ],
119
+ schema: {
120
+ ROOT: {
121
+ foo: {
122
+ type: "FooType",
123
+ },
124
+ },
125
+ FooType: {
126
+ bar: {
127
+ type: "StringType",
128
+ validation: [
129
+ {
130
+ type: "required",
131
+ trigger: "load",
132
+ },
133
+ ],
134
+ },
135
+ },
136
+ },
137
+ };
138
+
139
+ const ref = runTransform("choice", choiceTransform, choice, [
140
+ new CommonTypesPlugin(),
141
+ ]);
142
+
143
+ expect(ref.current?.validation?.type).toBe(validations[0].type);
144
+ });
145
+ });
@@ -0,0 +1,2 @@
1
+ export * from "./transform";
2
+ export * from "./types";
@@ -0,0 +1,55 @@
1
+ import type { TransformFunction } from "@player-ui/player";
2
+ import type {
3
+ ChoiceAsset,
4
+ TransformedChoice,
5
+ TransformedChoiceItem,
6
+ } from "./types";
7
+
8
+ /**
9
+ * Docs about the asset transform
10
+ */
11
+ export const choiceTransform: TransformFunction<
12
+ ChoiceAsset,
13
+ TransformedChoice
14
+ > = (asset, options) => {
15
+ const { items, binding, ...rest } = asset;
16
+
17
+ const assetHasBinding = binding !== undefined;
18
+
19
+ const currentValue = assetHasBinding
20
+ ? options.data.model.get(binding, {
21
+ includeInvalid: true,
22
+ })
23
+ : undefined;
24
+
25
+ const resetValue = () => {
26
+ if (assetHasBinding) {
27
+ return options.data.model.set([[binding, null]]);
28
+ }
29
+ };
30
+
31
+ const transformedChoiceItems: TransformedChoiceItem[] = (items || []).map(
32
+ (item, index) => ({
33
+ ...item,
34
+ id: item.id ?? `${asset.id}-choice-${index}`,
35
+ select() {
36
+ if (assetHasBinding) {
37
+ return options.data.model.set([[binding, item.value]]);
38
+ }
39
+ },
40
+ unselect: resetValue,
41
+ }),
42
+ );
43
+
44
+ return {
45
+ ...rest,
46
+ binding,
47
+ clearSelection: resetValue,
48
+ items: transformedChoiceItems,
49
+ value: currentValue,
50
+ validation: assetHasBinding
51
+ ? options.validation?.get(binding, { track: true })
52
+ : undefined,
53
+ dataType: assetHasBinding ? options.validation?.type(binding) : undefined,
54
+ };
55
+ };
@@ -0,0 +1,73 @@
1
+ import type {
2
+ Asset,
3
+ AssetWrapper,
4
+ Binding,
5
+ ValidationResponse,
6
+ Schema,
7
+ } from "@player-ui/player";
8
+ import type { BeaconMetaData } from "@player-ui/beacon-plugin";
9
+
10
+ /**
11
+ * A choice asset represents a single selection choice, often displayed as radio buttons in a web context.
12
+ * This will allow users to test out more complex flows than just inputs + buttons.
13
+ */
14
+ export interface ChoiceAsset<AnyTextAsset extends Asset = Asset>
15
+ extends Asset<"choice"> {
16
+ /** A text-like asset for the choice's label */
17
+ title?: AssetWrapper<AnyTextAsset>;
18
+
19
+ /** Asset container for a note. */
20
+ note?: AssetWrapper<AnyTextAsset>;
21
+
22
+ /** The location in the data-model to store the data */
23
+ binding?: Binding;
24
+
25
+ /** The options to select from */
26
+ items?: Array<ChoiceItem>;
27
+
28
+ /** Optional additional data */
29
+ metaData?: BeaconMetaData;
30
+ }
31
+
32
+ export type ValueType = string | number | boolean | null;
33
+
34
+ export interface ChoiceItem<AnyTextAsset extends Asset = Asset> {
35
+ /** The id associated with the choice item */
36
+ id: string;
37
+
38
+ /** A text-like asset for the choice's label */
39
+ label?: AssetWrapper<AnyTextAsset>;
40
+
41
+ /** The value of the input from the data-model */
42
+ value?: ValueType;
43
+ }
44
+
45
+ /** A stateful instance of a choice */
46
+ export interface TransformedChoice extends ChoiceAsset {
47
+ /**
48
+ * A function to unselect all of the options
49
+ * This is typically used when selecting a placeholder value
50
+ */
51
+ clearSelection: () => void;
52
+
53
+ /** The transformed options to select from */
54
+ items?: Array<TransformedChoiceItem>;
55
+
56
+ /** The value of the selected choice from the data-model */
57
+ value?: ValueType;
58
+
59
+ /** Any validation associated with the current choice's value */
60
+ validation?: ValidationResponse;
61
+
62
+ /** The dataType defined from the schema */
63
+ dataType?: Schema.DataType;
64
+ }
65
+
66
+ /** A stateful instance of a Choice Item */
67
+ export interface TransformedChoiceItem extends ChoiceItem {
68
+ /** The function that is called when a choice item is selected */
69
+ select: () => void;
70
+
71
+ /** The function that is called when a choice item is unSelected */
72
+ unselect: () => void;
73
+ }
@@ -1 +1 @@
1
- export * from './types';
1
+ export * from "./types";
@@ -1,6 +1,6 @@
1
- import type { AssetWrapper, Asset } from '@player-ui/player';
1
+ import type { AssetWrapper, Asset } from "@player-ui/player";
2
2
 
3
- export interface CollectionAsset extends Asset<'collection'> {
3
+ export interface CollectionAsset extends Asset<"collection"> {
4
4
  /** An optional label to title the collection */
5
5
  label?: AssetWrapper;
6
6
  /** The string value to show */
@@ -0,0 +1,35 @@
1
+ import { describe, it, expect } from "vitest";
2
+ import { runTransform } from "@player-ui/asset-testing-library";
3
+ import { imageTransform } from "..";
4
+
5
+ describe("image transform", () => {
6
+ it("adds a prop altText which gets filled with the accessibility text if provided", () => {
7
+ const ref = runTransform("image", imageTransform, {
8
+ id: "image-1",
9
+ type: "image",
10
+ metaData: {
11
+ ref: "https://player-ui.github.io/latest/logo/logo-light-large.png",
12
+ accessibility: "This is accessibility text for an image",
13
+ },
14
+ placeholder: "This is placeholder text for an image",
15
+ caption: "This is a caption",
16
+ });
17
+
18
+ expect(ref.current?.altText).toBe(
19
+ "This is accessibility text for an image",
20
+ );
21
+ });
22
+ it("adds a prop altText which gets filled with the placeholder text if accessibility text not provided", () => {
23
+ const ref = runTransform("image", imageTransform, {
24
+ id: "image-1",
25
+ type: "image",
26
+ metaData: {
27
+ ref: "https://player-ui.github.io/latest/logo/logo-light-large.png",
28
+ },
29
+ placeholder: "This is placeholder text for an image",
30
+ caption: "This is a caption",
31
+ });
32
+
33
+ expect(ref.current?.altText).toBe("This is placeholder text for an image");
34
+ });
35
+ });
@@ -1,2 +1,2 @@
1
- export * from './transform';
2
- export * from './types';
1
+ export * from "./transform";
2
+ export * from "./types";
@@ -1,5 +1,5 @@
1
- import type { TransformFunction } from '@player-ui/player';
2
- import type { ImageAsset, TransformedImage } from './types';
1
+ import type { TransformFunction } from "@player-ui/player";
2
+ import type { ImageAsset, TransformedImage } from "./types";
3
3
 
4
4
  /**
5
5
  * Function to retrieve the desired alt text based on passed in props.
@@ -12,14 +12,14 @@ const getImageAlt = (props: ImageAsset): string => {
12
12
 
13
13
  if (placeholder) return placeholder;
14
14
 
15
- return 'Image';
15
+ return "Image";
16
16
  };
17
17
 
18
18
  /**
19
19
  * Sets the Image's placeholder and accessibilty
20
20
  */
21
21
  export const imageTransform: TransformFunction<ImageAsset, TransformedImage> = (
22
- props
22
+ props,
23
23
  ) => {
24
24
  const altText = getImageAlt(props);
25
25
 
@@ -1,6 +1,6 @@
1
- import type { Asset } from '@player-ui/player';
1
+ import type { Asset, AssetWrapper } from "@player-ui/player";
2
2
 
3
- export interface ImageAsset extends Asset<'image'> {
3
+ export interface ImageAsset extends Asset<"image"> {
4
4
  /** Reference to the image */
5
5
  metaData: ImageMetaData;
6
6
 
@@ -8,7 +8,7 @@ export interface ImageAsset extends Asset<'image'> {
8
8
  placeholder?: string;
9
9
 
10
10
  /** Optional caption */
11
- caption?: Asset;
11
+ caption?: AssetWrapper;
12
12
  }
13
13
 
14
14
  /** A modifier to turn the text into a link */
@@ -1,6 +1,7 @@
1
- export * from './input';
2
- export * from './action';
3
- export * from './collection';
4
- export * from './info';
5
- export * from './text';
6
- export * from './image';
1
+ export * from "./input";
2
+ export * from "./action";
3
+ export * from "./collection";
4
+ export * from "./info";
5
+ export * from "./text";
6
+ export * from "./image";
7
+ export * from "./choice";
@@ -0,0 +1,143 @@
1
+ import { describe, it, expect } from "vitest";
2
+ import { runTransform } from "@player-ui/asset-testing-library";
3
+ import { infoTransform } from "..";
4
+
5
+ describe("info transform", () => {
6
+ it("populates segmentedActions", () => {
7
+ const ref = runTransform("info", infoTransform, {
8
+ id: "generated-flow",
9
+ views: [
10
+ {
11
+ id: "info-view",
12
+ type: "info",
13
+ title: {
14
+ asset: {
15
+ id: "info-title",
16
+ type: "text",
17
+ value: "Info Title",
18
+ },
19
+ },
20
+ actions: [
21
+ {
22
+ asset: {
23
+ id: "next-action",
24
+ value: "Next",
25
+ type: "action",
26
+ label: {
27
+ asset: {
28
+ id: "next-action-label",
29
+ type: "text",
30
+ value: "Continue",
31
+ },
32
+ },
33
+ },
34
+ },
35
+ {
36
+ asset: {
37
+ id: "prev-action",
38
+ value: "Prev",
39
+ type: "action",
40
+ label: {
41
+ asset: {
42
+ id: "next-action-label",
43
+ type: "text",
44
+ value: "Back",
45
+ },
46
+ },
47
+ },
48
+ },
49
+ ],
50
+ },
51
+ ],
52
+ data: {},
53
+ navigation: {
54
+ BEGIN: "FLOW_1",
55
+ FLOW_1: {
56
+ startState: "VIEW_1",
57
+ VIEW_1: {
58
+ state_type: "VIEW",
59
+ ref: "info-view",
60
+ transitions: {
61
+ "*": "END_Done",
62
+ },
63
+ },
64
+ END_Done: {
65
+ state_type: "END",
66
+ outcome: "done",
67
+ },
68
+ },
69
+ },
70
+ });
71
+ expect(ref.current?.segmentedActions).toStrictEqual({
72
+ next: [
73
+ {
74
+ asset: {
75
+ id: "next-action",
76
+ label: {
77
+ asset: {
78
+ id: "next-action-label",
79
+ type: "text",
80
+ value: "Continue",
81
+ },
82
+ },
83
+ type: "action",
84
+ value: "Next",
85
+ },
86
+ },
87
+ ],
88
+ prev: [
89
+ {
90
+ asset: {
91
+ id: "prev-action",
92
+ label: {
93
+ asset: {
94
+ id: "next-action-label",
95
+ type: "text",
96
+ value: "Back",
97
+ },
98
+ },
99
+ type: "action",
100
+ value: "Prev",
101
+ },
102
+ },
103
+ ],
104
+ });
105
+ });
106
+ it("does not populate segmentedActions", () => {
107
+ const ref = runTransform("info", infoTransform, {
108
+ id: "generated-flow",
109
+ views: [
110
+ {
111
+ id: "info-view",
112
+ type: "info",
113
+ title: {
114
+ asset: {
115
+ id: "info-title",
116
+ type: "text",
117
+ value: "Info Title",
118
+ },
119
+ },
120
+ },
121
+ ],
122
+ data: {},
123
+ navigation: {
124
+ BEGIN: "FLOW_1",
125
+ FLOW_1: {
126
+ startState: "VIEW_1",
127
+ VIEW_1: {
128
+ state_type: "VIEW",
129
+ ref: "info-view",
130
+ transitions: {
131
+ "*": "END_Done",
132
+ },
133
+ },
134
+ END_Done: {
135
+ state_type: "END",
136
+ outcome: "done",
137
+ },
138
+ },
139
+ },
140
+ });
141
+ expect(ref.current?.segmentedActions).toBeUndefined();
142
+ });
143
+ });
@@ -1,2 +1,2 @@
1
- export * from './transform';
2
- export * from './types';
1
+ export * from "./transform";
2
+ export * from "./types";
@@ -1,21 +1,21 @@
1
- import type { TransformFunction } from '@player-ui/player';
2
- import type { AssetWrapper } from '@player-ui/player';
3
- import type { InfoAsset, InfoAssetTransform } from './types';
4
- import type { ActionAsset } from '../action/types';
5
- import { isBackAction } from '../action/transform';
1
+ import type { TransformFunction } from "@player-ui/player";
2
+ import type { AssetWrapper } from "@player-ui/player";
3
+ import type { InfoAsset, InfoAssetTransform } from "./types";
4
+ import type { ActionAsset } from "../action/types";
5
+ import { isBackAction } from "../action/transform";
6
6
 
7
7
  /**
8
8
  * This transform should add segmentedActions to the info asset.
9
9
  * Segmented actions display side by side in larger viewports. Segmented Actions is an object of next and prev actions
10
10
  */
11
11
  export const infoTransform: TransformFunction<InfoAsset, InfoAssetTransform> = (
12
- infoAsset
12
+ infoAsset,
13
13
  ) => {
14
14
  const actions = infoAsset?.actions;
15
15
  const segmentedActions = actions?.reduce(
16
16
  (segmentedActionsArray, action) => {
17
17
  segmentedActionsArray[
18
- isBackAction(action.asset as ActionAsset) ? 'prev' : 'next'
18
+ isBackAction(action.asset as ActionAsset) ? "prev" : "next"
19
19
  ].push(action as AssetWrapper<ActionAsset>);
20
20
  return segmentedActionsArray;
21
21
  },
@@ -28,7 +28,7 @@ export const infoTransform: TransformFunction<InfoAsset, InfoAssetTransform> = (
28
28
  * prev is an array of prev actions
29
29
  */
30
30
  prev: Array<AssetWrapper<ActionAsset>>;
31
- }
31
+ },
32
32
  );
33
33
 
34
34
  return {
@@ -1,7 +1,7 @@
1
- import type { AssetWrapper, Asset } from '@player-ui/player';
2
- import type { ActionAsset } from '../action/types';
1
+ import type { AssetWrapper, Asset } from "@player-ui/player";
2
+ import type { ActionAsset } from "../action/types";
3
3
 
4
- export interface InfoAsset extends Asset<'info'> {
4
+ export interface InfoAsset extends Asset<"info"> {
5
5
  /** The string value to show */
6
6
  title?: AssetWrapper;
7
7
 
@@ -1,2 +1,2 @@
1
- export * from './types';
2
- export * from './transform';
1
+ export * from "./types";
2
+ export * from "./transform";
@@ -1,12 +1,12 @@
1
- import type { TransformFunction } from '@player-ui/player';
2
- import type { InputAsset, TransformedInput } from './types';
1
+ import type { TransformFunction } from "@player-ui/player";
2
+ import type { InputAsset, TransformedInput } from "./types";
3
3
 
4
4
  /**
5
5
  * Docs about the asset transform
6
6
  */
7
7
  export const inputTransform: TransformFunction<InputAsset, TransformedInput> = (
8
8
  asset,
9
- options
9
+ options,
10
10
  ) => {
11
11
  return {
12
12
  ...asset,
@@ -28,7 +28,7 @@ export const inputTransform: TransformFunction<InputAsset, TransformedInput> = (
28
28
  },
29
29
  value:
30
30
  asset.binding === undefined
31
- ? ''
31
+ ? ""
32
32
  : options.data.model.get(asset.binding, {
33
33
  includeInvalid: true,
34
34
  formatted: true,
@@ -4,15 +4,15 @@ import type {
4
4
  Schema,
5
5
  Binding,
6
6
  ValidationResponse,
7
- } from '@player-ui/player';
8
- import type { BeaconDataType } from '@player-ui/beacon-plugin';
7
+ } from "@player-ui/player";
8
+ import type { BeaconDataType } from "@player-ui/beacon-plugin";
9
9
 
10
10
  /**
11
11
  * This is the most generic way of gathering data. The input is bound to a data model using the 'binding' property.
12
12
  * Players can get field type information from the 'schema' definition, thus to decide the input controls for visual rendering.
13
13
  * */
14
14
  export interface InputAsset<AnyTextAsset extends Asset = Asset>
15
- extends Asset<'input'> {
15
+ extends Asset<"input"> {
16
16
  /** Asset container for a field label. */
17
17
  label?: AssetWrapper<AnyTextAsset>;
18
18
 
@@ -1 +1 @@
1
- export * from './types';
1
+ export * from "./types";
@@ -1,6 +1,6 @@
1
- import type { Asset, Expression } from '@player-ui/player';
1
+ import type { Asset, Expression } from "@player-ui/player";
2
2
 
3
- export interface TextAsset extends Asset<'text'> {
3
+ export interface TextAsset extends Asset<"text"> {
4
4
  /** The text to display */
5
5
  value: string;
6
6
 
@@ -24,7 +24,7 @@ export interface BasicTextModifier {
24
24
  /** A modifier to turn the text into a link */
25
25
  export interface LinkModifier {
26
26
  /** The link type denotes this as a link */
27
- type: 'link';
27
+ type: "link";
28
28
 
29
29
  /** An optional expression to run before the link is opened */
30
30
  exp?: Expression;
@@ -35,6 +35,6 @@ export interface LinkModifier {
35
35
  ref: string;
36
36
 
37
37
  /** Used to indicate an application specific resolver to use */
38
- 'mime-type'?: string;
38
+ "mime-type"?: string;
39
39
  };
40
40
  }
package/src/index.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from './assets';
2
- export * from './plugin';
1
+ export * from "./assets";
2
+ export * from "./plugin";