tailwind-styled-v4 5.1.23 → 5.1.25

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 CHANGED
@@ -19,7 +19,6 @@ interface AnimateOptions {
19
19
  name?: string;
20
20
  }
21
21
 
22
- type TokenMap = Record<string, string>;
23
22
  type HtmlTagName = keyof HTMLElementTagNameMap;
24
23
 
25
24
  /**
@@ -813,27 +812,4 @@ interface ThemeConfig {
813
812
  raw: Record<string, string>;
814
813
  }
815
814
 
816
- type TokenSubscriber = (tokens: TokenMap) => void;
817
- interface LiveTokenSet {
818
- vars: Record<string, string>;
819
- get(name: string): string | undefined;
820
- set(name: string, value: string): void;
821
- setAll(tokens: TokenMap): void;
822
- snapshot(): TokenMap;
823
- }
824
- interface LiveTokenEngineBridge {
825
- getToken(name: string): string | undefined;
826
- getTokens(): TokenMap;
827
- setToken(name: string, value: string): void;
828
- setTokens(tokens: TokenMap): void;
829
- applyTokenSet(tokens: TokenMap): void;
830
- subscribeTokens(fn: TokenSubscriber): () => void;
831
- subscribe?(fn: TokenSubscriber): () => void;
832
- }
833
- declare global {
834
- interface Window {
835
- __TW_TOKEN_ENGINE__?: LiveTokenEngineBridge;
836
- }
837
- }
838
-
839
- 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, cn, createComponent, createStyledSystem, createTheme, createTwMerge, cssVar, cv, cx, cxm, generateContainerCss, generateStateCss, getAllSubComponents, getContainerRegistry, getStateRegistry, getSubComponent, mergeWithRules, processContainer, processState, registerSubComponent, registerVariantTable, resolveStyledClassName, server, styled, t, tw, twMerge, twVar, v4Tokens, withSubComponents };
815
+ export { type ComponentConfig, type ContainerConfig, type ContainerEntry, type CvFn, type HtmlTagName, type InferVariantProps, 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 TwComponentFactory, type TwObject, type TwStyledComponent, type TwSubComponent, type TwTagFactory, type TwTagFactoryAny, type VariantLiterals, cn, createComponent, createStyledSystem, createTheme, createTwMerge, cssVar, cv, cx, cxm, generateContainerCss, generateStateCss, getAllSubComponents, getContainerRegistry, getStateRegistry, getSubComponent, mergeWithRules, processContainer, processState, registerSubComponent, registerVariantTable, resolveStyledClassName, server, styled, t, tw, twMerge, twVar, v4Tokens, withSubComponents };
package/dist/index.d.ts CHANGED
@@ -19,7 +19,6 @@ interface AnimateOptions {
19
19
  name?: string;
20
20
  }
21
21
 
22
- type TokenMap = Record<string, string>;
23
22
  type HtmlTagName = keyof HTMLElementTagNameMap;
24
23
 
25
24
  /**
@@ -813,27 +812,4 @@ interface ThemeConfig {
813
812
  raw: Record<string, string>;
814
813
  }
815
814
 
816
- type TokenSubscriber = (tokens: TokenMap) => void;
817
- interface LiveTokenSet {
818
- vars: Record<string, string>;
819
- get(name: string): string | undefined;
820
- set(name: string, value: string): void;
821
- setAll(tokens: TokenMap): void;
822
- snapshot(): TokenMap;
823
- }
824
- interface LiveTokenEngineBridge {
825
- getToken(name: string): string | undefined;
826
- getTokens(): TokenMap;
827
- setToken(name: string, value: string): void;
828
- setTokens(tokens: TokenMap): void;
829
- applyTokenSet(tokens: TokenMap): void;
830
- subscribeTokens(fn: TokenSubscriber): () => void;
831
- subscribe?(fn: TokenSubscriber): () => void;
832
- }
833
- declare global {
834
- interface Window {
835
- __TW_TOKEN_ENGINE__?: LiveTokenEngineBridge;
836
- }
837
- }
838
-
839
- 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, cn, createComponent, createStyledSystem, createTheme, createTwMerge, cssVar, cv, cx, cxm, generateContainerCss, generateStateCss, getAllSubComponents, getContainerRegistry, getStateRegistry, getSubComponent, mergeWithRules, processContainer, processState, registerSubComponent, registerVariantTable, resolveStyledClassName, server, styled, t, tw, twMerge, twVar, v4Tokens, withSubComponents };
815
+ export { type ComponentConfig, type ContainerConfig, type ContainerEntry, type CvFn, type HtmlTagName, type InferVariantProps, 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 TwComponentFactory, type TwObject, type TwStyledComponent, type TwSubComponent, type TwTagFactory, type TwTagFactoryAny, type VariantLiterals, cn, createComponent, createStyledSystem, createTheme, createTwMerge, cssVar, cv, cx, cxm, generateContainerCss, generateStateCss, getAllSubComponents, getContainerRegistry, getStateRegistry, getSubComponent, mergeWithRules, processContainer, processState, registerSubComponent, registerVariantTable, resolveStyledClassName, server, styled, t, tw, twMerge, twVar, v4Tokens, withSubComponents };
package/dist/index.js CHANGED
@@ -913,19 +913,7 @@ function registerSubComponents(component, template, configSub) {
913
913
  tag
914
914
  );
915
915
  } else if ("base" in value || "variants" in value) {
916
- const tag = key;
917
- for (const [componentName, subConfig] of Object.entries(value)) {
918
- if (typeof subConfig === "string") {
919
- map[componentName] = createSubComponentAccessor(
920
- displayName,
921
- componentName,
922
- subConfig.trim().replace(/\s+/g, " "),
923
- tag
924
- );
925
- } else {
926
- map[componentName] = createComponent(tag, subConfig);
927
- }
928
- }
916
+ map[key] = createComponent("div", value);
929
917
  } else {
930
918
  const tag = key;
931
919
  for (const [componentName, classesOrConfig] of Object.entries(value)) {
@@ -1181,6 +1169,10 @@ var SKIP_PROXY_KEYS = /* @__PURE__ */ new Set([
1181
1169
  ]);
1182
1170
  function wrapWithSubProxy(component, tagLabel) {
1183
1171
  return new Proxy(component, {
1172
+ // Forward function calls to target component
1173
+ apply(target, thisArg, args) {
1174
+ return Reflect.apply(target, thisArg, args);
1175
+ },
1184
1176
  get(target, prop) {
1185
1177
  const value = target[prop];
1186
1178
  if (value !== void 0) return value;
@@ -1244,6 +1236,9 @@ function makeTag(tag) {
1244
1236
  });
1245
1237
  }
1246
1238
  var HTML_TAGS = [
1239
+ "html",
1240
+ "head",
1241
+ "body",
1247
1242
  "div",
1248
1243
  "section",
1249
1244
  "article",