kineto 0.1.0 → 0.1.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 CHANGED
@@ -79,8 +79,8 @@ clean build and completely unstyled components:
79
79
  ```
80
80
 
81
81
  ```tsx
82
- import { Card } from "kineto/card"; // subpath — always tree-shakes, always server-safe
83
- import { Button } from "kineto"; // barrel — fine, but see the Next note below
82
+ import { Button } from "kineto"; // root import — tree-shakes
83
+ import { Card } from "kineto/card"; // subpath — identical output, zero config
84
84
  ```
85
85
 
86
86
  We ship **no pre-built CSS**. Every class resolves in your Tailwind build from your own config, so
@@ -91,26 +91,30 @@ a bundle, so each component stays its own module and keeps its own `"use client"
91
91
  directive-free primitives (`badge`, `input`, `container`, …) render on the server through the barrel
92
92
  too.
93
93
 
94
- **Next.js users: add one line.** Next turns every `"use client"` module reachable from a barrel into
95
- a client entry, and client entries are graph roots that webpack will not shake away. Next's own
96
- remedy rewrites barrel imports to subpath imports at compile time:
94
+ **One exception — a Next.js Server Component importing the barrel.** Next registers a client entry
95
+ for every `"use client"` module a Server Component can reach through a barrel, and client entries are
96
+ graph roots webpack will not shake away. This is a Next limitation that applies to any component
97
+ library, not something specific to kineto. Client Components are unaffected — they shake normally.
98
+
99
+ Measured, Next 14.2 App Router, page rendering one component (First Load JS):
100
+
101
+ | | plain | with `optimizePackageImports` |
102
+ | --- | --- | --- |
103
+ | **Server** Component, `from "kineto"` | 476 kB | **130 kB** |
104
+ | **Client** Component, `from "kineto"` | 130 kB | 130 kB |
105
+ | any component, `from "kineto/button"` | 130 kB | 130 kB |
106
+
107
+ Next's own remedy rewrites barrel imports to subpath imports at compile time — add it once and the
108
+ root import is optimal everywhere:
97
109
 
98
110
  ```js
99
- // next.config.mjs
111
+ // next.config.mjs (top-level `optimizePackageImports` in Next 15+)
100
112
  export default { experimental: { optimizePackageImports: ["kineto"] } };
101
113
  ```
102
114
 
103
- Measured, Next 14 App Router, page rendering one `<Button>` (First Load JS):
104
-
105
- | import | plain | with `optimizePackageImports` |
106
- | --- | --- | --- |
107
- | `from "kineto"` | 476 kB | **131 kB** |
108
- | `from "kineto/button"` | 131 kB | 131 kB |
109
-
110
- Bundlers that shake on the module graph directly — Vite, Rollup, plain webpack outside the RSC
111
- pipeline — need no configuration: there the barrel and the subpath emit byte-identical output
112
- (3,085 B for one `Button`, vendor external). If you would rather not touch `next.config.mjs`, use
113
- the subpath import; it is the one form that is optimal everywhere.
115
+ Everywhere else — Vite, Rollup, plain webpack outside the RSC pipeline — no configuration is needed:
116
+ the barrel and the subpath emit byte-identical output (3,085 B for one `Button`, vendor external).
117
+ The subpath import is simply the form that is optimal in every case with no setup.
114
118
 
115
119
  All peers (`react`, `react-dom`, `motion`) are external; Radix/lucide/etc. ship as deps.
116
120
 
package/dist/badge.d.ts CHANGED
@@ -3,7 +3,7 @@ import * as React from 'react';
3
3
  import { VariantProps } from 'class-variance-authority';
4
4
 
5
5
  declare const badgeVariants: (props?: ({
6
- variant?: "default" | "outline" | "solid" | "brand" | "success" | "warning" | "destructive" | "gradient" | "secondary" | null | undefined;
6
+ variant?: "outline" | "default" | "solid" | "brand" | "success" | "warning" | "destructive" | "gradient" | "secondary" | null | undefined;
7
7
  } & class_variance_authority_types.ClassProp) | undefined) => string;
8
8
  interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
9
9
  /** Show a leading status dot in the current text color. */
package/dist/button.d.ts CHANGED
@@ -3,8 +3,8 @@ import * as React from 'react';
3
3
  import { VariantProps } from 'class-variance-authority';
4
4
 
