@devtools-ui/console 0.1.1-next.3 → 0.1.2-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.
@@ -0,0 +1,67 @@
1
+ // ../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/console/src/component/index.tsx
2
+ import React from "react";
3
+ import { Console } from "@devtools-ds/console";
4
+ var ConsoleComponent = (props) => {
5
+ const { evaluate, history } = props;
6
+ return /* @__PURE__ */ React.createElement(Console, { execute: evaluate, history });
7
+ };
8
+
9
+ // ../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/console/src/dsl/index.tsx
10
+ import React2 from "react";
11
+ import {
12
+ Asset
13
+ } from "@player-tools/dsl";
14
+ var Console2 = (props) => {
15
+ const { exp, binding } = props;
16
+ return /* @__PURE__ */ React2.createElement(Asset, { type: "console" }, exp && /* @__PURE__ */ React2.createElement("property", { name: "exp" }, exp.toValue()), binding && /* @__PURE__ */ React2.createElement("property", { name: "binding" }, binding.toValue()));
17
+ };
18
+
19
+ // ../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/console/src/transform/index.ts
20
+ import { compose, composeBefore } from "@player-ui/asset-transform-plugin";
21
+ var transform = (asset, options) => {
22
+ return {
23
+ ...asset,
24
+ history: asset.binding === void 0 ? void 0 : options.data.model.get(asset.binding, {
25
+ includeInvalid: true,
26
+ formatted: false
27
+ }),
28
+ evaluate(expression) {
29
+ if (asset.exp) {
30
+ const referencedExpression = asset.exp.match(/{{\s*(.*?)\s*}}/);
31
+ referencedExpression && options.data.model.set([[referencedExpression[1], expression]]);
32
+ options.evaluate(asset.exp);
33
+ }
34
+ }
35
+ };
36
+ };
37
+ var expPropTransform = (asset) => {
38
+ const skipArray = asset.plugins?.stringResolver?.propertiesToSkip;
39
+ if (skipArray && skipArray.indexOf("exp") > 1) {
40
+ return asset;
41
+ }
42
+ return {
43
+ ...asset,
44
+ plugins: {
45
+ ...asset.plugins,
46
+ stringResolver: {
47
+ ...asset?.plugins?.stringResolver,
48
+ propertiesToSkip: [
49
+ ...asset.plugins?.stringResolver?.propertiesToSkip ?? [],
50
+ "exp"
51
+ ]
52
+ }
53
+ }
54
+ };
55
+ };
56
+ var consoleTransform = compose(
57
+ transform,
58
+ composeBefore(expPropTransform)
59
+ );
60
+ export {
61
+ Console2 as Console,
62
+ ConsoleComponent,
63
+ consoleTransform,
64
+ expPropTransform,
65
+ transform
66
+ };
67
+ //# sourceMappingURL=index.mjs.map
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@devtools-ui/console",
3
- "version": "0.1.1-next.3",
3
+ "version": "0.1.2-next.0",
4
4
  "main": "dist/cjs/index.cjs",
5
5
  "dependencies": {
6
- "@devtools-ui/text": "0.1.1-next.3",
7
- "@devtools-ui/collection": "0.1.1-next.3",
6
+ "@devtools-ui/text": "0.1.2-next.0",
7
+ "@devtools-ui/collection": "0.1.2-next.0",
8
8
  "@chakra-ui/react": "^2.8.2",
9
9
  "@emotion/react": "^11.11.4",
10
10
  "@emotion/styled": "^11.11.0",