likec4 1.12.0 → 1.12.2
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/__app__/react/likec4.tsx +13 -12
- package/dist/__app__/src/chunks/{-index-overview-Csz814YU.js → -index-overview-BkDZVsmQ.js} +6 -6
- package/dist/__app__/src/chunks/{likec4-DlkyDuSp.js → likec4-CNg5BLwi.js} +66 -17
- package/dist/__app__/src/chunks/{main-Bc_PC5BH.js → main-BqtsxvKL.js} +3180 -2401
- package/dist/__app__/src/chunks/{mantine-IOl1S4mZ.js → mantine-CN5aX5HW.js} +193 -119
- package/dist/__app__/src/chunks/{tanstack-router-CU5V4Ll-.js → tanstack-router-COsz5nw6.js} +1 -1
- package/dist/__app__/src/main.js +1 -1
- package/dist/__app__/src/style.css +1 -1
- package/dist/__app__/webcomponent/webcomponent.js +12200 -12925
- package/dist/chunks/prompt.mjs +1 -1
- package/dist/cli/index.mjs +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/shared/{likec4.Ceq7jJZD.mjs → likec4.BYHvTT3g.mjs} +114 -114
- package/package.json +22 -22
- package/react/index.d.ts +26 -12
- package/react/index.mjs +12306 -12243
- package/react/style.css +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "likec4",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://likec4.dev",
|
|
6
6
|
"author": "Denis Davydkov <denis@davydkov.com>",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
},
|
|
98
98
|
"dependencies": {
|
|
99
99
|
"@hpcc-js/wasm-graphviz": "1.6.1",
|
|
100
|
-
"@vitejs/plugin-react-swc": "3.7.
|
|
100
|
+
"@vitejs/plugin-react-swc": "3.7.1",
|
|
101
101
|
"playwright": "1.47.2",
|
|
102
102
|
"react": "^18.3.1",
|
|
103
103
|
"react-dom": "^18.3.1",
|
|
@@ -106,20 +106,20 @@
|
|
|
106
106
|
},
|
|
107
107
|
"devDependencies": {
|
|
108
108
|
"@fontsource/ibm-plex-sans": "^5.1.0",
|
|
109
|
-
"@likec4/core": "1.12.
|
|
110
|
-
"@likec4/diagram": "1.12.
|
|
111
|
-
"@likec4/generators": "1.12.
|
|
112
|
-
"@likec4/icons": "1.12.
|
|
113
|
-
"@likec4/language-server": "1.12.
|
|
114
|
-
"@likec4/layouts": "1.12.
|
|
115
|
-
"@likec4/log": "1.12.
|
|
116
|
-
"@likec4/tsconfig": "1.12.
|
|
117
|
-
"@mantine/core": "7.
|
|
118
|
-
"@mantine/hooks": "7.
|
|
119
|
-
"@mantine/vanilla-extract": "7.
|
|
120
|
-
"@nanostores/react": "0.
|
|
109
|
+
"@likec4/core": "1.12.2",
|
|
110
|
+
"@likec4/diagram": "1.12.2",
|
|
111
|
+
"@likec4/generators": "1.12.2",
|
|
112
|
+
"@likec4/icons": "1.12.2",
|
|
113
|
+
"@likec4/language-server": "1.12.2",
|
|
114
|
+
"@likec4/layouts": "1.12.2",
|
|
115
|
+
"@likec4/log": "1.12.2",
|
|
116
|
+
"@likec4/tsconfig": "1.12.2",
|
|
117
|
+
"@mantine/core": "7.13.2",
|
|
118
|
+
"@mantine/hooks": "7.13.2",
|
|
119
|
+
"@mantine/vanilla-extract": "7.13.2",
|
|
120
|
+
"@nanostores/react": "0.8.0",
|
|
121
121
|
"@react-hookz/web": "^24.0.4",
|
|
122
|
-
"@tabler/icons-react": "
|
|
122
|
+
"@tabler/icons-react": "3.17.0",
|
|
123
123
|
"@tanstack/react-router": "1.45.13",
|
|
124
124
|
"@tanstack/router-cli": "1.45.13",
|
|
125
125
|
"@tanstack/router-vite-plugin": "1.45.13",
|
|
@@ -139,12 +139,12 @@
|
|
|
139
139
|
"clsx": "^2.1.1",
|
|
140
140
|
"defu": "^6.1.4",
|
|
141
141
|
"dts-bundle-generator": "^9.5.1",
|
|
142
|
-
"esbuild": "^0.
|
|
143
|
-
"esbuild-node-externals": "^1.
|
|
142
|
+
"esbuild": "^0.24.0",
|
|
143
|
+
"esbuild-node-externals": "^1.15.0",
|
|
144
144
|
"execa": "^9.3.1",
|
|
145
145
|
"fast-equals": "^5.0.1",
|
|
146
|
-
"fdir": "^6.
|
|
147
|
-
"framer-motion": "^11.
|
|
146
|
+
"fdir": "^6.4.0",
|
|
147
|
+
"framer-motion": "^11.11.1",
|
|
148
148
|
"get-port": "^7.1.0",
|
|
149
149
|
"glob": "^11.0.0",
|
|
150
150
|
"html-to-image": "^1.11.11",
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
"postcss-preset-mantine": "^1.17.0",
|
|
160
160
|
"pretty-ms": "^9.1.0",
|
|
161
161
|
"react-error-boundary": "^4.0.13",
|
|
162
|
-
"react-resizable-panels": "^2.1.
|
|
162
|
+
"react-resizable-panels": "^2.1.4",
|
|
163
163
|
"react-shadow": "^20.5.0",
|
|
164
164
|
"remeda": "^2.14.0",
|
|
165
165
|
"std-env": "^3.7.0",
|
|
@@ -168,10 +168,10 @@
|
|
|
168
168
|
"terser": "^5.33.0",
|
|
169
169
|
"tinyrainbow": "^1.2.0",
|
|
170
170
|
"tsx": "~4.9.3",
|
|
171
|
-
"turbo": "^2.1.
|
|
171
|
+
"turbo": "^2.1.3",
|
|
172
172
|
"typescript": "^5.6.2",
|
|
173
173
|
"ufo": "^1.5.4",
|
|
174
|
-
"unbuild": "^3.0.0-rc.
|
|
174
|
+
"unbuild": "^3.0.0-rc.11",
|
|
175
175
|
"vite-plugin-css-injected-by-js": "^3.5.2",
|
|
176
176
|
"vite-plugin-shadow-style": "^1.1.1",
|
|
177
177
|
"vitest": "^2.1.2",
|
package/react/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
|
-
import { CSSProperties, HTMLAttributes, MouseEvent as ReactMouseEvent, PropsWithChildren, ReactNode } from 'react';
|
|
4
|
-
import { LiteralUnion, OverrideProperties, PartialDeep,
|
|
3
|
+
import { CSSProperties, DependencyList, HTMLAttributes, MouseEvent as ReactMouseEvent, PropsWithChildren, ReactNode } from 'react';
|
|
4
|
+
import { LiteralUnion, OverrideProperties, PartialDeep, Tagged, UnwrapTagged } from 'type-fest';
|
|
5
5
|
|
|
6
6
|
declare const ThemeColors: readonly [
|
|
7
7
|
"amber",
|
|
@@ -899,7 +899,7 @@ declare namespace ViewChange {
|
|
|
899
899
|
}
|
|
900
900
|
interface ChangeAutoLayout {
|
|
901
901
|
op: "change-autolayout";
|
|
902
|
-
layout:
|
|
902
|
+
layout: ViewRuleAutoLayout;
|
|
903
903
|
}
|
|
904
904
|
}
|
|
905
905
|
type ViewChange = ViewChange.ChangeElementStyle | ViewChange.SaveManualLayout | ViewChange.ChangeAutoLayout;
|
|
@@ -925,7 +925,7 @@ interface MantineTheme {
|
|
|
925
925
|
* - `never` – focus ring is always hidden (not recommended)
|
|
926
926
|
*/
|
|
927
927
|
focusRing: "auto" | "always" | "never";
|
|
928
|
-
/**
|
|
928
|
+
/** Rem units scale, change if you customize font-size of `<html />` element
|
|
929
929
|
* default value is `1` (for `100%`/`16px` font-size on `<html />`)
|
|
930
930
|
*/
|
|
931
931
|
scale: number;
|
|
@@ -967,7 +967,7 @@ interface MantineTheme {
|
|
|
967
967
|
* Default value is `0.3`
|
|
968
968
|
* */
|
|
969
969
|
luminanceThreshold: number;
|
|
970
|
-
/**
|
|
970
|
+
/** Font-family used in all components, system fonts by default */
|
|
971
971
|
fontFamily: string;
|
|
972
972
|
/** Monospace font-family, used in code and other similar components, system fonts by default */
|
|
973
973
|
fontFamilyMonospace: string;
|
|
@@ -1157,6 +1157,8 @@ export type LikeC4ViewProps<ViewId extends string, Tag extends string, Kind exte
|
|
|
1157
1157
|
browserClassName?: string | undefined;
|
|
1158
1158
|
browserStyle?: CSSProperties | undefined;
|
|
1159
1159
|
mantineTheme?: MantineThemeOverride | undefined;
|
|
1160
|
+
/** Function to generate nonce attribute added to all generated `<style />` tags */
|
|
1161
|
+
styleNonce?: string | (() => string) | undefined;
|
|
1160
1162
|
};
|
|
1161
1163
|
export type LikeC4BrowserProps<ViewId extends string, Tag extends string, Kind extends string> = Pick<HTMLAttributes<HTMLDialogElement>, "style" | "className"> & {
|
|
1162
1164
|
view: ViewData<ViewId>;
|
|
@@ -1186,8 +1188,10 @@ export type LikeC4BrowserProps<ViewId extends string, Tag extends string, Kind e
|
|
|
1186
1188
|
renderIcon?: ElementIconRenderer | undefined;
|
|
1187
1189
|
where?: WhereOperator<Tag, Kind> | undefined;
|
|
1188
1190
|
mantineTheme?: MantineThemeOverride | undefined;
|
|
1191
|
+
/** Function to generate nonce attribute added to all generated `<style />` tags */
|
|
1192
|
+
styleNonce?: string | (() => string) | undefined;
|
|
1189
1193
|
};
|
|
1190
|
-
export declare function LikeC4Browser<ViewId extends string = string, Tag extends string = string, Kind extends string = string>({ className, colorScheme, view, injectFontCss, onNavigateTo, onClose, renderIcon, where, style, mantineTheme, background }: LikeC4BrowserProps<ViewId, Tag, Kind>): import("react/jsx-runtime").JSX.Element;
|
|
1194
|
+
export declare function LikeC4Browser<ViewId extends string = string, Tag extends string = string, Kind extends string = string>({ className, colorScheme, view, injectFontCss, onNavigateTo, onClose, renderIcon, where, style, mantineTheme, background, styleNonce }: LikeC4BrowserProps<ViewId, Tag, Kind>): import("react/jsx-runtime").JSX.Element;
|
|
1191
1195
|
export type LikeC4ViewEmbeddedProps<ViewId extends string, Tag extends string, Kind extends string> = Pick<HTMLAttributes<HTMLDivElement>, "style" | "className"> & {
|
|
1192
1196
|
view: ViewData<ViewId>;
|
|
1193
1197
|
/**
|
|
@@ -1245,8 +1249,10 @@ export type LikeC4ViewEmbeddedProps<ViewId extends string, Tag extends string, K
|
|
|
1245
1249
|
enableFocusMode?: boolean | undefined;
|
|
1246
1250
|
where?: WhereOperator<Tag, Kind> | undefined;
|
|
1247
1251
|
mantineTheme?: MantineThemeOverride | undefined;
|
|
1252
|
+
/** Function to generate nonce attribute added to all generated `<style />` tags */
|
|
1253
|
+
styleNonce?: string | (() => string) | undefined;
|
|
1248
1254
|
};
|
|
1249
|
-
export declare function LikeC4ViewEmbedded<ViewId extends string = string, Tag extends string = string, Kind extends string = string>({ onNavigateTo: _onNavigateTo, className, view, injectFontCss, colorScheme, background, renderIcon, showDiagramTitle, showElementLinks, showNavigationButtons, enableFocusMode, showNotations, showRelationshipDetails, mantineTheme, where, style }: LikeC4ViewEmbeddedProps<ViewId, Tag, Kind>): import("react/jsx-runtime").JSX.Element;
|
|
1255
|
+
export declare function LikeC4ViewEmbedded<ViewId extends string = string, Tag extends string = string, Kind extends string = string>({ onNavigateTo: _onNavigateTo, className, view, injectFontCss, colorScheme, background, renderIcon, showDiagramTitle, showElementLinks, showNavigationButtons, enableFocusMode, showNotations, showRelationshipDetails, mantineTheme, where, style, styleNonce }: LikeC4ViewEmbeddedProps<ViewId, Tag, Kind>): import("react/jsx-runtime").JSX.Element;
|
|
1250
1256
|
declare enum BackgroundVariant {
|
|
1251
1257
|
Lines = "lines",
|
|
1252
1258
|
Dots = "dots",
|
|
@@ -1437,17 +1443,18 @@ export declare function useLikeC4Model(strict: boolean, type: "computed"): LikeC
|
|
|
1437
1443
|
export declare function useLikeC4Model(strict: boolean, type: LikeC4Model["type"] | undefined): LikeC4Model | null;
|
|
1438
1444
|
export declare function useLikeC4Views(): LikeC4Model.SourceModel["views"];
|
|
1439
1445
|
export declare function useLikeC4ViewModel(viewId: LiteralUnion<ViewID, string>): LikeC4Model.ViewModel;
|
|
1446
|
+
/**
|
|
1447
|
+
* Parsed view, computed or layouted
|
|
1448
|
+
*/
|
|
1440
1449
|
export declare function useLikeC4View(viewId: LiteralUnion<ViewID, string>): ComputedView | DiagramView | null;
|
|
1441
1450
|
export declare function useLikeC4DiagramView(viewId: LiteralUnion<ViewID, string>): DiagramView | null;
|
|
1442
|
-
type LikeC4ModelProviderProps = PropsWithChildren<
|
|
1451
|
+
type LikeC4ModelProviderProps = PropsWithChildren<{
|
|
1443
1452
|
likec4model: LikeC4Model;
|
|
1444
|
-
|
|
1445
|
-
computed: LikeC4Model.Computed.SourceModel;
|
|
1446
|
-
}>>;
|
|
1453
|
+
}>;
|
|
1447
1454
|
/**
|
|
1448
1455
|
* Ensures LikeC4Model context
|
|
1449
1456
|
*/
|
|
1450
|
-
export declare function LikeC4ModelProvider({ children,
|
|
1457
|
+
export declare function LikeC4ModelProvider({ children, likec4model }: LikeC4ModelProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
1451
1458
|
export type ReactLikeC4Props<ViewId extends string, Tag extends string, Kind extends string> = Omit<LikeC4DiagramProps, "view" | "where" | "onNavigateTo"> & {
|
|
1452
1459
|
view: ViewData<ViewId>;
|
|
1453
1460
|
/**
|
|
@@ -1696,6 +1703,13 @@ type StoreKeys<T> = T extends {
|
|
|
1696
1703
|
setKey: (k: infer K, v: any) => unknown;
|
|
1697
1704
|
} ? K : never;
|
|
1698
1705
|
interface UseStoreOptions<SomeStore> {
|
|
1706
|
+
/**
|
|
1707
|
+
* @default
|
|
1708
|
+
* ```ts
|
|
1709
|
+
* [store, options.keys]
|
|
1710
|
+
* ```
|
|
1711
|
+
*/
|
|
1712
|
+
deps?: DependencyList;
|
|
1699
1713
|
/**
|
|
1700
1714
|
* Will re-render components only on specific key changes.
|
|
1701
1715
|
*/
|