5
5
  declare const buttonVariants: (props?: ({
6
- variant?: "link" | "default" | "outline" | "brand" | "destructive" | "gradient" | "secondary" | "ghost" | null | undefined;
7
- size?: "default" | "sm" | "lg" | "icon" | "pill" | null | undefined;
6
+ variant?: "link" | "outline" | "default" | "brand" | "destructive" | "gradient" | "secondary" | "ghost" | null | undefined;
7
+ size?: "default" | "icon" | "sm" | "lg" | "pill" | null | undefined;
8
8
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
9
  type NativeButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onAnimationStart" | "onAnimationEnd" | "onAnimationIteration" | "onDrag" | "onDragStart" | "onDragEnd" | "onDragEnter" | "onDragLeave" | "onDragOver" | "onDrop">;
10
10
  interface ButtonProps extends NativeButtonProps, VariantProps<typeof buttonVariants> {
package/dist/command.d.ts CHANGED
@@ -7,7 +7,7 @@ declare const Command: React.ForwardRefExoticComponent<Omit<{
7
7
  ref?: React.Ref<HTMLDivElement>;
8
8
  } & {
9
9
  asChild?: boolean;
10
- }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
10
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
11
11
  label?: string;
12
12
  shouldFilter?: boolean;
13
13
  filter?: (value: string, search: string, keywords?: string[]) => number;
@@ -29,7 +29,7 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
29
29
  ref?: React.Ref<HTMLInputElement>;
30
30
  } & {
31
31
  asChild?: boolean;
32
- }, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "type" | "value"> & {
32
+ }, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "value" | "type"> & {
33
33
  value?: string;
34
34
  onValueChange?: (search: string) => void;
35
35
  } & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
@@ -39,7 +39,7 @@ declare const CommandList: React.ForwardRefExoticComponent<Omit<{
39
39
  ref?: React.Ref<HTMLDivElement>;
40
40
  } & {
41
41
  asChild?: boolean;
42
- }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
42
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
43
43
  label?: string;
44
44
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
45
45
  declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
@@ -48,14 +48,14 @@ declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
48
48
  ref?: React.Ref<HTMLDivElement>;
49
49
  } & {
50
50
  asChild?: boolean;
51
- }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
51
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
52
52
  declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
53
53
  children?: React.ReactNode;
54
54
  } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
55
55
  ref?: React.Ref<HTMLDivElement>;
56
56
  } & {
57
57
  asChild?: boolean;
58
- }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
58
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "value" | "heading"> & {
59
59
  heading?: React.ReactNode;
60
60
  value?: string;
61
61
  forceMount?: boolean;
@@ -66,7 +66,7 @@ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
66
66
  ref?: React.Ref<HTMLDivElement>;
67
67
  } & {
68
68
  asChild?: boolean;
69
- }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "onSelect" | "disabled" | "value"> & {
69
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "onSelect" | "value" | "disabled"> & {
70
70
  disabled?: boolean;
71
71
  onSelect?: (value: string) => void;
72
72
  value?: string;
@@ -77,7 +77,7 @@ declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<R
77
77
  ref?: React.Ref<HTMLDivElement>;
78
78
  } & {
79
79
  asChild?: boolean;
80
- }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
80
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
81
81
  alwaysRender?: boolean;
82
82
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
83
83
  declare const CommandShortcut: {
@@ -5,7 +5,7 @@ import { LucideIcon } from 'lucide-react';
5
5
 
6
6
  declare const featuredIconVariants: (props?: ({
7
7
  size?: "sm" | "md" | "lg" | null | undefined;
8
- shape?: "circle" | "square" | null | undefined;
8
+ shape?: "square" | "circle" | null | undefined;
9
9
  variant?: "outline" | "gray" | "brand" | "success" | "warning" | "destructive" | "gradient" | null | undefined;
10
10
  } & class_variance_authority_types.ClassProp) | undefined) => string;
11
11
  interface FeaturedIconProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof featuredIconVariants> {
package/dist/flex.d.ts CHANGED
@@ -4,9 +4,9 @@ import { VariantProps } from 'class-variance-authority';
4
4
  import { Gap } from './gap.js';
5
5
 
6
6
  declare const flexVariants: (props?: ({
7
- direction?: "col" | "row" | "row-reverse" | "col-reverse" | null | undefined;
8
- align?: "center" | "end" | "start" | "baseline" | "stretch" | null | undefined;
9
- justify?: "center" | "end" | "start" | "between" | "around" | "evenly" | null | undefined;
7
+ direction?: "row" | "row-reverse" | "col" | "col-reverse" | null | undefined;
8
+ align?: "baseline" | "end" | "start" | "center" | "stretch" | null | undefined;
9
+ justify?: "end" | "start" | "center" | "between" | "around" | "evenly" | null | undefined;
10
10
  wrap?: boolean | null | undefined;
11
11
  inline?: boolean | null | undefined;
12
12
  } & class_variance_authority_types.ClassProp) | undefined) => string;
package/dist/grid.d.ts CHANGED
@@ -4,10 +4,10 @@ import { VariantProps } from 'class-variance-authority';
4
4
  import { Gap } from './gap.js';
5
5
 
6
6
  declare const gridVariants: (props?: ({
7
- cols?: 1 | 2 | 6 | 4 | 3 | 12 | 5 | null | undefined;
8
- align?: "center" | "end" | "start" | "stretch" | null | undefined;
9
- justify?: "center" | "end" | "start" | "stretch" | null | undefined;
10
- flow?: "col" | "row" | "dense" | null | undefined;
7
+ cols?: 2 | 1 | 4 | 6 | 3 | 12 | 5 | null | undefined;
8
+ align?: "end" | "start" | "center" | "stretch" | null | undefined;
9
+ justify?: "end" | "start" | "center" | "stretch" | null | undefined;
10
+ flow?: "row" | "dense" | "col" | null | undefined;
11
11
  } & class_variance_authority_types.ClassProp) | undefined) => string;
12
12
  interface GridProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof gridVariants> {
13
13
  /** Space between cells, from the shared gap scale. */
package/dist/masonry.d.ts CHANGED
@@ -4,7 +4,7 @@ import { VariantProps } from 'class-variance-authority';
4
4
  import { Gap } from './gap.js';
5
5
 
6
6
  declare const masonryVariants: (props?: ({
7
- columns?: 1 | 2 | 4 | 3 | 5 | null | undefined;
7
+ columns?: 2 | 1 | 4 | 3 | 5 | null | undefined;
8
8
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
9
  interface MasonryProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof masonryVariants> {
10
10
  /** Space between items (column gap + matching row gap), from the shared scale. */
@@ -3,7 +3,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import * as ResizablePrimitive from 'react-resizable-panels';
4
4
 
5
5
  declare const ResizablePanelGroup: ({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => react_jsx_runtime.JSX.Element;
6
- declare const ResizablePanel: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLSpanElement | HTMLElement | HTMLObjectElement | HTMLAnchorElement | HTMLButtonElement | HTMLDivElement | HTMLFormElement | HTMLHeadingElement | HTMLImageElement | HTMLInputElement | HTMLLabelElement | HTMLLIElement | HTMLOListElement | HTMLParagraphElement | HTMLSelectElement | HTMLUListElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLLegendElement | HTMLLinkElement | HTMLMapElement | HTMLMetaElement | HTMLMeterElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPreElement | HTMLProgressElement | HTMLSlotElement | HTMLScriptElement | HTMLSourceElement | HTMLStyleElement | HTMLTableElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
6
+ declare const ResizablePanel: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLSpanElement | HTMLElement | HTMLDivElement | HTMLButtonElement | HTMLParagraphElement | HTMLObjectElement | HTMLSlotElement | HTMLStyleElement | HTMLTitleElement | HTMLLinkElement | HTMLDialogElement | HTMLFormElement | HTMLImageElement | HTMLOptionElement | HTMLTableElement | HTMLTimeElement | HTMLProgressElement | HTMLEmbedElement | HTMLMeterElement | HTMLTextAreaElement | HTMLPreElement | HTMLAnchorElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDListElement | HTMLFieldSetElement | HTMLHeadingElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLInputElement | HTMLLabelElement | HTMLLegendElement | HTMLLIElement | HTMLMapElement | HTMLMetaElement | HTMLOListElement | HTMLOptGroupElement | HTMLOutputElement | HTMLScriptElement | HTMLSelectElement | HTMLSourceElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
7
7
  className?: string | undefined;
8
8
  collapsedSize?: number | undefined;
9
9
  collapsible?: boolean | undefined;
package/dist/stack.d.ts CHANGED
@@ -5,8 +5,8 @@ import { Gap } from './gap.js';
5
5
 
6
6
  declare const stackVariants: (props?: ({
7
7
  direction?: "horizontal" | "vertical" | null | undefined;
8
- align?: "center" | "end" | "start" | "baseline" | "stretch" | null | undefined;
9
- justify?: "center" | "end" | "start" | "between" | "around" | "evenly" | null | undefined;
8
+ align?: "baseline" | "end" | "start" | "center" | "stretch" | null | undefined;
9
+ justify?: "end" | "start" | "center" | "between" | "around" | "evenly" | null | undefined;
10
10
  wrap?: boolean | null | undefined;
11
11
  } & class_variance_authority_types.ClassProp) | undefined) => string;
12
12
  interface StackProps extends React.HTMLAttributes<HTMLDivElement>, Omit<VariantProps<typeof stackVariants>, "wrap"> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kineto",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "A drop-in library of beautifully animated, copy-paste React components — shadcn DNA, motion-first.",
5
5
  "type": "module",
6
6
  "sideEffects": [