tailwind-styled-v4 5.0.36 → 5.0.38
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/analyzer.d.mts +152 -5
- package/dist/analyzer.d.ts +152 -5
- package/dist/analyzer.js +213 -161
- package/dist/analyzer.js.map +1 -1
- package/dist/analyzer.mjs +118 -82
- package/dist/analyzer.mjs.map +1 -1
- package/dist/animate.d.mts +30 -3
- package/dist/animate.d.ts +30 -3
- package/dist/animate.js +131 -87
- package/dist/animate.js.map +1 -1
- package/dist/animate.mjs +28 -14
- package/dist/animate.mjs.map +1 -1
- package/dist/atomic.js +105 -68
- package/dist/atomic.js.map +1 -1
- package/dist/atomic.mjs +40 -13
- package/dist/atomic.mjs.map +1 -1
- package/dist/cli.js +577 -426
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +466 -304
- package/dist/cli.mjs.map +1 -1
- package/dist/compiler.d.mts +5 -0
- package/dist/compiler.d.ts +5 -0
- package/dist/compiler.js +826 -508
- package/dist/compiler.js.map +1 -1
- package/dist/compiler.mjs +287 -29
- package/dist/compiler.mjs.map +1 -1
- package/dist/dashboard.js +71 -41
- package/dist/dashboard.js.map +1 -1
- package/dist/dashboard.mjs +12 -6
- package/dist/dashboard.mjs.map +1 -1
- package/dist/devtools.d.mts +88 -2
- package/dist/devtools.d.ts +88 -2
- package/dist/devtools.js +333 -289
- package/dist/devtools.js.map +1 -1
- package/dist/devtools.mjs +26 -11
- package/dist/devtools.mjs.map +1 -1
- package/dist/engine.d.mts +557 -6
- package/dist/engine.d.ts +557 -6
- package/dist/engine.js +679 -502
- package/dist/engine.js.map +1 -1
- package/dist/engine.mjs +467 -307
- package/dist/engine.mjs.map +1 -1
- package/dist/index.d.mts +180 -127
- package/dist/index.d.ts +180 -127
- package/dist/index.js +1329 -7441
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1266 -7385
- package/dist/index.mjs.map +1 -1
- package/dist/next.js +318 -243
- package/dist/next.js.map +1 -1
- package/dist/next.mjs +256 -181
- package/dist/next.mjs.map +1 -1
- package/dist/plugin-api.d.mts +4 -2
- package/dist/plugin-api.d.ts +4 -2
- package/dist/plugin-api.js +93 -49
- package/dist/plugin-api.js.map +1 -1
- package/dist/plugin-api.mjs +26 -6
- package/dist/plugin-api.mjs.map +1 -1
- package/dist/plugin-registry.js +103 -62
- package/dist/plugin-registry.js.map +1 -1
- package/dist/plugin-registry.mjs +53 -35
- package/dist/plugin-registry.mjs.map +1 -1
- package/dist/plugin.d.mts +165 -5
- package/dist/plugin.d.ts +165 -5
- package/dist/plugin.js +115 -50
- package/dist/plugin.js.map +1 -1
- package/dist/plugin.mjs +44 -6
- package/dist/plugin.mjs.map +1 -1
- package/dist/preset.js +47 -15
- package/dist/preset.js.map +1 -1
- package/dist/preset.mjs +13 -5
- package/dist/preset.mjs.map +1 -1
- package/dist/rspack.js +82 -50
- package/dist/rspack.js.map +1 -1
- package/dist/rspack.mjs +20 -12
- package/dist/rspack.mjs.map +1 -1
- package/dist/runtime-css.js +62 -24
- package/dist/runtime-css.js.map +1 -1
- package/dist/runtime-css.mjs +15 -7
- package/dist/runtime-css.mjs.map +1 -1
- package/dist/runtime.d.mts +38 -3
- package/dist/runtime.d.ts +38 -3
- package/dist/runtime.js +97 -44
- package/dist/runtime.js.map +1 -1
- package/dist/runtime.mjs +31 -8
- package/dist/runtime.mjs.map +1 -1
- package/dist/scanner.d.mts +58 -4
- package/dist/scanner.d.ts +58 -4
- package/dist/scanner.js +163 -120
- package/dist/scanner.js.map +1 -1
- package/dist/scanner.mjs +67 -39
- package/dist/scanner.mjs.map +1 -1
- package/dist/shared.d.mts +185 -3
- package/dist/shared.d.ts +185 -3
- package/dist/shared.js +441 -295
- package/dist/shared.js.map +1 -1
- package/dist/shared.mjs +253 -122
- package/dist/shared.mjs.map +1 -1
- package/dist/storybook-addon.d.mts +2 -2
- package/dist/storybook-addon.d.ts +2 -2
- package/dist/storybook-addon.js +39 -10
- package/dist/storybook-addon.js.map +1 -1
- package/dist/storybook-addon.mjs +8 -3
- package/dist/storybook-addon.mjs.map +1 -1
- package/dist/svelte.d.mts +2 -1
- package/dist/svelte.d.ts +2 -1
- package/dist/svelte.js +88 -64
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +28 -13
- package/dist/svelte.mjs.map +1 -1
- package/dist/syntax.js +68 -37
- package/dist/syntax.js.map +1 -1
- package/dist/syntax.mjs +8 -7
- package/dist/syntax.mjs.map +1 -1
- package/dist/testing.js +55 -18
- package/dist/testing.js.map +1 -1
- package/dist/testing.mjs +16 -3
- package/dist/testing.mjs.map +1 -1
- package/dist/theme.d.mts +38 -3
- package/dist/theme.d.ts +38 -3
- package/dist/theme.js +131 -74
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +42 -13
- package/dist/theme.mjs.map +1 -1
- package/dist/turbopackLoader.js +150 -116
- package/dist/turbopackLoader.js.map +1 -1
- package/dist/turbopackLoader.mjs +124 -81
- package/dist/turbopackLoader.mjs.map +1 -1
- package/dist/tw.js +560 -421
- package/dist/tw.js.map +1 -1
- package/dist/tw.mjs +460 -302
- package/dist/tw.mjs.map +1 -1
- package/dist/vite.js +561 -446
- package/dist/vite.js.map +1 -1
- package/dist/vite.mjs +433 -321
- package/dist/vite.mjs.map +1 -1
- package/dist/vue.d.mts +4 -1
- package/dist/vue.d.ts +4 -1
- package/dist/vue.js +95 -70
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +30 -14
- package/dist/vue.mjs.map +1 -1
- package/dist/webpackLoader.js +110 -78
- package/dist/webpackLoader.js.map +1 -1
- package/dist/webpackLoader.mjs +45 -17
- package/dist/webpackLoader.mjs.map +1 -1
- package/native/tailwind-styled-native.linux-x64-gnu.node +0 -0
- package/native/tailwind-styled-native.node +0 -0
- package/package.json +3 -1
- package/dist/analyzeWorkspace-B1_XRfdl.d.ts +0 -134
- package/dist/analyzeWorkspace-hYfu4Hg3.d.mts +0 -134
- package/dist/index-DQI6O24n.d.mts +0 -464
- package/dist/index-NDINUhLN.d.mts +0 -90
- package/dist/index-NDINUhLN.d.ts +0 -90
- package/dist/index-UkYbyBkR.d.ts +0 -464
- package/dist/liveTokenEngine-CN9ian1R.d.ts +0 -38
- package/dist/liveTokenEngine-DKoWRtqH.d.mts +0 -38
- package/dist/schemas-DR-SLxZZ.d.mts +0 -59
- package/dist/schemas-DR-SLxZZ.d.ts +0 -59
- package/dist/trace-Dz4vmZdy.d.mts +0 -96
- package/dist/trace-Dz4vmZdy.d.ts +0 -96
- package/dist/types-DXr2PmGP.d.mts +0 -31
- package/dist/types-DXr2PmGP.d.ts +0 -31
package/dist/index.d.mts
CHANGED
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
|
|
3
|
+
type CSSFillMode = "none" | "forwards" | "backwards" | "both";
|
|
4
|
+
type CSSDirection = "normal" | "reverse" | "alternate" | "alternate-reverse";
|
|
5
|
+
type CSSIterationCount = number | "infinite";
|
|
6
|
+
type PresetEasing = "linear" | "ease" | "ease-in" | "ease-out" | "ease-in-out" | "step-start" | "step-end";
|
|
7
|
+
type CubicBezierEasing = `cubic-bezier(${string})`;
|
|
8
|
+
type StepsEasing = `steps(${string})`;
|
|
9
|
+
type CSSEasing = PresetEasing | CubicBezierEasing | StepsEasing;
|
|
10
|
+
interface AnimateOptions {
|
|
11
|
+
from: string;
|
|
12
|
+
to: string;
|
|
13
|
+
duration?: number;
|
|
14
|
+
easing?: CSSEasing;
|
|
15
|
+
delay?: number;
|
|
16
|
+
fill?: CSSFillMode;
|
|
17
|
+
iterations?: CSSIterationCount;
|
|
18
|
+
direction?: CSSDirection;
|
|
19
|
+
name?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
type TokenMap = Record<string, string>;
|
|
23
|
+
type HtmlTagName = keyof HTMLElementTagNameMap;
|
|
10
24
|
|
|
11
25
|
/**
|
|
12
26
|
* tailwind-styled-v4 — Core Types
|
|
@@ -205,63 +219,18 @@ type TwObject = TwComponentFactory & TwTagFactory & {
|
|
|
205
219
|
};
|
|
206
220
|
|
|
207
221
|
/**
|
|
208
|
-
* tailwind-styled-v4 —
|
|
209
|
-
*
|
|
210
|
-
* Generates @container rules from a simple breakpoint config.
|
|
211
|
-
*
|
|
212
|
-
* Usage:
|
|
213
|
-
* const Card = tw.div({
|
|
214
|
-
* base: "p-4",
|
|
215
|
-
* container: {
|
|
216
|
-
* sm: "flex-col", // @container (min-width: 320px)
|
|
217
|
-
* md: "flex-row", // @container (min-width: 640px)
|
|
218
|
-
* lg: "grid-cols-3", // @container (min-width: 1024px)
|
|
219
|
-
* },
|
|
220
|
-
* containerName: "card",
|
|
221
|
-
* })
|
|
222
|
-
*
|
|
223
|
-
* // Wrap with container context:
|
|
224
|
-
* const CardWrapper = tw.div`@container`
|
|
225
|
-
*
|
|
226
|
-
* Named containers:
|
|
227
|
-
* const SidebarCard = tw.div({
|
|
228
|
-
* base: "p-2",
|
|
229
|
-
* container: { lg: "text-sm" },
|
|
230
|
-
* containerName: "sidebar",
|
|
231
|
-
* })
|
|
232
|
-
* // Generates: @container sidebar (min-width: 1024px) { ... }
|
|
233
|
-
*/
|
|
234
|
-
|
|
235
|
-
interface ContainerEntry {
|
|
236
|
-
id: string;
|
|
237
|
-
tag: string;
|
|
238
|
-
containerName?: string;
|
|
239
|
-
breakpoints: Array<{
|
|
240
|
-
minWidth: string;
|
|
241
|
-
classes: string;
|
|
242
|
-
}>;
|
|
243
|
-
cssInjected: boolean;
|
|
244
|
-
}
|
|
245
|
-
declare const containerRegistry: Map<string, ContainerEntry>;
|
|
246
|
-
declare global {
|
|
247
|
-
interface Window {
|
|
248
|
-
__TW_CONTAINER_REGISTRY__?: typeof containerRegistry;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
interface ContainerQueryResult {
|
|
252
|
-
containerClass: string;
|
|
253
|
-
hasContainer: true;
|
|
254
|
-
}
|
|
255
|
-
declare function processContainer(tag: string, container: ContainerConfig, containerName?: string): ContainerQueryResult;
|
|
256
|
-
/**
|
|
257
|
-
* Generate @container CSS rules dari breakpoint config.
|
|
222
|
+
* tailwind-styled-v4 v2 — tw
|
|
258
223
|
*
|
|
259
|
-
*
|
|
224
|
+
* API:
|
|
225
|
+
* tw.div`p-4 bg-zinc-900`
|
|
226
|
+
* tw.button`px-4 [icon] { h-4 w-4 }` ← sub-components inline
|
|
227
|
+
* tw.button({ base: "px-4", variants: { size: { sm: "text-sm" } } })
|
|
228
|
+
* tw(Link)`underline text-blue-400`
|
|
229
|
+
* tw.server.div`p-4` ← server-only, compiler enforced + runtime dev warning
|
|
260
230
|
*/
|
|
261
|
-
declare function generateContainerCss(tag: string, container: ContainerConfig, containerName?: string): string;
|
|
262
|
-
declare function getContainerRegistry(): Map<string, ContainerEntry>;
|
|
263
231
|
|
|
264
|
-
declare
|
|
232
|
+
declare const server: TwServerObject;
|
|
233
|
+
declare const tw: TwObject;
|
|
265
234
|
|
|
266
235
|
/**
|
|
267
236
|
* tailwind-styled-v4 — cv()
|
|
@@ -275,6 +244,11 @@ declare function createComponent<TConfig extends ComponentConfig>(tag: React.Ele
|
|
|
275
244
|
* → Requires native Rust binding for variant resolution
|
|
276
245
|
*/
|
|
277
246
|
|
|
247
|
+
/**
|
|
248
|
+
* Register pre-computed variant table dari generated file.
|
|
249
|
+
* Dipanggil otomatis saat import variants.generated.ts
|
|
250
|
+
*/
|
|
251
|
+
declare function registerVariantTable(componentId: string, table: Record<string, string>): void;
|
|
278
252
|
declare function cv<C extends ComponentConfig>(config: C, componentId?: string): CvFn<C>;
|
|
279
253
|
|
|
280
254
|
/**
|
|
@@ -301,6 +275,8 @@ declare function cx(...inputs: (ClassValue | ClassValue[])[]): string;
|
|
|
301
275
|
/** @deprecated Use cx() instead. */
|
|
302
276
|
declare const cxm: typeof cx;
|
|
303
277
|
|
|
278
|
+
declare function createComponent<TConfig extends ComponentConfig>(tag: React.ElementType, config: TConfig | string): TwStyledComponent<TConfig, InferSubFromConfig<TConfig>>;
|
|
279
|
+
|
|
304
280
|
interface ThemeConfig$1 {
|
|
305
281
|
colors: Record<string, string>;
|
|
306
282
|
spacing: Record<string, string>;
|
|
@@ -324,45 +300,6 @@ declare function createTwMerge(_options?: MergeOptions): (...classLists: Array<s
|
|
|
324
300
|
declare const twMerge: (...classLists: Array<string | undefined | null | false>) => string;
|
|
325
301
|
declare function mergeWithRules(rules: Record<string, (classes: string[]) => string>, ...classLists: string[]): string;
|
|
326
302
|
|
|
327
|
-
/**
|
|
328
|
-
* tailwind-styled-v5 — Native Rust Bindings
|
|
329
|
-
*
|
|
330
|
-
* All functions require native Rust bindings.
|
|
331
|
-
* Uses @tailwind-styled/shared for native resolution.
|
|
332
|
-
*/
|
|
333
|
-
interface ParsedClassModifier {
|
|
334
|
-
type: "opacity" | "arbitrary";
|
|
335
|
-
value: string;
|
|
336
|
-
}
|
|
337
|
-
interface ParsedClass {
|
|
338
|
-
raw: string;
|
|
339
|
-
base: string;
|
|
340
|
-
variants: string[];
|
|
341
|
-
modifier?: ParsedClassModifier;
|
|
342
|
-
}
|
|
343
|
-
interface ThemeConfig {
|
|
344
|
-
colors: Record<string, string>;
|
|
345
|
-
spacing: Record<string, string>;
|
|
346
|
-
fonts: Record<string, string>;
|
|
347
|
-
breakpoints: Record<string, string>;
|
|
348
|
-
animations: Record<string, string>;
|
|
349
|
-
raw: Record<string, string>;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
interface SubComponentProps {
|
|
353
|
-
children?: React.ReactNode;
|
|
354
|
-
className?: string;
|
|
355
|
-
}
|
|
356
|
-
interface SubComponentEntry {
|
|
357
|
-
name: string;
|
|
358
|
-
component: React.FC<SubComponentProps>;
|
|
359
|
-
defaultClasses?: string;
|
|
360
|
-
}
|
|
361
|
-
declare function registerSubComponent(entry: SubComponentEntry): void;
|
|
362
|
-
declare function getSubComponent(name: string): SubComponentEntry | undefined;
|
|
363
|
-
declare function getAllSubComponents(): SubComponentEntry[];
|
|
364
|
-
declare function withSubComponents<T extends object>(Component: T, subComponentNames: string[]): T & Record<string, React.FC<SubComponentProps>>;
|
|
365
|
-
|
|
366
303
|
/**
|
|
367
304
|
* tailwind-styled-v4 — Reactive State Engine
|
|
368
305
|
*
|
|
@@ -421,20 +358,62 @@ declare function generateStateCss(tag: string, state: StateConfig): string;
|
|
|
421
358
|
*/
|
|
422
359
|
declare function getStateRegistry(): Map<string, StateComponentEntry>;
|
|
423
360
|
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
361
|
+
/**
|
|
362
|
+
* tailwind-styled-v4 — Container Query Engine
|
|
363
|
+
*
|
|
364
|
+
* Generates @container rules from a simple breakpoint config.
|
|
365
|
+
*
|
|
366
|
+
* Usage:
|
|
367
|
+
* const Card = tw.div({
|
|
368
|
+
* base: "p-4",
|
|
369
|
+
* container: {
|
|
370
|
+
* sm: "flex-col", // @container (min-width: 320px)
|
|
371
|
+
* md: "flex-row", // @container (min-width: 640px)
|
|
372
|
+
* lg: "grid-cols-3", // @container (min-width: 1024px)
|
|
373
|
+
* },
|
|
374
|
+
* containerName: "card",
|
|
375
|
+
* })
|
|
376
|
+
*
|
|
377
|
+
* // Wrap with container context:
|
|
378
|
+
* const CardWrapper = tw.div`@container`
|
|
379
|
+
*
|
|
380
|
+
* Named containers:
|
|
381
|
+
* const SidebarCard = tw.div({
|
|
382
|
+
* base: "p-2",
|
|
383
|
+
* container: { lg: "text-sm" },
|
|
384
|
+
* containerName: "sidebar",
|
|
385
|
+
* })
|
|
386
|
+
* // Generates: @container sidebar (min-width: 1024px) { ... }
|
|
387
|
+
*/
|
|
388
|
+
|
|
389
|
+
interface ContainerEntry {
|
|
390
|
+
id: string;
|
|
391
|
+
tag: string;
|
|
392
|
+
containerName?: string;
|
|
393
|
+
breakpoints: Array<{
|
|
394
|
+
minWidth: string;
|
|
395
|
+
classes: string;
|
|
431
396
|
}>;
|
|
397
|
+
cssInjected: boolean;
|
|
432
398
|
}
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
399
|
+
declare const containerRegistry: Map<string, ContainerEntry>;
|
|
400
|
+
declare global {
|
|
401
|
+
interface Window {
|
|
402
|
+
__TW_CONTAINER_REGISTRY__?: typeof containerRegistry;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
interface ContainerQueryResult {
|
|
406
|
+
containerClass: string;
|
|
407
|
+
hasContainer: true;
|
|
408
|
+
}
|
|
409
|
+
declare function processContainer(tag: string, container: ContainerConfig, containerName?: string): ContainerQueryResult;
|
|
410
|
+
/**
|
|
411
|
+
* Generate @container CSS rules dari breakpoint config.
|
|
412
|
+
*
|
|
413
|
+
* Native-only: Rust string building tanpa intermediate allocations.
|
|
414
|
+
*/
|
|
415
|
+
declare function generateContainerCss(tag: string, container: ContainerConfig, containerName?: string): string;
|
|
416
|
+
declare function getContainerRegistry(): Map<string, ContainerEntry>;
|
|
438
417
|
|
|
439
418
|
/**
|
|
440
419
|
* tailwind-styled-v4 — createStyledSystem()
|
|
@@ -527,19 +506,20 @@ type StyledSystemInstance<T extends SystemTokenMap, C extends Record<string, Sys
|
|
|
527
506
|
};
|
|
528
507
|
declare function createStyledSystem<T extends SystemTokenMap = SystemTokenMap, C extends Record<string, SystemComponentConfig> = Record<string, SystemComponentConfig>>(config: StyledSystemConfig<T, C>): StyledSystemInstance<T, C>;
|
|
529
508
|
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
declare
|
|
509
|
+
interface StyledOptions {
|
|
510
|
+
base?: string;
|
|
511
|
+
variants?: Record<string, Record<string, string>>;
|
|
512
|
+
defaultVariants?: Record<string, string>;
|
|
513
|
+
compoundVariants?: Array<{
|
|
514
|
+
variants: Record<string, string>;
|
|
515
|
+
className: string;
|
|
516
|
+
}>;
|
|
517
|
+
}
|
|
518
|
+
type StyledProps = {
|
|
519
|
+
className?: string;
|
|
520
|
+
} & Record<string, string | number | boolean | undefined>;
|
|
521
|
+
declare function resolveStyledClassName(options: StyledOptions, props?: StyledProps): string;
|
|
522
|
+
declare function styled(options: StyledOptions): (props?: StyledProps) => string;
|
|
543
523
|
|
|
544
524
|
/**
|
|
545
525
|
* tailwind-styled-v4 v2 — twTheme
|
|
@@ -675,4 +655,77 @@ declare const v4Tokens: {
|
|
|
675
655
|
readonly fontMono: string;
|
|
676
656
|
};
|
|
677
657
|
|
|
678
|
-
|
|
658
|
+
type TokenSubscriber = (tokens: TokenMap) => void;
|
|
659
|
+
interface LiveTokenSet {
|
|
660
|
+
vars: Record<string, string>;
|
|
661
|
+
get(name: string): string | undefined;
|
|
662
|
+
set(name: string, value: string): void;
|
|
663
|
+
setAll(tokens: TokenMap): void;
|
|
664
|
+
snapshot(): TokenMap;
|
|
665
|
+
}
|
|
666
|
+
interface LiveTokenEngineBridge {
|
|
667
|
+
getToken(name: string): string | undefined;
|
|
668
|
+
getTokens(): TokenMap;
|
|
669
|
+
setToken(name: string, value: string): void;
|
|
670
|
+
setTokens(tokens: TokenMap): void;
|
|
671
|
+
applyTokenSet(tokens: TokenMap): void;
|
|
672
|
+
subscribeTokens(fn: TokenSubscriber): () => void;
|
|
673
|
+
subscribe?(fn: TokenSubscriber): () => void;
|
|
674
|
+
}
|
|
675
|
+
declare function tokenVar(name: string): string;
|
|
676
|
+
declare function tokenRef(name: string): string;
|
|
677
|
+
declare function liveToken(tokens: TokenMap): LiveTokenSet;
|
|
678
|
+
declare function setToken(name: string, value: string): void;
|
|
679
|
+
declare function setTokens(tokens: TokenMap): void;
|
|
680
|
+
declare function applyTokenSet(tokens: TokenMap): void;
|
|
681
|
+
declare function getToken(name: string): string | undefined;
|
|
682
|
+
declare function getTokens(): TokenMap;
|
|
683
|
+
declare function subscribeTokens(fn: TokenSubscriber): () => void;
|
|
684
|
+
declare function generateTokenCssString(): string;
|
|
685
|
+
declare function createUseTokens(): () => TokenMap;
|
|
686
|
+
declare global {
|
|
687
|
+
interface Window {
|
|
688
|
+
__TW_TOKEN_ENGINE__?: LiveTokenEngineBridge;
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
interface SubComponentProps {
|
|
693
|
+
children?: React.ReactNode;
|
|
694
|
+
className?: string;
|
|
695
|
+
}
|
|
696
|
+
interface SubComponentEntry {
|
|
697
|
+
name: string;
|
|
698
|
+
component: React.FC<SubComponentProps>;
|
|
699
|
+
defaultClasses?: string;
|
|
700
|
+
}
|
|
701
|
+
declare function registerSubComponent(entry: SubComponentEntry): void;
|
|
702
|
+
declare function getSubComponent(name: string): SubComponentEntry | undefined;
|
|
703
|
+
declare function getAllSubComponents(): SubComponentEntry[];
|
|
704
|
+
declare function withSubComponents<T extends object>(Component: T, subComponentNames: string[]): T & Record<string, React.FC<SubComponentProps>>;
|
|
705
|
+
|
|
706
|
+
/**
|
|
707
|
+
* tailwind-styled-v5 — Native Rust Bindings
|
|
708
|
+
*
|
|
709
|
+
* All functions require native Rust bindings.
|
|
710
|
+
* Uses @tailwind-styled/shared for native resolution.
|
|
711
|
+
*/
|
|
712
|
+
interface ParsedClassModifier {
|
|
713
|
+
type: "opacity" | "arbitrary";
|
|
714
|
+
value: string;
|
|
715
|
+
}
|
|
716
|
+
interface ParsedClass {
|
|
717
|
+
raw: string;
|
|
718
|
+
base: string;
|
|
719
|
+
variants: string[];
|
|
720
|
+
modifier?: ParsedClassModifier;
|
|
721
|
+
}
|
|
722
|
+
interface ThemeConfig {
|
|
723
|
+
colors: Record<string, string>;
|
|
724
|
+
spacing: Record<string, string>;
|
|
725
|
+
fonts: Record<string, string>;
|
|
726
|
+
breakpoints: Record<string, string>;
|
|
727
|
+
animations: Record<string, string>;
|
|
728
|
+
raw: Record<string, string>;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
export { type ComponentConfig, type ContainerConfig, type ContainerEntry, type CvFn, type HtmlTagName, type InferVariantProps, type LiveTokenSet, type MergeOptions, type ParsedClass, type ParsedClassModifier, type ResolvedThemeTokens, type StateComponentEntry, type StateConfig, type StyledComponentProps, type StyledOptions, type StyledProps, type StyledSystemConfig, type StyledSystemInstance, type SubComponentEntry, type SubComponentMap, type SubComponentProps, type SystemComponentConfig, type SystemComponentFactory, type SystemTokenMap, type ThemeConfig, type ThemeTokenMap, type TokenMap, type TokenSubscriber, type TwComponentFactory, type TwObject, type TwStyledComponent, type TwSubComponent, type TwTagFactory, type TwTagFactoryAny, type VariantLiterals, applyTokenSet, cn, tokenRef as containerRef, createComponent, createStyledSystem, createTheme, createTwMerge, createUseTokens, cssVar, cv, cx, cxm, generateContainerCss, generateStateCss, generateTokenCssString, getAllSubComponents, getContainerRegistry, getStateRegistry, getSubComponent, getToken, getTokens, liveToken, mergeWithRules, processContainer, processState, registerSubComponent, registerVariantTable, resolveStyledClassName, server, setToken, setTokens, styled, subscribeTokens, t, tokenRef, tokenVar, tw, twMerge, twVar, v4Tokens, withSubComponents };
|