@likec4/styles 1.36.1 → 1.38.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.
Files changed (37) hide show
  1. package/dist/css/conditions.mjs +1 -1
  2. package/dist/css/css.mjs +1 -1
  3. package/dist/css/sva.mjs +9 -4
  4. package/dist/helpers.mjs +11 -22
  5. package/dist/jsx/create-style-context.d.ts +47 -0
  6. package/dist/jsx/create-style-context.mjs +94 -0
  7. package/dist/jsx/factory.mjs +5 -2
  8. package/dist/jsx/index.d.ts +1 -0
  9. package/dist/jsx/index.mjs +1 -0
  10. package/dist/jsx/is-valid-prop.mjs +1 -1
  11. package/dist/recipes/action-btn.d.ts +3 -0
  12. package/dist/recipes/compound-node.d.ts +33 -0
  13. package/dist/recipes/compound-node.mjs +39 -0
  14. package/dist/recipes/edge-action-btn.d.ts +3 -0
  15. package/dist/recipes/edge-label.d.ts +8 -1
  16. package/dist/recipes/edge-label.mjs +8 -1
  17. package/dist/recipes/element-node-data.d.ts +4 -1
  18. package/dist/recipes/element-node-data.mjs +1 -0
  19. package/dist/recipes/element-node-icon.d.ts +3 -0
  20. package/dist/recipes/element-shape-recipe.d.ts +33 -0
  21. package/dist/recipes/element-shape-recipe.mjs +29 -0
  22. package/dist/recipes/index.d.ts +2 -0
  23. package/dist/recipes/index.mjs +2 -0
  24. package/dist/recipes/likec4tag.d.ts +3 -0
  25. package/dist/recipes/markdown-block.d.ts +3 -0
  26. package/dist/recipes/navigation-link.d.ts +4 -1
  27. package/dist/recipes/navigation-link.mjs +1 -0
  28. package/dist/recipes/navigation-panel-action-icon.d.ts +3 -0
  29. package/dist/styles.css +886 -760
  30. package/dist/tokens/index.mjs +5 -5
  31. package/dist/types/conditions.d.ts +13 -9
  32. package/dist/types/jsx.d.ts +2 -1
  33. package/dist/types/prop-type.d.ts +4 -2
  34. package/dist/types/style-props.d.ts +9 -2
  35. package/package.json +6 -6
  36. package/preset.d.mts +23 -1
  37. package/preset.mjs +544 -86
@@ -0,0 +1,33 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types';
4
+
5
+ interface ElementShapeRecipeVariant {
6
+ shapetype: "html" | "svg"
7
+ }
8
+
9
+ type ElementShapeRecipeVariantMap = {
10
+ [key in keyof ElementShapeRecipeVariant]: Array<ElementShapeRecipeVariant[key]>
11
+ }
12
+
13
+
14
+
15
+ export type ElementShapeRecipeVariantProps = {
16
+ [key in keyof ElementShapeRecipeVariant]?: ConditionalValue<ElementShapeRecipeVariant[key]> | undefined
17
+ }
18
+
19
+ export interface ElementShapeRecipeRecipe {
20
+
21
+ __type: ElementShapeRecipeVariantProps
22
+ (props?: ElementShapeRecipeVariantProps): string
23
+ raw: (props?: ElementShapeRecipeVariantProps) => ElementShapeRecipeVariantProps
24
+ variantMap: ElementShapeRecipeVariantMap
25
+ variantKeys: Array<keyof ElementShapeRecipeVariant>
26
+ splitVariantProps<Props extends ElementShapeRecipeVariantProps>(props: Props): [ElementShapeRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof ElementShapeRecipeVariantProps>>]
27
+ getVariantProps: (props?: ElementShapeRecipeVariantProps) => ElementShapeRecipeVariantProps
28
+ }
29
+
30
+ /**
31
+ * Recipe for Diagram node shape
32
+ */
33
+ export declare const elementShapeRecipe: ElementShapeRecipeRecipe
@@ -0,0 +1,29 @@
1
+ import { memo, splitProps } from '../helpers.mjs';
2
+ import { createRecipe, mergeRecipes } from './create-recipe.mjs';
3
+
4
+ const elementShapeRecipeFn = /* @__PURE__ */ createRecipe('likec4-element-shape', {}, [])
5
+
6
+ const elementShapeRecipeVariantMap = {
7
+ "shapetype": [
8
+ "html",
9
+ "svg"
10
+ ]
11
+ }
12
+
13
+ const elementShapeRecipeVariantKeys = Object.keys(elementShapeRecipeVariantMap)
14
+
15
+ export const elementShapeRecipe = /* @__PURE__ */ Object.assign(memo(elementShapeRecipeFn.recipeFn), {
16
+ __recipe__: true,
17
+ __name__: 'elementShapeRecipe',
18
+ __getCompoundVariantCss__: elementShapeRecipeFn.__getCompoundVariantCss__,
19
+ raw: (props) => props,
20
+ variantKeys: elementShapeRecipeVariantKeys,
21
+ variantMap: elementShapeRecipeVariantMap,
22
+ merge(recipe) {
23
+ return mergeRecipes(this, recipe)
24
+ },
25
+ splitVariantProps(props) {
26
+ return splitProps(props, elementShapeRecipeVariantKeys)
27
+ },
28
+ getVariantProps: elementShapeRecipeFn.getVariantProps,
29
+ })
@@ -1,7 +1,9 @@
1
1
  /* eslint-disable */
