@likec4/styles 1.30.0 → 1.31.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/README.md +3 -2
- package/build.config.ts +7 -2
- package/dev.ts +1 -1
- package/dist/css/css.mjs +1 -1
- package/dist/jsx/is-valid-prop.mjs +1 -1
- package/dist/patterns/hstack.mjs +1 -1
- package/dist/patterns/vstack.mjs +1 -1
- package/dist/types/style-props.d.ts +1 -2
- package/package.json +12 -12
- package/preset.d.mts +6 -2750
- package/preset.mjs +47 -28
- package/preset.ts +2 -2
package/preset.mjs
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { defineRecipe, defineSemanticTokens, defineTextStyles, defineTokens, defineUtility, definePreset } from '@pandacss/dev';
|
|
2
2
|
|
|
3
|
+
const root = ".likec4-root";
|
|
4
|
+
const rootNotReduced = `${root}:not([data-likec4-reduced-graphics])`;
|
|
5
|
+
const nodeOrEdge = `:where(.react-flow__node, .react-flow__edge, .likec4-edge-label-container)`;
|
|
6
|
+
|
|
3
7
|
const themeColors = [
|
|
4
8
|
"amber",
|
|
5
9
|
"blue",
|
|
@@ -2286,23 +2290,23 @@ const conditions = {
|
|
|
2286
2290
|
dark: '[data-mantine-color-scheme="dark"] &',
|
|
2287
2291
|
// This is used to hide certain elements when the diagram is in reduced graphics mode (large)
|
|
2288
2292
|
reduceGraphics: [
|
|
2289
|
-
|
|
2293
|
+
`${root}:is([data-likec4-reduced-graphics])`,
|
|
2290
2294
|
" &"
|
|
2291
2295
|
].join(""),
|
|
2292
2296
|
// This is used to improve performance when the diagram is in reduced graphics mode
|
|
2293
2297
|
// and the user is panning around the diagram
|
|
2294
2298
|
reduceGraphicsOnPan: [
|
|
2295
|
-
|
|
2299
|
+
`${root}:is(`,
|
|
2296
2300
|
"[data-likec4-reduced-graphics]",
|
|
2297
2301
|
"[data-likec4-diagram-panning]",
|
|
2298
2302
|
") &"
|
|
2299
2303
|
].join(""),
|
|
2300
2304
|
noReduceGraphics: [
|
|
2301
|
-
|
|
2305
|
+
`${root}:not(`,
|
|
2302
2306
|
"[data-likec4-reduced-graphics]",
|
|
2303
2307
|
") &"
|
|
2304
2308
|
].join(""),
|
|
2305
|
-
whenPanning:
|
|
2309
|
+
whenPanning: `:is(${root}[data-likec4-diagram-panning]) &`,
|
|
2306
2310
|
smallZoom: ":where([data-likec4-zoom-small]) &",
|
|
2307
2311
|
compoundTransparent: ":where([data-compound-transparent]) &",
|
|
2308
2312
|
edgeActive: ':where([data-likec4-edge-active="true"]) &',
|
|
@@ -2315,6 +2319,22 @@ const conditions = {
|
|
|
2315
2319
|
}
|
|
2316
2320
|
};
|
|
2317
2321
|
|
|
2322
|
+
const patterns = {
|
|
2323
|
+
extend: {
|
|
2324
|
+
vstack: {
|
|
2325
|
+
defaultValues: {
|
|
2326
|
+
alignItems: "stretch",
|
|
2327
|
+
gap: "sm"
|
|
2328
|
+
}
|
|
2329
|
+
},
|
|
2330
|
+
hstack: {
|
|
2331
|
+
defaultValues: {
|
|
2332
|
+
gap: "sm"
|
|
2333
|
+
}
|
|
2334
|
+
}
|
|
2335
|
+
}
|
|
2336
|
+
};
|
|
2337
|
+
|
|
2318
2338
|
const actionBtn = defineRecipe({
|
|
2319
2339
|
className: "action-btn",
|
|
2320
2340
|
description: "The styles for the Action Buttons",
|
|
@@ -2628,10 +2648,27 @@ const likec4RelationPalette = defineUtility({
|
|
|
2628
2648
|
};
|
|
2629
2649
|
}
|
|
2630
2650
|
});
|
|
2651
|
+
const utilities = {
|
|
2652
|
+
extend: {
|
|
2653
|
+
transition: {
|
|
2654
|
+
values: ["fast"],
|
|
2655
|
+
className: "transition-fast",
|
|
2656
|
+
transform(value, { token }) {
|
|
2657
|
+
if (value !== "fast") {
|
|
2658
|
+
return {
|
|
2659
|
+
transition: value
|
|
2660
|
+
};
|
|
2661
|
+
}
|
|
2662
|
+
return {
|
|
2663
|
+
transition: `all ${token("durations.fast")} ${token("easings.inOut")}`
|
|
2664
|
+
};
|
|
2665
|
+
}
|
|
2666
|
+
},
|
|
2667
|
+
likec4Palette,
|
|
2668
|
+
likec4RelationPalette
|
|
2669
|
+
}
|
|
2670
|
+
};
|
|
2631
2671
|
|
|
2632
|
-
const root = ".likec4-root";
|
|
2633
|
-
const rootNotReduced = `${root}:not([data-likec4-reduced-graphics])`;
|
|
2634
|
-
const nodeOrEdge = `:where(.react-flow__node, .react-flow__edge, .likec4-edge-label-container)`;
|
|
2635
2672
|
const index = definePreset({
|
|
2636
2673
|
name: "likec4",
|
|
2637
2674
|
// Whether to use css reset
|
|
@@ -2727,27 +2764,9 @@ const index = definePreset({
|
|
|
2727
2764
|
}
|
|
2728
2765
|
},
|
|
2729
2766
|
conditions,
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
transition: {
|
|
2733
|
-
values: ["fast"],
|
|
2734
|
-
className: "transition-fast",
|
|
2735
|
-
transform(value, { token }) {
|
|
2736
|
-
if (value !== "fast") {
|
|
2737
|
-
return {
|
|
2738
|
-
transition: value
|
|
2739
|
-
};
|
|
2740
|
-
}
|
|
2741
|
-
return {
|
|
2742
|
-
transition: `all ${token("durations.fast")} ${token("easings.inOut")}`
|
|
2743
|
-
};
|
|
2744
|
-
}
|
|
2745
|
-
},
|
|
2746
|
-
likec4Palette,
|
|
2747
|
-
likec4RelationPalette
|
|
2748
|
-
}
|
|
2749
|
-
},
|
|
2767
|
+
patterns,
|
|
2768
|
+
utilities,
|
|
2750
2769
|
theme
|
|
2751
2770
|
});
|
|
2752
2771
|
|
|
2753
|
-
export { index as default };
|
|
2772
|
+
export { index as default, theme };
|
package/preset.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import likec4preset from '@likec4/style-preset/src'
|
|
1
|
+
import likec4preset, { theme } from '@likec4/style-preset/src'
|
|
2
2
|
|
|
3
|
-
export { likec4preset as default }
|
|
3
|
+
export { likec4preset as default, theme }
|