@likec4/styles 1.44.0 → 1.46.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/jsx/create-style-context.d.ts +4 -4
- package/dist/jsx/create-style-context.mjs +23 -3
- package/dist/preset.d.mts +20 -7
- package/dist/preset.mjs +533 -225
- package/dist/recipes/edge-label.d.ts +3 -3
- package/dist/recipes/edge-label.mjs +20 -49
- package/dist/recipes/edge-path.d.ts +33 -0
- package/dist/recipes/edge-path.mjs +45 -0
- package/dist/recipes/index.d.ts +2 -1
- package/dist/recipes/index.mjs +2 -1
- package/dist/tokens/index.mjs +8 -0
- package/dist/tokens/tokens.d.ts +2 -2
- package/dist/types/conditions.d.ts +3 -3
- package/dist/types/jsx.d.ts +3 -1
- package/dist/types/prop-type.d.ts +3 -3
- package/package.json +11 -11
|
@@ -21,16 +21,16 @@ type EdgeLabelVariantMap = {
|
|
|
21
21
|
[key in keyof EdgeLabelVariant]: Array<EdgeLabelVariant[key]>
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
|
|
25
25
|
|
|
26
26
|
export type EdgeLabelVariantProps = {
|
|
27
27
|
[key in keyof EdgeLabelVariant]?: ConditionalValue<EdgeLabelVariant[key]> | undefined
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
export interface EdgeLabelRecipe {
|
|
31
|
-
|
|
31
|
+
|
|
32
32
|
__type: EdgeLabelVariantProps
|
|
33
|
-
(props?: EdgeLabelVariantProps):
|
|
33
|
+
(props?: EdgeLabelVariantProps): string
|
|
34
34
|
raw: (props?: EdgeLabelVariantProps) => EdgeLabelVariantProps
|
|
35
35
|
variantMap: EdgeLabelVariantMap
|
|
36
36
|
variantKeys: Array<keyof EdgeLabelVariant>
|
|
@@ -1,55 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createRecipe } from './create-recipe.mjs';
|
|
1
|
+
import { memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const edgeLabelFn = /* @__PURE__ */ createRecipe('likec4-edge-label', {
|
|
5
5
|
"pointerEvents": "all",
|
|
6
6
|
"isStepEdge": false,
|
|
7
7
|
"cursor": "default"
|
|
8
|
-
}
|
|
9
|
-
const edgeLabelCompoundVariants = []
|
|
10
|
-
|
|
11
|
-
const edgeLabelSlotNames = [
|
|
12
|
-
[
|
|
13
|
-
"root",
|
|
14
|
-
"likec4-edge-label__root"
|
|
15
|
-
],
|
|
16
|
-
[
|
|
17
|
-
"stepNumber",
|
|
18
|
-
"likec4-edge-label__stepNumber"
|
|
19
|
-
],
|
|
20
|
-
[
|
|
21
|
-
"labelContents",
|
|
22
|
-
"likec4-edge-label__labelContents"
|
|
23
|
-
],
|
|
24
|
-
[
|
|
25
|
-
"labelText",
|
|
26
|
-
"likec4-edge-label__labelText"
|
|
27
|
-
],
|
|
28
|
-
[
|
|
29
|
-
"labelTechnology",
|
|
30
|
-
"likec4-edge-label__labelTechnology"
|
|
31
|
-
]
|
|
32
|
-
]
|
|
33
|
-
const edgeLabelSlotFns = /* @__PURE__ */ edgeLabelSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, edgeLabelDefaultVariants, getSlotCompoundVariant(edgeLabelCompoundVariants, slotName))])
|
|
34
|
-
|
|
35
|
-
const edgeLabelFn = memo((props = {}) => {
|
|
36
|
-
return Object.fromEntries(edgeLabelSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
37
|
-
})
|
|
8
|
+
}, [])
|
|
38
9
|
|
|
39
|
-
const
|
|
40
|
-
"pointerEvents",
|
|
41
|
-
"cursor",
|
|
42
|
-
"isStepEdge"
|
|
43
|
-
]
|
|
44
|
-
const getVariantProps = (variants) => ({ ...edgeLabelDefaultVariants, ...compact(variants) })
|
|
45
|
-
|
|
46
|
-
export const edgeLabel = /* @__PURE__ */ Object.assign(edgeLabelFn, {
|
|
47
|
-
__recipe__: false,
|
|
48
|
-
__name__: 'edgeLabel',
|
|
49
|
-
raw: (props) => props,
|
|
50
|
-
classNameMap: {},
|
|
51
|
-
variantKeys: edgeLabelVariantKeys,
|
|
52
|
-
variantMap: {
|
|
10
|
+
const edgeLabelVariantMap = {
|
|
53
11
|
"pointerEvents": [
|
|
54
12
|
"none",
|
|
55
13
|
"all"
|
|
@@ -62,9 +20,22 @@ export const edgeLabel = /* @__PURE__ */ Object.assign(edgeLabelFn, {
|
|
|
62
20
|
"false",
|
|
63
21
|
"true"
|
|
64
22
|
]
|
|
65
|
-
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const edgeLabelVariantKeys = Object.keys(edgeLabelVariantMap)
|
|
26
|
+
|
|
27
|
+
export const edgeLabel = /* @__PURE__ */ Object.assign(memo(edgeLabelFn.recipeFn), {
|
|
28
|
+
__recipe__: true,
|
|
29
|
+
__name__: 'edgeLabel',
|
|
30
|
+
__getCompoundVariantCss__: edgeLabelFn.__getCompoundVariantCss__,
|
|
31
|
+
raw: (props) => props,
|
|
32
|
+
variantKeys: edgeLabelVariantKeys,
|
|
33
|
+
variantMap: edgeLabelVariantMap,
|
|
34
|
+
merge(recipe) {
|
|
35
|
+
return mergeRecipes(this, recipe)
|
|
36
|
+
},
|
|
66
37
|
splitVariantProps(props) {
|
|
67
38
|
return splitProps(props, edgeLabelVariantKeys)
|
|
68
39
|
},
|
|
69
|
-
getVariantProps
|
|
40
|
+
getVariantProps: edgeLabelFn.getVariantProps,
|
|
70
41
|
})
|
|
@@ -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 EdgePathVariant {
|
|
6
|
+
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
type EdgePathVariantMap = {
|
|
10
|
+
[key in keyof EdgePathVariant]: Array<EdgePathVariant[key]>
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
type EdgePathSlot = "path" | "pathBg" | "markersCtx" | "middlePoint"
|
|
14
|
+
|
|
15
|
+
export type EdgePathVariantProps = {
|
|
16
|
+
[key in keyof EdgePathVariant]?: ConditionalValue<EdgePathVariant[key]> | undefined
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface EdgePathRecipe {
|
|
20
|
+
__slot: EdgePathSlot
|
|
21
|
+
__type: EdgePathVariantProps
|
|
22
|
+
(props?: EdgePathVariantProps): Pretty<Record<EdgePathSlot, string>>
|
|
23
|
+
raw: (props?: EdgePathVariantProps) => EdgePathVariantProps
|
|
24
|
+
variantMap: EdgePathVariantMap
|
|
25
|
+
variantKeys: Array<keyof EdgePathVariant>
|
|
26
|
+
splitVariantProps<Props extends EdgePathVariantProps>(props: Props): [EdgePathVariantProps, Pretty<DistributiveOmit<Props, keyof EdgePathVariantProps>>]
|
|
27
|
+
getVariantProps: (props?: EdgePathVariantProps) => EdgePathVariantProps
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Recipe for Edge Path
|
|
32
|
+
*/
|
|
33
|
+
export declare const edgePath: EdgePathRecipe
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe } from './create-recipe.mjs';
|
|
3
|
+
|
|
4
|
+
const edgePathDefaultVariants = {}
|
|
5
|
+
const edgePathCompoundVariants = []
|
|
6
|
+
|
|
7
|
+
const edgePathSlotNames = [
|
|
8
|
+
[
|
|
9
|
+
"path",
|
|
10
|
+
"likec4-edge__path"
|
|
11
|
+
],
|
|
12
|
+
[
|
|
13
|
+
"pathBg",
|
|
14
|
+
"likec4-edge__pathBg"
|
|
15
|
+
],
|
|
16
|
+
[
|
|
17
|
+
"markersCtx",
|
|
18
|
+
"likec4-edge__markersCtx"
|
|
19
|
+
],
|
|
20
|
+
[
|
|
21
|
+
"middlePoint",
|
|
22
|
+
"likec4-edge__middlePoint"
|
|
23
|
+
]
|
|
24
|
+
]
|
|
25
|
+
const edgePathSlotFns = /* @__PURE__ */ edgePathSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, edgePathDefaultVariants, getSlotCompoundVariant(edgePathCompoundVariants, slotName))])
|
|
26
|
+
|
|
27
|
+
const edgePathFn = memo((props = {}) => {
|
|
28
|
+
return Object.fromEntries(edgePathSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
const edgePathVariantKeys = []
|
|
32
|
+
const getVariantProps = (variants) => ({ ...edgePathDefaultVariants, ...compact(variants) })
|
|
33
|
+
|
|
34
|
+
export const edgePath = /* @__PURE__ */ Object.assign(edgePathFn, {
|
|
35
|
+
__recipe__: false,
|
|
36
|
+
__name__: 'edgePath',
|
|
37
|
+
raw: (props) => props,
|
|
38
|
+
classNameMap: {},
|
|
39
|
+
variantKeys: edgePathVariantKeys,
|
|
40
|
+
variantMap: {},
|
|
41
|
+
splitVariantProps(props) {
|
|
42
|
+
return splitProps(props, edgePathVariantKeys)
|
|
43
|
+
},
|
|
44
|
+
getVariantProps
|
|
45
|
+
})
|
package/dist/recipes/index.d.ts
CHANGED
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
export * from './action-btn';
|
|
3
3
|
export * from './compound-node';
|
|
4
4
|
export * from './edge-action-btn';
|
|
5
|
+
export * from './edge-label';
|
|
6
|
+
export * from './edge-path';
|
|
5
7
|
export * from './element-node-data';
|
|
6
8
|
export * from './element-shape-recipe';
|
|
7
9
|
export * from './likec4tag';
|
|
8
10
|
export * from './markdown-block';
|
|
9
11
|
export * from './navigation-panel-action-icon';
|
|
10
12
|
export * from './overlay';
|
|
11
|
-
export * from './edge-label';
|
|
12
13
|
export * from './navigation-link';
|
package/dist/recipes/index.mjs
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
export * from './action-btn.mjs';
|
|
2
2
|
export * from './compound-node.mjs';
|
|
3
3
|
export * from './edge-action-btn.mjs';
|
|
4
|
+
export * from './edge-label.mjs';
|
|
5
|
+
export * from './edge-path.mjs';
|
|
4
6
|
export * from './element-node-data.mjs';
|
|
5
7
|
export * from './element-shape-recipe.mjs';
|
|
6
8
|
export * from './likec4tag.mjs';
|
|
7
9
|
export * from './markdown-block.mjs';
|
|
8
10
|
export * from './navigation-panel-action-icon.mjs';
|
|
9
11
|
export * from './overlay.mjs';
|
|
10
|
-
export * from './edge-label.mjs';
|
|
11
12
|
export * from './navigation-link.mjs';
|
package/dist/tokens/index.mjs
CHANGED
|
@@ -9643,6 +9643,14 @@ const tokens = {
|
|
|
9643
9643
|
"value": "var(--colors-yellow-p3-a-12)",
|
|
9644
9644
|
"variable": "var(--colors-yellow-p3-a-12)"
|
|
9645
9645
|
},
|
|
9646
|
+
"colors.text": {
|
|
9647
|
+
"value": "var(--mantine-color-text)",
|
|
9648
|
+
"variable": "var(--colors-text)"
|
|
9649
|
+
},
|
|
9650
|
+
"colors.text.dimmed": {
|
|
9651
|
+
"value": "var(--mantine-color-dimmed)",
|
|
9652
|
+
"variable": "var(--colors-text-dimmed)"
|
|
9653
|
+
},
|
|
9646
9654
|
"colors.likec4.background": {
|
|
9647
9655
|
"value": "var(--mantine-color-body)",
|
|
9648
9656
|
"variable": "var(--colors-likec4-background)"
|