@pantoken/react 0.1.28 → 0.1.30
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/index.d.mts +8 -9
- package/dist/index.mjs +1 -2
- package/dist/scaffold-preset.d.mts +2 -3
- package/package.json +9 -10
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { register } from "@pantoken/web-components";
|
|
1
|
+
import { LocaleBundle, register, registerLocalized } from "@pantoken/web-components";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
|
-
import { LocaleBundle, registerLocalized } from "@pantoken/i18n";
|
|
4
3
|
//#region src/index.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Read a resolved token value from the document. Returns `fallback` on the server.
|
|
@@ -12,7 +11,7 @@ import { LocaleBundle, registerLocalized } from "@pantoken/i18n";
|
|
|
12
11
|
* const brand = readToken("--instui-color-background-brand", "#0374B5");
|
|
13
12
|
* ```
|
|
14
13
|
*/
|
|
15
|
-
declare function readToken(name: string, fallback?: string): string;
|
|
14
|
+
export declare function readToken(name: string, fallback?: string): string;
|
|
16
15
|
/**
|
|
17
16
|
* React hook returning a resolved `--instui-*` token value (re-reads on `name` change).
|
|
18
17
|
*
|
|
@@ -26,9 +25,9 @@ declare function readToken(name: string, fallback?: string): string;
|
|
|
26
25
|
* }
|
|
27
26
|
* ```
|
|
28
27
|
*/
|
|
29
|
-
declare function useToken(name: string, fallback?: string): string;
|
|
28
|
+
export declare function useToken(name: string, fallback?: string): string;
|
|
30
29
|
/** Props for {@link Icon}. */
|
|
31
|
-
interface IconProps {
|
|
30
|
+
export interface IconProps {
|
|
32
31
|
name: string;
|
|
33
32
|
size?: string;
|
|
34
33
|
color?: string;
|
|
@@ -43,9 +42,9 @@ interface IconProps {
|
|
|
43
42
|
* <Icon name="check-mark" size="1.25rem" color="var(--instui-color-text-success)" />;
|
|
44
43
|
* ```
|
|
45
44
|
*/
|
|
46
|
-
declare function Icon({ name, size, color }: IconProps): ReactNode;
|
|
45
|
+
export declare function Icon({ name, size, color }: IconProps): ReactNode;
|
|
47
46
|
/** Props for {@link TokenProvider}. */
|
|
48
|
-
interface TokenProviderProps {
|
|
47
|
+
export interface TokenProviderProps {
|
|
49
48
|
children?: ReactNode;
|
|
50
49
|
/** BCP47 locale tag or a pre-built {@link LocaleBundle}. When set, uses `registerLocalized`. */
|
|
51
50
|
locale?: string | LocaleBundle;
|
|
@@ -67,6 +66,6 @@ interface TokenProviderProps {
|
|
|
67
66
|
* }
|
|
68
67
|
* ```
|
|
69
68
|
*/
|
|
70
|
-
declare function TokenProvider({ children, locale }: TokenProviderProps): ReactNode;
|
|
69
|
+
export declare function TokenProvider({ children, locale }: TokenProviderProps): ReactNode;
|
|
71
70
|
//#endregion
|
|
72
|
-
export {
|
|
71
|
+
export { register, registerLocalized };
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { register, register as register$1 } from "@pantoken/web-components";
|
|
1
|
+
import { register, register as register$1, registerLocalized, registerLocalized as registerLocalized$1 } from "@pantoken/web-components";
|
|
2
2
|
import { createElement, useEffect, useState } from "react";
|
|
3
|
-
import { registerLocalized, registerLocalized as registerLocalized$1 } from "@pantoken/i18n";
|
|
4
3
|
//#region src/index.tsx
|
|
5
4
|
/**
|
|
6
5
|
* `@pantoken/react` — thin React helpers over `@pantoken/web-components` and the token CSS.
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pantoken/react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.30",
|
|
4
4
|
"description": "React helpers for pantoken: <Icon>, useToken, and TokenProvider over the web components + token CSS.",
|
|
5
|
-
"homepage": "https://pantoken.
|
|
5
|
+
"homepage": "https://pantoken.app",
|
|
6
6
|
"bugs": "https://github.com/thedannywahl/pantoken/issues",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|
|
@@ -28,21 +28,20 @@
|
|
|
28
28
|
"provenance": true
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@pantoken/
|
|
32
|
-
"@pantoken/
|
|
33
|
-
"@pantoken/web-components": "0.5.8"
|
|
31
|
+
"@pantoken/scaffold-base": "0.2.1",
|
|
32
|
+
"@pantoken/web-components": "0.6.1"
|
|
34
33
|
},
|
|
35
34
|
"devDependencies": {
|
|
36
|
-
"@pantoken/components": "1.
|
|
37
|
-
"@types/node": "^26.
|
|
35
|
+
"@pantoken/components": "1.1.1",
|
|
36
|
+
"@types/node": "^26.5.0",
|
|
38
37
|
"@types/react": "^19.2.18",
|
|
39
|
-
"@types/react-dom": "^19.2.
|
|
38
|
+
"@types/react-dom": "^19.2.7",
|
|
40
39
|
"bingo-stratum": "^0.5.13",
|
|
41
40
|
"react": "^19.2.8",
|
|
42
41
|
"react-dom": "^19.2.8",
|
|
43
42
|
"typescript": "^7.0.2",
|
|
44
|
-
"vite": "npm:@voidzero-dev/vite-plus-core@0.3.
|
|
45
|
-
"vite-plus": "0.3.
|
|
43
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@0.3.1",
|
|
44
|
+
"vite-plus": "0.3.1"
|
|
46
45
|
},
|
|
47
46
|
"peerDependencies": {
|
|
48
47
|
"react": ">=18"
|