@likec4/styles 1.36.0 → 1.37.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/recipes/compound-node.d.ts +30 -0
- package/dist/recipes/compound-node.mjs +39 -0
- package/dist/recipes/edge-label.d.ts +4 -0
- package/dist/recipes/edge-label.mjs +7 -1
- package/dist/recipes/element-shape-recipe.d.ts +30 -0
- package/dist/recipes/element-shape-recipe.mjs +29 -0
- package/dist/recipes/index.d.ts +2 -0
- package/dist/recipes/index.mjs +2 -0
- package/dist/styles.css +802 -678
- package/dist/tokens/index.mjs +5 -5
- package/dist/types/conditions.d.ts +5 -5
- package/dist/types/prop-type.d.ts +2 -2
- package/dist/types/style-props.d.ts +2 -2
- package/package.json +3 -3
- package/preset.d.mts +23 -1
- package/preset.mjs +548 -89
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { ConditionalValue } from '../types/index';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
4
|
+
|
|
5
|
+
interface CompoundNodeVariant {
|
|
6
|
+
isTransparent: boolean
|
|
7
|
+
inverseColor: boolean
|
|
8
|
+
borderStyle: "solid" | "dashed" | "dotted" | "none"
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
type CompoundNodeVariantMap = {
|
|
12
|
+
[key in keyof CompoundNodeVariant]: Array<CompoundNodeVariant[key]>
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type CompoundNodeVariantProps = {
|
|
16
|
+
[key in keyof CompoundNodeVariant]?: ConditionalValue<CompoundNodeVariant[key]> | undefined
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface CompoundNodeRecipe {
|
|
20
|
+
__type: CompoundNodeVariantProps
|
|
21
|
+
(props?: CompoundNodeVariantProps): string
|
|
22
|
+
raw: (props?: CompoundNodeVariantProps) => CompoundNodeVariantProps
|
|
23
|
+
variantMap: CompoundNodeVariantMap
|
|
24
|
+
variantKeys: Array<keyof CompoundNodeVariant>
|
|
25
|
+
splitVariantProps<Props extends CompoundNodeVariantProps>(props: Props): [CompoundNodeVariantProps, Pretty<DistributiveOmit<Props, keyof CompoundNodeVariantProps>>]
|
|
26
|
+
getVariantProps: (props?: CompoundNodeVariantProps) => CompoundNodeVariantProps
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
export declare const compoundNode: CompoundNodeRecipe
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
|
+
|
|
4
|
+
const compoundNodeFn = /* @__PURE__ */ createRecipe('likec4-compound-node', {}, [])
|
|
5
|
+
|
|
6
|
+
const compoundNodeVariantMap = {
|
|
7
|
+
"isTransparent": [
|
|
8
|
+
"false",
|
|
9
|
+
"true"
|
|
10
|
+
],
|
|
11
|
+
"inverseColor": [
|
|
12
|
+
"true",
|
|
13
|
+
"false"
|
|
14
|
+
],
|
|
15
|
+
"borderStyle": [
|
|
16
|
+
"solid",
|
|
17
|
+
"dashed",
|
|
18
|
+
"dotted",
|
|
19
|
+
"none"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const compoundNodeVariantKeys = Object.keys(compoundNodeVariantMap)
|
|
24
|
+
|
|
25
|
+
export const compoundNode = /* @__PURE__ */ Object.assign(memo(compoundNodeFn.recipeFn), {
|
|
26
|
+
__recipe__: true,
|
|
27
|
+
__name__: 'compoundNode',
|
|
28
|
+
__getCompoundVariantCss__: compoundNodeFn.__getCompoundVariantCss__,
|
|
29
|
+
raw: (props) => props,
|
|
30
|
+
variantKeys: compoundNodeVariantKeys,
|
|
31
|
+
variantMap: compoundNodeVariantMap,
|
|
32
|
+
merge(recipe) {
|
|
33
|
+
return mergeRecipes(this, recipe)
|
|
34
|
+
},
|
|
35
|
+
splitVariantProps(props) {
|
|
36
|
+
return splitProps(props, compoundNodeVariantKeys)
|
|
37
|
+
},
|
|
38
|
+
getVariantProps: compoundNodeFn.getVariantProps,
|
|
39
|
+
})
|
|
@@ -2,7 +2,8 @@ import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mj
|
|
|
2
2
|
import { createRecipe } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const edgeLabelDefaultVariants = {
|
|
5
|
-
"isStepEdge": false
|
|
5
|
+
"isStepEdge": false,
|
|
6
|
+
"cursor": "default"
|
|
6
7
|
}
|
|
7
8
|
const edgeLabelCompoundVariants = []
|
|
8
9
|
|
|
@@ -35,6 +36,7 @@ const edgeLabelFn = memo((props = {}) => {
|
|
|
35
36
|
})
|
|
36
37
|
|
|
37
38
|
const edgeLabelVariantKeys = [
|
|
39
|
+
"cursor",
|
|
38
40
|
"isStepEdge"
|
|
39
41
|
]
|
|
40
42
|
const getVariantProps = (variants) => ({ ...edgeLabelDefaultVariants, ...compact(variants) })
|
|
@@ -45,6 +47,10 @@ export const edgeLabel = /* @__PURE__ */ Object.assign(edgeLabelFn, {
|
|
|
45
47
|
raw: (props) => props,
|
|
46
48
|
variantKeys: edgeLabelVariantKeys,
|
|
47
49
|
variantMap: {
|
|
50
|
+
"cursor": [
|
|
51
|
+
"pointer",
|
|
52
|
+
"default"
|
|
53
|
+
],
|
|
48
54
|
"isStepEdge": [
|
|
49
55
|
"false",
|
|
50
56
|
"true"
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
export type ElementShapeRecipeVariantProps = {
|
|
14
|
+
[key in keyof ElementShapeRecipeVariant]?: ConditionalValue<ElementShapeRecipeVariant[key]> | undefined
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface ElementShapeRecipeRecipe {
|
|
18
|
+
__type: ElementShapeRecipeVariantProps
|
|
19
|
+
(props?: ElementShapeRecipeVariantProps): string
|
|
20
|
+
raw: (props?: ElementShapeRecipeVariantProps) => ElementShapeRecipeVariantProps
|
|
21
|
+
variantMap: ElementShapeRecipeVariantMap
|
|
22
|
+
variantKeys: Array<keyof ElementShapeRecipeVariant>
|
|
23
|
+
splitVariantProps<Props extends ElementShapeRecipeVariantProps>(props: Props): [ElementShapeRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof ElementShapeRecipeVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: ElementShapeRecipeVariantProps) => ElementShapeRecipeVariantProps
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Recipe for Diagram node shape
|
|
29
|
+
*/
|
|
30
|
+
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
|
+
})
|
package/dist/recipes/index.d.ts
CHANGED
|
@@ -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';
|
package/dist/recipes/index.mjs
CHANGED
|
@@ -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';
|