@devtools-ui/flame-graph 0.4.0 → 0.4.1-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.
package/README.md ADDED
@@ -0,0 +1,86 @@
1
+ # @devtools-ui/flame-graph
2
+
3
+ ## Overview
4
+
5
+ `@devtools-ui/flame-graph` is a component package designed to be leveraged by a [Player-UI assets plugin](https://player-ui.github.io/next/plugins).
6
+
7
+ It provides a `flame-graph` component for visualizing profiling data.
8
+
9
+ ## Installation
10
+
11
+ To install `@devtools-ui/flame-graph`, you can use pnpm or yarn:
12
+
13
+ ```sh
14
+ pnpm i @devtools-ui/flame-graph
15
+ ```
16
+
17
+ or
18
+
19
+ ```sh
20
+ yarn add @devtools-ui/flame-graph
21
+ ```
22
+
23
+ ## Usage
24
+
25
+ You can leverage this asset through the `@devtools-ui/plugin`:
26
+
27
+ ```ts
28
+ import { FlameGraph } from "@devtools-ui/plugin";
29
+
30
+ // and use it to define your Player-UI content:
31
+ myFlow = {
32
+ id: "my_flow",
33
+ views: [<FlameGraph binding={b`my_binding`} height={100} width={200} />],
34
+ };
35
+ ```
36
+
37
+ For more information on how to author Player-UI content using DSL, please check our [Player-UI docs](https://player-ui.github.io/next/dsl#tsxjsx-content-authoring-player-dsl).
38
+
39
+ Or, your can leverage this asset in your own plugin:
40
+
41
+ ```ts
42
+ // TransformPlugin.ts
43
+ import type { Player, PlayerPlugin } from "@player-ui/player";
44
+ import { AssetTransformPlugin } from "@player-ui/asset-transform-plugin";
45
+ import { flameGraphTransform } from "@devtools-ui/flame-graph";
46
+
47
+ export class TransformsPlugin implements PlayerPlugin {
48
+ name = "my-plugin-transforms";
49
+
50
+ apply(player: Player) {
51
+ player.registerPlugin(
52
+ new AssetTransformPlugin([[{ type: "flame-graph" }, flameGraphTransform]])
53
+ );
54
+ }
55
+ }
56
+ ```
57
+
58
+ ```ts
59
+ // AssetRegistryPlugin.ts
60
+ import React from "react";
61
+ import type { Player } from "@player-ui/player";
62
+ import type {
63
+ ExtendedPlayerPlugin,
64
+ ReactPlayer,
65
+ ReactPlayerPlugin,
66
+ } from "@player-ui/react";
67
+ import { AssetProviderPlugin } from "@player-ui/asset-provider-plugin-react";
68
+ import { TransformsPlugin } from "./TransformPlugin";
69
+ import { FlameGraphAsset, FlameGraphComponent } from "@devtools-ui/flame-graph";
70
+
71
+ export class AssetsRegistryPlugin
72
+ implements ReactPlayerPlugin, ExtendedPlayerPlugin<[FlameGraphAsset]>
73
+ {
74
+ name = "my-plugin";
75
+
76
+ applyReact(reactPlayer: ReactPlayer) {
77
+ reactPlayer.registerPlugin(
78
+ new AssetProviderPlugin([["flame-graph", FlameGraphComponent]])
79
+ );
80
+ }
81
+
82
+ apply(player: Player) {
83
+ player.registerPlugin(new TransformsPlugin());
84
+ }
85
+ }
86
+ ```
@@ -62,10 +62,10 @@ var FlameGraphComponent = (props) => {
62
62
 
63
63
  // ../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/flame-graph/src/dsl/index.tsx
64
64
  var import_react2 = __toESM(require("react"));
65
- var import_dsl = require("@player-tools/dsl");
65
+ var import_react_dsl = require("@player-lang/react-dsl");
66
66
  var FlameGraph2 = (props) => {
67
67
  const { children, binding, ...rest } = props;
68
- return /* @__PURE__ */ import_react2.default.createElement(import_dsl.Asset, { type: "flame-graph", ...rest }, /* @__PURE__ */ import_react2.default.createElement("property", { name: "binding" }, binding.toValue()), children);
68
+ return /* @__PURE__ */ import_react2.default.createElement(import_react_dsl.Asset, { type: "flame-graph", ...rest }, /* @__PURE__ */ import_react2.default.createElement("property", { name: "binding" }, binding.toValue()), children);
69
69
  };
70
70
 
71
71
  // ../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/flame-graph/src/transform/index.ts
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/flame-graph/src/index.ts","../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/flame-graph/src/component/index.tsx","../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/flame-graph/src/hooks/index.ts","../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/flame-graph/src/dsl/index.tsx","../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/flame-graph/src/transform/index.ts"],"sourcesContent":["export * from \"./types\";\nexport * from \"./component\";\nexport * from \"./dsl\";\nexport * from \"./transform\";\n","import React from \"react\";\nimport { FlameGraph } from \"react-flame-graph\";\nimport { useFlameGraphProps } from \"../hooks\";\nimport type { TransformedFlameGraph } from \"../types\";\n\nexport const FlameGraphComponent = (props: TransformedFlameGraph) => {\n const transformedProps = useFlameGraphProps(props);\n\n return <FlameGraph {...transformedProps} />;\n};\n","import type { Props } from \"react-flame-graph\";\nimport type { TransformedFlameGraph } from \"../types\";\n\nconst transformData = (data: TransformedFlameGraph[\"data\"]): Props[\"data\"] => ({\n name: data?.name || \"root\",\n value: data?.value || 0,\n ...(data?.tooltip && { tooltip: data.tooltip }),\n children: data?.children?.map(transformData) || [],\n});\n\n/**\n * Hook to translate the properties we get from the Player Content (DSL > JSON > transformer)\n * into what the FlameGraph component expects.\n */\nexport const useFlameGraphProps = (props: TransformedFlameGraph): Props => ({\n ...props,\n height: props.height || 500,\n width: props.width || 500,\n data: transformData(props.data),\n});\n","import React from \"react\";\nimport {\n AssetPropsWithChildren,\n Asset,\n BindingTemplateInstance,\n} from \"@player-tools/dsl\";\nimport type { FlameGraphAsset } from \"../types\";\n\n/**\n * Defines the component DSL representation, so users of this plugin can author Player-UI\n * content leveraging .jsx/.tsx syntax.\n */\nexport const FlameGraph = (\n props: Omit<AssetPropsWithChildren<FlameGraphAsset>, \"binding\"> & {\n /** The binding as a tagged template instance */\n binding: BindingTemplateInstance;\n }\n) => {\n const { children, binding, ...rest } = props;\n\n return (\n <Asset type=\"flame-graph\" {...rest}>\n <property name=\"binding\">{binding.toValue()}</property>\n {children}\n </Asset>\n );\n};\n","import type { TransformFunction } from \"@player-ui/player\";\nimport { FlameGraphAsset, TransformedFlameGraph } from \"../types\";\n\n/**\n * Platform-agnostic transform function that takes the properties we get from the Player Content (DSL > JSON)\n * and embeds Player state and methods:\n */\nexport const flameGraphTransform: TransformFunction<\n FlameGraphAsset,\n TransformedFlameGraph\n> = (asset, options) => {\n return {\n ...asset,\n data: asset.binding\n ? options.data.model.get(asset.binding, {\n includeInvalid: true,\n formatted: false,\n })\n : undefined,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,oBAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAkB;AAClB,+BAA2B;;;ACE3B,IAAM,gBAAgB,CAAC,UAAwD;AAAA,EAC7E,MAAM,MAAM,QAAQ;AAAA,EACpB,OAAO,MAAM,SAAS;AAAA,EACtB,GAAI,MAAM,WAAW,EAAE,SAAS,KAAK,QAAQ;AAAA,EAC7C,UAAU,MAAM,UAAU,IAAI,aAAa,KAAK,CAAC;AACnD;AAMO,IAAM,qBAAqB,CAAC,WAAyC;AAAA,EAC1E,GAAG;AAAA,EACH,QAAQ,MAAM,UAAU;AAAA,EACxB,OAAO,MAAM,SAAS;AAAA,EACtB,MAAM,cAAc,MAAM,IAAI;AAChC;;;ADdO,IAAM,sBAAsB,CAAC,UAAiC;AACnE,QAAM,mBAAmB,mBAAmB,KAAK;AAEjD,SAAO,6BAAAC,QAAA,cAAC,uCAAY,GAAG,kBAAkB;AAC3C;;;AETA,IAAAC,gBAAkB;AAClB,iBAIO;AAOA,IAAMC,cAAa,CACxB,UAIG;AACH,QAAM,EAAE,UAAU,SAAS,GAAG,KAAK,IAAI;AAEvC,SACE,8BAAAC,QAAA,cAAC,oBAAM,MAAK,eAAe,GAAG,QAC5B,8BAAAA,QAAA,cAAC,cAAS,MAAK,aAAW,QAAQ,QAAQ,CAAE,GAC3C,QACH;AAEJ;;;ACnBO,IAAM,sBAGT,CAAC,OAAO,YAAY;AACtB,SAAO;AAAA,IACL,GAAG;AAAA,IACH,MAAM,MAAM,UACR,QAAQ,KAAK,MAAM,IAAI,MAAM,SAAS;AAAA,MACpC,gBAAgB;AAAA,MAChB,WAAW;AAAA,IACb,CAAC,IACD;AAAA,EACN;AACF;","names":["FlameGraph","React","import_react","FlameGraph","React"]}
1
+ {"version":3,"sources":["../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/flame-graph/src/index.ts","../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/flame-graph/src/component/index.tsx","../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/flame-graph/src/hooks/index.ts","../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/flame-graph/src/dsl/index.tsx","../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/flame-graph/src/transform/index.ts"],"sourcesContent":["export * from \"./types\";\nexport * from \"./component\";\nexport * from \"./dsl\";\nexport * from \"./transform\";\n","import React from \"react\";\nimport { FlameGraph } from \"react-flame-graph\";\nimport { useFlameGraphProps } from \"../hooks\";\nimport type { TransformedFlameGraph } from \"../types\";\n\nexport const FlameGraphComponent = (props: TransformedFlameGraph) => {\n const transformedProps = useFlameGraphProps(props);\n\n return <FlameGraph {...transformedProps} />;\n};\n","import type { Props } from \"react-flame-graph\";\nimport type { TransformedFlameGraph } from \"../types\";\n\nconst transformData = (data: TransformedFlameGraph[\"data\"]): Props[\"data\"] => ({\n name: data?.name || \"root\",\n value: data?.value || 0,\n ...(data?.tooltip && { tooltip: data.tooltip }),\n children: data?.children?.map(transformData) || [],\n});\n\n/**\n * Hook to translate the properties we get from the Player Content (DSL > JSON > transformer)\n * into what the FlameGraph component expects.\n */\nexport const useFlameGraphProps = (props: TransformedFlameGraph): Props => ({\n ...props,\n height: props.height || 500,\n width: props.width || 500,\n data: transformData(props.data),\n});\n","import React from \"react\";\nimport {\n AssetPropsWithChildren,\n Asset,\n BindingTemplateInstance,\n} from \"@player-lang/react-dsl\";\nimport type { FlameGraphAsset } from \"../types\";\n\n/**\n * Defines the component DSL representation, so users of this plugin can author Player-UI\n * content leveraging .jsx/.tsx syntax.\n */\nexport const FlameGraph = (\n props: Omit<AssetPropsWithChildren<FlameGraphAsset>, \"binding\"> & {\n /** The binding as a tagged template instance */\n binding: BindingTemplateInstance;\n }\n) => {\n const { children, binding, ...rest } = props;\n\n return (\n <Asset type=\"flame-graph\" {...rest}>\n <property name=\"binding\">{binding.toValue()}</property>\n {children}\n </Asset>\n );\n};\n","import type { TransformFunction } from \"@player-ui/player\";\nimport { FlameGraphAsset, TransformedFlameGraph } from \"../types\";\n\n/**\n * Platform-agnostic transform function that takes the properties we get from the Player Content (DSL > JSON)\n * and embeds Player state and methods:\n */\nexport const flameGraphTransform: TransformFunction<\n FlameGraphAsset,\n TransformedFlameGraph\n> = (asset, options) => {\n return {\n ...asset,\n data: asset.binding\n ? options.data.model.get(asset.binding, {\n includeInvalid: true,\n formatted: false,\n })\n : undefined,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,oBAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAkB;AAClB,+BAA2B;;;ACE3B,IAAM,gBAAgB,CAAC,UAAwD;AAAA,EAC7E,MAAM,MAAM,QAAQ;AAAA,EACpB,OAAO,MAAM,SAAS;AAAA,EACtB,GAAI,MAAM,WAAW,EAAE,SAAS,KAAK,QAAQ;AAAA,EAC7C,UAAU,MAAM,UAAU,IAAI,aAAa,KAAK,CAAC;AACnD;AAMO,IAAM,qBAAqB,CAAC,WAAyC;AAAA,EAC1E,GAAG;AAAA,EACH,QAAQ,MAAM,UAAU;AAAA,EACxB,OAAO,MAAM,SAAS;AAAA,EACtB,MAAM,cAAc,MAAM,IAAI;AAChC;;;ADdO,IAAM,sBAAsB,CAAC,UAAiC;AACnE,QAAM,mBAAmB,mBAAmB,KAAK;AAEjD,SAAO,6BAAAC,QAAA,cAAC,uCAAY,GAAG,kBAAkB;AAC3C;;;AETA,IAAAC,gBAAkB;AAClB,uBAIO;AAOA,IAAMC,cAAa,CACxB,UAIG;AACH,QAAM,EAAE,UAAU,SAAS,GAAG,KAAK,IAAI;AAEvC,SACE,8BAAAC,QAAA,cAAC,0BAAM,MAAK,eAAe,GAAG,QAC5B,8BAAAA,QAAA,cAAC,cAAS,MAAK,aAAW,QAAQ,QAAQ,CAAE,GAC3C,QACH;AAEJ;;;ACnBO,IAAM,sBAGT,CAAC,OAAO,YAAY;AACtB,SAAO;AAAA,IACL,GAAG;AAAA,IACH,MAAM,MAAM,UACR,QAAQ,KAAK,MAAM,IAAI,MAAM,SAAS;AAAA,MACpC,gBAAgB;AAAA,MAChB,WAAW;AAAA,IACb,CAAC,IACD;AAAA,EACN;AACF;","names":["FlameGraph","React","import_react","FlameGraph","React"]}
@@ -26,7 +26,7 @@ var FlameGraphComponent = (props) => {
26
26
  import React2 from "react";
27
27
  import {
28
28
  Asset
29
- } from "@player-tools/dsl";
29
+ } from "@player-lang/react-dsl";
30
30
  var FlameGraph2 = (props) => {
31
31
  const { children, binding, ...rest } = props;
32
32
  return /* @__PURE__ */ React2.createElement(Asset, { type: "flame-graph", ...rest }, /* @__PURE__ */ React2.createElement("property", { name: "binding" }, binding.toValue()), children);
package/dist/index.mjs CHANGED
@@ -26,7 +26,7 @@ var FlameGraphComponent = (props) => {
26
26
  import React2 from "react";
27
27
  import {
28
28
  Asset
29
- } from "@player-tools/dsl";
29
+ } from "@player-lang/react-dsl";
30
30
  var FlameGraph2 = (props) => {
31
31
  const { children, binding, ...rest } = props;
32
32
  return /* @__PURE__ */ React2.createElement(Asset, { type: "flame-graph", ...rest }, /* @__PURE__ */ React2.createElement("property", { name: "binding" }, binding.toValue()), children);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/flame-graph/src/component/index.tsx","../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/flame-graph/src/hooks/index.ts","../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/flame-graph/src/dsl/index.tsx","../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/flame-graph/src/transform/index.ts"],"sourcesContent":["import React from \"react\";\nimport { FlameGraph } from \"react-flame-graph\";\nimport { useFlameGraphProps } from \"../hooks\";\nimport type { TransformedFlameGraph } from \"../types\";\n\nexport const FlameGraphComponent = (props: TransformedFlameGraph) => {\n const transformedProps = useFlameGraphProps(props);\n\n return <FlameGraph {...transformedProps} />;\n};\n","import type { Props } from \"react-flame-graph\";\nimport type { TransformedFlameGraph } from \"../types\";\n\nconst transformData = (data: TransformedFlameGraph[\"data\"]): Props[\"data\"] => ({\n name: data?.name || \"root\",\n value: data?.value || 0,\n ...(data?.tooltip && { tooltip: data.tooltip }),\n children: data?.children?.map(transformData) || [],\n});\n\n/**\n * Hook to translate the properties we get from the Player Content (DSL > JSON > transformer)\n * into what the FlameGraph component expects.\n */\nexport const useFlameGraphProps = (props: TransformedFlameGraph): Props => ({\n ...props,\n height: props.height || 500,\n width: props.width || 500,\n data: transformData(props.data),\n});\n","import React from \"react\";\nimport {\n AssetPropsWithChildren,\n Asset,\n BindingTemplateInstance,\n} from \"@player-tools/dsl\";\nimport type { FlameGraphAsset } from \"../types\";\n\n/**\n * Defines the component DSL representation, so users of this plugin can author Player-UI\n * content leveraging .jsx/.tsx syntax.\n */\nexport const FlameGraph = (\n props: Omit<AssetPropsWithChildren<FlameGraphAsset>, \"binding\"> & {\n /** The binding as a tagged template instance */\n binding: BindingTemplateInstance;\n }\n) => {\n const { children, binding, ...rest } = props;\n\n return (\n <Asset type=\"flame-graph\" {...rest}>\n <property name=\"binding\">{binding.toValue()}</property>\n {children}\n </Asset>\n );\n};\n","import type { TransformFunction } from \"@player-ui/player\";\nimport { FlameGraphAsset, TransformedFlameGraph } from \"../types\";\n\n/**\n * Platform-agnostic transform function that takes the properties we get from the Player Content (DSL > JSON)\n * and embeds Player state and methods:\n */\nexport const flameGraphTransform: TransformFunction<\n FlameGraphAsset,\n TransformedFlameGraph\n> = (asset, options) => {\n return {\n ...asset,\n data: asset.binding\n ? options.data.model.get(asset.binding, {\n includeInvalid: true,\n formatted: false,\n })\n : undefined,\n };\n};\n"],"mappings":";AAAA,OAAO,WAAW;AAClB,SAAS,kBAAkB;;;ACE3B,IAAM,gBAAgB,CAAC,UAAwD;AAAA,EAC7E,MAAM,MAAM,QAAQ;AAAA,EACpB,OAAO,MAAM,SAAS;AAAA,EACtB,GAAI,MAAM,WAAW,EAAE,SAAS,KAAK,QAAQ;AAAA,EAC7C,UAAU,MAAM,UAAU,IAAI,aAAa,KAAK,CAAC;AACnD;AAMO,IAAM,qBAAqB,CAAC,WAAyC;AAAA,EAC1E,GAAG;AAAA,EACH,QAAQ,MAAM,UAAU;AAAA,EACxB,OAAO,MAAM,SAAS;AAAA,EACtB,MAAM,cAAc,MAAM,IAAI;AAChC;;;ADdO,IAAM,sBAAsB,CAAC,UAAiC;AACnE,QAAM,mBAAmB,mBAAmB,KAAK;AAEjD,SAAO,oCAAC,cAAY,GAAG,kBAAkB;AAC3C;;;AETA,OAAOA,YAAW;AAClB;AAAA,EAEE;AAAA,OAEK;AAOA,IAAMC,cAAa,CACxB,UAIG;AACH,QAAM,EAAE,UAAU,SAAS,GAAG,KAAK,IAAI;AAEvC,SACE,gBAAAD,OAAA,cAAC,SAAM,MAAK,eAAe,GAAG,QAC5B,gBAAAA,OAAA,cAAC,cAAS,MAAK,aAAW,QAAQ,QAAQ,CAAE,GAC3C,QACH;AAEJ;;;ACnBO,IAAM,sBAGT,CAAC,OAAO,YAAY;AACtB,SAAO;AAAA,IACL,GAAG;AAAA,IACH,MAAM,MAAM,UACR,QAAQ,KAAK,MAAM,IAAI,MAAM,SAAS;AAAA,MACpC,gBAAgB;AAAA,MAChB,WAAW;AAAA,IACb,CAAC,IACD;AAAA,EACN;AACF;","names":["React","FlameGraph"]}
1
+ {"version":3,"sources":["../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/flame-graph/src/component/index.tsx","../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/flame-graph/src/hooks/index.ts","../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/flame-graph/src/dsl/index.tsx","../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/flame-graph/src/transform/index.ts"],"sourcesContent":["import React from \"react\";\nimport { FlameGraph } from \"react-flame-graph\";\nimport { useFlameGraphProps } from \"../hooks\";\nimport type { TransformedFlameGraph } from \"../types\";\n\nexport const FlameGraphComponent = (props: TransformedFlameGraph) => {\n const transformedProps = useFlameGraphProps(props);\n\n return <FlameGraph {...transformedProps} />;\n};\n","import type { Props } from \"react-flame-graph\";\nimport type { TransformedFlameGraph } from \"../types\";\n\nconst transformData = (data: TransformedFlameGraph[\"data\"]): Props[\"data\"] => ({\n name: data?.name || \"root\",\n value: data?.value || 0,\n ...(data?.tooltip && { tooltip: data.tooltip }),\n children: data?.children?.map(transformData) || [],\n});\n\n/**\n * Hook to translate the properties we get from the Player Content (DSL > JSON > transformer)\n * into what the FlameGraph component expects.\n */\nexport const useFlameGraphProps = (props: TransformedFlameGraph): Props => ({\n ...props,\n height: props.height || 500,\n width: props.width || 500,\n data: transformData(props.data),\n});\n","import React from \"react\";\nimport {\n AssetPropsWithChildren,\n Asset,\n BindingTemplateInstance,\n} from \"@player-lang/react-dsl\";\nimport type { FlameGraphAsset } from \"../types\";\n\n/**\n * Defines the component DSL representation, so users of this plugin can author Player-UI\n * content leveraging .jsx/.tsx syntax.\n */\nexport const FlameGraph = (\n props: Omit<AssetPropsWithChildren<FlameGraphAsset>, \"binding\"> & {\n /** The binding as a tagged template instance */\n binding: BindingTemplateInstance;\n }\n) => {\n const { children, binding, ...rest } = props;\n\n return (\n <Asset type=\"flame-graph\" {...rest}>\n <property name=\"binding\">{binding.toValue()}</property>\n {children}\n </Asset>\n );\n};\n","import type { TransformFunction } from \"@player-ui/player\";\nimport { FlameGraphAsset, TransformedFlameGraph } from \"../types\";\n\n/**\n * Platform-agnostic transform function that takes the properties we get from the Player Content (DSL > JSON)\n * and embeds Player state and methods:\n */\nexport const flameGraphTransform: TransformFunction<\n FlameGraphAsset,\n TransformedFlameGraph\n> = (asset, options) => {\n return {\n ...asset,\n data: asset.binding\n ? options.data.model.get(asset.binding, {\n includeInvalid: true,\n formatted: false,\n })\n : undefined,\n };\n};\n"],"mappings":";AAAA,OAAO,WAAW;AAClB,SAAS,kBAAkB;;;ACE3B,IAAM,gBAAgB,CAAC,UAAwD;AAAA,EAC7E,MAAM,MAAM,QAAQ;AAAA,EACpB,OAAO,MAAM,SAAS;AAAA,EACtB,GAAI,MAAM,WAAW,EAAE,SAAS,KAAK,QAAQ;AAAA,EAC7C,UAAU,MAAM,UAAU,IAAI,aAAa,KAAK,CAAC;AACnD;AAMO,IAAM,qBAAqB,CAAC,WAAyC;AAAA,EAC1E,GAAG;AAAA,EACH,QAAQ,MAAM,UAAU;AAAA,EACxB,OAAO,MAAM,SAAS;AAAA,EACtB,MAAM,cAAc,MAAM,IAAI;AAChC;;;ADdO,IAAM,sBAAsB,CAAC,UAAiC;AACnE,QAAM,mBAAmB,mBAAmB,KAAK;AAEjD,SAAO,oCAAC,cAAY,GAAG,kBAAkB;AAC3C;;;AETA,OAAOA,YAAW;AAClB;AAAA,EAEE;AAAA,OAEK;AAOA,IAAMC,cAAa,CACxB,UAIG;AACH,QAAM,EAAE,UAAU,SAAS,GAAG,KAAK,IAAI;AAEvC,SACE,gBAAAD,OAAA,cAAC,SAAM,MAAK,eAAe,GAAG,QAC5B,gBAAAA,OAAA,cAAC,cAAS,MAAK,aAAW,QAAQ,QAAQ,CAAE,GAC3C,QACH;AAEJ;;;ACnBO,IAAM,sBAGT,CAAC,OAAO,YAAY;AACtB,SAAO;AAAA,IACL,GAAG;AAAA,IACH,MAAM,MAAM,UACR,QAAQ,KAAK,MAAM,IAAI,MAAM,SAAS;AAAA,MACpC,gBAAgB;AAAA,MAChB,WAAW;AAAA,IACb,CAAC,IACD;AAAA,EACN;AACF;","names":["React","FlameGraph"]}
package/package.json CHANGED
@@ -1,10 +1,15 @@
1
1
  {
2
+ "sideEffects": false,
3
+ "files": [
4
+ "dist",
5
+ "src",
6
+ "types"
7
+ ],
2
8
  "name": "@devtools-ui/flame-graph",
3
- "version": "0.4.0",
9
+ "version": "0.4.1-next.0",
4
10
  "main": "dist/cjs/index.cjs",
5
11
  "module": "dist/index.legacy-esm.js",
6
12
  "types": "types/index.d.ts",
7
- "sideEffects": false,
8
13
  "exports": {
9
14
  "./package.json": "./package.json",
10
15
  "./dist/index.css": "./dist/index.css",
@@ -14,11 +19,6 @@
14
19
  "default": "./dist/cjs/index.cjs"
15
20
  }
16
21
  },
17
- "files": [
18
- "dist",
19
- "src",
20
- "types"
21
- ],
22
22
  "dependencies": {
23
23
  "@chakra-ui/react": "^2.8.2",
24
24
  "@emotion/react": "^11.11.4",
@@ -31,10 +31,10 @@
31
31
  "tslib": "^2.6.2"
32
32
  },
33
33
  "peerDependencies": {
34
- "@player-tools/dsl": "0.7.0-next.3",
35
- "@player-ui/asset-transform-plugin": "0.9.1-next.0",
36
- "@player-ui/player": "0.9.1-next.0",
37
- "@player-ui/react": "0.9.1-next.0",
38
- "@player-ui/types": "0.9.1-next.0"
34
+ "@player-lang/react-dsl": "1.0.1",
35
+ "@player-ui/asset-transform-plugin": "0.15.5",
36
+ "@player-ui/player": "0.15.5",
37
+ "@player-ui/react": "0.15.5",
38
+ "@player-ui/types": "0.15.5"
39
39
  }
40
40
  }
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { describe, expect, test } from "vitest";
3
- import { render, binding as b } from "@player-tools/dsl";
3
+ import { render, binding as b } from "@player-lang/react-dsl";
4
4
  import { FlameGraph } from "../";
5
5
 
6
6
  describe("DSL: FlameGraph", () => {
package/src/dsl/index.tsx CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  AssetPropsWithChildren,
4
4
  Asset,
5
5
  BindingTemplateInstance,
6
- } from "@player-tools/dsl";
6
+ } from "@player-lang/react-dsl";
7
7
  import type { FlameGraphAsset } from "../types";
8
8
 
9
9
  /**
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { AssetPropsWithChildren, BindingTemplateInstance } from "@player-tools/dsl";
2
+ import { AssetPropsWithChildren, BindingTemplateInstance } from "@player-lang/react-dsl";
3
3
  import type { FlameGraphAsset } from "../types";
4
4
  /**
5
5
  * Defines the component DSL representation, so users of this plugin can author Player-UI
@@ -1,5 +1,5 @@
1
1
  import type { Asset } from "@player-ui/types";
2
- export type ProfilerNode = {
2
+ export declare type ProfilerNode = {
3
3
  /** hook name */
4
4
  name: string;
5
5
  startTime?: number;