@sia.soul/sia-react-ui 0.1.159 → 0.1.162
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/{Select-DIdEbGwf.d.cts → Select-Dxevc0f6.d.cts} +1 -1
- package/dist/{Select-BCVUoK0I.d.ts → Select-tsENCXQI.d.ts} +1 -1
- package/dist/chart.cjs +9 -9
- package/dist/chart.js +5 -5
- package/dist/{chunk-6PIZGTNT.js → chunk-33WX54AU.js} +5 -5
- package/dist/{chunk-PU2V3VB5.js → chunk-4B7ATL6J.js} +1 -1
- package/dist/{chunk-XXFYFLZA.js → chunk-5WZR2RHA.js} +2 -2
- package/dist/{chunk-YO5OJQEH.js → chunk-CRA7VNOA.js} +1 -1
- package/dist/{chunk-ZIH5VLPT.js → chunk-KA3M4TE4.js} +2 -2
- package/dist/{chunk-6SSZVJO4.js → chunk-M4IASLGB.js} +3 -3
- package/dist/{chunk-UGCKRFZN.js → chunk-MXK6TKMO.js} +5 -5
- package/dist/{chunk-CDMCXNRK.js → chunk-Q3LEK2TL.js} +599 -270
- package/dist/{chunk-NRLIOMXY.js → chunk-UL54A2YN.js} +2 -2
- package/dist/{chunk-4CFFAKIJ.js → chunk-UPXL2QLJ.js} +6 -6
- package/dist/{chunk-SRWUDTCS.js → chunk-WMZYYPIW.js} +9 -9
- package/dist/{chunk-PJCO6PPW.js → chunk-ZNPNZD6O.js} +30 -15
- package/dist/{core-sU1bV7QH.d.ts → core-XtqUDbbD.d.ts} +5 -5
- package/dist/{core-B26pkBp_.d.cts → core-r-smfiNN.d.cts} +5 -5
- package/dist/core.cjs +27 -13
- package/dist/core.css +170 -22
- package/dist/core.d.cts +2 -2
- package/dist/core.d.ts +2 -2
- package/dist/core.js +8 -8
- package/dist/game.cjs +9 -9
- package/dist/game.js +3 -3
- package/dist/index.cjs +664 -320
- package/dist/index.css +170 -22
- package/dist/index.d.cts +13 -8
- package/dist/index.d.ts +13 -8
- package/dist/index.js +60 -59
- package/dist/markdown-editor.cjs +9 -9
- package/dist/markdown-editor.js +3 -3
- package/dist/rich-text-editor.cjs +40 -13
- package/dist/rich-text-editor.js +7 -7
- package/dist/{select-date-range-DYrA87Tl.d.ts → select-date-range-CIXBuoef.d.ts} +8 -9
- package/dist/{select-date-range-CIwE5nFu.d.cts → select-date-range-Cbh37zmU.d.cts} +8 -9
- package/dist/select-date-range.cjs +598 -269
- package/dist/select-date-range.d.cts +2 -2
- package/dist/select-date-range.d.ts +2 -2
- package/dist/select-date-range.js +8 -8
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -7370,24 +7370,35 @@ body:has(.sia-window-frame[data-sia-text-selectable=false]) img {
|
|
|
7370
7370
|
box-shadow: var(--sia-shadow-popup);
|
|
7371
7371
|
scrollbar-width: thin;
|
|
7372
7372
|
}
|
|
7373
|
-
.sia-date-panel--with-time {
|
|
7374
|
-
width: max-content;
|
|
7375
|
-
}
|
|
7376
7373
|
.sia-date-panel--with-presets {
|
|
7377
7374
|
width: max-content;
|
|
7378
7375
|
}
|
|
7379
|
-
.sia-date-panel--with-presets.sia-date-panel--with-time {
|
|
7380
|
-
width: max-content;
|
|
7381
|
-
}
|
|
7382
7376
|
.sia-date-panel--range {
|
|
7383
7377
|
width: max-content;
|
|
7384
7378
|
}
|
|
7385
7379
|
.sia-date-panel--range.sia-date-panel--with-presets {
|
|
7386
7380
|
width: max-content;
|
|
7387
7381
|
}
|
|
7388
|
-
.sia-date-panel--
|
|
7382
|
+
.sia-date-panel--datetime {
|
|
7383
|
+
width: 282px;
|
|
7384
|
+
}
|
|
7385
|
+
.sia-date-panel--datetime.sia-date-panel--with-presets {
|
|
7389
7386
|
width: max-content;
|
|
7390
7387
|
}
|
|
7388
|
+
.sia-date-panel--datetime.sia-date-panel--with-presets {
|
|
7389
|
+
display: grid;
|
|
7390
|
+
grid-template-columns: 145px minmax(0, 1fr);
|
|
7391
|
+
grid-template-rows: auto auto;
|
|
7392
|
+
}
|
|
7393
|
+
.sia-date-panel--datetime.sia-date-panel--with-presets .sia-date-panel__body {
|
|
7394
|
+
display: contents;
|
|
7395
|
+
}
|
|
7396
|
+
.sia-date-panel--datetime.sia-date-panel--with-presets .sia-date-panel__presets {
|
|
7397
|
+
grid-row: 1 / span 2;
|
|
7398
|
+
}
|
|
7399
|
+
.sia-date-panel--datetime.sia-date-panel--with-presets .sia-date-panel__footer {
|
|
7400
|
+
grid-column: 2;
|
|
7401
|
+
}
|
|
7391
7402
|
.sia-date-panel__body {
|
|
7392
7403
|
display: flex;
|
|
7393
7404
|
min-width: 0;
|
|
@@ -7423,21 +7434,6 @@ body:has(.sia-window-frame[data-sia-text-selectable=false]) img {
|
|
|
7423
7434
|
.sia-date-panel__range-calendars > .sia-date-panel__calendar + .sia-date-panel__calendar {
|
|
7424
7435
|
border-inline-start: 1px solid var(--sia-color-border);
|
|
7425
7436
|
}
|
|
7426
|
-
.sia-date-panel__range-date-time {
|
|
7427
|
-
display: flex;
|
|
7428
|
-
min-width: 0;
|
|
7429
|
-
}
|
|
7430
|
-
.sia-date-panel__range-date-time-group {
|
|
7431
|
-
display: flex;
|
|
7432
|
-
min-width: 0;
|
|
7433
|
-
box-shadow: inset 0 2px transparent;
|
|
7434
|
-
}
|
|
7435
|
-
.sia-date-panel__range-date-time-group.is-active {
|
|
7436
|
-
box-shadow: inset 0 2px var(--sia-color-primary);
|
|
7437
|
-
}
|
|
7438
|
-
.sia-date-panel__range-date-time-group + .sia-date-panel__range-date-time-group {
|
|
7439
|
-
border-inline-start: 1px solid var(--sia-color-border);
|
|
7440
|
-
}
|
|
7441
7437
|
.sia-date-panel__header {
|
|
7442
7438
|
display: grid;
|
|
7443
7439
|
grid-template-columns: 56px 1fr 56px;
|
|
@@ -7463,6 +7459,35 @@ body:has(.sia-window-frame[data-sia-text-selectable=false]) img {
|
|
|
7463
7459
|
font-size: 12px;
|
|
7464
7460
|
font-weight: 600;
|
|
7465
7461
|
}
|
|
7462
|
+
.sia-date-panel__header > .sia-date-panel__title {
|
|
7463
|
+
display: flex;
|
|
7464
|
+
align-items: center;
|
|
7465
|
+
justify-content: center;
|
|
7466
|
+
gap: 7px;
|
|
7467
|
+
min-width: 0;
|
|
7468
|
+
padding: 5px 9px;
|
|
7469
|
+
color: var(--sia-color-text);
|
|
7470
|
+
font: inherit;
|
|
7471
|
+
font-weight: inherit;
|
|
7472
|
+
text-align: center;
|
|
7473
|
+
white-space: nowrap;
|
|
7474
|
+
cursor: pointer;
|
|
7475
|
+
background: transparent;
|
|
7476
|
+
border: 0;
|
|
7477
|
+
border-radius: 6px;
|
|
7478
|
+
}
|
|
7479
|
+
.sia-date-panel__header > .sia-date-panel__title small {
|
|
7480
|
+
padding: 2px 5px;
|
|
7481
|
+
color: var(--sia-color-primary-text);
|
|
7482
|
+
background: color-mix(in srgb, var(--sia-color-primary) 10%, transparent);
|
|
7483
|
+
border-radius: 4px;
|
|
7484
|
+
font-size: 12px;
|
|
7485
|
+
font-weight: 600;
|
|
7486
|
+
}
|
|
7487
|
+
.sia-date-panel__header > .sia-date-panel__title:hover {
|
|
7488
|
+
color: var(--sia-color-primary-text);
|
|
7489
|
+
background: var(--sia-color-control-hover);
|
|
7490
|
+
}
|
|
7466
7491
|
.sia-date-panel__nav {
|
|
7467
7492
|
display: flex;
|
|
7468
7493
|
align-items: center;
|
|
@@ -7492,11 +7517,14 @@ body:has(.sia-window-frame[data-sia-text-selectable=false]) img {
|
|
|
7492
7517
|
}
|
|
7493
7518
|
.sia-date-panel__month {
|
|
7494
7519
|
padding: 12px 14px 14px;
|
|
7520
|
+
touch-action: pan-y;
|
|
7521
|
+
user-select: none;
|
|
7495
7522
|
}
|
|
7496
7523
|
.sia-date-panel__weekdays,
|
|
7497
7524
|
.sia-date-panel__days {
|
|
7498
7525
|
display: grid;
|
|
7499
7526
|
grid-template-columns: repeat(7, 1fr);
|
|
7527
|
+
gap: 4px;
|
|
7500
7528
|
}
|
|
7501
7529
|
.sia-date-panel__weekdays {
|
|
7502
7530
|
margin-bottom: 6px;
|
|
@@ -7583,6 +7611,9 @@ body:has(.sia-window-frame[data-sia-text-selectable=false]) img {
|
|
|
7583
7611
|
place-items: center;
|
|
7584
7612
|
border-bottom: 1px solid var(--sia-color-border);
|
|
7585
7613
|
}
|
|
7614
|
+
.sia-date-panel__time > .sia-date-panel__time-title {
|
|
7615
|
+
font-weight: 600;
|
|
7616
|
+
}
|
|
7586
7617
|
.sia-date-panel__time-columns {
|
|
7587
7618
|
display: grid;
|
|
7588
7619
|
grid-auto-flow: column;
|
|
@@ -7590,10 +7621,60 @@ body:has(.sia-window-frame[data-sia-text-selectable=false]) img {
|
|
|
7590
7621
|
height: 280px;
|
|
7591
7622
|
overflow: hidden;
|
|
7592
7623
|
}
|
|
7624
|
+
.sia-date-panel__views {
|
|
7625
|
+
position: relative;
|
|
7626
|
+
flex: 0 0 280px;
|
|
7627
|
+
min-width: 0;
|
|
7628
|
+
overflow: hidden;
|
|
7629
|
+
}
|
|
7630
|
+
.sia-date-panel__view {
|
|
7631
|
+
min-width: 0;
|
|
7632
|
+
pointer-events: none;
|
|
7633
|
+
transition: transform 220ms cubic-bezier(.2, .7, .2, 1), visibility 0s 220ms;
|
|
7634
|
+
}
|
|
7635
|
+
.sia-date-panel__view.is-active {
|
|
7636
|
+
pointer-events: auto;
|
|
7637
|
+
visibility: visible;
|
|
7638
|
+
transform: translateX(0);
|
|
7639
|
+
transition: transform 220ms cubic-bezier(.2, .7, .2, 1);
|
|
7640
|
+
}
|
|
7641
|
+
.sia-date-panel__view--date:not(.is-active) {
|
|
7642
|
+
visibility: hidden;
|
|
7643
|
+
transform: translateX(-100%);
|
|
7644
|
+
}
|
|
7645
|
+
.sia-date-panel__view--time {
|
|
7646
|
+
position: absolute;
|
|
7647
|
+
inset: 0;
|
|
7648
|
+
}
|
|
7649
|
+
.sia-date-panel__view--time:not(.is-active) {
|
|
7650
|
+
visibility: hidden;
|
|
7651
|
+
transform: translateX(100%);
|
|
7652
|
+
}
|
|
7653
|
+
.sia-date-panel__view--time .sia-date-panel__time {
|
|
7654
|
+
height: 100%;
|
|
7655
|
+
flex: none;
|
|
7656
|
+
border-inline-start: 0;
|
|
7657
|
+
}
|
|
7658
|
+
.sia-date-panel__view--time .sia-date-panel__time-columns {
|
|
7659
|
+
grid-auto-columns: 1fr;
|
|
7660
|
+
height: auto;
|
|
7661
|
+
min-height: 0;
|
|
7662
|
+
}
|
|
7663
|
+
@media (prefers-reduced-motion: reduce) {
|
|
7664
|
+
.sia-date-panel__view {
|
|
7665
|
+
transition: none;
|
|
7666
|
+
}
|
|
7667
|
+
}
|
|
7593
7668
|
.sia-date-panel__time-columns > div {
|
|
7594
7669
|
height: 100%;
|
|
7595
7670
|
overflow: auto;
|
|
7596
7671
|
padding: 4px;
|
|
7672
|
+
touch-action: none;
|
|
7673
|
+
user-select: none;
|
|
7674
|
+
cursor: grab;
|
|
7675
|
+
}
|
|
7676
|
+
.sia-date-panel__time-columns > div:active {
|
|
7677
|
+
cursor: grabbing;
|
|
7597
7678
|
}
|
|
7598
7679
|
.sia-date-panel__time-columns > div + div {
|
|
7599
7680
|
border-inline-start: 1px solid var(--sia-color-border);
|
|
@@ -7667,6 +7748,67 @@ body:has(.sia-window-frame[data-sia-text-selectable=false]) img {
|
|
|
7667
7748
|
.sia-date-panel__range-error {
|
|
7668
7749
|
color: var(--sia-color-error);
|
|
7669
7750
|
}
|
|
7751
|
+
.sia-date-panel__footer button.sia-date-panel__chip {
|
|
7752
|
+
display: inline-flex;
|
|
7753
|
+
align-items: center;
|
|
7754
|
+
gap: 6px;
|
|
7755
|
+
min-width: 0;
|
|
7756
|
+
min-height: 30px;
|
|
7757
|
+
padding: 3px 9px;
|
|
7758
|
+
color: var(--sia-color-text);
|
|
7759
|
+
font-variant-numeric: tabular-nums;
|
|
7760
|
+
white-space: nowrap;
|
|
7761
|
+
cursor: pointer;
|
|
7762
|
+
background: transparent;
|
|
7763
|
+
border: 0;
|
|
7764
|
+
border-radius: 6px;
|
|
7765
|
+
transition: background-color 160ms ease, color 160ms ease;
|
|
7766
|
+
}
|
|
7767
|
+
.sia-date-panel__footer .sia-date-panel__chip .sia-icon {
|
|
7768
|
+
flex-shrink: 0;
|
|
7769
|
+
color: var(--sia-color-text-secondary);
|
|
7770
|
+
}
|
|
7771
|
+
.sia-date-panel__footer button.sia-date-panel__chip:hover {
|
|
7772
|
+
color: var(--sia-color-text);
|
|
7773
|
+
background: var(--sia-color-control-hover);
|
|
7774
|
+
}
|
|
7775
|
+
.sia-date-panel__footer button.sia-date-panel__chip[aria-pressed=true] {
|
|
7776
|
+
color: var(--sia-color-primary-text);
|
|
7777
|
+
background: color-mix(in srgb, var(--sia-color-primary) 10%, transparent);
|
|
7778
|
+
}
|
|
7779
|
+
.sia-date-panel__footer button.sia-date-panel__chip[aria-pressed=true] .sia-icon {
|
|
7780
|
+
color: var(--sia-color-primary-text);
|
|
7781
|
+
}
|
|
7782
|
+
.sia-date-panel__footer button.sia-date-panel__chip:disabled {
|
|
7783
|
+
cursor: not-allowed;
|
|
7784
|
+
opacity: .45;
|
|
7785
|
+
}
|
|
7786
|
+
.sia-date-panel__footer button.sia-date-panel__chip:disabled:hover {
|
|
7787
|
+
color: var(--sia-color-text);
|
|
7788
|
+
background: transparent;
|
|
7789
|
+
}
|
|
7790
|
+
.sia-date-panel__footer button.sia-date-panel__chip--time.is-clearable {
|
|
7791
|
+
position: relative;
|
|
7792
|
+
padding-inline-end: 24px;
|
|
7793
|
+
}
|
|
7794
|
+
.sia-date-panel__chip-clear {
|
|
7795
|
+
position: absolute;
|
|
7796
|
+
inset-block: 0;
|
|
7797
|
+
inset-inline-end: 3px;
|
|
7798
|
+
display: none;
|
|
7799
|
+
place-items: center;
|
|
7800
|
+
padding: 2px;
|
|
7801
|
+
color: var(--sia-color-text-secondary);
|
|
7802
|
+
cursor: pointer;
|
|
7803
|
+
border-radius: 50%;
|
|
7804
|
+
}
|
|
7805
|
+
.sia-date-panel__chip--time:hover .sia-date-panel__chip-clear,
|
|
7806
|
+
.sia-date-panel__chip-clear:focus-visible {
|
|
7807
|
+
display: grid;
|
|
7808
|
+
}
|
|
7809
|
+
.sia-date-panel__chip-clear:hover {
|
|
7810
|
+
color: var(--sia-color-text);
|
|
7811
|
+
}
|
|
7670
7812
|
.sia-tree-select {
|
|
7671
7813
|
position: relative;
|
|
7672
7814
|
display: inline-block;
|
|
@@ -8811,6 +8953,12 @@ body:has(.sia-window-frame[data-sia-text-selectable=false]) img {
|
|
|
8811
8953
|
background: transparent;
|
|
8812
8954
|
border: 0;
|
|
8813
8955
|
}
|
|
8956
|
+
.sia-dropdown__popup > .sia-menu,
|
|
8957
|
+
.sia-dropdown__popup > .sia-dropdown__menu {
|
|
8958
|
+
max-height: max(120px, calc(var(--sia-popup-available-height, calc(100vh - 16px)) - 10px));
|
|
8959
|
+
overflow-x: hidden;
|
|
8960
|
+
overflow-y: var(--sia-scroll-overflow, auto);
|
|
8961
|
+
}
|
|
8814
8962
|
.sia-dropdown__menu .sia-menu__item,
|
|
8815
8963
|
.sia-menu__popup .sia-menu__item {
|
|
8816
8964
|
font-size: inherit;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, MouseEvent, Key, PointerEvent, Ref, ReactElement, ButtonHTMLAttributes, VideoHTMLAttributes } from 'react';
|
|
3
|
-
import { T as TagStatus, B as BadgeProps } from './core-
|
|
4
|
-
export { a as Badge, b as BadgeRibbonProps, c as BadgeStatus, d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, C as Calendar, g as CalendarProps, h as Card, i as CardAccent, j as CardProps, k as Carousel, l as CarouselProps, m as CarouselRef, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, D as Dropdown, r as DropdownButtonProps, s as DropdownMenuProps, t as DropdownOpenSource, u as DropdownPlacement, v as DropdownProps, w as DropdownTrigger, F as FILLED_ICON_NAMES, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, H as FloatingPlacement, I as FloatingScrollbarProvider, J as FloatingScrollbarProviderProps, K as FloatingTrigger, L as ICON_NAMES, M as Icon, N as IconName, O as IconProps, P as IconVariant, Q as Image, R as ImagePreview, S as ImagePreviewConfig, U as ImagePreviewGroup, V as ImagePreviewGroupProps, W as ImagePreviewProps, X as ImageProps, Y as Input, Z as InputProps, _ as Menu, $ as MenuClickInfo, a0 as MenuItem, a1 as MenuMode, a2 as MenuProps, a3 as MenuTheme, a4 as MessageConfig, a5 as MessageHandle, a6 as MessageKey, a7 as MessageType, a8 as NotificationConfig, a9 as NotificationPlacement, aa as NotificationType, ab as Popconfirm, ac as PopconfirmProps, ad as Popover, ae as PopoverProps, af as Progress, ag as ProgressProps, ah as ProgressStatus, ai as Rate, aj as RateProps, ak as Result, al as ResultProps, am as ResultStatus, an as Segmented, ao as SegmentedOption, ap as SegmentedProps, aq as SegmentedValue, ar as Skeleton, as as SkeletonProps, at as Spin, au as SpinProps, av as StepItem, aw as StepStatus, ax as Steps, ay as StepsProps, az as TabItem, aA as Tabs, aB as TabsContextMenuClickInfo, aC as TabsOrientation, aD as TabsPosition, aE as TabsProps, aF as TabsType, aG as Tag, aH as TagProps, aI as TagSize, aJ as TagVariant, aK as Timeline, aL as TimelineItem, aM as TimelineProps, aN as Toolbar, aO as ToolbarItem, aP as ToolbarProps, aQ as Tooltip, aR as TooltipProps, aS as Tour, aT as TourProps, aU as TourStep, aV as Tree, aW as TreeDropPosition, aX as TreeKey, aY as TreeNode, aZ as TreeProps, a_ as Typography, a$ as TypographyLinkProps, b0 as TypographyProps, b1 as TypographyTitleProps, b2 as TypographyType, b3 as Upload, b4 as UploadChangeInfo, b5 as UploadDraggerProps, b6 as UploadFile, b7 as UploadFileStatus, b8 as UploadHttpRequest, b9 as UploadItemActions, ba as UploadProps, bb as UploadRef, bc as UploadRejectInfo, bd as UploadRequestHandle, be as UploadRequestOptions, bf as Watermark, bg as WatermarkFont, bh as WatermarkProps, bi as message, bj as notification } from './core-
|
|
3
|
+
import { T as TagStatus, B as BadgeProps } from './core-r-smfiNN.cjs';
|
|
4
|
+
export { a as Badge, b as BadgeRibbonProps, c as BadgeStatus, d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, C as Calendar, g as CalendarProps, h as Card, i as CardAccent, j as CardProps, k as Carousel, l as CarouselProps, m as CarouselRef, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, D as Dropdown, r as DropdownButtonProps, s as DropdownMenuProps, t as DropdownOpenSource, u as DropdownPlacement, v as DropdownProps, w as DropdownTrigger, F as FILLED_ICON_NAMES, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, H as FloatingPlacement, I as FloatingScrollbarProvider, J as FloatingScrollbarProviderProps, K as FloatingTrigger, L as ICON_NAMES, M as Icon, N as IconName, O as IconProps, P as IconVariant, Q as Image, R as ImagePreview, S as ImagePreviewConfig, U as ImagePreviewGroup, V as ImagePreviewGroupProps, W as ImagePreviewProps, X as ImageProps, Y as Input, Z as InputProps, _ as Menu, $ as MenuClickInfo, a0 as MenuItem, a1 as MenuMode, a2 as MenuProps, a3 as MenuTheme, a4 as MessageConfig, a5 as MessageHandle, a6 as MessageKey, a7 as MessageType, a8 as NotificationConfig, a9 as NotificationPlacement, aa as NotificationType, ab as Popconfirm, ac as PopconfirmProps, ad as Popover, ae as PopoverProps, af as Progress, ag as ProgressProps, ah as ProgressStatus, ai as Rate, aj as RateProps, ak as Result, al as ResultProps, am as ResultStatus, an as Segmented, ao as SegmentedOption, ap as SegmentedProps, aq as SegmentedValue, ar as Skeleton, as as SkeletonProps, at as Spin, au as SpinProps, av as StepItem, aw as StepStatus, ax as Steps, ay as StepsProps, az as TabItem, aA as Tabs, aB as TabsContextMenuClickInfo, aC as TabsOrientation, aD as TabsPosition, aE as TabsProps, aF as TabsType, aG as Tag, aH as TagProps, aI as TagSize, aJ as TagVariant, aK as Timeline, aL as TimelineItem, aM as TimelineProps, aN as Toolbar, aO as ToolbarItem, aP as ToolbarProps, aQ as Tooltip, aR as TooltipProps, aS as Tour, aT as TourProps, aU as TourStep, aV as Tree, aW as TreeDropPosition, aX as TreeKey, aY as TreeNode, aZ as TreeProps, a_ as Typography, a$ as TypographyLinkProps, b0 as TypographyProps, b1 as TypographyTitleProps, b2 as TypographyType, b3 as Upload, b4 as UploadChangeInfo, b5 as UploadDraggerProps, b6 as UploadFile, b7 as UploadFileStatus, b8 as UploadHttpRequest, b9 as UploadItemActions, ba as UploadProps, bb as UploadRef, bc as UploadRejectInfo, bd as UploadRequestHandle, be as UploadRequestOptions, bf as Watermark, bg as WatermarkFont, bh as WatermarkProps, bi as message, bj as notification } from './core-r-smfiNN.cjs';
|
|
5
5
|
import { C as ControlSize, I as InputPlaceholderMode, a as ControlStatus } from './shared-Bx4B28Wh.cjs';
|
|
6
6
|
import { B as ButtonProps, a as ButtonSize } from './Button-xLR4Yt57.cjs';
|
|
7
7
|
export { b as Button, c as ButtonVariant } from './Button-xLR4Yt57.cjs';
|
|
8
|
-
import { O as OverlayContainer, a as OverlayApiHandle, M as ModalOpenConfig, S as SelectOption, b as SelectChangeValue, c as SelectProps, d as ModalActionResult } from './Select-
|
|
9
|
-
export { e as Modal, f as ModalProps, g as ModalType, h as Select, i as SelectMode, j as SelectValue } from './Select-
|
|
10
|
-
export { D as DatePicker, a as DatePickerDisabledInfo, b as DatePickerPreset, c as DatePickerProps, d as DatePickerShowTime, e as DatePickerType, f as DatePickerValue, g as DateRangePickerPreset, h as DateRangePickerProps, S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-
|
|
8
|
+
import { O as OverlayContainer, a as OverlayApiHandle, M as ModalOpenConfig, S as SelectOption, b as SelectChangeValue, c as SelectProps, d as ModalActionResult } from './Select-Dxevc0f6.cjs';
|
|
9
|
+
export { e as Modal, f as ModalProps, g as ModalType, h as Select, i as SelectMode, j as SelectValue } from './Select-Dxevc0f6.cjs';
|
|
10
|
+
export { D as DatePicker, a as DatePickerDisabledInfo, b as DatePickerPreset, c as DatePickerProps, d as DatePickerShowTime, e as DatePickerType, f as DatePickerValue, g as DateRangePickerPreset, h as DateRangePickerProps, S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-Cbh37zmU.cjs';
|
|
11
11
|
export { RichTextContent, RichTextContentFormat, RichTextContentProps, RichTextEditor, RichTextEditorProps, RichTextImagePasteHandler, RichTextToolbar } from './rich-text-editor.cjs';
|
|
12
12
|
export { MarkdownEditor, MarkdownEditorMode, MarkdownEditorProps } from './markdown-editor.cjs';
|
|
13
13
|
import * as Monaco from 'monaco-editor';
|
|
@@ -1725,15 +1725,18 @@ interface EditorCompletionItem {
|
|
|
1725
1725
|
}
|
|
1726
1726
|
/** 根据编辑器上下文生成补全候选项的函数。 */
|
|
1727
1727
|
type EditorCompletionProvider = (context: EditorCompletionContext) => readonly EditorCompletionItem[] | Promise<readonly EditorCompletionItem[]>;
|
|
1728
|
-
/**
|
|
1729
|
-
|
|
1728
|
+
/**
|
|
1729
|
+
* 编辑器右键菜单可直接调用的内置命令名称。
|
|
1730
|
+
* `undo` 撤销最近一次可撤销编辑,其他取值分别执行剪切、复制、粘贴和全选。
|
|
1731
|
+
*/
|
|
1732
|
+
type EditorCommand = "undo" | "cut" | "copy" | "paste" | "selectAll";
|
|
1730
1733
|
/** EditorContextMenu的项目定义。 */
|
|
1731
1734
|
interface EditorContextMenuItem {
|
|
1732
1735
|
/** 唯一标识;同一集合内应保持唯一且稳定,用于定位、渲染和状态关联。 */
|
|
1733
1736
|
key: string;
|
|
1734
1737
|
/** 展示给用户的名称,可传入文本或 React 节点。 */
|
|
1735
1738
|
label: string;
|
|
1736
|
-
/**
|
|
1739
|
+
/** 点击菜单项时执行的编辑器内置命令;与 `onClick` 同时设置时优先执行此命令。 */
|
|
1737
1740
|
command?: EditorCommand;
|
|
1738
1741
|
/** 显示或绑定的快捷键。 */
|
|
1739
1742
|
shortcut?: string;
|
|
@@ -1746,6 +1749,8 @@ interface EditorContextMenuItem {
|
|
|
1746
1749
|
interface EditorHandle {
|
|
1747
1750
|
/** 将焦点移入控件。 */
|
|
1748
1751
|
focus(): void;
|
|
1752
|
+
/** 返回当前模型是否存在可撤销的编辑记录;只读操作和已清空的撤销栈返回 `false`。 */
|
|
1753
|
+
canUndo(): boolean;
|
|
1749
1754
|
/** 读取当前内容。 */
|
|
1750
1755
|
getValue(): string;
|
|
1751
1756
|
/** 读取当前选区范围。 */
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, MouseEvent, Key, PointerEvent, Ref, ReactElement, ButtonHTMLAttributes, VideoHTMLAttributes } from 'react';
|
|
3
|
-
import { T as TagStatus, B as BadgeProps } from './core-
|
|
4
|
-
export { a as Badge, b as BadgeRibbonProps, c as BadgeStatus, d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, C as Calendar, g as CalendarProps, h as Card, i as CardAccent, j as CardProps, k as Carousel, l as CarouselProps, m as CarouselRef, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, D as Dropdown, r as DropdownButtonProps, s as DropdownMenuProps, t as DropdownOpenSource, u as DropdownPlacement, v as DropdownProps, w as DropdownTrigger, F as FILLED_ICON_NAMES, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, H as FloatingPlacement, I as FloatingScrollbarProvider, J as FloatingScrollbarProviderProps, K as FloatingTrigger, L as ICON_NAMES, M as Icon, N as IconName, O as IconProps, P as IconVariant, Q as Image, R as ImagePreview, S as ImagePreviewConfig, U as ImagePreviewGroup, V as ImagePreviewGroupProps, W as ImagePreviewProps, X as ImageProps, Y as Input, Z as InputProps, _ as Menu, $ as MenuClickInfo, a0 as MenuItem, a1 as MenuMode, a2 as MenuProps, a3 as MenuTheme, a4 as MessageConfig, a5 as MessageHandle, a6 as MessageKey, a7 as MessageType, a8 as NotificationConfig, a9 as NotificationPlacement, aa as NotificationType, ab as Popconfirm, ac as PopconfirmProps, ad as Popover, ae as PopoverProps, af as Progress, ag as ProgressProps, ah as ProgressStatus, ai as Rate, aj as RateProps, ak as Result, al as ResultProps, am as ResultStatus, an as Segmented, ao as SegmentedOption, ap as SegmentedProps, aq as SegmentedValue, ar as Skeleton, as as SkeletonProps, at as Spin, au as SpinProps, av as StepItem, aw as StepStatus, ax as Steps, ay as StepsProps, az as TabItem, aA as Tabs, aB as TabsContextMenuClickInfo, aC as TabsOrientation, aD as TabsPosition, aE as TabsProps, aF as TabsType, aG as Tag, aH as TagProps, aI as TagSize, aJ as TagVariant, aK as Timeline, aL as TimelineItem, aM as TimelineProps, aN as Toolbar, aO as ToolbarItem, aP as ToolbarProps, aQ as Tooltip, aR as TooltipProps, aS as Tour, aT as TourProps, aU as TourStep, aV as Tree, aW as TreeDropPosition, aX as TreeKey, aY as TreeNode, aZ as TreeProps, a_ as Typography, a$ as TypographyLinkProps, b0 as TypographyProps, b1 as TypographyTitleProps, b2 as TypographyType, b3 as Upload, b4 as UploadChangeInfo, b5 as UploadDraggerProps, b6 as UploadFile, b7 as UploadFileStatus, b8 as UploadHttpRequest, b9 as UploadItemActions, ba as UploadProps, bb as UploadRef, bc as UploadRejectInfo, bd as UploadRequestHandle, be as UploadRequestOptions, bf as Watermark, bg as WatermarkFont, bh as WatermarkProps, bi as message, bj as notification } from './core-
|
|
3
|
+
import { T as TagStatus, B as BadgeProps } from './core-XtqUDbbD.js';
|
|
4
|
+
export { a as Badge, b as BadgeRibbonProps, c as BadgeStatus, d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, C as Calendar, g as CalendarProps, h as Card, i as CardAccent, j as CardProps, k as Carousel, l as CarouselProps, m as CarouselRef, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, D as Dropdown, r as DropdownButtonProps, s as DropdownMenuProps, t as DropdownOpenSource, u as DropdownPlacement, v as DropdownProps, w as DropdownTrigger, F as FILLED_ICON_NAMES, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, H as FloatingPlacement, I as FloatingScrollbarProvider, J as FloatingScrollbarProviderProps, K as FloatingTrigger, L as ICON_NAMES, M as Icon, N as IconName, O as IconProps, P as IconVariant, Q as Image, R as ImagePreview, S as ImagePreviewConfig, U as ImagePreviewGroup, V as ImagePreviewGroupProps, W as ImagePreviewProps, X as ImageProps, Y as Input, Z as InputProps, _ as Menu, $ as MenuClickInfo, a0 as MenuItem, a1 as MenuMode, a2 as MenuProps, a3 as MenuTheme, a4 as MessageConfig, a5 as MessageHandle, a6 as MessageKey, a7 as MessageType, a8 as NotificationConfig, a9 as NotificationPlacement, aa as NotificationType, ab as Popconfirm, ac as PopconfirmProps, ad as Popover, ae as PopoverProps, af as Progress, ag as ProgressProps, ah as ProgressStatus, ai as Rate, aj as RateProps, ak as Result, al as ResultProps, am as ResultStatus, an as Segmented, ao as SegmentedOption, ap as SegmentedProps, aq as SegmentedValue, ar as Skeleton, as as SkeletonProps, at as Spin, au as SpinProps, av as StepItem, aw as StepStatus, ax as Steps, ay as StepsProps, az as TabItem, aA as Tabs, aB as TabsContextMenuClickInfo, aC as TabsOrientation, aD as TabsPosition, aE as TabsProps, aF as TabsType, aG as Tag, aH as TagProps, aI as TagSize, aJ as TagVariant, aK as Timeline, aL as TimelineItem, aM as TimelineProps, aN as Toolbar, aO as ToolbarItem, aP as ToolbarProps, aQ as Tooltip, aR as TooltipProps, aS as Tour, aT as TourProps, aU as TourStep, aV as Tree, aW as TreeDropPosition, aX as TreeKey, aY as TreeNode, aZ as TreeProps, a_ as Typography, a$ as TypographyLinkProps, b0 as TypographyProps, b1 as TypographyTitleProps, b2 as TypographyType, b3 as Upload, b4 as UploadChangeInfo, b5 as UploadDraggerProps, b6 as UploadFile, b7 as UploadFileStatus, b8 as UploadHttpRequest, b9 as UploadItemActions, ba as UploadProps, bb as UploadRef, bc as UploadRejectInfo, bd as UploadRequestHandle, be as UploadRequestOptions, bf as Watermark, bg as WatermarkFont, bh as WatermarkProps, bi as message, bj as notification } from './core-XtqUDbbD.js';
|
|
5
5
|
import { C as ControlSize, I as InputPlaceholderMode, a as ControlStatus } from './shared-Bx4B28Wh.js';
|
|
6
6
|
import { B as ButtonProps, a as ButtonSize } from './Button-B59TIes7.js';
|
|
7
7
|
export { b as Button, c as ButtonVariant } from './Button-B59TIes7.js';
|
|
8
|
-
import { O as OverlayContainer, a as OverlayApiHandle, M as ModalOpenConfig, S as SelectOption, b as SelectChangeValue, c as SelectProps, d as ModalActionResult } from './Select-
|
|
9
|
-
export { e as Modal, f as ModalProps, g as ModalType, h as Select, i as SelectMode, j as SelectValue } from './Select-
|
|
10
|
-
export { D as DatePicker, a as DatePickerDisabledInfo, b as DatePickerPreset, c as DatePickerProps, d as DatePickerShowTime, e as DatePickerType, f as DatePickerValue, g as DateRangePickerPreset, h as DateRangePickerProps, S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-
|
|
8
|
+
import { O as OverlayContainer, a as OverlayApiHandle, M as ModalOpenConfig, S as SelectOption, b as SelectChangeValue, c as SelectProps, d as ModalActionResult } from './Select-tsENCXQI.js';
|
|
9
|
+
export { e as Modal, f as ModalProps, g as ModalType, h as Select, i as SelectMode, j as SelectValue } from './Select-tsENCXQI.js';
|
|
10
|
+
export { D as DatePicker, a as DatePickerDisabledInfo, b as DatePickerPreset, c as DatePickerProps, d as DatePickerShowTime, e as DatePickerType, f as DatePickerValue, g as DateRangePickerPreset, h as DateRangePickerProps, S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-CIXBuoef.js';
|
|
11
11
|
export { RichTextContent, RichTextContentFormat, RichTextContentProps, RichTextEditor, RichTextEditorProps, RichTextImagePasteHandler, RichTextToolbar } from './rich-text-editor.js';
|
|
12
12
|
export { MarkdownEditor, MarkdownEditorMode, MarkdownEditorProps } from './markdown-editor.js';
|
|
13
13
|
import * as Monaco from 'monaco-editor';
|
|
@@ -1725,15 +1725,18 @@ interface EditorCompletionItem {
|
|
|
1725
1725
|
}
|
|
1726
1726
|
/** 根据编辑器上下文生成补全候选项的函数。 */
|
|
1727
1727
|
type EditorCompletionProvider = (context: EditorCompletionContext) => readonly EditorCompletionItem[] | Promise<readonly EditorCompletionItem[]>;
|
|
1728
|
-
/**
|
|
1729
|
-
|
|
1728
|
+
/**
|
|
1729
|
+
* 编辑器右键菜单可直接调用的内置命令名称。
|
|
1730
|
+
* `undo` 撤销最近一次可撤销编辑,其他取值分别执行剪切、复制、粘贴和全选。
|
|
1731
|
+
*/
|
|
1732
|
+
type EditorCommand = "undo" | "cut" | "copy" | "paste" | "selectAll";
|
|
1730
1733
|
/** EditorContextMenu的项目定义。 */
|
|
1731
1734
|
interface EditorContextMenuItem {
|
|
1732
1735
|
/** 唯一标识;同一集合内应保持唯一且稳定,用于定位、渲染和状态关联。 */
|
|
1733
1736
|
key: string;
|
|
1734
1737
|
/** 展示给用户的名称,可传入文本或 React 节点。 */
|
|
1735
1738
|
label: string;
|
|
1736
|
-
/**
|
|
1739
|
+
/** 点击菜单项时执行的编辑器内置命令;与 `onClick` 同时设置时优先执行此命令。 */
|
|
1737
1740
|
command?: EditorCommand;
|
|
1738
1741
|
/** 显示或绑定的快捷键。 */
|
|
1739
1742
|
shortcut?: string;
|
|
@@ -1746,6 +1749,8 @@ interface EditorContextMenuItem {
|
|
|
1746
1749
|
interface EditorHandle {
|
|
1747
1750
|
/** 将焦点移入控件。 */
|
|
1748
1751
|
focus(): void;
|
|
1752
|
+
/** 返回当前模型是否存在可撤销的编辑记录;只读操作和已清空的撤销栈返回 `false`。 */
|
|
1753
|
+
canUndo(): boolean;
|
|
1749
1754
|
/** 读取当前内容。 */
|
|
1750
1755
|
getValue(): string;
|
|
1751
1756
|
/** 读取当前选区范围。 */
|
package/dist/index.js
CHANGED
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
smoothSvgPath,
|
|
57
57
|
svgArcPath,
|
|
58
58
|
transferCompositeValue
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-M4IASLGB.js";
|
|
60
60
|
import {
|
|
61
61
|
Badge,
|
|
62
62
|
Breadcrumb,
|
|
@@ -82,20 +82,20 @@ import {
|
|
|
82
82
|
Watermark,
|
|
83
83
|
message,
|
|
84
84
|
notification
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-UPXL2QLJ.js";
|
|
86
86
|
import "./chunk-RX242MUO.js";
|
|
87
87
|
import {
|
|
88
88
|
MarkdownEditor
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-5WZR2RHA.js";
|
|
90
90
|
import {
|
|
91
91
|
RichTextContent,
|
|
92
92
|
RichTextEditor
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-33WX54AU.js";
|
|
94
94
|
import {
|
|
95
95
|
DatePicker,
|
|
96
96
|
SelectDateRange,
|
|
97
97
|
TimePanel
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-Q3LEK2TL.js";
|
|
99
99
|
import {
|
|
100
100
|
Checkbox,
|
|
101
101
|
OverflowTags,
|
|
@@ -107,17 +107,17 @@ import {
|
|
|
107
107
|
Tree,
|
|
108
108
|
normalizeSelectionValues,
|
|
109
109
|
usePressFeedback
|
|
110
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-MXK6TKMO.js";
|
|
111
111
|
import {
|
|
112
112
|
Dropdown,
|
|
113
113
|
Input,
|
|
114
114
|
Menu,
|
|
115
115
|
Segmented,
|
|
116
116
|
Steps
|
|
117
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-ZNPNZD6O.js";
|
|
118
118
|
import {
|
|
119
119
|
TextArea
|
|
120
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-UL54A2YN.js";
|
|
121
121
|
import {
|
|
122
122
|
FILLED_ICON_NAMES,
|
|
123
123
|
ICON_NAMES,
|
|
@@ -128,13 +128,13 @@ import {
|
|
|
128
128
|
Skeleton,
|
|
129
129
|
useOverlayExitPlaceholder,
|
|
130
130
|
useOverlayLifecycle
|
|
131
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-KA3M4TE4.js";
|
|
132
132
|
import {
|
|
133
133
|
Button
|
|
134
|
-
} from "./chunk-
|
|
134
|
+
} from "./chunk-4B7ATL6J.js";
|
|
135
135
|
import {
|
|
136
136
|
useFloatingPlaceholder
|
|
137
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-CRA7VNOA.js";
|
|
138
138
|
import {
|
|
139
139
|
ControlSizeContext,
|
|
140
140
|
FloatingScrollbarProvider,
|
|
@@ -147,7 +147,7 @@ import {
|
|
|
147
147
|
usePlaceholderMode,
|
|
148
148
|
useScrollbarProximity,
|
|
149
149
|
withTitleTooltip
|
|
150
|
-
} from "./chunk-
|
|
150
|
+
} from "./chunk-WMZYYPIW.js";
|
|
151
151
|
|
|
152
152
|
// src/components/CursorPreview.tsx
|
|
153
153
|
import { useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
@@ -4718,6 +4718,7 @@ function registerSqlLanguages(monaco) {
|
|
|
4718
4718
|
// src/components/Editor.tsx
|
|
4719
4719
|
import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4720
4720
|
var EDITOR_COMMAND_SHORTCUTS = {
|
|
4721
|
+
undo: "Ctrl+Z",
|
|
4721
4722
|
cut: "Ctrl+X",
|
|
4722
4723
|
copy: "Ctrl+C",
|
|
4723
4724
|
paste: "Ctrl+V",
|
|
@@ -5062,6 +5063,7 @@ function Editor({
|
|
|
5062
5063
|
});
|
|
5063
5064
|
const api = {
|
|
5064
5065
|
focus: () => editor.focus(),
|
|
5066
|
+
canUndo: () => model.canUndo(),
|
|
5065
5067
|
getValue: () => model.getValue(),
|
|
5066
5068
|
getSelection: () => {
|
|
5067
5069
|
const selection = editor.getSelection();
|
|
@@ -5342,6 +5344,7 @@ function Editor({
|
|
|
5342
5344
|
editor.focus();
|
|
5343
5345
|
if (item.command) {
|
|
5344
5346
|
const commandId = {
|
|
5347
|
+
undo: "undo",
|
|
5345
5348
|
cut: "editor.action.clipboardCutAction",
|
|
5346
5349
|
copy: "editor.action.clipboardCopyAction",
|
|
5347
5350
|
paste: "editor.action.clipboardPasteAction",
|
|
@@ -11449,6 +11452,7 @@ function useQueryFormSettings(config, fields, defaultCollapsed, applyCollapsed,
|
|
|
11449
11452
|
if (request !== token.current) return;
|
|
11450
11453
|
setLoadFailed(true);
|
|
11451
11454
|
setError(reason instanceof Error ? reason.message : "\u8BFB\u53D6\u67E5\u8BE2\u8BBE\u7F6E\u5931\u8D25");
|
|
11455
|
+
if (!edit) message.warning("\u67E5\u8BE2\u8BBE\u7F6E\u8BFB\u53D6\u5931\u8D25\uFF0C\u8BF7\u6253\u5F00\u8BBE\u7F6E\u91CD\u8BD5");
|
|
11452
11456
|
current.config.onError?.(reason, "load");
|
|
11453
11457
|
} finally {
|
|
11454
11458
|
if (request === token.current) setLoading(false);
|
|
@@ -11526,53 +11530,50 @@ function useQueryFormSettings(config, fields, defaultCollapsed, applyCollapsed,
|
|
|
11526
11530
|
}
|
|
11527
11531
|
}
|
|
11528
11532
|
) : null;
|
|
11529
|
-
const panel = config ? /* @__PURE__ */
|
|
11530
|
-
|
|
11531
|
-
|
|
11532
|
-
|
|
11533
|
-
|
|
11534
|
-
|
|
11535
|
-
|
|
11536
|
-
|
|
11537
|
-
|
|
11538
|
-
|
|
11539
|
-
|
|
11540
|
-
|
|
11541
|
-
|
|
11542
|
-
|
|
11543
|
-
},
|
|
11544
|
-
|
|
11545
|
-
|
|
11546
|
-
|
|
11547
|
-
|
|
11548
|
-
|
|
11549
|
-
|
|
11550
|
-
|
|
11551
|
-
|
|
11552
|
-
|
|
11553
|
-
"
|
|
11554
|
-
{
|
|
11555
|
-
|
|
11556
|
-
|
|
11557
|
-
|
|
11558
|
-
|
|
11559
|
-
|
|
11560
|
-
|
|
11561
|
-
|
|
11562
|
-
/* @__PURE__ */ jsx33("
|
|
11563
|
-
/* @__PURE__ */
|
|
11564
|
-
|
|
11565
|
-
|
|
11566
|
-
|
|
11567
|
-
|
|
11568
|
-
|
|
11569
|
-
|
|
11570
|
-
|
|
11571
|
-
|
|
11572
|
-
|
|
11573
|
-
}
|
|
11574
|
-
)
|
|
11575
|
-
] }) : null;
|
|
11533
|
+
const panel = config ? /* @__PURE__ */ jsx33(Fragment11, { children: /* @__PURE__ */ jsx33(
|
|
11534
|
+
Modal,
|
|
11535
|
+
{
|
|
11536
|
+
title: "\u67E5\u8BE2\u8BBE\u7F6E",
|
|
11537
|
+
open,
|
|
11538
|
+
width: 520,
|
|
11539
|
+
okText: "\u4FDD\u5B58",
|
|
11540
|
+
confirmLoading: saving,
|
|
11541
|
+
okButtonProps: { disabled: locked },
|
|
11542
|
+
onOk: save,
|
|
11543
|
+
onOpenChange: (next) => {
|
|
11544
|
+
if (!saveLock.current) setOpen(next);
|
|
11545
|
+
},
|
|
11546
|
+
children: /* @__PURE__ */ jsxs28("div", { className: "sia-query-settings", children: [
|
|
11547
|
+
loading ? /* @__PURE__ */ jsx33("p", { role: "status", children: "\u6B63\u5728\u8BFB\u53D6\u67E5\u8BE2\u8BBE\u7F6E\u2026" }) : null,
|
|
11548
|
+
error ? /* @__PURE__ */ jsxs28("div", { role: "alert", className: "sia-query-form__error", children: [
|
|
11549
|
+
error,
|
|
11550
|
+
loadFailed ? /* @__PURE__ */ jsx33(Button, { type: "button", variant: "link", onClick: () => void load(true), children: "\u91CD\u8BD5" }) : null
|
|
11551
|
+
] }) : null,
|
|
11552
|
+
/* @__PURE__ */ jsx33(Checkbox, { checked: draft.defaultCollapsed, disabled: locked, onChange: (checked) => setDraft((current) => ({ ...current, defaultCollapsed: checked })), children: "\u9ED8\u8BA4\u6536\u8D77\u67E5\u8BE2\u6761\u4EF6" }),
|
|
11553
|
+
/* @__PURE__ */ jsx33("p", { className: "sia-query-settings__hint", children: "\u52FE\u9009\u9700\u8981\u663E\u793A\u7684\u6761\u4EF6\uFF0C\u62D6\u52A8\u6216\u4F7F\u7528\u4E0A\u4E0B\u6309\u94AE\u8C03\u6574\u987A\u5E8F\u3002" }),
|
|
11554
|
+
/* @__PURE__ */ jsx33("div", { ref: sort.listRef, className: `sia-query-settings__list${sort.preview ? " is-sorting" : ""}`, children: visibleDraft.map((item, index) => /* @__PURE__ */ jsxs28(
|
|
11555
|
+
"div",
|
|
11556
|
+
{
|
|
11557
|
+
"data-query-field-key": item.key,
|
|
11558
|
+
className: `sia-query-settings__item${sort.preview?.key === item.key ? " is-dragging" : ""}${locked ? " is-disabled" : ""}`,
|
|
11559
|
+
style: sort.preview ? { transform: `translateY(${sort.preview.offsets[item.key] ?? 0}px)` } : void 0,
|
|
11560
|
+
onPointerDown: (event) => sort.start(event, item.key),
|
|
11561
|
+
children: [
|
|
11562
|
+
/* @__PURE__ */ jsx33(Icon, { name: "menu", size: 15 }),
|
|
11563
|
+
/* @__PURE__ */ jsx33(Checkbox, { "aria-label": `\u663E\u793A ${item.key}`, checked: item.visible, disabled: locked || hideDisabledKeys.has(item.key), onChange: (checked) => setDraft((current) => ({ ...current, fields: visibleDraft.map((field) => field.key === item.key ? { ...field, visible: checked } : field) })) }),
|
|
11564
|
+
/* @__PURE__ */ jsx33("span", { className: "sia-query-settings__name", children: labels.get(item.key) ?? item.key }),
|
|
11565
|
+
/* @__PURE__ */ jsxs28("div", { className: "sia-query-settings__order", children: [
|
|
11566
|
+
/* @__PURE__ */ jsx33(Button, { type: "button", size: "small", variant: "text", "aria-label": `\u4E0A\u79FB ${item.key}`, disabled: locked || index === 0, icon: /* @__PURE__ */ jsx33(Icon, { name: "chevron-up" }), onClick: () => move(index, index - 1) }),
|
|
11567
|
+
/* @__PURE__ */ jsx33(Button, { type: "button", size: "small", variant: "text", "aria-label": `\u4E0B\u79FB ${item.key}`, disabled: locked || index === visibleDraft.length - 1, icon: /* @__PURE__ */ jsx33(Icon, { name: "chevron-down" }), onClick: () => move(index, index + 1) })
|
|
11568
|
+
] })
|
|
11569
|
+
]
|
|
11570
|
+
},
|
|
11571
|
+
item.key
|
|
11572
|
+
)) }),
|
|
11573
|
+
/* @__PURE__ */ jsx33(Button, { type: "button", disabled: locked, onClick: () => setDraft({ fields: reconcileQueryFields(fields.map((field) => field.key)), defaultCollapsed: defaultCollapsed ?? false }), children: "\u6062\u590D\u9ED8\u8BA4" })
|
|
11574
|
+
] })
|
|
11575
|
+
}
|
|
11576
|
+
) }) : null;
|
|
11576
11577
|
return { snapshot, control, panel };
|
|
11577
11578
|
}
|
|
11578
11579
|
|
package/dist/markdown-editor.cjs
CHANGED
|
@@ -529,8 +529,8 @@ var import_react3 = require("react");
|
|
|
529
529
|
// src/components/popupFluidMotion.ts
|
|
530
530
|
var popupEnterDuration = 260;
|
|
531
531
|
var popupExitDuration = 140;
|
|
532
|
-
var popupInitialScale = 0.
|
|
533
|
-
var popupTravelOffset =
|
|
532
|
+
var popupInitialScale = 0.93;
|
|
533
|
+
var popupTravelOffset = 4;
|
|
534
534
|
function popupFluidFrames(placement, open = true) {
|
|
535
535
|
const side = placement.split("-")[0];
|
|
536
536
|
const axis = side === "left" || side === "right" ? "X" : "Y";
|
|
@@ -539,8 +539,8 @@ function popupFluidFrames(placement, open = true) {
|
|
|
539
539
|
const visible = { opacity: 1, transform: "none" };
|
|
540
540
|
return open ? [
|
|
541
541
|
{ ...hidden, offset: 0 },
|
|
542
|
-
{ opacity: 1, transform: "scale(1.
|
|
543
|
-
{ opacity: 1, transform: "scale(.
|
|
542
|
+
{ opacity: 1, transform: "scale(1.05, 1.04)", offset: 0.68 },
|
|
543
|
+
{ opacity: 1, transform: "scale(.977, .985)", offset: 0.86 },
|
|
544
544
|
{ ...visible, offset: 1 }
|
|
545
545
|
] : [{ ...visible, offset: 0 }, { ...hidden, offset: 1 }];
|
|
546
546
|
}
|
|
@@ -560,16 +560,16 @@ function motionFrames(kind, placement) {
|
|
|
560
560
|
const outside = `translate${axis}(${sign * 100}%)`;
|
|
561
561
|
return [
|
|
562
562
|
{ transform: outside, offset: 0 },
|
|
563
|
-
{ transform: `translate${axis}(0) scale${axis}(1.
|
|
564
|
-
{ transform: `translate${axis}(0) scale${axis}(.
|
|
563
|
+
{ transform: `translate${axis}(0) scale${axis}(1.03)`, offset: 0.68 },
|
|
564
|
+
{ transform: `translate${axis}(0) scale${axis}(.988)`, offset: 0.86 },
|
|
565
565
|
{ transform: "none", offset: 1 }
|
|
566
566
|
];
|
|
567
567
|
}
|
|
568
568
|
const modal = kind === "modal";
|
|
569
569
|
return [
|
|
570
|
-
{ opacity: 0, transform: `translateY(${modal ?
|
|
571
|
-
{ opacity: 1, transform: modal ? "scale(1.
|
|
572
|
-
{ opacity: 1, transform: modal ? "scale(.
|
|
570
|
+
{ opacity: 0, transform: `translateY(${modal ? 14 : -4}px) scale(${modal ? 0.95 : 0.93})`, offset: 0 },
|
|
571
|
+
{ opacity: 1, transform: modal ? "scale(1.035, 1.02)" : "scale(1.05, 1.04)", offset: 0.68 },
|
|
572
|
+
{ opacity: 1, transform: modal ? "scale(.984, .992)" : "scale(.977, .985)", offset: 0.86 },
|
|
573
573
|
{ opacity: 1, transform: "none", offset: 1 }
|
|
574
574
|
];
|
|
575
575
|
}
|