likec4 1.12.1 → 1.13.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/__app__/react/likec4.tsx +2 -0
- package/dist/__app__/src/chunks/{-index-overview-BCq3uZl4.js → -index-overview-DrWsHFH4.js} +6 -6
- package/dist/__app__/src/chunks/{likec4-CNg5BLwi.js → likec4-B4TbAFjc.js} +19 -14
- package/dist/__app__/src/chunks/{main-TBVrmxK9.js → main-Bb3q3o7f.js} +6589 -3860
- package/dist/__app__/src/chunks/{mantine-CDAXKBgY.js → mantine-5H3V65ZR.js} +112 -69
- package/dist/__app__/src/chunks/{tanstack-router-COsz5nw6.js → tanstack-router-C6UpMKjv.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 +7860 -4741
- package/dist/chunks/prompt.mjs +3 -3
- package/dist/cli/index.mjs +47 -47
- package/dist/index.d.mts +483 -205
- package/dist/index.d.ts +483 -205
- package/dist/index.mjs +1 -1
- package/dist/shared/likec4.Dgm8MxXR.mjs +1816 -0
- package/package.json +14 -14
- package/react/index.d.ts +273 -232
- package/react/index.mjs +8088 -4993
- package/react/style.css +1 -1
- package/dist/shared/likec4.DIJE01bW.mjs +0 -1816
|
@@ -1157,6 +1157,15 @@ function useHotkeys(hotkeys, tagsToIgnore = ["INPUT", "TEXTAREA", "SELECT"], tri
|
|
|
1157
1157
|
return document.documentElement.addEventListener("keydown", keydownListener), () => document.documentElement.removeEventListener("keydown", keydownListener);
|
|
1158
1158
|
}, [hotkeys]);
|
|
1159
1159
|
}
|
|
1160
|
+
function useHover$1() {
|
|
1161
|
+
const [hovered, setHovered] = useState(!1), ref = useRef(null), onMouseEnter = useCallback(() => setHovered(!0), []), onMouseLeave = useCallback(() => setHovered(!1), []);
|
|
1162
|
+
return useEffect(() => {
|
|
1163
|
+
if (ref.current)
|
|
1164
|
+
return ref.current.addEventListener("mouseenter", onMouseEnter), ref.current.addEventListener("mouseleave", onMouseLeave), () => {
|
|
1165
|
+
ref.current?.removeEventListener("mouseenter", onMouseEnter), ref.current?.removeEventListener("mouseleave", onMouseLeave);
|
|
1166
|
+
};
|
|
1167
|
+
}, [ref.current]), { ref, hovered };
|
|
1168
|
+
}
|
|
1160
1169
|
function useDisclosure(initialState = !1, callbacks) {
|
|
1161
1170
|
const { onOpen, onClose } = callbacks || {}, [opened, setOpened] = useState(initialState), open = useCallback(() => {
|
|
1162
1171
|
setOpened((isOpened) => isOpened || (onOpen?.(), !0));
|
|
@@ -1207,6 +1216,36 @@ function useMounted() {
|
|
|
1207
1216
|
const [mounted, setMounted] = useState(!1);
|
|
1208
1217
|
return useEffect(() => setMounted(!0), []), mounted;
|
|
1209
1218
|
}
|
|
1219
|
+
function useStateHistory(initialValue) {
|
|
1220
|
+
const [state, setState] = useState({
|
|
1221
|
+
history: [initialValue],
|
|
1222
|
+
current: 0
|
|
1223
|
+
}), set = useCallback(
|
|
1224
|
+
(val) => setState((currentState) => {
|
|
1225
|
+
const nextState = [...currentState.history.slice(0, currentState.current + 1), val];
|
|
1226
|
+
return {
|
|
1227
|
+
history: nextState,
|
|
1228
|
+
current: nextState.length - 1
|
|
1229
|
+
};
|
|
1230
|
+
}),
|
|
1231
|
+
[]
|
|
1232
|
+
), back = useCallback(
|
|
1233
|
+
(steps = 1) => setState((currentState) => ({
|
|
1234
|
+
history: currentState.history,
|
|
1235
|
+
current: Math.max(0, currentState.current - steps)
|
|
1236
|
+
})),
|
|
1237
|
+
[]
|
|
1238
|
+
), forward = useCallback(
|
|
1239
|
+
(steps = 1) => setState((currentState) => ({
|
|
1240
|
+
history: currentState.history,
|
|
1241
|
+
current: Math.min(currentState.history.length - 1, currentState.current + steps)
|
|
1242
|
+
})),
|
|
1243
|
+
[]
|
|
1244
|
+
), reset = useCallback(() => {
|
|
1245
|
+
setState({ history: [initialValue], current: 0 });
|
|
1246
|
+
}, [initialValue]), handlers = useMemo(() => ({ back, forward, reset, set }), [back, forward, reset, set]);
|
|
1247
|
+
return [state.history[state.current], handlers, state];
|
|
1248
|
+
}
|
|
1210
1249
|
function getEnv() {
|
|
1211
1250
|
return typeof process < "u" && process.env ? "production" : "development";
|
|
1212
1251
|
}
|
|
@@ -12384,68 +12423,72 @@ function themeToVars(theme) {
|
|
|
12384
12423
|
};
|
|
12385
12424
|
}
|
|
12386
12425
|
export {
|
|
12387
|
-
|
|
12426
|
+
UnstyledButton as $,
|
|
12388
12427
|
ActionIcon as A,
|
|
12389
12428
|
Box as B,
|
|
12390
12429
|
Card as C,
|
|
12391
|
-
|
|
12392
|
-
|
|
12393
|
-
|
|
12430
|
+
MenuTarget as D,
|
|
12431
|
+
MenuDropdown as E,
|
|
12432
|
+
MenuLabel as F,
|
|
12394
12433
|
Group as G,
|
|
12395
|
-
|
|
12434
|
+
MenuDivider as H,
|
|
12396
12435
|
Image as I,
|
|
12397
|
-
|
|
12398
|
-
|
|
12399
|
-
|
|
12436
|
+
Stack as J,
|
|
12437
|
+
TooltipGroup as K,
|
|
12438
|
+
MenuItem as L,
|
|
12400
12439
|
MantineContext as M,
|
|
12401
|
-
|
|
12402
|
-
|
|
12440
|
+
CloseButton as N,
|
|
12441
|
+
keys as O,
|
|
12403
12442
|
Paper as P,
|
|
12404
|
-
|
|
12405
|
-
|
|
12406
|
-
|
|
12443
|
+
ColorSwatch as Q,
|
|
12444
|
+
Divider as R,
|
|
12445
|
+
ScrollAreaAutosize as S,
|
|
12407
12446
|
ThemeIcon as T,
|
|
12408
|
-
|
|
12409
|
-
|
|
12410
|
-
|
|
12411
|
-
|
|
12412
|
-
|
|
12413
|
-
|
|
12414
|
-
|
|
12447
|
+
Flex as U,
|
|
12448
|
+
CheckIcon as V,
|
|
12449
|
+
rem as W,
|
|
12450
|
+
Slider as X,
|
|
12451
|
+
useDebouncedValue as Y,
|
|
12452
|
+
HoverCard as Z,
|
|
12453
|
+
HoverCardTarget as _,
|
|
12415
12454
|
Text as a,
|
|
12416
|
-
|
|
12417
|
-
|
|
12418
|
-
|
|
12419
|
-
|
|
12420
|
-
|
|
12421
|
-
|
|
12422
|
-
|
|
12423
|
-
|
|
12424
|
-
|
|
12425
|
-
|
|
12426
|
-
|
|
12427
|
-
|
|
12428
|
-
|
|
12429
|
-
|
|
12430
|
-
|
|
12431
|
-
|
|
12432
|
-
|
|
12433
|
-
|
|
12434
|
-
|
|
12435
|
-
|
|
12436
|
-
|
|
12437
|
-
|
|
12438
|
-
|
|
12439
|
-
|
|
12440
|
-
|
|
12441
|
-
|
|
12442
|
-
|
|
12443
|
-
|
|
12444
|
-
|
|
12445
|
-
|
|
12446
|
-
|
|
12447
|
-
|
|
12448
|
-
|
|
12455
|
+
HoverCardDropdown as a0,
|
|
12456
|
+
Anchor as a1,
|
|
12457
|
+
CopyButton as a2,
|
|
12458
|
+
Spoiler as a3,
|
|
12459
|
+
Badge as a4,
|
|
12460
|
+
ButtonGroup as a5,
|
|
12461
|
+
Tabs as a6,
|
|
12462
|
+
TabsList as a7,
|
|
12463
|
+
TabsTab as a8,
|
|
12464
|
+
TabsPanel as a9,
|
|
12465
|
+
Loader as aA,
|
|
12466
|
+
useHover$1 as aa,
|
|
12467
|
+
FloatingIndicator as ab,
|
|
12468
|
+
useUncontrolled as ac,
|
|
12469
|
+
clampUseMovePosition as ad,
|
|
12470
|
+
useMove as ae,
|
|
12471
|
+
ActionIconGroup as af,
|
|
12472
|
+
Overlay as ag,
|
|
12473
|
+
Notification as ah,
|
|
12474
|
+
createTheme as ai,
|
|
12475
|
+
MantineProvider as aj,
|
|
12476
|
+
useInViewport as ak,
|
|
12477
|
+
SimpleGrid as al,
|
|
12478
|
+
Drawer as am,
|
|
12479
|
+
ScrollArea as an,
|
|
12480
|
+
Alert as ao,
|
|
12481
|
+
Select as ap,
|
|
12482
|
+
ModalRoot as aq,
|
|
12483
|
+
ModalOverlay as ar,
|
|
12484
|
+
ModalContent as as,
|
|
12485
|
+
ModalBody as at,
|
|
12486
|
+
useMantineTheme as au,
|
|
12487
|
+
useMediaQuery as av,
|
|
12488
|
+
useDisclosure as aw,
|
|
12489
|
+
LoadingOverlay as ax,
|
|
12490
|
+
useCallbackRef as ay,
|
|
12491
|
+
Burger as az,
|
|
12449
12492
|
CardSection as b,
|
|
12450
12493
|
clsx as c,
|
|
12451
12494
|
Center as d,
|
|
@@ -12453,22 +12496,22 @@ export {
|
|
|
12453
12496
|
Title as f,
|
|
12454
12497
|
Button as g,
|
|
12455
12498
|
useMantineStyleNonce as h,
|
|
12456
|
-
|
|
12457
|
-
|
|
12458
|
-
|
|
12459
|
-
|
|
12460
|
-
|
|
12461
|
-
|
|
12462
|
-
|
|
12463
|
-
|
|
12464
|
-
|
|
12465
|
-
|
|
12466
|
-
|
|
12499
|
+
useMergedRef as i,
|
|
12500
|
+
useTimeout as j,
|
|
12501
|
+
Code as k,
|
|
12502
|
+
useTree as l,
|
|
12503
|
+
useComputedColorScheme as m,
|
|
12504
|
+
Popover as n,
|
|
12505
|
+
PopoverTarget as o,
|
|
12506
|
+
PopoverDropdown as p,
|
|
12507
|
+
Tree as q,
|
|
12508
|
+
useLocalStorage as r,
|
|
12509
|
+
useStateHistory as s,
|
|
12467
12510
|
themeToVars as t,
|
|
12468
12511
|
useMantineColorScheme as u,
|
|
12469
|
-
|
|
12470
|
-
|
|
12471
|
-
|
|
12472
|
-
|
|
12473
|
-
|
|
12512
|
+
Space as v,
|
|
12513
|
+
SegmentedControl as w,
|
|
12514
|
+
useHotkeys as x,
|
|
12515
|
+
Tooltip as y,
|
|
12516
|
+
Menu as z
|
|
12474
12517
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { flushSync } from "react-dom";
|
|
4
|
-
import { w as withSelectorExports } from "./likec4-
|
|
4
|
+
import { w as withSelectorExports } from "./likec4-B4TbAFjc.js";
|
|
5
5
|
const pushStateEvent = "pushstate", popStateEvent = "popstate", beforeUnloadEvent = "beforeunload", beforeUnloadListener = (event) => (event.preventDefault(), event.returnValue = ""), stopBlocking = () => {
|
|
6
6
|
removeEventListener(beforeUnloadEvent, beforeUnloadListener, {
|
|
7
7
|
capture: !0
|
package/dist/__app__/src/main.js
CHANGED