@devtools-ui/flame-graph 0.4.0-next.1 → 0.4.1--canary.62.3837
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/dist/cjs/index.cjs +2 -2
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/index.legacy-esm.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
- package/src/dsl/__tests__/index.test.tsx +1 -1
- package/src/dsl/index.tsx +1 -1
- package/types/dsl/index.d.ts +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -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
|
|
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(
|
|
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
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -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-
|
|
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"]}
|
package/dist/index.legacy-esm.js
CHANGED
|
@@ -26,7 +26,7 @@ var FlameGraphComponent = (props) => {
|
|
|
26
26
|
import React2 from "react";
|
|
27
27
|
import {
|
|
28
28
|
Asset
|
|
29
|
-
} from "@player-
|
|
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-
|
|
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.map
CHANGED
|
@@ -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-
|
|
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devtools-ui/flame-graph",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1--canary.62.3837",
|
|
4
4
|
"main": "dist/cjs/index.cjs",
|
|
5
5
|
"module": "dist/index.legacy-esm.js",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"tslib": "^2.6.2"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@player-
|
|
35
|
-
"@player-ui/asset-transform-plugin": "0.
|
|
36
|
-
"@player-ui/player": "0.
|
|
37
|
-
"@player-ui/react": "0.
|
|
38
|
-
"@player-ui/types": "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-
|
|
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
package/types/dsl/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { AssetPropsWithChildren, BindingTemplateInstance } from "@player-
|
|
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
|