2
2
  export * from './action-btn';
3
+ export * from './compound-node';
3
4
  export * from './edge-action-btn';
4
5
  export * from './element-node-icon';
6
+ export * from './element-shape-recipe';
5
7
  export * from './likec4tag';
6
8
  export * from './markdown-block';
7
9
  export * from './navigation-panel-action-icon';
@@ -1,6 +1,8 @@
1
1
  export * from './action-btn.mjs';
2
+ export * from './compound-node.mjs';
2
3
  export * from './edge-action-btn.mjs';
3
4
  export * from './element-node-icon.mjs';
5
+ export * from './element-shape-recipe.mjs';
4
6
  export * from './likec4tag.mjs';
5
7
  export * from './markdown-block.mjs';
6
8
  export * from './navigation-panel-action-icon.mjs';
@@ -13,11 +13,14 @@ type Likec4tagVariantMap = {
13
13
  [key in keyof Likec4tagVariant]: Array<Likec4tagVariant[key]>
14
14
  }
15
15
 
16
+
17
+
16
18
  export type Likec4tagVariantProps = {
17
19
  [key in keyof Likec4tagVariant]?: ConditionalValue<Likec4tagVariant[key]> | undefined
18
20
  }
19
21
 
20
22
  export interface Likec4tagRecipe {
23
+
21
24
  __type: Likec4tagVariantProps
22
25
  (props?: Likec4tagVariantProps): string
23
26
  raw: (props?: Likec4tagVariantProps) => Likec4tagVariantProps
@@ -13,11 +13,14 @@ type MarkdownBlockVariantMap = {
13
13
  [key in keyof MarkdownBlockVariant]: Array<MarkdownBlockVariant[key]>
14
14
  }
15
15
 
16
+
17
+
16
18
  export type MarkdownBlockVariantProps = {
17
19
  [key in keyof MarkdownBlockVariant]?: ConditionalValue<MarkdownBlockVariant[key]> | undefined
18
20
  }
19
21
 
20
22
  export interface MarkdownBlockRecipe {
23
+
21
24
  __type: MarkdownBlockVariantProps
22
25
  (props?: MarkdownBlockVariantProps): string
23
26
  raw: (props?: MarkdownBlockVariantProps) => MarkdownBlockVariantProps
@@ -13,13 +13,16 @@ type NavigationLinkVariantMap = {
13
13
  [key in keyof NavigationLinkVariant]: Array<NavigationLinkVariant[key]>
14
14
  }
15
15
 
16
+ type NavigationLinkSlot = "root" | "body" | "section" | "label" | "description"
17
+
16
18
  export type NavigationLinkVariantProps = {
17
19
  [key in keyof NavigationLinkVariant]?: ConditionalValue<NavigationLinkVariant[key]> | undefined
18
20
  }
19
21
 
20
22
  export interface NavigationLinkRecipe {
23
+ __slot: NavigationLinkSlot
21
24
  __type: NavigationLinkVariantProps
22
- (props?: NavigationLinkVariantProps): Pretty<Record<"root" | "body" | "section" | "label" | "description", string>>
25
+ (props?: NavigationLinkVariantProps): Pretty<Record<NavigationLinkSlot, string>>
23
26
  raw: (props?: NavigationLinkVariantProps) => NavigationLinkVariantProps
24
27
  variantMap: NavigationLinkVariantMap
25
28
  variantKeys: Array<keyof NavigationLinkVariant>
@@ -43,6 +43,7 @@ export const navigationLink = /* @__PURE__ */ Object.assign(navigationLinkFn, {
43
43
  __recipe__: false,
44
44
  __name__: 'navigationLink',
45
45
  raw: (props) => props,
46
+ classNameMap: {},
46
47
  variantKeys: navigationLinkVariantKeys,
47
48
  variantMap: {
48
49
  "truncateLabel": [
@@ -13,11 +13,14 @@ type NavigationPanelActionIconVariantMap = {
13
13
  [key in keyof NavigationPanelActionIconVariant]: Array<NavigationPanelActionIconVariant[key]>
14
14
  }
15
15
 
16
+
17
+
16
18
  export type NavigationPanelActionIconVariantProps = {
17
19
  [key in keyof NavigationPanelActionIconVariant]?: ConditionalValue<NavigationPanelActionIconVariant[key]> | undefined
18
20
  }
19
21
 
20
22
  export interface NavigationPanelActionIconRecipe {
23
+
21
24
  __type: NavigationPanelActionIconVariantProps
22
25
  (props?: NavigationPanelActionIconVariantProps): string
23
26
  raw: (props?: NavigationPanelActionIconVariantProps) => NavigationPanelActionIconVariantProps