@omnitron-dev/prism 0.1.3 → 0.2.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/blocks/index.js +49 -9
- package/dist/blocks/index.js.map +1 -1
- package/dist/chunk-2FYNRDXR.js +192 -0
- package/dist/chunk-2FYNRDXR.js.map +1 -0
- package/dist/chunk-A2Z7NVGL.js +11496 -0
- package/dist/chunk-A2Z7NVGL.js.map +1 -0
- package/dist/{chunk-E3XANPTO.js → chunk-IZOIO7PA.js} +5 -191
- package/dist/{chunk-E3XANPTO.js.map → chunk-IZOIO7PA.js.map} +1 -1
- package/dist/{chunk-LAEY5USO.js → chunk-KTCWPGON.js} +55 -25
- package/dist/chunk-KTCWPGON.js.map +1 -0
- package/dist/{chunk-DXXZ3ITR.js → chunk-MEFT6XPH.js} +721 -455
- package/dist/chunk-MEFT6XPH.js.map +1 -0
- package/dist/{chunk-BTIT7WYH.js → chunk-SNKGGHBT.js} +2 -2
- package/dist/chunk-SNKGGHBT.js.map +1 -0
- package/dist/{chunk-UR6X3W5I.js → chunk-VAAIHNWQ.js} +3 -3
- package/dist/{chunk-UR6X3W5I.js.map → chunk-VAAIHNWQ.js.map} +1 -1
- package/dist/{chunk-GYDT5EKX.js → chunk-XQXGE2PW.js} +760 -472
- package/dist/chunk-XQXGE2PW.js.map +1 -0
- package/dist/{chunk-WC2WM2JD.js → chunk-XXP3ZGU6.js} +18 -8
- package/dist/chunk-XXP3ZGU6.js.map +1 -0
- package/dist/chunk-YJMAQL3S.js +1887 -0
- package/dist/chunk-YJMAQL3S.js.map +1 -0
- package/dist/cli/index.js +4 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/components/editor/index.d.ts +107 -0
- package/dist/components/editor/index.js +4 -0
- package/dist/components/editor/index.js.map +1 -0
- package/dist/components/index.css +131 -0
- package/dist/components/index.css.map +1 -0
- package/dist/components/index.d.ts +7073 -0
- package/dist/components/index.js +13 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components-BCGZ-Rwt.d.ts +142 -0
- package/dist/{config-BA6IeTq9.d.ts → config-Pct0n_Kq.d.ts} +2 -2
- package/dist/core/index.d.ts +20 -5
- package/dist/core/index.js +2 -2
- package/dist/hooks/index.d.ts +3 -2
- package/dist/hooks/index.js +4 -3
- package/dist/{index-odhPSv9I.d.ts → index-nmJ8Muwg.d.ts} +4 -127
- package/dist/index.d.ts +265 -6615
- package/dist/index.js +119 -11662
- package/dist/index.js.map +1 -1
- package/dist/layouts/index.js +1 -1
- package/dist/popover-Dmw7SJLR.d.ts +127 -0
- package/dist/registry/index.d.ts +2 -2
- package/dist/{registry-BrDNftd5.d.ts → registry-DQcIzW2s.d.ts} +2 -2
- package/dist/{settings-plpR26Xk.d.ts → settings-CAC0qFjS.d.ts} +2 -2
- package/dist/state/index.d.ts +2 -2
- package/dist/state/index.js +1 -1
- package/dist/text-transform-D6MzzF7V.d.ts +165 -0
- package/dist/theme/index.d.ts +2 -2
- package/dist/theme/index.js +2 -2
- package/dist/{theme-CrXLfP1c.d.ts → theme-B4Q3Bg5o.d.ts} +1 -1
- package/dist/types/index.d.ts +6 -145
- package/package.json +46 -40
- package/dist/chunk-BTIT7WYH.js.map +0 -1
- package/dist/chunk-DXXZ3ITR.js.map +0 -1
- package/dist/chunk-GYDT5EKX.js.map +0 -1
- package/dist/chunk-LAEY5USO.js.map +0 -1
- package/dist/chunk-WC2WM2JD.js.map +0 -1
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import { useIsClient } from './chunk-
|
|
2
|
-
import { PRESET_NAMES } from './chunk-
|
|
1
|
+
import { useIsClient } from './chunk-XXP3ZGU6.js';
|
|
2
|
+
import { PRESET_NAMES } from './chunk-MEFT6XPH.js';
|
|
3
3
|
import { useLayoutEffect, useEffect, useState, useRef, useCallback, useMemo, useSyncExternalStore } from 'react';
|
|
4
|
-
import Popover from '@mui/material/Popover';
|
|
5
|
-
import { styled, alpha } from '@mui/material/styles';
|
|
6
|
-
import { listClasses } from '@mui/material/List';
|
|
7
|
-
import { menuItemClasses } from '@mui/material/MenuItem';
|
|
8
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
9
4
|
|
|
10
5
|
function useAsync(asyncFn, options = {}) {
|
|
11
6
|
const { initialData = null, immediate = false, onSuccess, onError } = options;
|
|
@@ -416,187 +411,6 @@ function usePopoverHover(inputRef) {
|
|
|
416
411
|
setOpen
|
|
417
412
|
};
|
|
418
413
|
}
|
|
419
|
-
var POPOVER_DISTANCE = 0.75;
|
|
420
|
-
function calculateAnchorOrigin(arrow = "top-right") {
|
|
421
|
-
const configs = {
|
|
422
|
-
"top-left": {
|
|
423
|
-
paperStyles: { ml: -POPOVER_DISTANCE },
|
|
424
|
-
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
425
|
-
transformOrigin: { vertical: "top", horizontal: "left" }
|
|
426
|
-
},
|
|
427
|
-
"top-center": {
|
|
428
|
-
paperStyles: void 0,
|
|
429
|
-
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
430
|
-
transformOrigin: { vertical: "top", horizontal: "center" }
|
|
431
|
-
},
|
|
432
|
-
"top-right": {
|
|
433
|
-
paperStyles: { ml: POPOVER_DISTANCE },
|
|
434
|
-
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
435
|
-
transformOrigin: { vertical: "top", horizontal: "right" }
|
|
436
|
-
},
|
|
437
|
-
"bottom-left": {
|
|
438
|
-
paperStyles: { ml: -POPOVER_DISTANCE },
|
|
439
|
-
anchorOrigin: { vertical: "top", horizontal: "left" },
|
|
440
|
-
transformOrigin: { vertical: "bottom", horizontal: "left" }
|
|
441
|
-
},
|
|
442
|
-
"bottom-center": {
|
|
443
|
-
paperStyles: void 0,
|
|
444
|
-
anchorOrigin: { vertical: "top", horizontal: "center" },
|
|
445
|
-
transformOrigin: { vertical: "bottom", horizontal: "center" }
|
|
446
|
-
},
|
|
447
|
-
"bottom-right": {
|
|
448
|
-
paperStyles: { ml: POPOVER_DISTANCE },
|
|
449
|
-
anchorOrigin: { vertical: "top", horizontal: "right" },
|
|
450
|
-
transformOrigin: { vertical: "bottom", horizontal: "right" }
|
|
451
|
-
},
|
|
452
|
-
"left-top": {
|
|
453
|
-
paperStyles: { mt: -POPOVER_DISTANCE },
|
|
454
|
-
anchorOrigin: { vertical: "top", horizontal: "right" },
|
|
455
|
-
transformOrigin: { vertical: "top", horizontal: "left" }
|
|
456
|
-
},
|
|
457
|
-
"left-center": {
|
|
458
|
-
paperStyles: void 0,
|
|
459
|
-
anchorOrigin: { vertical: "center", horizontal: "right" },
|
|
460
|
-
transformOrigin: { vertical: "center", horizontal: "left" }
|
|
461
|
-
},
|
|
462
|
-
"left-bottom": {
|
|
463
|
-
paperStyles: { mt: POPOVER_DISTANCE },
|
|
464
|
-
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
465
|
-
transformOrigin: { vertical: "bottom", horizontal: "left" }
|
|
466
|
-
},
|
|
467
|
-
"right-top": {
|
|
468
|
-
paperStyles: { mt: -POPOVER_DISTANCE },
|
|
469
|
-
anchorOrigin: { vertical: "top", horizontal: "left" },
|
|
470
|
-
transformOrigin: { vertical: "top", horizontal: "right" }
|
|
471
|
-
},
|
|
472
|
-
"right-center": {
|
|
473
|
-
paperStyles: void 0,
|
|
474
|
-
anchorOrigin: { vertical: "center", horizontal: "left" },
|
|
475
|
-
transformOrigin: { vertical: "center", horizontal: "right" }
|
|
476
|
-
},
|
|
477
|
-
"right-bottom": {
|
|
478
|
-
paperStyles: { mt: POPOVER_DISTANCE },
|
|
479
|
-
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
480
|
-
transformOrigin: { vertical: "bottom", horizontal: "right" }
|
|
481
|
-
}
|
|
482
|
-
};
|
|
483
|
-
return configs[arrow] || configs["top-right"];
|
|
484
|
-
}
|
|
485
|
-
var Arrow = styled("span", {
|
|
486
|
-
shouldForwardProp: (prop) => prop !== "ownerState"
|
|
487
|
-
})(({ theme, ownerState }) => {
|
|
488
|
-
const { size, offset, placement } = ownerState;
|
|
489
|
-
const directions = {
|
|
490
|
-
top: { top: 0, rotate: "135deg", translate: "0 -50%" },
|
|
491
|
-
bottom: { bottom: 0, rotate: "-45deg", translate: "0 50%" },
|
|
492
|
-
left: { left: 0, rotate: "45deg", translate: "-50% 0" },
|
|
493
|
-
right: { right: 0, rotate: "-135deg", translate: "50% 0" }
|
|
494
|
-
};
|
|
495
|
-
const getDirection = () => {
|
|
496
|
-
if (placement.startsWith("top-")) return directions.top;
|
|
497
|
-
if (placement.startsWith("bottom-")) return directions.bottom;
|
|
498
|
-
if (placement.startsWith("left-")) return directions.left;
|
|
499
|
-
if (placement.startsWith("right-")) return directions.right;
|
|
500
|
-
return {};
|
|
501
|
-
};
|
|
502
|
-
const getPosition = () => {
|
|
503
|
-
if (placement.endsWith("-left")) return { left: offset };
|
|
504
|
-
if (placement.endsWith("-right")) return { right: offset };
|
|
505
|
-
if (placement.endsWith("-top")) return { top: offset };
|
|
506
|
-
if (placement.endsWith("-bottom")) return { bottom: offset };
|
|
507
|
-
if (placement.endsWith("-center")) {
|
|
508
|
-
if (placement.startsWith("top-") || placement.startsWith("bottom-")) {
|
|
509
|
-
return { left: 0, right: 0, margin: "auto" };
|
|
510
|
-
}
|
|
511
|
-
return { top: 0, bottom: 0, margin: "auto" };
|
|
512
|
-
}
|
|
513
|
-
return {};
|
|
514
|
-
};
|
|
515
|
-
return {
|
|
516
|
-
width: size,
|
|
517
|
-
height: size,
|
|
518
|
-
position: "absolute",
|
|
519
|
-
borderBottomLeftRadius: size / 4,
|
|
520
|
-
clipPath: "polygon(0% 0%, 100% 100%, 0% 100%)",
|
|
521
|
-
backgroundColor: theme.palette.background.paper,
|
|
522
|
-
border: `solid 1px ${alpha(theme.palette.grey[500], 0.12)}`,
|
|
523
|
-
...getDirection(),
|
|
524
|
-
...getPosition()
|
|
525
|
-
};
|
|
526
|
-
});
|
|
527
|
-
function CustomPopover({
|
|
528
|
-
open,
|
|
529
|
-
onClose,
|
|
530
|
-
children,
|
|
531
|
-
anchorEl,
|
|
532
|
-
arrow,
|
|
533
|
-
minWidth = 140,
|
|
534
|
-
slotProps,
|
|
535
|
-
...other
|
|
536
|
-
}) {
|
|
537
|
-
const arrowSize = arrow?.size ?? 14;
|
|
538
|
-
const arrowOffset = arrow?.offset ?? 17;
|
|
539
|
-
const arrowPlacement = arrow?.placement ?? "top-right";
|
|
540
|
-
const hideArrow = arrow?.hide ?? false;
|
|
541
|
-
const { paperStyles, anchorOrigin, transformOrigin } = calculateAnchorOrigin(arrowPlacement);
|
|
542
|
-
const isOpen = Boolean(open);
|
|
543
|
-
return /* @__PURE__ */ jsxs(
|
|
544
|
-
Popover,
|
|
545
|
-
{
|
|
546
|
-
open: isOpen,
|
|
547
|
-
anchorEl,
|
|
548
|
-
onClose,
|
|
549
|
-
anchorOrigin,
|
|
550
|
-
transformOrigin,
|
|
551
|
-
slotProps: {
|
|
552
|
-
...slotProps,
|
|
553
|
-
paper: {
|
|
554
|
-
...typeof slotProps?.paper === "object" ? slotProps.paper : {},
|
|
555
|
-
sx: [
|
|
556
|
-
paperStyles,
|
|
557
|
-
{
|
|
558
|
-
overflow: "inherit",
|
|
559
|
-
[`& .${listClasses.root}`]: { minWidth },
|
|
560
|
-
[`& .${menuItemClasses.root}`]: { gap: 2 }
|
|
561
|
-
},
|
|
562
|
-
...typeof slotProps?.paper === "object" && slotProps.paper && "sx" in slotProps.paper ? Array.isArray(slotProps.paper.sx) ? slotProps.paper.sx : [slotProps.paper.sx] : []
|
|
563
|
-
]
|
|
564
|
-
}
|
|
565
|
-
},
|
|
566
|
-
...other,
|
|
567
|
-
children: [
|
|
568
|
-
!hideArrow && /* @__PURE__ */ jsx(
|
|
569
|
-
Arrow,
|
|
570
|
-
{
|
|
571
|
-
ownerState: {
|
|
572
|
-
size: arrowSize,
|
|
573
|
-
offset: arrowOffset,
|
|
574
|
-
placement: arrowPlacement
|
|
575
|
-
},
|
|
576
|
-
sx: arrow?.sx
|
|
577
|
-
}
|
|
578
|
-
),
|
|
579
|
-
children
|
|
580
|
-
]
|
|
581
|
-
}
|
|
582
|
-
);
|
|
583
|
-
}
|
|
584
|
-
function usePopover() {
|
|
585
|
-
const [anchorEl, setAnchorEl] = useState(null);
|
|
586
|
-
const onOpen = useCallback((event) => {
|
|
587
|
-
setAnchorEl(event.currentTarget);
|
|
588
|
-
}, []);
|
|
589
|
-
const onClose = useCallback(() => {
|
|
590
|
-
setAnchorEl(null);
|
|
591
|
-
}, []);
|
|
592
|
-
return {
|
|
593
|
-
open: Boolean(anchorEl),
|
|
594
|
-
anchorEl,
|
|
595
|
-
onOpen,
|
|
596
|
-
onClose,
|
|
597
|
-
setAnchorEl
|
|
598
|
-
};
|
|
599
|
-
}
|
|
600
414
|
|
|
601
415
|
// src/utils/cookies.ts
|
|
602
416
|
function cookiesAvailable() {
|
|
@@ -2314,6 +2128,6 @@ function useInfiniteScroll(fetchFn, options = {}) {
|
|
|
2314
2128
|
};
|
|
2315
2129
|
}
|
|
2316
2130
|
|
|
2317
|
-
export {
|
|
2318
|
-
//# sourceMappingURL=chunk-
|
|
2319
|
-
//# sourceMappingURL=chunk-
|
|
2131
|
+
export { cookiesAvailable, getCookie, removeCookie, setCookie, useArray, useAsync, useAsyncFn, useBackToTop, useBreakpoint, useBreakpointChecks, useClientRect, useConfigFromQuery, useCookies, useCountdownDate, useCountdownSeconds, useDoubleClick, useEnterKey, useEscapeKey, useFocusTrap, useImageDimensions, useInfiniteScroll, useIntersectionObserver, useIsomorphicLayoutEffect, useKeyboardShortcut, useLazyQuery, useMultipleImageDimensions, useMutation, useOnlineStatus, usePasswordVisibility, usePopoverHover, useResponsiveQuery, useScrollLock, useScrollOffsetTop, useScrollPosition, useScrollToTop, useSessionStorage, useThrottle, useThrottleCallback, useUpdateEffect, useUpdateLayoutEffect, useWindowSize };
|
|
2132
|
+
//# sourceMappingURL=chunk-IZOIO7PA.js.map
|
|
2133
|
+
//# sourceMappingURL=chunk-IZOIO7PA.js.map
|