@player-ui/reference-assets-plugin-components 1.2.0-next.3 → 1.2.0-next.5

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.
@@ -1,108 +0,0 @@
1
- // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/reference-assets/components/src/index.tsx
2
- import React from "react";
3
- import {
4
- createSlot,
5
- Asset,
6
- View,
7
- getObjectReferences,
8
- toJsonProperties,
9
- ObjectWithIndexTracking,
10
- GeneratedIDProperty,
11
- toJsonElement
12
- } from "@player-lang/react-dsl";
13
- import { dataTypes, validators } from "@player-ui/common-types-plugin";
14
- var dataRefs = getObjectReferences(dataTypes);
15
- var validationRefs = getObjectReferences(validators);
16
- var Text = (props) => {
17
- return /* @__PURE__ */ React.createElement(Asset, { type: "text", ...props }, /* @__PURE__ */ React.createElement("property", { name: "value" }, props.children));
18
- };
19
- var Collection = (props) => {
20
- return /* @__PURE__ */ React.createElement(Asset, { type: "collection", ...props });
21
- };
22
- var CollectionComp = (props) => {
23
- return /* @__PURE__ */ React.createElement(Collection, null, /* @__PURE__ */ React.createElement(Collection.Values, null, props.children));
24
- };
25
- var slotFactory = (name, isArray = false, wrapInAsset = true) => createSlot({
26
- name,
27
- TextComp: Text,
28
- CollectionComp,
29
- isArray,
30
- wrapInAsset
31
- });
32
- var LabelSlot = slotFactory("label");
33
- var ValueSlot = slotFactory("value");
34
- var TitleSlot = slotFactory("title");
35
- var NoteSlot = slotFactory("note");
36
- var SubtitleSlot = slotFactory("subtitle");
37
- var ActionsSlot = slotFactory("actions", true);
38
- var PrimaryInfoSlot = slotFactory("primaryInfo");
39
- var ItemsSlot = slotFactory("items", true, false);
40
- Collection.Values = createSlot({
41
- name: "values",
42
- isArray: true,
43
- TextComp: Text,
44
- wrapInAsset: true
45
- });
46
- Collection.Label = LabelSlot;
47
- var Action = (props) => {
48
- const { exp, children, ...rest } = props;
49
- return /* @__PURE__ */ React.createElement(Asset, { type: "action", ...rest }, /* @__PURE__ */ React.createElement("property", { name: "exp" }, Array.isArray(exp) ? toJsonElement(exp.map((e) => e.toValue())) : exp?.toValue()), children);
50
- };
51
- Action.Label = LabelSlot;
52
- var Image = (props) => {
53
- return /* @__PURE__ */ React.createElement(Asset, { type: "image", ...props });
54
- };
55
- Image.Caption = slotFactory("caption");
56
- var Input = (props) => {
57
- const { binding, children, ...rest } = props;
58
- return /* @__PURE__ */ React.createElement(Asset, { type: "input", ...rest }, /* @__PURE__ */ React.createElement("property", { name: "binding" }, binding.toValue()), children);
59
- };
60
- Input.Label = LabelSlot;
61
- Input.Note = NoteSlot;
62
- var Info = (props) => {
63
- return /* @__PURE__ */ React.createElement(View, { type: "info", ...props });
64
- };
65
- Info.Title = TitleSlot;
66
- Info.Subtitle = SubtitleSlot;
67
- Info.PrimaryInfo = PrimaryInfoSlot;
68
- Info.Actions = ActionsSlot;
69
- Info.Footer = slotFactory("footer");
70
- var Choice = (props) => {
71
- const { binding, children, ...rest } = props;
72
- return /* @__PURE__ */ React.createElement(Asset, { type: "choice", ...rest }, /* @__PURE__ */ React.createElement("property", { name: "binding" }, binding.toValue()), children);
73
- };
74
- Choice.Title = TitleSlot;
75
- Choice.Note = NoteSlot;
76
- Choice.Items = ItemsSlot;
77
- var ChoiceItem = (props) => {
78
- const { children, id, ...rest } = props;
79
- return /* @__PURE__ */ React.createElement(ObjectWithIndexTracking, null, id && /* @__PURE__ */ React.createElement("property", { name: "id" }, /* @__PURE__ */ React.createElement("value", null, id)), !id && /* @__PURE__ */ React.createElement(GeneratedIDProperty, null), toJsonProperties(rest, { propertiesToSkip: ["applicability"] }), children);
80
- };
81
- ChoiceItem.Label = LabelSlot;
82
- Choice.Item = ChoiceItem;
83
- var ChatMessage = (props) => {
84
- const { id, children } = props;
85
- return /* @__PURE__ */ React.createElement(Asset, { type: "chat-message" }, /* @__PURE__ */ React.createElement("property", { name: "id" }, id), children);
86
- };
87
- ChatMessage.Value = ValueSlot;
88
- export {
89
- Action,
90
- ActionsSlot,
91
- ChatMessage,
92
- Choice,
93
- Collection,
94
- Image,
95
- Info,
96
- Input,
97
- ItemsSlot,
98
- LabelSlot,
99
- NoteSlot,
100
- PrimaryInfoSlot,
101
- SubtitleSlot,
102
- Text,
103
- TitleSlot,
104
- ValueSlot,
105
- dataRefs,
106
- validationRefs
107
- };
108
- //# sourceMappingURL=index.mjs.map
package/package.json CHANGED
@@ -6,17 +6,17 @@
6
6
  "types"
7
7
  ],
8
8
  "name": "@player-ui/reference-assets-plugin-components",
9
- "version": "1.2.0-next.3",
9
+ "version": "1.2.0-next.5",
10
10
  "main": "dist/cjs/index.cjs",
11
11
  "peerDependencies": {
12
- "@player-ui/player": "1.2.0-next.3",
12
+ "@player-ui/player": "1.2.0-next.5",
13
13
  "react": "^18.2.0",
14
14
  "@types/react": "^18.2.39",
15
15
  "@player-lang/react-dsl": "1.0.1"
16
16
  },
17
17
  "dependencies": {
18
- "@player-ui/common-types-plugin": "1.2.0-next.3",
19
- "@player-ui/reference-assets-plugin": "1.2.0-next.3",
18
+ "@player-ui/common-types-plugin": "1.2.0-next.5",
19
+ "@player-ui/reference-assets-plugin": "1.2.0-next.5",
20
20
  "tslib": "^2.6.2"
21
21
  },
22
22
  "module": "dist/index.legacy-esm.js",