@react-spot/plugin-open-editor 0.0.1

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,71 @@
1
+ # @react-spot/plugin-open-editor
2
+
3
+ Open the currently selected component source in a local editor from the Trace action panel.
4
+
5
+ This plugin adds:
6
+
7
+ - an `Open in Editor` action for the selected source
8
+ - a settings control for choosing the default editor inside the widget
9
+
10
+ ## Installation
11
+
12
+ Install the plugin alongside its peer dependencies:
13
+
14
+ ```bash
15
+ pnpm add --dev @react-spot/core @react-spot/ui-components @react-spot/plugin-open-editor
16
+ ```
17
+
18
+ If you are already using `@react-spot/kit`, this plugin is included there by default.
19
+
20
+ ## Usage
21
+
22
+ ```tsx
23
+ import { Trace } from '@react-spot/core'
24
+ import { OpenEditorPlugin } from '@react-spot/plugin-open-editor'
25
+
26
+ import App from './App'
27
+
28
+ export function AppWithTrace() {
29
+ return (
30
+ <>
31
+ <App />
32
+ <Trace
33
+ root={import.meta.env.VITE_ROOT}
34
+ plugins={[OpenEditorPlugin({ editor: 'vscode' })]}
35
+ />
36
+ </>
37
+ )
38
+ }
39
+ ```
40
+
41
+ `root` should be the absolute project root passed to Trace so the plugin can resolve relative file paths for comments.
42
+
43
+ ## `editor` option
44
+
45
+ `OpenEditorPlugin` accepts a single option:
46
+
47
+ ```ts
48
+ interface OpenEditorPluginOptions {
49
+ editor?: EditorPreset
50
+ }
51
+ ```
52
+
53
+ - Default: `vscode`
54
+ - If the user changes the editor in the widget settings, that's what's used instead.
55
+
56
+ The package also exports the `EditorPreset` type.
57
+
58
+ ## Supported editor presets
59
+
60
+ These are the currently implemented presets:
61
+
62
+ - `vscode`
63
+ - `cursor`
64
+ - `windsurf`
65
+ - `zed`
66
+ - `webstorm`
67
+ - `intellij`
68
+
69
+ ## Behavior
70
+
71
+ When a source location is selected, the plugin resolves the file path relative to the Trace `root` and opens the generated editor URL with `window.open(...)`.
@@ -0,0 +1,19 @@
1
+ import { TracePlugin } from "@react-spot/core";
2
+
3
+ //#region src/types.d.ts
4
+ type EditorPreset = 'vscode' | 'cursor' | 'windsurf' | 'webstorm' | 'intellij' | 'zed';
5
+ //#endregion
6
+ //#region src/index.d.ts
7
+ interface OpenEditorPluginOptions {
8
+ /**
9
+ * The editor to open files in.
10
+ * @default 'vscode'
11
+ */
12
+ editor?: EditorPreset;
13
+ }
14
+ declare function OpenEditorPlugin({
15
+ editor
16
+ }?: OpenEditorPluginOptions): TracePlugin;
17
+ //#endregion
18
+ export { OpenEditorPluginOptions as n, EditorPreset as r, OpenEditorPlugin as t };
19
+ //# sourceMappingURL=index-B9Y5AtZb.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-B9Y5AtZb.d.cts","names":[],"sources":["../src/types.ts","../src/index.tsx"],"mappings":";;;KAAY,YAAA;;;UCWK,uBAAA;EDXO;;;;ECgBtB,MAAA,GAAS,YAAA;AAAA;AAAA,iBAuBK,gBAAA,CAAA;EACd;AAAA,IACC,uBAAA,GAA+B,WAAA"}
@@ -0,0 +1,19 @@
1
+ import { TracePlugin } from "@react-spot/core";
2
+
3
+ //#region src/types.d.ts
4
+ type EditorPreset = 'vscode' | 'cursor' | 'windsurf' | 'webstorm' | 'intellij' | 'zed';
5
+ //#endregion
6
+ //#region src/index.d.ts
7
+ interface OpenEditorPluginOptions {
8
+ /**
9
+ * The editor to open files in.
10
+ * @default 'vscode'
11
+ */
12
+ editor?: EditorPreset;
13
+ }
14
+ declare function OpenEditorPlugin({
15
+ editor
16
+ }?: OpenEditorPluginOptions): TracePlugin;
17
+ //#endregion
18
+ export { OpenEditorPluginOptions as n, EditorPreset as r, OpenEditorPlugin as t };
19
+ //# sourceMappingURL=index-BiOO9sbK.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-BiOO9sbK.d.ts","names":[],"sources":["../src/types.ts","../src/index.tsx"],"mappings":";;;KAAY,YAAA;;;UCWK,uBAAA;EDXO;;;;ECgBtB,MAAA,GAAS,YAAA;AAAA;AAAA,iBAuBK,gBAAA,CAAA;EACd;AAAA,IACC,uBAAA,GAA+B,WAAA"}
package/dist/index.cjs ADDED
@@ -0,0 +1,85 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ let _react_spot_core = require("@react-spot/core");
3
+ let _react_spot_ui_components = require("@react-spot/ui-components");
4
+ let jotai = require("jotai");
5
+ let react_jsx_runtime = require("react/jsx-runtime");
6
+
7
+ //#region src/store.ts
8
+ const openEditorSettingsAtom = (0, _react_spot_core.settingsPluginAtom)("openEditor");
9
+
10
+ //#endregion
11
+ //#region src/index.tsx
12
+ const editors = Object.entries({
13
+ vscode: "VS Code",
14
+ cursor: "Cursor",
15
+ windsurf: "Windsurf",
16
+ zed: "Zed",
17
+ webstorm: "WebStorm",
18
+ intellij: "IntelliJ"
19
+ }).map(([value, label]) => ({
20
+ value,
21
+ label
22
+ }));
23
+ const LABEL_STYLE = {
24
+ fontSize: 12,
25
+ color: "#d4d4d8",
26
+ fontFamily: "system-ui, sans-serif"
27
+ };
28
+ function OpenEditorPlugin({ editor = "vscode" } = {}) {
29
+ function OpenEditorSettings() {
30
+ const portalContainer = (0, _react_spot_core.useWidgetPortalContainer)();
31
+ const [editorSettings = { editor }, setEditorSettings] = (0, jotai.useAtom)(openEditorSettingsAtom);
32
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
33
+ style: {
34
+ display: "flex",
35
+ flexDirection: "column",
36
+ gap: 12
37
+ },
38
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
39
+ style: {
40
+ display: "flex",
41
+ flexDirection: "column",
42
+ gap: 6
43
+ },
44
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
45
+ style: LABEL_STYLE,
46
+ children: "Default editor"
47
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_react_spot_ui_components.Select.Root, {
48
+ value: editorSettings.editor,
49
+ items: editors,
50
+ onValueChange: (value) => {
51
+ if (value) setEditorSettings({
52
+ ...editorSettings,
53
+ editor: value
54
+ });
55
+ },
56
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_react_spot_ui_components.Select.Trigger, {
57
+ onClick: (e) => e.stopPropagation(),
58
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_react_spot_ui_components.Select.Value, {})
59
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_react_spot_ui_components.Select.Portal, {
60
+ container: portalContainer,
61
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_react_spot_ui_components.Select.Positioner, {
62
+ style: {
63
+ zIndex: 1e8,
64
+ pointerEvents: "auto"
65
+ },
66
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_react_spot_ui_components.Select.Popup, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_react_spot_ui_components.Select.List, { children: editors.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_react_spot_ui_components.Select.Item, {
67
+ value: option.value,
68
+ onClick: (e) => e.stopPropagation(),
69
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_react_spot_ui_components.Select.ItemText, { children: option.label })
70
+ }, option.value)) }) })
71
+ })
72
+ })]
73
+ })]
74
+ })
75
+ });
76
+ }
77
+ return {
78
+ name: "open-editor",
79
+ settings: OpenEditorSettings
80
+ };
81
+ }
82
+
83
+ //#endregion
84
+ exports.OpenEditorPlugin = OpenEditorPlugin;
85
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":["Select"],"sources":["../src/store.ts","../src/index.tsx"],"sourcesContent":["import type { TraceSettings } from '@react-spot/core'\nimport { settingsPluginAtom } from '@react-spot/core'\nimport type { WritableAtom } from 'jotai'\n\nimport type { EditorPreset } from './types'\n\ndeclare module '@react-spot/core' {\n interface TraceSettings {\n openEditor?: {\n editor: EditorPreset\n }\n }\n}\n\nexport const openEditorSettingsAtom = settingsPluginAtom(\n 'openEditor',\n) as WritableAtom<\n TraceSettings['openEditor'],\n [TraceSettings['openEditor']],\n void\n>\n","import type { TracePlugin } from '@react-spot/core'\nimport { useWidgetPortalContainer } from '@react-spot/core'\nimport { Select } from '@react-spot/ui-components'\nimport { useAtom } from 'jotai'\nimport type { CSSProperties } from 'react'\n\nimport { openEditorSettingsAtom } from './store'\nimport type { EditorPreset } from './types'\n\nexport type { EditorPreset }\n\nexport interface OpenEditorPluginOptions {\n /**\n * The editor to open files in.\n * @default 'vscode'\n */\n editor?: EditorPreset\n}\n\nconst EDITOR_LABELS: Record<EditorPreset, string> = {\n vscode: 'VS Code',\n cursor: 'Cursor',\n windsurf: 'Windsurf',\n zed: 'Zed',\n webstorm: 'WebStorm',\n intellij: 'IntelliJ',\n}\n\nconst editors = Object.entries(EDITOR_LABELS).map(([value, label]) => ({\n value: value as EditorPreset,\n label,\n}))\n\nconst LABEL_STYLE: CSSProperties = {\n fontSize: 12,\n color: '#d4d4d8',\n fontFamily: 'system-ui, sans-serif',\n}\n\nexport function OpenEditorPlugin({\n editor = 'vscode',\n}: OpenEditorPluginOptions = {}): TracePlugin {\n function OpenEditorSettings() {\n const portalContainer = useWidgetPortalContainer()\n\n const [editorSettings = { editor }, setEditorSettings] = useAtom(\n openEditorSettingsAtom,\n )\n\n return (\n <div style={{ display: 'flex', flexDirection: 'column', gap: 12 }}>\n <div style={{ display: 'flex', flexDirection: 'column', gap: 6 }}>\n <label style={LABEL_STYLE}>Default editor</label>\n <Select.Root\n value={editorSettings.editor}\n items={editors}\n onValueChange={(value) => {\n if (value) {\n setEditorSettings({ ...editorSettings, editor: value })\n }\n }}\n >\n <Select.Trigger onClick={(e) => e.stopPropagation()}>\n <Select.Value />\n </Select.Trigger>\n\n <Select.Portal container={portalContainer}>\n <Select.Positioner\n style={{ zIndex: 100000000, pointerEvents: 'auto' }}\n >\n <Select.Popup>\n <Select.List>\n {editors.map((option) => (\n <Select.Item\n key={option.value}\n value={option.value}\n onClick={(e) => e.stopPropagation()}\n >\n <Select.ItemText>{option.label}</Select.ItemText>\n </Select.Item>\n ))}\n </Select.List>\n </Select.Popup>\n </Select.Positioner>\n </Select.Portal>\n </Select.Root>\n </div>\n </div>\n )\n }\n\n return {\n name: 'open-editor',\n settings: OpenEditorSettings,\n }\n}\n"],"mappings":";;;;;;;AAcA,MAAa,kEACX,aACD;;;;ACYD,MAAM,UAAU,OAAO,QAT6B;CAClD,QAAQ;CACR,QAAQ;CACR,UAAU;CACV,KAAK;CACL,UAAU;CACV,UAAU;CACX,CAE4C,CAAC,KAAK,CAAC,OAAO,YAAY;CAC9D;CACP;CACD,EAAE;AAEH,MAAM,cAA6B;CACjC,UAAU;CACV,OAAO;CACP,YAAY;CACb;AAED,SAAgB,iBAAiB,EAC/B,SAAS,aACkB,EAAE,EAAe;CAC5C,SAAS,qBAAqB;EAC5B,MAAM,kEAA4C;EAElD,MAAM,CAAC,iBAAiB,EAAE,QAAQ,EAAE,wCAClC,uBACD;AAED,SACE,2CAAC,OAAD;GAAK,OAAO;IAAE,SAAS;IAAQ,eAAe;IAAU,KAAK;IAAI;aAC/D,4CAAC,OAAD;IAAK,OAAO;KAAE,SAAS;KAAQ,eAAe;KAAU,KAAK;KAAG;cAAhE,CACE,2CAAC,SAAD;KAAO,OAAO;eAAa;KAAsB,GACjD,4CAACA,iCAAO,MAAR;KACE,OAAO,eAAe;KACtB,OAAO;KACP,gBAAgB,UAAU;AACxB,UAAI,MACF,mBAAkB;OAAE,GAAG;OAAgB,QAAQ;OAAO,CAAC;;eAL7D,CASE,2CAACA,iCAAO,SAAR;MAAgB,UAAU,MAAM,EAAE,iBAAiB;gBACjD,2CAACA,iCAAO,OAAR,EAAgB;MACD,GAEjB,2CAACA,iCAAO,QAAR;MAAe,WAAW;gBACxB,2CAACA,iCAAO,YAAR;OACE,OAAO;QAAE,QAAQ;QAAW,eAAe;QAAQ;iBAEnD,2CAACA,iCAAO,OAAR,YACE,2CAACA,iCAAO,MAAR,YACG,QAAQ,KAAK,WACZ,2CAACA,iCAAO,MAAR;QAEE,OAAO,OAAO;QACd,UAAU,MAAM,EAAE,iBAAiB;kBAEnC,2CAACA,iCAAO,UAAR,YAAkB,OAAO,OAAwB;QACrC,EALP,OAAO,MAKA,CACd,EACU,GACD;OACG;MACN,EACJ;OACV;;GACF;;AAIV,QAAO;EACL,MAAM;EACN,UAAU;EACX"}
@@ -0,0 +1,2 @@
1
+ import { n as OpenEditorPluginOptions, r as EditorPreset, t as OpenEditorPlugin } from "./index-B9Y5AtZb.cjs";
2
+ export { EditorPreset, OpenEditorPlugin, OpenEditorPluginOptions };
@@ -0,0 +1,2 @@
1
+ import { n as OpenEditorPluginOptions, r as EditorPreset, t as OpenEditorPlugin } from "./index-BiOO9sbK.js";
2
+ export { EditorPreset, OpenEditorPlugin, OpenEditorPluginOptions };
package/dist/index.js ADDED
@@ -0,0 +1,84 @@
1
+ import { settingsPluginAtom, useWidgetPortalContainer } from "@react-spot/core";
2
+ import { Select } from "@react-spot/ui-components";
3
+ import { useAtom } from "jotai";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+
6
+ //#region src/store.ts
7
+ const openEditorSettingsAtom = settingsPluginAtom("openEditor");
8
+
9
+ //#endregion
10
+ //#region src/index.tsx
11
+ const editors = Object.entries({
12
+ vscode: "VS Code",
13
+ cursor: "Cursor",
14
+ windsurf: "Windsurf",
15
+ zed: "Zed",
16
+ webstorm: "WebStorm",
17
+ intellij: "IntelliJ"
18
+ }).map(([value, label]) => ({
19
+ value,
20
+ label
21
+ }));
22
+ const LABEL_STYLE = {
23
+ fontSize: 12,
24
+ color: "#d4d4d8",
25
+ fontFamily: "system-ui, sans-serif"
26
+ };
27
+ function OpenEditorPlugin({ editor = "vscode" } = {}) {
28
+ function OpenEditorSettings() {
29
+ const portalContainer = useWidgetPortalContainer();
30
+ const [editorSettings = { editor }, setEditorSettings] = useAtom(openEditorSettingsAtom);
31
+ return /* @__PURE__ */ jsx("div", {
32
+ style: {
33
+ display: "flex",
34
+ flexDirection: "column",
35
+ gap: 12
36
+ },
37
+ children: /* @__PURE__ */ jsxs("div", {
38
+ style: {
39
+ display: "flex",
40
+ flexDirection: "column",
41
+ gap: 6
42
+ },
43
+ children: [/* @__PURE__ */ jsx("label", {
44
+ style: LABEL_STYLE,
45
+ children: "Default editor"
46
+ }), /* @__PURE__ */ jsxs(Select.Root, {
47
+ value: editorSettings.editor,
48
+ items: editors,
49
+ onValueChange: (value) => {
50
+ if (value) setEditorSettings({
51
+ ...editorSettings,
52
+ editor: value
53
+ });
54
+ },
55
+ children: [/* @__PURE__ */ jsx(Select.Trigger, {
56
+ onClick: (e) => e.stopPropagation(),
57
+ children: /* @__PURE__ */ jsx(Select.Value, {})
58
+ }), /* @__PURE__ */ jsx(Select.Portal, {
59
+ container: portalContainer,
60
+ children: /* @__PURE__ */ jsx(Select.Positioner, {
61
+ style: {
62
+ zIndex: 1e8,
63
+ pointerEvents: "auto"
64
+ },
65
+ children: /* @__PURE__ */ jsx(Select.Popup, { children: /* @__PURE__ */ jsx(Select.List, { children: editors.map((option) => /* @__PURE__ */ jsx(Select.Item, {
66
+ value: option.value,
67
+ onClick: (e) => e.stopPropagation(),
68
+ children: /* @__PURE__ */ jsx(Select.ItemText, { children: option.label })
69
+ }, option.value)) }) })
70
+ })
71
+ })]
72
+ })]
73
+ })
74
+ });
75
+ }
76
+ return {
77
+ name: "open-editor",
78
+ settings: OpenEditorSettings
79
+ };
80
+ }
81
+
82
+ //#endregion
83
+ export { OpenEditorPlugin };
84
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/store.ts","../src/index.tsx"],"sourcesContent":["import type { TraceSettings } from '@react-spot/core'\nimport { settingsPluginAtom } from '@react-spot/core'\nimport type { WritableAtom } from 'jotai'\n\nimport type { EditorPreset } from './types'\n\ndeclare module '@react-spot/core' {\n interface TraceSettings {\n openEditor?: {\n editor: EditorPreset\n }\n }\n}\n\nexport const openEditorSettingsAtom = settingsPluginAtom(\n 'openEditor',\n) as WritableAtom<\n TraceSettings['openEditor'],\n [TraceSettings['openEditor']],\n void\n>\n","import type { TracePlugin } from '@react-spot/core'\nimport { useWidgetPortalContainer } from '@react-spot/core'\nimport { Select } from '@react-spot/ui-components'\nimport { useAtom } from 'jotai'\nimport type { CSSProperties } from 'react'\n\nimport { openEditorSettingsAtom } from './store'\nimport type { EditorPreset } from './types'\n\nexport type { EditorPreset }\n\nexport interface OpenEditorPluginOptions {\n /**\n * The editor to open files in.\n * @default 'vscode'\n */\n editor?: EditorPreset\n}\n\nconst EDITOR_LABELS: Record<EditorPreset, string> = {\n vscode: 'VS Code',\n cursor: 'Cursor',\n windsurf: 'Windsurf',\n zed: 'Zed',\n webstorm: 'WebStorm',\n intellij: 'IntelliJ',\n}\n\nconst editors = Object.entries(EDITOR_LABELS).map(([value, label]) => ({\n value: value as EditorPreset,\n label,\n}))\n\nconst LABEL_STYLE: CSSProperties = {\n fontSize: 12,\n color: '#d4d4d8',\n fontFamily: 'system-ui, sans-serif',\n}\n\nexport function OpenEditorPlugin({\n editor = 'vscode',\n}: OpenEditorPluginOptions = {}): TracePlugin {\n function OpenEditorSettings() {\n const portalContainer = useWidgetPortalContainer()\n\n const [editorSettings = { editor }, setEditorSettings] = useAtom(\n openEditorSettingsAtom,\n )\n\n return (\n <div style={{ display: 'flex', flexDirection: 'column', gap: 12 }}>\n <div style={{ display: 'flex', flexDirection: 'column', gap: 6 }}>\n <label style={LABEL_STYLE}>Default editor</label>\n <Select.Root\n value={editorSettings.editor}\n items={editors}\n onValueChange={(value) => {\n if (value) {\n setEditorSettings({ ...editorSettings, editor: value })\n }\n }}\n >\n <Select.Trigger onClick={(e) => e.stopPropagation()}>\n <Select.Value />\n </Select.Trigger>\n\n <Select.Portal container={portalContainer}>\n <Select.Positioner\n style={{ zIndex: 100000000, pointerEvents: 'auto' }}\n >\n <Select.Popup>\n <Select.List>\n {editors.map((option) => (\n <Select.Item\n key={option.value}\n value={option.value}\n onClick={(e) => e.stopPropagation()}\n >\n <Select.ItemText>{option.label}</Select.ItemText>\n </Select.Item>\n ))}\n </Select.List>\n </Select.Popup>\n </Select.Positioner>\n </Select.Portal>\n </Select.Root>\n </div>\n </div>\n )\n }\n\n return {\n name: 'open-editor',\n settings: OpenEditorSettings,\n }\n}\n"],"mappings":";;;;;;AAcA,MAAa,yBAAyB,mBACpC,aACD;;;;ACYD,MAAM,UAAU,OAAO,QAT6B;CAClD,QAAQ;CACR,QAAQ;CACR,UAAU;CACV,KAAK;CACL,UAAU;CACV,UAAU;CACX,CAE4C,CAAC,KAAK,CAAC,OAAO,YAAY;CAC9D;CACP;CACD,EAAE;AAEH,MAAM,cAA6B;CACjC,UAAU;CACV,OAAO;CACP,YAAY;CACb;AAED,SAAgB,iBAAiB,EAC/B,SAAS,aACkB,EAAE,EAAe;CAC5C,SAAS,qBAAqB;EAC5B,MAAM,kBAAkB,0BAA0B;EAElD,MAAM,CAAC,iBAAiB,EAAE,QAAQ,EAAE,qBAAqB,QACvD,uBACD;AAED,SACE,oBAAC,OAAD;GAAK,OAAO;IAAE,SAAS;IAAQ,eAAe;IAAU,KAAK;IAAI;aAC/D,qBAAC,OAAD;IAAK,OAAO;KAAE,SAAS;KAAQ,eAAe;KAAU,KAAK;KAAG;cAAhE,CACE,oBAAC,SAAD;KAAO,OAAO;eAAa;KAAsB,GACjD,qBAAC,OAAO,MAAR;KACE,OAAO,eAAe;KACtB,OAAO;KACP,gBAAgB,UAAU;AACxB,UAAI,MACF,mBAAkB;OAAE,GAAG;OAAgB,QAAQ;OAAO,CAAC;;eAL7D,CASE,oBAAC,OAAO,SAAR;MAAgB,UAAU,MAAM,EAAE,iBAAiB;gBACjD,oBAAC,OAAO,OAAR,EAAgB;MACD,GAEjB,oBAAC,OAAO,QAAR;MAAe,WAAW;gBACxB,oBAAC,OAAO,YAAR;OACE,OAAO;QAAE,QAAQ;QAAW,eAAe;QAAQ;iBAEnD,oBAAC,OAAO,OAAR,YACE,oBAAC,OAAO,MAAR,YACG,QAAQ,KAAK,WACZ,oBAAC,OAAO,MAAR;QAEE,OAAO,OAAO;QACd,UAAU,MAAM,EAAE,iBAAiB;kBAEnC,oBAAC,OAAO,UAAR,YAAkB,OAAO,OAAwB;QACrC,EALP,OAAO,MAKA,CACd,EACU,GACD;OACG;MACN,EACJ;OACV;;GACF;;AAIV,QAAO;EACL,MAAM;EACN,UAAU;EACX"}
@@ -0,0 +1,11 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ //#region src/index.prod.ts
4
+ /**
5
+ * Production stub for @react-spot/plugin-open-editor.
6
+ */
7
+ const OpenEditorPlugin = () => ({ name: "open-editor" });
8
+
9
+ //#endregion
10
+ exports.OpenEditorPlugin = OpenEditorPlugin;
11
+ //# sourceMappingURL=index.prod.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.prod.cjs","names":[],"sources":["../src/index.prod.ts"],"sourcesContent":["/**\n * Production stub for @react-spot/plugin-open-editor.\n */\nexport const OpenEditorPlugin = () => ({ name: 'open-editor' as const })\n\nexport type { OpenEditorPluginOptions } from './index'\n\nexport type { EditorPreset } from './types'\n"],"mappings":";;;;;;AAGA,MAAa,0BAA0B,EAAE,MAAM,eAAwB"}
@@ -0,0 +1,12 @@
1
+ import { n as OpenEditorPluginOptions, r as EditorPreset } from "./index-B9Y5AtZb.cjs";
2
+
3
+ //#region src/index.prod.d.ts
4
+ /**
5
+ * Production stub for @react-spot/plugin-open-editor.
6
+ */
7
+ declare const OpenEditorPlugin: () => {
8
+ name: "open-editor";
9
+ };
10
+ //#endregion
11
+ export { type EditorPreset, OpenEditorPlugin, type OpenEditorPluginOptions };
12
+ //# sourceMappingURL=index.prod.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.prod.d.cts","names":[],"sources":["../src/index.prod.ts"],"mappings":";;;;;;cAGa,gBAAA;EAA2D,IAAA;AAAA"}
@@ -0,0 +1,12 @@
1
+ import { n as OpenEditorPluginOptions, r as EditorPreset } from "./index-BiOO9sbK.js";
2
+
3
+ //#region src/index.prod.d.ts
4
+ /**
5
+ * Production stub for @react-spot/plugin-open-editor.
6
+ */
7
+ declare const OpenEditorPlugin: () => {
8
+ name: "open-editor";
9
+ };
10
+ //#endregion
11
+ export { type EditorPreset, OpenEditorPlugin, type OpenEditorPluginOptions };
12
+ //# sourceMappingURL=index.prod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.prod.d.ts","names":[],"sources":["../src/index.prod.ts"],"mappings":";;;;;;cAGa,gBAAA;EAA2D,IAAA;AAAA"}
@@ -0,0 +1,9 @@
1
+ //#region src/index.prod.ts
2
+ /**
3
+ * Production stub for @react-spot/plugin-open-editor.
4
+ */
5
+ const OpenEditorPlugin = () => ({ name: "open-editor" });
6
+
7
+ //#endregion
8
+ export { OpenEditorPlugin };
9
+ //# sourceMappingURL=index.prod.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.prod.js","names":[],"sources":["../src/index.prod.ts"],"sourcesContent":["/**\n * Production stub for @react-spot/plugin-open-editor.\n */\nexport const OpenEditorPlugin = () => ({ name: 'open-editor' as const })\n\nexport type { OpenEditorPluginOptions } from './index'\n\nexport type { EditorPreset } from './types'\n"],"mappings":";;;;AAGA,MAAa,0BAA0B,EAAE,MAAM,eAAwB"}
package/package.json ADDED
@@ -0,0 +1,80 @@
1
+ {
2
+ "name": "@react-spot/plugin-open-editor",
3
+ "version": "0.0.1",
4
+ "description": "react-trace plugin: open inspected component source in your code editor",
5
+ "keywords": [
6
+ "react-trace",
7
+ "react-trace-plugin"
8
+ ],
9
+ "license": "MIT",
10
+ "author": "Vitor Buzinaro",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/buzinas/react-trace",
14
+ "directory": "packages/plugin-open-editor"
15
+ },
16
+ "files": [
17
+ "dist"
18
+ ],
19
+ "type": "module",
20
+ "main": "./dist/index.cjs",
21
+ "module": "./dist/index.js",
22
+ "types": "./dist/index.d.ts",
23
+ "exports": {
24
+ ".": {
25
+ "development": {
26
+ "import": {
27
+ "types": "./dist/index.d.ts",
28
+ "default": "./dist/index.js"
29
+ },
30
+ "require": {
31
+ "types": "./dist/index.d.cts",
32
+ "default": "./dist/index.cjs"
33
+ }
34
+ },
35
+ "production": {
36
+ "import": {
37
+ "types": "./dist/index.d.ts",
38
+ "default": "./dist/index.prod.js"
39
+ },
40
+ "require": {
41
+ "types": "./dist/index.d.cts",
42
+ "default": "./dist/index.prod.cjs"
43
+ }
44
+ },
45
+ "default": {
46
+ "import": {
47
+ "types": "./dist/index.d.ts",
48
+ "default": "./dist/index.js"
49
+ },
50
+ "require": {
51
+ "types": "./dist/index.d.cts",
52
+ "default": "./dist/index.cjs"
53
+ }
54
+ }
55
+ }
56
+ },
57
+ "publishConfig": {
58
+ "access": "public"
59
+ },
60
+ "scripts": {
61
+ "build": "tsdown",
62
+ "dev": "tsdown --watch --no-clean",
63
+ "typecheck": "tsc --noEmit",
64
+ "lint": "oxlint src",
65
+ "prepublishOnly": "pnpm build"
66
+ },
67
+ "devDependencies": {
68
+ "@types/react": "^19",
69
+ "oxlint": "latest",
70
+ "react": "^19",
71
+ "tsdown": "^0.21.0-beta.2",
72
+ "typescript": "^5"
73
+ },
74
+ "peerDependencies": {
75
+ "@react-spot/core": "^0.0.1",
76
+ "@react-spot/ui-components": "^0.0.1",
77
+ "jotai": "^2.18.0",
78
+ "react": ">=18"
79
+ }
80
+ }