@archie/devtools 0.0.17 → 0.0.18

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,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode } from 'react';
2
+ import React, { ReactNode } from 'react';
3
3
 
4
4
  /** Only configured domains (Archie host origins) and optionally localhost in dev. "*" is never used. */
5
5
  type InjectOptions = {
@@ -82,4 +82,9 @@ interface ArchieDevToolProviderProps extends ArchieDevToolsRuntimeOptions {
82
82
  }
83
83
  declare function ArchieDevToolProvider({ children, router, inspector, inspectorOptions, }: ArchieDevToolProviderProps): react_jsx_runtime.JSX.Element;
84
84
 
85
- export { ArchieDevToolProvider, type ArchieDevToolProviderProps };
85
+ interface DndProviderProps {
86
+ children: React.ReactNode;
87
+ }
88
+ declare function DndProvider({ children }: DndProviderProps): react_jsx_runtime.JSX.Element;
89
+
90
+ export { ArchieDevToolProvider, type ArchieDevToolProviderProps, DndProvider };
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode } from 'react';
2
+ import React, { ReactNode } from 'react';
3
3
 
4
4
  /** Only configured domains (Archie host origins) and optionally localhost in dev. "*" is never used. */
5
5
  type InjectOptions = {
@@ -82,4 +82,9 @@ interface ArchieDevToolProviderProps extends ArchieDevToolsRuntimeOptions {
82
82
  }
83
83
  declare function ArchieDevToolProvider({ children, router, inspector, inspectorOptions, }: ArchieDevToolProviderProps): react_jsx_runtime.JSX.Element;
84
84
 
85
- export { ArchieDevToolProvider, type ArchieDevToolProviderProps };
85
+ interface DndProviderProps {
86
+ children: React.ReactNode;
87
+ }
88
+ declare function DndProvider({ children }: DndProviderProps): react_jsx_runtime.JSX.Element;
89
+
90
+ export { ArchieDevToolProvider, type ArchieDevToolProviderProps, DndProvider };
@@ -32,7 +32,8 @@ var __publicField = (obj, key2, value) => __defNormalProp(obj, typeof key2 !== "
32
32
  // src/client/client.ts
33
33
  var client_exports = {};
34
34
  __export(client_exports, {
35
- ArchieDevToolProvider: () => ArchieDevToolProvider
35
+ ArchieDevToolProvider: () => ArchieDevToolProvider,
36
+ DndProvider: () => DndProvider
36
37
  });
37
38
  module.exports = __toCommonJS(client_exports);
38
39
 
@@ -9368,5 +9369,6 @@ function ArchieDevToolProvider({
9368
9369
  }
9369
9370
  // Annotate the CommonJS export names for ESM import in node:
9370
9371
  0 && (module.exports = {
9371
- ArchieDevToolProvider
9372
+ ArchieDevToolProvider,
9373
+ DndProvider
9372
9374
  });
@@ -9332,5 +9332,6 @@ function ArchieDevToolProvider({
9332
9332
  return /* @__PURE__ */ jsx6(DndProvider, { children });
9333
9333
  }
9334
9334
  export {
9335
- ArchieDevToolProvider
9335
+ ArchieDevToolProvider,
9336
+ DndProvider
9336
9337
  };
package/dist/index.d.mts CHANGED
@@ -1,4 +1,31 @@
1
1
  import { ResolvedConfig, ViteDevServer } from 'vite';
2
+ import { types, PluginObj } from '@babel/core';
3
+
4
+ /**
5
+ * babel-plugin-editor-meta
6
+ *
7
+ * Injects `__editorMeta` prop into every JSX element at compile time.
8
+ * This replaces the external `@react-dev-inspector/babel-plugin` — metadata
9
+ * lives in React Fiber `memoizedProps` rather than DOM `data-inspector-*` attrs.
10
+ *
11
+ * The injected prop contains:
12
+ * nodeId, file, line, col, componentName, staticProps, movable, parentNodeId
13
+ *
14
+ * At runtime the Fiber bridge reads `memoizedProps.__editorMeta` to resolve
15
+ * element identity without any DOM attributes.
16
+ */
17
+
18
+ interface EditorMetaPluginOptions {
19
+ /** Skip files matching this pattern. @default /node_modules/ */
20
+ fileExclude?: RegExp;
21
+ /** Allow instrumentation for imported components. Defaults to true for local imports. */
22
+ instrumentImported?: boolean;
23
+ /** Include exact host source refs for runtime DOM lookup. */
24
+ includeHostSourceRef?: boolean;
25
+ }
26
+ declare function babelPluginEditorMeta({ types: t }: {
27
+ types: typeof types;
28
+ }, opts?: EditorMetaPluginOptions): PluginObj;
2
29
 
3
30
  interface ArchieDevToolsOptions {
4
31
  /**
@@ -34,4 +61,4 @@ interface ArchieDevToolsPlugin {
34
61
  }
35
62
  declare function archieDevTools(options?: ArchieDevToolsOptions): ArchieDevToolsPlugin;
36
63
 
37
- export { archieDevTools };
64
+ export { type EditorMetaPluginOptions, archieDevTools, babelPluginEditorMeta };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,31 @@
1
1
  import { ResolvedConfig, ViteDevServer } from 'vite';
2
+ import { types, PluginObj } from '@babel/core';
3
+
4
+ /**
5
+ * babel-plugin-editor-meta
6
+ *
7
+ * Injects `__editorMeta` prop into every JSX element at compile time.
8
+ * This replaces the external `@react-dev-inspector/babel-plugin` — metadata
9
+ * lives in React Fiber `memoizedProps` rather than DOM `data-inspector-*` attrs.
10
+ *
11
+ * The injected prop contains:
12
+ * nodeId, file, line, col, componentName, staticProps, movable, parentNodeId
13
+ *
14
+ * At runtime the Fiber bridge reads `memoizedProps.__editorMeta` to resolve
15
+ * element identity without any DOM attributes.
16
+ */
17
+
18
+ interface EditorMetaPluginOptions {
19
+ /** Skip files matching this pattern. @default /node_modules/ */
20
+ fileExclude?: RegExp;
21
+ /** Allow instrumentation for imported components. Defaults to true for local imports. */
22
+ instrumentImported?: boolean;
23
+ /** Include exact host source refs for runtime DOM lookup. */
24
+ includeHostSourceRef?: boolean;
25
+ }
26
+ declare function babelPluginEditorMeta({ types: t }: {
27
+ types: typeof types;
28
+ }, opts?: EditorMetaPluginOptions): PluginObj;
2
29
 
3
30
  interface ArchieDevToolsOptions {
4
31
  /**
@@ -34,4 +61,4 @@ interface ArchieDevToolsPlugin {
34
61
  }
35
62
  declare function archieDevTools(options?: ArchieDevToolsOptions): ArchieDevToolsPlugin;
36
63
 
37
- export { archieDevTools };
64
+ export { type EditorMetaPluginOptions, archieDevTools, babelPluginEditorMeta };
package/dist/index.js CHANGED
@@ -30,7 +30,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/index.ts
31
31
  var src_exports = {};
32
32
  __export(src_exports, {
33
- archieDevTools: () => archieDevTools
33
+ archieDevTools: () => archieDevTools,
34
+ babelPluginEditorMeta: () => babelPluginEditorMeta
34
35
  });
35
36
  module.exports = __toCommonJS(src_exports);
36
37
  var import_node_fs = require("fs");
@@ -591,5 +592,6 @@ function archieDevTools(options = {}) {
591
592
  }
592
593
  // Annotate the CommonJS export names for ESM import in node:
593
594
  0 && (module.exports = {
594
- archieDevTools
595
+ archieDevTools,
596
+ babelPluginEditorMeta
595
597
  });
package/dist/index.mjs CHANGED
@@ -563,5 +563,6 @@ function archieDevTools(options = {}) {
563
563
  return plugin;
564
564
  }
565
565
  export {
566
- archieDevTools
566
+ archieDevTools,
567
+ babelPluginEditorMeta
567
568
  };