@hanzo/ui 8.4.13 → 8.5.0
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/backends/gui/index.cjs +11 -1
- package/dist/backends/gui/index.d.ts +3 -0
- package/dist/backends/gui/index.d.ts.map +1 -1
- package/dist/backends/gui/index.js +3 -0
- package/dist/backends/gui/index.js.map +1 -1
- package/dist/backends/gui/link.cjs +126 -0
- package/dist/backends/gui/link.d.ts +65 -0
- package/dist/backends/gui/link.d.ts.map +1 -0
- package/dist/backends/gui/link.js +88 -0
- package/dist/backends/gui/link.js.map +1 -0
- package/dist/backends/gui/prose.cjs +33 -0
- package/dist/backends/gui/prose.d.ts +39 -0
- package/dist/backends/gui/prose.d.ts.map +1 -0
- package/dist/backends/gui/prose.js +30 -0
- package/dist/backends/gui/prose.js.map +1 -0
- package/dist/backends/gui/video.cjs +89 -0
- package/dist/backends/gui/video.d.ts +33 -0
- package/dist/backends/gui/video.d.ts.map +1 -0
- package/dist/backends/gui/video.js +53 -0
- package/dist/backends/gui/video.js.map +1 -0
- package/dist/blocks/accordian.cjs +19 -0
- package/dist/blocks/accordian.d.ts +4 -0
- package/dist/blocks/accordian.d.ts.map +1 -0
- package/dist/blocks/accordian.js +16 -0
- package/dist/blocks/accordian.js.map +1 -0
- package/dist/blocks/bullet-cards.cjs +40 -0
- package/dist/blocks/bullet-cards.d.ts +10 -0
- package/dist/blocks/bullet-cards.d.ts.map +1 -0
- package/dist/blocks/bullet-cards.js +37 -0
- package/dist/blocks/bullet-cards.js.map +1 -0
- package/dist/blocks/card.cjs +58 -0
- package/dist/blocks/card.d.ts +14 -0
- package/dist/blocks/card.d.ts.map +1 -0
- package/dist/blocks/card.js +55 -0
- package/dist/blocks/card.js.map +1 -0
- package/dist/blocks/carte-blanche.cjs +38 -0
- package/dist/blocks/carte-blanche.d.ts +13 -0
- package/dist/blocks/carte-blanche.d.ts.map +1 -0
- package/dist/blocks/carte-blanche.js +35 -0
- package/dist/blocks/carte-blanche.js.map +1 -0
- package/dist/blocks/content.cjs +65 -0
- package/dist/blocks/content.d.ts +11 -0
- package/dist/blocks/content.d.ts.map +1 -0
- package/dist/blocks/content.js +61 -0
- package/dist/blocks/content.js.map +1 -0
- package/dist/blocks/cta.cjs +103 -0
- package/dist/blocks/cta.d.ts +13 -0
- package/dist/blocks/cta.d.ts.map +1 -0
- package/dist/blocks/cta.js +67 -0
- package/dist/blocks/cta.js.map +1 -0
- package/dist/blocks/def.cjs +24 -0
- package/dist/blocks/def.d.ts +191 -0
- package/dist/blocks/def.d.ts.map +1 -0
- package/dist/blocks/def.js +22 -0
- package/dist/blocks/def.js.map +1 -0
- package/dist/blocks/enh-heading.cjs +86 -0
- package/dist/blocks/enh-heading.d.ts +7 -0
- package/dist/blocks/enh-heading.d.ts.map +1 -0
- package/dist/blocks/enh-heading.js +83 -0
- package/dist/blocks/enh-heading.js.map +1 -0
- package/dist/blocks/grid.cjs +98 -0
- package/dist/blocks/grid.d.ts +18 -0
- package/dist/blocks/grid.d.ts.map +1 -0
- package/dist/blocks/grid.js +62 -0
- package/dist/blocks/grid.js.map +1 -0
- package/dist/blocks/group.cjs +43 -0
- package/dist/blocks/group.d.ts +4 -0
- package/dist/blocks/group.d.ts.map +1 -0
- package/dist/blocks/group.js +40 -0
- package/dist/blocks/group.js.map +1 -0
- package/dist/blocks/heading.cjs +22 -0
- package/dist/blocks/heading.d.ts +4 -0
- package/dist/blocks/heading.d.ts.map +1 -0
- package/dist/blocks/heading.js +19 -0
- package/dist/blocks/heading.js.map +1 -0
- package/dist/blocks/image.cjs +54 -0
- package/dist/blocks/image.d.ts +19 -0
- package/dist/blocks/image.d.ts.map +1 -0
- package/dist/blocks/image.js +51 -0
- package/dist/blocks/image.js.map +1 -0
- package/dist/blocks/index.cjs +65 -0
- package/dist/blocks/index.d.ts +18 -0
- package/dist/blocks/index.d.ts.map +1 -0
- package/dist/blocks/index.js +30 -0
- package/dist/blocks/index.js.map +1 -0
- package/dist/blocks/screenful.cjs +139 -0
- package/dist/blocks/screenful.d.ts +18 -0
- package/dist/blocks/screenful.d.ts.map +1 -0
- package/dist/blocks/screenful.js +103 -0
- package/dist/blocks/screenful.js.map +1 -0
- package/dist/blocks/space.cjs +38 -0
- package/dist/blocks/space.d.ts +4 -0
- package/dist/blocks/space.d.ts.map +1 -0
- package/dist/blocks/space.js +35 -0
- package/dist/blocks/space.js.map +1 -0
- package/dist/blocks/spec.cjs +58 -0
- package/dist/blocks/spec.d.ts +60 -0
- package/dist/blocks/spec.d.ts.map +1 -0
- package/dist/blocks/spec.js +52 -0
- package/dist/blocks/spec.js.map +1 -0
- package/dist/blocks/video.cjs +103 -0
- package/dist/blocks/video.d.ts +22 -0
- package/dist/blocks/video.d.ts.map +1 -0
- package/dist/blocks/video.js +67 -0
- package/dist/blocks/video.js.map +1 -0
- package/dist/gallery.html +102 -1
- package/dist/index.cjs +9 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.node.js +1 -1
- package/dist/primitives/ApplyTypography.cjs +8 -0
- package/dist/primitives/ApplyTypography.d.ts +2 -0
- package/dist/primitives/ApplyTypography.d.ts.map +1 -0
- package/dist/primitives/ApplyTypography.js +5 -0
- package/dist/primitives/ApplyTypography.js.map +1 -0
- package/dist/primitives/Link.cjs +8 -0
- package/dist/primitives/Link.d.ts +2 -0
- package/dist/primitives/Link.d.ts.map +1 -0
- package/dist/primitives/Link.js +5 -0
- package/dist/primitives/Link.js.map +1 -0
- package/dist/primitives/LinkElement.cjs +8 -0
- package/dist/primitives/LinkElement.d.ts +2 -0
- package/dist/primitives/LinkElement.d.ts.map +1 -0
- package/dist/primitives/LinkElement.js +5 -0
- package/dist/primitives/LinkElement.js.map +1 -0
- package/dist/primitives/MDXLink.cjs +8 -0
- package/dist/primitives/MDXLink.d.ts +2 -0
- package/dist/primitives/MDXLink.d.ts.map +1 -0
- package/dist/primitives/MDXLink.js +5 -0
- package/dist/primitives/MDXLink.js.map +1 -0
- package/dist/primitives/VideoPlayer.cjs +8 -0
- package/dist/primitives/VideoPlayer.d.ts +2 -0
- package/dist/primitives/VideoPlayer.d.ts.map +1 -0
- package/dist/primitives/VideoPlayer.js +5 -0
- package/dist/primitives/VideoPlayer.js.map +1 -0
- package/dist/primitives/YouTubeEmbed.cjs +8 -0
- package/dist/primitives/YouTubeEmbed.d.ts +2 -0
- package/dist/primitives/YouTubeEmbed.d.ts.map +1 -0
- package/dist/primitives/YouTubeEmbed.js +5 -0
- package/dist/primitives/YouTubeEmbed.js.map +1 -0
- package/dist/primitives/useLink.cjs +8 -0
- package/dist/primitives/useLink.d.ts +2 -0
- package/dist/primitives/useLink.d.ts.map +1 -0
- package/dist/primitives/useLink.js +5 -0
- package/dist/primitives/useLink.js.map +1 -0
- package/dist/product/menu/items.d.ts +1 -1
- package/dist/product/menu/items.d.ts.map +1 -1
- package/dist/styles.css +101 -0
- package/dist/theme.css +101 -0
- package/dist/tw.cjs +52 -1
- package/dist/tw.d.ts.map +1 -1
- package/dist/tw.js +52 -1
- package/dist/tw.js.map +1 -1
- package/dist/types.cjs +32 -0
- package/dist/types.d.ts +136 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +30 -0
- package/dist/types.js.map +1 -0
- package/package.json +13 -1
package/dist/types.cjs
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use client';"use strict";
|
|
2
|
+
// @hanzo/ui/types — the content vocabulary the block renderers read.
|
|
3
|
+
//
|
|
4
|
+
// These are the shapes a SITE authors: a grid, a link, an image, a video. They
|
|
5
|
+
// carry no behaviour and import no component, so content can be written, typed
|
|
6
|
+
// and tested without pulling a renderer in.
|
|
7
|
+
//
|
|
8
|
+
// Flat on purpose. The 5.x line spread these across ten files that each exported
|
|
9
|
+
// one type as `default`, so a consumer wanting three of them wrote three imports
|
|
10
|
+
// of a name the file did not state. One module, named exports, one import.
|
|
11
|
+
//
|
|
12
|
+
// The two that referenced Tailwind are the reason this could not simply be
|
|
13
|
+
// copied: `Breakpoint` was `keyof typeof` a tailwind screens config (under a
|
|
14
|
+
// blanket @ts-nocheck), and `LinkDef` reached `VariantProps<typeof
|
|
15
|
+
// buttonVariants>` from class-variance-authority. Both now name what they
|
|
16
|
+
// actually mean, and neither pulls an engine.
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.COMMON_GRID_4_COL = exports.COMMON_GRID_3_COL = exports.COMMON_GRID_2_COL = exports.COMMON_GRID_1_COL = exports.Breakpoints = void 0;
|
|
19
|
+
exports.Breakpoints = ['xs', 'sm', 'md', 'lg', 'xl', '2xl'];
|
|
20
|
+
const grid = (md, lg) => ({
|
|
21
|
+
at: {
|
|
22
|
+
xs: { columns: 1, gap: 2 },
|
|
23
|
+
md: { columns: md, gap: 3 },
|
|
24
|
+
lg: { columns: lg, gap: 6 },
|
|
25
|
+
},
|
|
26
|
+
mobile: { columns: 1, gap: 2 },
|
|
27
|
+
});
|
|
28
|
+
// One column on a phone in every case; the name says where it lands on a desk.
|
|
29
|
+
exports.COMMON_GRID_1_COL = grid(1, 1);
|
|
30
|
+
exports.COMMON_GRID_2_COL = grid(2, 2);
|
|
31
|
+
exports.COMMON_GRID_3_COL = grid(3, 3);
|
|
32
|
+
exports.COMMON_GRID_4_COL = grid(2, 4);
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ButtonProps, ButtonSize, ButtonVariant } from './backends/gui/button.js';
|
|
3
|
+
/**
|
|
4
|
+
* The responsive vocabulary, and the SAME one `tw()` maps class prefixes onto
|
|
5
|
+
* (`md:` → the `$md` gui media prop). A second list would be a second answer to
|
|
6
|
+
* "what is medium".
|
|
7
|
+
*
|
|
8
|
+
* `xs` is here and has no prefix in `tw()`: it is the base rung, which content
|
|
9
|
+
* authored on 5.x names explicitly in `GridDef.at` and `SpaceBlock.sizes`.
|
|
10
|
+
*/
|
|
11
|
+
export type Breakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
12
|
+
export declare const Breakpoints: Breakpoint[];
|
|
13
|
+
export interface Dimensions {
|
|
14
|
+
w: number;
|
|
15
|
+
h: number;
|
|
16
|
+
}
|
|
17
|
+
export type TShirtSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
18
|
+
/** A size per rung, `md` required — the one every consumer can fall back to. */
|
|
19
|
+
export type TShirtDimensions = {
|
|
20
|
+
[k in Exclude<TShirtSize, 'md'>]?: Dimensions;
|
|
21
|
+
} & {
|
|
22
|
+
md: Dimensions;
|
|
23
|
+
};
|
|
24
|
+
/** Columns alone, or columns with the gap between them. */
|
|
25
|
+
export type GridColumnSpec = number | {
|
|
26
|
+
columns: number;
|
|
27
|
+
gap: number;
|
|
28
|
+
};
|
|
29
|
+
export interface GridDef {
|
|
30
|
+
/** Must be given in ASCENDING order. */
|
|
31
|
+
at: {
|
|
32
|
+
[k in Breakpoint]?: GridColumnSpec;
|
|
33
|
+
};
|
|
34
|
+
mobile?: GridColumnSpec;
|
|
35
|
+
}
|
|
36
|
+
export declare const COMMON_GRID_1_COL: GridDef;
|
|
37
|
+
export declare const COMMON_GRID_2_COL: GridDef;
|
|
38
|
+
export declare const COMMON_GRID_3_COL: GridDef;
|
|
39
|
+
export declare const COMMON_GRID_4_COL: GridDef;
|
|
40
|
+
/** @see https://nextjs.org/docs/app/api-reference/components/image */
|
|
41
|
+
export interface ImageDef {
|
|
42
|
+
/** Image url. */
|
|
43
|
+
src: string;
|
|
44
|
+
/** Defaults to the short filename. */
|
|
45
|
+
alt?: string;
|
|
46
|
+
sizes?: string;
|
|
47
|
+
/**
|
|
48
|
+
* A colour class for an svg. Every `fill` in the file must be
|
|
49
|
+
* `currentColor` for it to have any effect.
|
|
50
|
+
*/
|
|
51
|
+
svgFillClass?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Rendered dimensions, unless a style prop overrides them — in which case
|
|
54
|
+
* give the file's own resolution so both the server and the browser can work
|
|
55
|
+
* out the aspect ratio before the bytes arrive.
|
|
56
|
+
*/
|
|
57
|
+
dim: Dimensions;
|
|
58
|
+
rounded?: string;
|
|
59
|
+
}
|
|
60
|
+
export interface VideoDef {
|
|
61
|
+
/**
|
|
62
|
+
* Passed through to `<video>`. Valueless HTML attributes are booleans here,
|
|
63
|
+
* and React's camelCase spelling is the one that reaches the element
|
|
64
|
+
* (`playsinline` → `playsInline`):
|
|
65
|
+
*
|
|
66
|
+
* videoProps: { autoPlay: true, loop: true, muted: true, playsInline: true }
|
|
67
|
+
*/
|
|
68
|
+
videoProps?: Record<string, unknown>;
|
|
69
|
+
poster?: string;
|
|
70
|
+
sources?: string[];
|
|
71
|
+
dim: TShirtDimensions;
|
|
72
|
+
/** e.g. `{ vh: 60, mobile: { vw: 70 } }` */
|
|
73
|
+
sizing?: Record<string, unknown>;
|
|
74
|
+
}
|
|
75
|
+
export interface BulletItem {
|
|
76
|
+
text: string;
|
|
77
|
+
/** An icon is any node, so a string is a legal icon. */
|
|
78
|
+
icon?: ReactNode;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* A link that renders with a button's clothes.
|
|
82
|
+
*
|
|
83
|
+
* `variant` and `size` were `VariantProps<typeof buttonVariants>` — a type
|
|
84
|
+
* class-variance-authority derives from a style table. Naming the two unions
|
|
85
|
+
* directly says the same thing, is readable at the call site, and drops a
|
|
86
|
+
* Tailwind-ecosystem dependency from a file that holds no styles.
|
|
87
|
+
*/
|
|
88
|
+
export interface LinkDef {
|
|
89
|
+
variant?: ButtonVariant | null;
|
|
90
|
+
size?: ButtonSize | null;
|
|
91
|
+
/** Ignored when the element is rendered directly WITH children. */
|
|
92
|
+
title?: string;
|
|
93
|
+
/** Ignored when the element is rendered directly WITH children. */
|
|
94
|
+
icon?: ReactNode;
|
|
95
|
+
/** Ignored when the element is rendered directly WITH children. */
|
|
96
|
+
iconAfter?: boolean;
|
|
97
|
+
href: string;
|
|
98
|
+
/**
|
|
99
|
+
* External links open in a new tab, internal ones in the same tab.
|
|
100
|
+
* `newTab` overrides both. ('external' means the url starts with `http`.)
|
|
101
|
+
*/
|
|
102
|
+
newTab?: boolean;
|
|
103
|
+
/** Renders disabled: default cursor, and pointer events stop here. */
|
|
104
|
+
disabled?: boolean;
|
|
105
|
+
contents?: string;
|
|
106
|
+
childMenu?: LinkDef[];
|
|
107
|
+
groupName?: string;
|
|
108
|
+
}
|
|
109
|
+
export type SubmitServerAction = (data: unknown, enclosure?: unknown) => Promise<unknown>;
|
|
110
|
+
export interface ButtonModalProps {
|
|
111
|
+
open: boolean;
|
|
112
|
+
onOpenChange: (b: boolean) => void;
|
|
113
|
+
buttonText: string;
|
|
114
|
+
buttonProps: ButtonProps;
|
|
115
|
+
title: string;
|
|
116
|
+
byline?: string;
|
|
117
|
+
action: SubmitServerAction;
|
|
118
|
+
actionEnclosure?: unknown;
|
|
119
|
+
}
|
|
120
|
+
export interface ButtonModalDef {
|
|
121
|
+
Comp: React.ComponentType<ButtonModalProps>;
|
|
122
|
+
title: string;
|
|
123
|
+
props?: Record<string, unknown>;
|
|
124
|
+
byline?: string;
|
|
125
|
+
action?: SubmitServerAction;
|
|
126
|
+
actionEnclosure?: unknown;
|
|
127
|
+
}
|
|
128
|
+
export interface ButtonDef {
|
|
129
|
+
text: string;
|
|
130
|
+
props: ButtonProps;
|
|
131
|
+
action: {
|
|
132
|
+
type: 'modal';
|
|
133
|
+
def: ButtonModalDef;
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE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C,EAAE,OAAO,KAAK,IAAI,CAAA;IAClC,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,WAAW,CAAA;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,kBAAkB,CAAA;IAC1B,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAA;IAC3C,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,kBAAkB,CAAA;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,WAAW,CAAA;IAClB,MAAM,EAAE;QACN,IAAI,EAAE,OAAO,CAAA;QACb,GAAG,EAAE,cAAc,CAAA;KACpB,CAAA;CACF"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use client';// @hanzo/ui/types — the content vocabulary the block renderers read.
|
|
2
|
+
//
|
|
3
|
+
// These are the shapes a SITE authors: a grid, a link, an image, a video. They
|
|
4
|
+
// carry no behaviour and import no component, so content can be written, typed
|
|
5
|
+
// and tested without pulling a renderer in.
|
|
6
|
+
//
|
|
7
|
+
// Flat on purpose. The 5.x line spread these across ten files that each exported
|
|
8
|
+
// one type as `default`, so a consumer wanting three of them wrote three imports
|
|
9
|
+
// of a name the file did not state. One module, named exports, one import.
|
|
10
|
+
//
|
|
11
|
+
// The two that referenced Tailwind are the reason this could not simply be
|
|
12
|
+
// copied: `Breakpoint` was `keyof typeof` a tailwind screens config (under a
|
|
13
|
+
// blanket @ts-nocheck), and `LinkDef` reached `VariantProps<typeof
|
|
14
|
+
// buttonVariants>` from class-variance-authority. Both now name what they
|
|
15
|
+
// actually mean, and neither pulls an engine.
|
|
16
|
+
export const Breakpoints = ['xs', 'sm', 'md', 'lg', 'xl', '2xl'];
|
|
17
|
+
const grid = (md, lg) => ({
|
|
18
|
+
at: {
|
|
19
|
+
xs: { columns: 1, gap: 2 },
|
|
20
|
+
md: { columns: md, gap: 3 },
|
|
21
|
+
lg: { columns: lg, gap: 6 },
|
|
22
|
+
},
|
|
23
|
+
mobile: { columns: 1, gap: 2 },
|
|
24
|
+
});
|
|
25
|
+
// One column on a phone in every case; the name says where it lands on a desk.
|
|
26
|
+
export const COMMON_GRID_1_COL = grid(1, 1);
|
|
27
|
+
export const COMMON_GRID_2_COL = grid(2, 2);
|
|
28
|
+
export const COMMON_GRID_3_COL = grid(3, 3);
|
|
29
|
+
export const COMMON_GRID_4_COL = grid(2, 4);
|
|
30
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,EAAE;AACF,+EAA+E;AAC/E,+EAA+E;AAC/E,4CAA4C;AAC5C,EAAE;AACF,iFAAiF;AACjF,iFAAiF;AACjF,2EAA2E;AAC3E,EAAE;AACF,2EAA2E;AAC3E,6EAA6E;AAC7E,mEAAmE;AACnE,0EAA0E;AAC1E,8CAA8C;AAiB9C,MAAM,CAAC,MAAM,WAAW,GAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAA;AA2B9E,MAAM,IAAI,GAAG,CAAC,EAAU,EAAE,EAAU,EAAW,EAAE,CAAC,CAAC;IACjD,EAAE,EAAE;QACF,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE;QAC1B,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE;QAC3B,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE;KAC5B;IACD,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE;CAC/B,CAAC,CAAA;AAEF,+EAA+E;AAC/E,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AAC3C,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AAC3C,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AAC3C,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/ui",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Hanzo UI — the one canonical Hanzo component library, on @hanzo/gui + @hanzo/design. ONE substrate: every component renders through @hanzo/gui primitives, so the same import works on web, native (expo) and desktop (Tauri). Self-contained (theme.css), presentational, host-agnostic, clean-room.",
|
|
6
6
|
"exports": {
|
|
@@ -11,6 +11,12 @@
|
|
|
11
11
|
"require": "./dist/index.cjs",
|
|
12
12
|
"default": "./dist/index.js"
|
|
13
13
|
},
|
|
14
|
+
"./blocks": {
|
|
15
|
+
"types": "./dist/blocks/index.d.ts",
|
|
16
|
+
"import": "./dist/blocks/index.js",
|
|
17
|
+
"require": "./dist/blocks/index.cjs",
|
|
18
|
+
"default": "./dist/blocks/index.js"
|
|
19
|
+
},
|
|
14
20
|
"./gallery": {
|
|
15
21
|
"types": "./dist/gallery.d.ts",
|
|
16
22
|
"import": "./dist/gallery.js",
|
|
@@ -194,6 +200,12 @@
|
|
|
194
200
|
"types": "./dist/grid.d.ts",
|
|
195
201
|
"import": "./dist/grid.js",
|
|
196
202
|
"require": "./dist/grid.cjs"
|
|
203
|
+
},
|
|
204
|
+
"./types": {
|
|
205
|
+
"types": "./dist/types.d.ts",
|
|
206
|
+
"import": "./dist/types.js",
|
|
207
|
+
"require": "./dist/types.cjs",
|
|
208
|
+
"default": "./dist/types.js"
|
|
197
209
|
}
|
|
198
210
|
},
|
|
199
211
|
"main": "./dist/index.cjs",
|