@unhead/react 3.0.0-beta.10 → 3.0.0-beta.12

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/client.d.mts CHANGED
@@ -3,12 +3,13 @@ import { ReactNode } from 'react';
3
3
  import * as unhead_types from 'unhead/types';
4
4
  import { CreateClientHeadOptions, Unhead } from 'unhead/types';
5
5
  export { CreateClientHeadOptions, Unhead } from 'unhead/types';
6
+ import { ClientUnhead } from 'unhead/client';
6
7
  export { renderDOMHead } from 'unhead/client';
7
8
 
8
- declare function createHead(options?: CreateClientHeadOptions): Unhead;
9
+ declare function createHead(options?: CreateClientHeadOptions): ClientUnhead;
9
10
  declare function UnheadProvider({ children, head }: {
10
11
  children: ReactNode;
11
- head?: ReturnType<typeof createHead>;
12
+ head?: Unhead<any, any>;
12
13
  }): react.FunctionComponentElement<react.ProviderProps<Unhead<unhead_types.ResolvableHead, unknown> | null>>;
13
14
 
14
15
  export { UnheadProvider, createHead };
package/dist/client.d.ts CHANGED
@@ -3,12 +3,13 @@ import { ReactNode } from 'react';
3
3
  import * as unhead_types from 'unhead/types';
4
4
  import { CreateClientHeadOptions, Unhead } from 'unhead/types';
5
5
  export { CreateClientHeadOptions, Unhead } from 'unhead/types';
6
+ import { ClientUnhead } from 'unhead/client';
6
7
  export { renderDOMHead } from 'unhead/client';
7
8
 
8
- declare function createHead(options?: CreateClientHeadOptions): Unhead;
9
+ declare function createHead(options?: CreateClientHeadOptions): ClientUnhead;
9
10
  declare function UnheadProvider({ children, head }: {
10
11
  children: ReactNode;
11
- head?: ReturnType<typeof createHead>;
12
+ head?: Unhead<any, any>;
12
13
  }): react.FunctionComponentElement<react.ProviderProps<Unhead<unhead_types.ResolvableHead, unknown> | null>>;
13
14
 
14
15
  export { UnheadProvider, createHead };
@@ -2,6 +2,7 @@ import MagicString from 'magic-string';
2
2
  import { parseAndWalk } from 'oxc-walker';
3
3
  import { createStreamingPlugin } from 'unhead/stream/vite';
4
4
 
5
+ const FILTER_RE = /\.[jt]sx$/;
5
6
  function transform(code, id, isSSR, s) {
6
7
  const lang = id.endsWith(".tsx") ? "tsx" : id.endsWith(".jsx") ? "jsx" : "tsx";
7
8
  const returns = [];
@@ -84,7 +85,7 @@ import { HeadStream } from '${importPath}'`);
84
85
  function unheadReactPlugin(options) {
85
86
  return createStreamingPlugin({
86
87
  framework: "@unhead/react",
87
- filter: /\.[jt]sx$/,
88
+ filter: FILTER_RE,
88
89
  mode: options?.mode,
89
90
  transform(code, id, opts) {
90
91
  const s = new MagicString(code);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unhead/react",
3
3
  "type": "module",
4
- "version": "3.0.0-beta.10",
4
+ "version": "3.0.0-beta.12",
5
5
  "description": "Full-stack <head> manager built for React.",
6
6
  "author": "Harlan Wilton <harlan@harlanzw.com>",
7
7
  "license": "MIT",
@@ -98,17 +98,17 @@
98
98
  },
99
99
  "dependencies": {
100
100
  "magic-string": "^0.30.21",
101
- "oxc-parser": "^0.106.0",
101
+ "oxc-parser": "^0.117.0",
102
102
  "oxc-walker": "^0.7.0",
103
- "unhead": "3.0.0-beta.10"
103
+ "unhead": "3.0.0-beta.12"
104
104
  },
105
105
  "devDependencies": {
106
- "@testing-library/react": "^16.3.1",
107
- "@types/react": "^19.2.8",
106
+ "@testing-library/react": "^16.3.2",
107
+ "@types/react": "^19.2.14",
108
108
  "@types/react-dom": "^19.2.3",
109
- "react": "^19.2.3",
110
- "react-dom": "^19.2.3",
111
- "vite": "^7.2.2"
109
+ "react": "^19.2.4",
110
+ "react-dom": "^19.2.4",
111
+ "vite": "^7.3.1"
112
112
  },
113
113
  "scripts": {
114
114
  "build": "unbuild",