@iblai/iblai-js 2.29.2 → 2.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.
|
@@ -48065,7 +48065,7 @@ function formatRelativeDate(date) {
|
|
|
48065
48065
|
}
|
|
48066
48066
|
}
|
|
48067
48067
|
|
|
48068
|
-
const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", {
|
|
48068
|
+
const buttonVariants$1 = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", {
|
|
48069
48069
|
variants: {
|
|
48070
48070
|
variant: {
|
|
48071
48071
|
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
@@ -48089,7 +48089,7 @@ const buttonVariants = cva("inline-flex items-center justify-center gap-2 whites
|
|
|
48089
48089
|
});
|
|
48090
48090
|
const Button$1 = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
48091
48091
|
const Comp = asChild ? Slot$4 : "button";
|
|
48092
|
-
return (jsx(Comp, { className: cn(buttonVariants({ variant, size, className })), ref: ref, ...props }));
|
|
48092
|
+
return (jsx(Comp, { className: cn(buttonVariants$1({ variant, size, className })), ref: ref, ...props }));
|
|
48093
48093
|
});
|
|
48094
48094
|
Button$1.displayName = "Button";
|
|
48095
48095
|
|
|
@@ -48376,7 +48376,7 @@ const __iconNode$pf = [
|
|
|
48376
48376
|
];
|
|
48377
48377
|
const Accessibility = createLucideIcon("accessibility", __iconNode$pf);
|
|
48378
48378
|
|
|
48379
|
-
var accessibility = /*#__PURE__*/Object.freeze({
|
|
48379
|
+
var accessibility$4 = /*#__PURE__*/Object.freeze({
|
|
48380
48380
|
__proto__: null,
|
|
48381
48381
|
__iconNode: __iconNode$pf,
|
|
48382
48382
|
default: Accessibility
|
|
@@ -103427,6 +103427,54 @@ var virtualMachineNetworkSection$3 = {
|
|
|
103427
103427
|
manageTitle: "Virtual Machine Settings",
|
|
103428
103428
|
manageDescription: "Network policies and VM secrets are shared by every agent in your organization."
|
|
103429
103429
|
};
|
|
103430
|
+
var accessibility$3 = {
|
|
103431
|
+
toolbar: {
|
|
103432
|
+
accessibilityMenu: "Accessibility Menu",
|
|
103433
|
+
contrastPlus: "Contrast +",
|
|
103434
|
+
highlightLinks: "Highlight Links",
|
|
103435
|
+
biggerText: "Bigger Text",
|
|
103436
|
+
textSpacing: "Text Spacing",
|
|
103437
|
+
pauseAnimations: "Pause Animations",
|
|
103438
|
+
hideImages: "Hide Images",
|
|
103439
|
+
dyslexiaFriendly: "Dyslexia Friendly",
|
|
103440
|
+
cursor: "Cursor",
|
|
103441
|
+
tooltips: "Tooltips",
|
|
103442
|
+
lineHeight: "Line Height",
|
|
103443
|
+
textAlign: "Text Align",
|
|
103444
|
+
saturation: "Saturation",
|
|
103445
|
+
resetAllAccessibilitySettings: "Reset All Accessibility Settings",
|
|
103446
|
+
contrastInvertColors: "Invert Colors",
|
|
103447
|
+
contrastDark: "Dark Contrast",
|
|
103448
|
+
contrastLight: "Light Contrast",
|
|
103449
|
+
textSizeNormal: "Normal Text",
|
|
103450
|
+
textSizeLarge: "Large Text",
|
|
103451
|
+
textSizeLarger: "Larger Text",
|
|
103452
|
+
spacingLight: "Light Spacing",
|
|
103453
|
+
spacingModerate: "Moderate Spacing",
|
|
103454
|
+
spacingHeavy: "Heavy Spacing",
|
|
103455
|
+
dyslexiaFont: "Dyslexia Font",
|
|
103456
|
+
legibleFont: "Legible Font",
|
|
103457
|
+
alignLeft: "Align Left",
|
|
103458
|
+
alignCenter: "Align Center",
|
|
103459
|
+
alignRight: "Align Right",
|
|
103460
|
+
justify: "Justify",
|
|
103461
|
+
saturationNormal: "Normal Saturation",
|
|
103462
|
+
saturationHigh: "High Saturation",
|
|
103463
|
+
saturationLow: "Low Saturation",
|
|
103464
|
+
resetButtonPosition: "Reset Button Position",
|
|
103465
|
+
moveButtonToCorner: "Move button to corner",
|
|
103466
|
+
moveButtonTopLeft: "Move button to top left corner",
|
|
103467
|
+
moveButtonTopRight: "Move button to top right corner",
|
|
103468
|
+
moveButtonBottomLeft: "Move button to bottom left corner",
|
|
103469
|
+
moveButtonBottomRight: "Move button to bottom right corner"
|
|
103470
|
+
},
|
|
103471
|
+
button: {
|
|
103472
|
+
openAccessibilityMenu: "Open Accessibility Menu",
|
|
103473
|
+
accessibilityIconAlt: "Accessibility",
|
|
103474
|
+
moveHint: "Use the up and down arrow keys to move this button, and the left and right arrow keys to switch sides. Hold Shift to move it faster.",
|
|
103475
|
+
positionAnnouncement: "Accessibility button moved to the {side, select, left {left} other {right}} edge, {bottom} pixels from the bottom."
|
|
103476
|
+
}
|
|
103477
|
+
};
|
|
103430
103478
|
var en = {
|
|
103431
103479
|
accessTabAddAccess: accessTabAddAccess$3,
|
|
103432
103480
|
accessTabLabels: accessTabLabels$3,
|
|
@@ -103722,7 +103770,8 @@ var en = {
|
|
|
103722
103770
|
virtualMachineAdminTab: virtualMachineAdminTab$3,
|
|
103723
103771
|
virtualMachineNetworkPolicies: virtualMachineNetworkPolicies$3,
|
|
103724
103772
|
virtualMachineSecrets: virtualMachineSecrets$3,
|
|
103725
|
-
virtualMachineNetworkSection: virtualMachineNetworkSection$3
|
|
103773
|
+
virtualMachineNetworkSection: virtualMachineNetworkSection$3,
|
|
103774
|
+
accessibility: accessibility$3
|
|
103726
103775
|
};
|
|
103727
103776
|
|
|
103728
103777
|
var accessTabAddAccess$2 = {
|
|
@@ -111083,6 +111132,54 @@ var virtualMachineNetworkSection$2 = {
|
|
|
111083
111132
|
manageTitle: "Paramètres de la machine virtuelle",
|
|
111084
111133
|
manageDescription: "Les politiques réseau et les secrets de VM sont partagés par tous les agents de votre organisation."
|
|
111085
111134
|
};
|
|
111135
|
+
var accessibility$2 = {
|
|
111136
|
+
toolbar: {
|
|
111137
|
+
accessibilityMenu: "Menu d'accessibilité",
|
|
111138
|
+
contrastPlus: "Contraste +",
|
|
111139
|
+
highlightLinks: "Mettre les liens en évidence",
|
|
111140
|
+
biggerText: "Texte plus grand",
|
|
111141
|
+
textSpacing: "Espacement du texte",
|
|
111142
|
+
pauseAnimations: "Mettre les animations en pause",
|
|
111143
|
+
hideImages: "Masquer les images",
|
|
111144
|
+
dyslexiaFriendly: "Adapté à la dyslexie",
|
|
111145
|
+
cursor: "Curseur",
|
|
111146
|
+
tooltips: "Infobulles",
|
|
111147
|
+
lineHeight: "Hauteur de ligne",
|
|
111148
|
+
textAlign: "Alignement du texte",
|
|
111149
|
+
saturation: "Saturation",
|
|
111150
|
+
resetAllAccessibilitySettings: "Réinitialiser tous les paramètres d'accessibilité",
|
|
111151
|
+
contrastInvertColors: "Inverser les couleurs",
|
|
111152
|
+
contrastDark: "Contraste sombre",
|
|
111153
|
+
contrastLight: "Contraste clair",
|
|
111154
|
+
textSizeNormal: "Texte normal",
|
|
111155
|
+
textSizeLarge: "Grand texte",
|
|
111156
|
+
textSizeLarger: "Texte très grand",
|
|
111157
|
+
spacingLight: "Espacement léger",
|
|
111158
|
+
spacingModerate: "Espacement modéré",
|
|
111159
|
+
spacingHeavy: "Espacement important",
|
|
111160
|
+
dyslexiaFont: "Police dyslexie",
|
|
111161
|
+
legibleFont: "Police lisible",
|
|
111162
|
+
alignLeft: "Aligner à gauche",
|
|
111163
|
+
alignCenter: "Centrer",
|
|
111164
|
+
alignRight: "Aligner à droite",
|
|
111165
|
+
justify: "Justifier",
|
|
111166
|
+
saturationNormal: "Saturation normale",
|
|
111167
|
+
saturationHigh: "Haute saturation",
|
|
111168
|
+
saturationLow: "Faible saturation",
|
|
111169
|
+
resetButtonPosition: "Réinitialiser la position du bouton",
|
|
111170
|
+
moveButtonToCorner: "Déplacer le bouton dans un coin",
|
|
111171
|
+
moveButtonTopLeft: "Déplacer le bouton dans le coin supérieur gauche",
|
|
111172
|
+
moveButtonTopRight: "Déplacer le bouton dans le coin supérieur droit",
|
|
111173
|
+
moveButtonBottomLeft: "Déplacer le bouton dans le coin inférieur gauche",
|
|
111174
|
+
moveButtonBottomRight: "Déplacer le bouton dans le coin inférieur droit"
|
|
111175
|
+
},
|
|
111176
|
+
button: {
|
|
111177
|
+
openAccessibilityMenu: "Ouvrir le menu d'accessibilité",
|
|
111178
|
+
accessibilityIconAlt: "Accessibilité",
|
|
111179
|
+
moveHint: "Utilisez les flèches haut et bas pour déplacer ce bouton, et les flèches gauche et droite pour changer de côté. Maintenez Maj enfoncée pour le déplacer plus vite.",
|
|
111180
|
+
positionAnnouncement: "Bouton d'accessibilité déplacé vers le bord {side, select, left {gauche} other {droit}}, à {bottom} pixels du bas."
|
|
111181
|
+
}
|
|
111182
|
+
};
|
|
111086
111183
|
var fr = {
|
|
111087
111184
|
accessTabAddAccess: accessTabAddAccess$2,
|
|
111088
111185
|
accessTabLabels: accessTabLabels$2,
|
|
@@ -111378,7 +111475,8 @@ var fr = {
|
|
|
111378
111475
|
virtualMachineAdminTab: virtualMachineAdminTab$2,
|
|
111379
111476
|
virtualMachineNetworkPolicies: virtualMachineNetworkPolicies$2,
|
|
111380
111477
|
virtualMachineSecrets: virtualMachineSecrets$2,
|
|
111381
|
-
virtualMachineNetworkSection: virtualMachineNetworkSection$2
|
|
111478
|
+
virtualMachineNetworkSection: virtualMachineNetworkSection$2,
|
|
111479
|
+
accessibility: accessibility$2
|
|
111382
111480
|
};
|
|
111383
111481
|
|
|
111384
111482
|
var accessTabAddAccess$1 = {
|
|
@@ -118739,6 +118837,54 @@ var virtualMachineNetworkSection$1 = {
|
|
|
118739
118837
|
manageTitle: "Configuración de la máquina virtual",
|
|
118740
118838
|
manageDescription: "Las políticas de red y los secretos de VM son compartidos por todos los agentes de tu organización."
|
|
118741
118839
|
};
|
|
118840
|
+
var accessibility$1 = {
|
|
118841
|
+
toolbar: {
|
|
118842
|
+
accessibilityMenu: "Menú de accesibilidad",
|
|
118843
|
+
contrastPlus: "Contraste +",
|
|
118844
|
+
highlightLinks: "Resaltar enlaces",
|
|
118845
|
+
biggerText: "Texto más grande",
|
|
118846
|
+
textSpacing: "Espaciado del texto",
|
|
118847
|
+
pauseAnimations: "Pausar animaciones",
|
|
118848
|
+
hideImages: "Ocultar imágenes",
|
|
118849
|
+
dyslexiaFriendly: "Apto para dislexia",
|
|
118850
|
+
cursor: "Cursor",
|
|
118851
|
+
tooltips: "Tooltips",
|
|
118852
|
+
lineHeight: "Altura de línea",
|
|
118853
|
+
textAlign: "Alineación del texto",
|
|
118854
|
+
saturation: "Saturación",
|
|
118855
|
+
resetAllAccessibilitySettings: "Restablecer todos los ajustes de accesibilidad",
|
|
118856
|
+
contrastInvertColors: "Invertir colores",
|
|
118857
|
+
contrastDark: "Contraste oscuro",
|
|
118858
|
+
contrastLight: "Contraste claro",
|
|
118859
|
+
textSizeNormal: "Texto normal",
|
|
118860
|
+
textSizeLarge: "Texto grande",
|
|
118861
|
+
textSizeLarger: "Texto más grande",
|
|
118862
|
+
spacingLight: "Espaciado ligero",
|
|
118863
|
+
spacingModerate: "Espaciado moderado",
|
|
118864
|
+
spacingHeavy: "Espaciado amplio",
|
|
118865
|
+
dyslexiaFont: "Fuente para dislexia",
|
|
118866
|
+
legibleFont: "Fuente legible",
|
|
118867
|
+
alignLeft: "Alinear a la izquierda",
|
|
118868
|
+
alignCenter: "Centrar",
|
|
118869
|
+
alignRight: "Alinear a la derecha",
|
|
118870
|
+
justify: "Justificar",
|
|
118871
|
+
saturationNormal: "Saturación normal",
|
|
118872
|
+
saturationHigh: "Alta saturación",
|
|
118873
|
+
saturationLow: "Baja saturación",
|
|
118874
|
+
resetButtonPosition: "Restablecer posición del botón",
|
|
118875
|
+
moveButtonToCorner: "Mover el botón a una esquina",
|
|
118876
|
+
moveButtonTopLeft: "Mover el botón a la esquina superior izquierda",
|
|
118877
|
+
moveButtonTopRight: "Mover el botón a la esquina superior derecha",
|
|
118878
|
+
moveButtonBottomLeft: "Mover el botón a la esquina inferior izquierda",
|
|
118879
|
+
moveButtonBottomRight: "Mover el botón a la esquina inferior derecha"
|
|
118880
|
+
},
|
|
118881
|
+
button: {
|
|
118882
|
+
openAccessibilityMenu: "Abrir el menú de accesibilidad",
|
|
118883
|
+
accessibilityIconAlt: "Accesibilidad",
|
|
118884
|
+
moveHint: "Usa las flechas arriba y abajo para mover este botón, y las flechas izquierda y derecha para cambiarlo de lado. Mantén pulsada Mayús para moverlo más rápido.",
|
|
118885
|
+
positionAnnouncement: "Botón de accesibilidad movido al borde {side, select, left {izquierdo} other {derecho}}, a {bottom} píxeles de la parte inferior."
|
|
118886
|
+
}
|
|
118887
|
+
};
|
|
118742
118888
|
var es = {
|
|
118743
118889
|
accessTabAddAccess: accessTabAddAccess$1,
|
|
118744
118890
|
accessTabLabels: accessTabLabels$1,
|
|
@@ -119034,7 +119180,8 @@ var es = {
|
|
|
119034
119180
|
virtualMachineAdminTab: virtualMachineAdminTab$1,
|
|
119035
119181
|
virtualMachineNetworkPolicies: virtualMachineNetworkPolicies$1,
|
|
119036
119182
|
virtualMachineSecrets: virtualMachineSecrets$1,
|
|
119037
|
-
virtualMachineNetworkSection: virtualMachineNetworkSection$1
|
|
119183
|
+
virtualMachineNetworkSection: virtualMachineNetworkSection$1,
|
|
119184
|
+
accessibility: accessibility$1
|
|
119038
119185
|
};
|
|
119039
119186
|
|
|
119040
119187
|
var accessTabAddAccess = {
|
|
@@ -126395,6 +126542,54 @@ var virtualMachineNetworkSection = {
|
|
|
126395
126542
|
manageTitle: "虚拟机设置",
|
|
126396
126543
|
manageDescription: "网络策略和虚拟机密钥由您组织中的所有智能体共享。"
|
|
126397
126544
|
};
|
|
126545
|
+
var accessibility = {
|
|
126546
|
+
toolbar: {
|
|
126547
|
+
accessibilityMenu: "无障碍菜单",
|
|
126548
|
+
contrastPlus: "对比度 +",
|
|
126549
|
+
highlightLinks: "高亮链接",
|
|
126550
|
+
biggerText: "放大文字",
|
|
126551
|
+
textSpacing: "文字间距",
|
|
126552
|
+
pauseAnimations: "暂停动画",
|
|
126553
|
+
hideImages: "隐藏图片",
|
|
126554
|
+
dyslexiaFriendly: "阅读障碍友好",
|
|
126555
|
+
cursor: "光标",
|
|
126556
|
+
tooltips: "工具提示",
|
|
126557
|
+
lineHeight: "行高",
|
|
126558
|
+
textAlign: "文字对齐",
|
|
126559
|
+
saturation: "饱和度",
|
|
126560
|
+
resetAllAccessibilitySettings: "重置所有无障碍设置",
|
|
126561
|
+
contrastInvertColors: "反转颜色",
|
|
126562
|
+
contrastDark: "深色对比",
|
|
126563
|
+
contrastLight: "浅色对比",
|
|
126564
|
+
textSizeNormal: "正常文字",
|
|
126565
|
+
textSizeLarge: "大号文字",
|
|
126566
|
+
textSizeLarger: "更大文字",
|
|
126567
|
+
spacingLight: "轻度间距",
|
|
126568
|
+
spacingModerate: "适中间距",
|
|
126569
|
+
spacingHeavy: "宽松间距",
|
|
126570
|
+
dyslexiaFont: "阅读障碍字体",
|
|
126571
|
+
legibleFont: "易读字体",
|
|
126572
|
+
alignLeft: "左对齐",
|
|
126573
|
+
alignCenter: "居中对齐",
|
|
126574
|
+
alignRight: "右对齐",
|
|
126575
|
+
justify: "两端对齐",
|
|
126576
|
+
saturationNormal: "正常饱和度",
|
|
126577
|
+
saturationHigh: "高饱和度",
|
|
126578
|
+
saturationLow: "低饱和度",
|
|
126579
|
+
resetButtonPosition: "重置按钮位置",
|
|
126580
|
+
moveButtonToCorner: "将按钮移到角落",
|
|
126581
|
+
moveButtonTopLeft: "将按钮移到左上角",
|
|
126582
|
+
moveButtonTopRight: "将按钮移到右上角",
|
|
126583
|
+
moveButtonBottomLeft: "将按钮移到左下角",
|
|
126584
|
+
moveButtonBottomRight: "将按钮移到右下角"
|
|
126585
|
+
},
|
|
126586
|
+
button: {
|
|
126587
|
+
openAccessibilityMenu: "打开无障碍菜单",
|
|
126588
|
+
accessibilityIconAlt: "无障碍",
|
|
126589
|
+
moveHint: "使用上下方向键移动此按钮,使用左右方向键切换到另一侧。按住 Shift 键可更快移动。",
|
|
126590
|
+
positionAnnouncement: "无障碍按钮已移到{side, select, left {左} other {右}}边缘,距底部 {bottom} 像素。"
|
|
126591
|
+
}
|
|
126592
|
+
};
|
|
126398
126593
|
var zh = {
|
|
126399
126594
|
accessTabAddAccess: accessTabAddAccess,
|
|
126400
126595
|
accessTabLabels: accessTabLabels,
|
|
@@ -126690,7 +126885,8 @@ var zh = {
|
|
|
126690
126885
|
virtualMachineAdminTab: virtualMachineAdminTab,
|
|
126691
126886
|
virtualMachineNetworkPolicies: virtualMachineNetworkPolicies,
|
|
126692
126887
|
virtualMachineSecrets: virtualMachineSecrets,
|
|
126693
|
-
virtualMachineNetworkSection: virtualMachineNetworkSection
|
|
126888
|
+
virtualMachineNetworkSection: virtualMachineNetworkSection,
|
|
126889
|
+
accessibility: accessibility
|
|
126694
126890
|
};
|
|
126695
126891
|
|
|
126696
126892
|
/**
|
|
@@ -181330,7 +181526,7 @@ const PaginationContent = React.forwardRef(({ className, ...props }, ref) => (js
|
|
|
181330
181526
|
PaginationContent.displayName = 'PaginationContent';
|
|
181331
181527
|
const PaginationItem = React.forwardRef(({ className, ...props }, ref) => jsx("li", { ref: ref, className: cn('', className), ...props }));
|
|
181332
181528
|
PaginationItem.displayName = 'PaginationItem';
|
|
181333
|
-
const PaginationLink = ({ className, isActive, size = 'icon', ...props }) => (jsx("a", { "aria-current": isActive ? 'page' : undefined, className: cn(buttonVariants({
|
|
181529
|
+
const PaginationLink = ({ className, isActive, size = 'icon', ...props }) => (jsx("a", { "aria-current": isActive ? 'page' : undefined, className: cn(buttonVariants$1({
|
|
181334
181530
|
variant: isActive ? 'outline' : 'ghost',
|
|
181335
181531
|
size,
|
|
181336
181532
|
}), className), ...props }));
|
|
@@ -271469,8 +271665,8 @@ function Calendar({ className, classNames, showOutsideDays = true, captionLayout
|
|
|
271469
271665
|
months: cn('flex gap-4 flex-col md:flex-row relative', defaultClassNames.months),
|
|
271470
271666
|
month: cn('flex flex-col w-full gap-4', defaultClassNames.month),
|
|
271471
271667
|
nav: cn('flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between', defaultClassNames.nav),
|
|
271472
|
-
button_previous: cn(buttonVariants({ variant: buttonVariant }), 'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none', defaultClassNames.button_previous),
|
|
271473
|
-
button_next: cn(buttonVariants({ variant: buttonVariant }), 'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none', defaultClassNames.button_next),
|
|
271668
|
+
button_previous: cn(buttonVariants$1({ variant: buttonVariant }), 'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none', defaultClassNames.button_previous),
|
|
271669
|
+
button_next: cn(buttonVariants$1({ variant: buttonVariant }), 'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none', defaultClassNames.button_next),
|
|
271474
271670
|
month_caption: cn('flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)', defaultClassNames.month_caption),
|
|
271475
271671
|
dropdowns: cn('w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5', defaultClassNames.dropdowns),
|
|
271476
271672
|
dropdown_root: cn('relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md', defaultClassNames.dropdown_root),
|
|
@@ -283495,9 +283691,9 @@ const AlertDialogTitle = React.forwardRef(({ className, ...props }, ref) => (jsx
|
|
|
283495
283691
|
AlertDialogTitle.displayName = Title2.displayName;
|
|
283496
283692
|
const AlertDialogDescription = React.forwardRef(({ className, ...props }, ref) => (jsx(Description2, { ref: ref, className: cn('text-muted-foreground text-sm', className), ...props })));
|
|
283497
283693
|
AlertDialogDescription.displayName = Description2.displayName;
|
|
283498
|
-
const AlertDialogAction = React.forwardRef(({ className, ...props }, ref) => (jsx(Action, { ref: ref, className: cn(buttonVariants(), className), ...props })));
|
|
283694
|
+
const AlertDialogAction = React.forwardRef(({ className, ...props }, ref) => (jsx(Action, { ref: ref, className: cn(buttonVariants$1(), className), ...props })));
|
|
283499
283695
|
AlertDialogAction.displayName = Action.displayName;
|
|
283500
|
-
const AlertDialogCancel = React.forwardRef(({ className, ...props }, ref) => (jsx(Cancel, { ref: ref, className: cn(buttonVariants({ variant: 'outline' }), 'mt-2 sm:mt-0', className), ...props })));
|
|
283696
|
+
const AlertDialogCancel = React.forwardRef(({ className, ...props }, ref) => (jsx(Cancel, { ref: ref, className: cn(buttonVariants$1({ variant: 'outline' }), 'mt-2 sm:mt-0', className), ...props })));
|
|
283501
283697
|
AlertDialogCancel.displayName = Cancel.displayName;
|
|
283502
283698
|
|
|
283503
283699
|
const hostedDomainStatus = (row) => {
|
|
@@ -295511,6 +295707,568 @@ var projectInstructionsModal = /*#__PURE__*/Object.freeze({
|
|
|
295511
295707
|
ProjectInstructionsModal: ProjectInstructionsModal
|
|
295512
295708
|
});
|
|
295513
295709
|
|
|
295710
|
+
const defaultSettings = {
|
|
295711
|
+
invertColors: false,
|
|
295712
|
+
highlightLinks: false,
|
|
295713
|
+
textSize: 'normal',
|
|
295714
|
+
textSpacing: 'none',
|
|
295715
|
+
pauseAnimations: false,
|
|
295716
|
+
hideImages: false,
|
|
295717
|
+
dyslexiaFont: 'normal',
|
|
295718
|
+
customCursor: false,
|
|
295719
|
+
tooltips: false,
|
|
295720
|
+
lineHeight: false,
|
|
295721
|
+
textAlign: 'normal',
|
|
295722
|
+
saturation: 'normal',
|
|
295723
|
+
contrastMode: 'normal',
|
|
295724
|
+
};
|
|
295725
|
+
const AccessibilityContext = createContext(undefined);
|
|
295726
|
+
// localStorage throws in sandboxed iframes and when site data is blocked; settings then live in memory.
|
|
295727
|
+
function storeSettings(settings) {
|
|
295728
|
+
try {
|
|
295729
|
+
if (settings)
|
|
295730
|
+
localStorage.setItem('accessibility-settings', JSON.stringify(settings));
|
|
295731
|
+
else
|
|
295732
|
+
localStorage.removeItem('accessibility-settings');
|
|
295733
|
+
}
|
|
295734
|
+
catch (_a) { }
|
|
295735
|
+
}
|
|
295736
|
+
function AccessibilityProvider({ children }) {
|
|
295737
|
+
const [settings, setSettings] = useState(defaultSettings);
|
|
295738
|
+
const [isToolbarOpen, setIsToolbarOpen] = useState(false);
|
|
295739
|
+
useEffect(() => {
|
|
295740
|
+
setSettings(defaultSettings);
|
|
295741
|
+
storeSettings(null);
|
|
295742
|
+
}, []);
|
|
295743
|
+
useEffect(() => {
|
|
295744
|
+
const root = document.documentElement;
|
|
295745
|
+
if (settings.contrastMode === 'invert') {
|
|
295746
|
+
root.style.setProperty('--accessibility-invert', 'invert(1)');
|
|
295747
|
+
document.body.classList.add('accessibility-invert');
|
|
295748
|
+
}
|
|
295749
|
+
else {
|
|
295750
|
+
root.style.setProperty('--accessibility-invert', 'invert(0)');
|
|
295751
|
+
document.body.classList.remove('accessibility-invert');
|
|
295752
|
+
}
|
|
295753
|
+
const fontSizeMap = {
|
|
295754
|
+
normal: '1',
|
|
295755
|
+
large: '1.2',
|
|
295756
|
+
larger: '1.4',
|
|
295757
|
+
};
|
|
295758
|
+
root.style.setProperty('--accessibility-font-size', fontSizeMap[settings.textSize]);
|
|
295759
|
+
document.body.classList.toggle('accessibility-text-size', settings.textSize !== 'normal');
|
|
295760
|
+
const spacingMap = {
|
|
295761
|
+
none: { letter: 'normal', word: 'normal' },
|
|
295762
|
+
light: { letter: '0.05em', word: '0.1em' },
|
|
295763
|
+
moderate: { letter: '0.1em', word: '0.2em' },
|
|
295764
|
+
heavy: { letter: '0.15em', word: '0.3em' },
|
|
295765
|
+
};
|
|
295766
|
+
const spacing = spacingMap[settings.textSpacing];
|
|
295767
|
+
root.style.setProperty('--accessibility-letter-spacing', spacing.letter);
|
|
295768
|
+
root.style.setProperty('--accessibility-word-spacing', spacing.word);
|
|
295769
|
+
document.body.classList.toggle('accessibility-text-spacing', settings.textSpacing !== 'none');
|
|
295770
|
+
if (settings.pauseAnimations) {
|
|
295771
|
+
document.body.classList.add('accessibility-pause-animations');
|
|
295772
|
+
}
|
|
295773
|
+
else {
|
|
295774
|
+
document.body.classList.remove('accessibility-pause-animations');
|
|
295775
|
+
}
|
|
295776
|
+
if (settings.lineHeight) {
|
|
295777
|
+
root.style.setProperty('--accessibility-line-height', '1.8');
|
|
295778
|
+
document.body.classList.add('accessibility-line-height');
|
|
295779
|
+
}
|
|
295780
|
+
else {
|
|
295781
|
+
root.style.setProperty('--accessibility-line-height', '1.5');
|
|
295782
|
+
document.body.classList.remove('accessibility-line-height');
|
|
295783
|
+
}
|
|
295784
|
+
const saturationMap = {
|
|
295785
|
+
normal: 'saturate(1)',
|
|
295786
|
+
high: 'saturate(1.8)',
|
|
295787
|
+
low: 'saturate(0.3)',
|
|
295788
|
+
};
|
|
295789
|
+
root.style.setProperty('--accessibility-saturation', saturationMap[settings.saturation]);
|
|
295790
|
+
document.body.classList.toggle('accessibility-saturation', settings.saturation !== 'normal');
|
|
295791
|
+
document.body.classList.toggle('accessibility-custom-cursor', settings.customCursor);
|
|
295792
|
+
const body = document.body;
|
|
295793
|
+
body.classList.toggle('accessibility-highlight-links', settings.highlightLinks);
|
|
295794
|
+
body.classList.toggle('accessibility-hide-images', settings.hideImages);
|
|
295795
|
+
body.classList.toggle('accessibility-dyslexia-friendly', settings.dyslexiaFont === 'dyslexia');
|
|
295796
|
+
body.classList.toggle('accessibility-legible-font', settings.dyslexiaFont === 'legible');
|
|
295797
|
+
body.classList.toggle('accessibility-pause-animations', settings.pauseAnimations);
|
|
295798
|
+
body.classList.toggle('accessibility-tooltips', settings.tooltips);
|
|
295799
|
+
body.classList.remove('accessibility-text-left', 'accessibility-text-center', 'accessibility-text-right', 'accessibility-text-justify');
|
|
295800
|
+
if (settings.textAlign !== 'normal') {
|
|
295801
|
+
body.classList.add(`accessibility-text-${settings.textAlign}`);
|
|
295802
|
+
}
|
|
295803
|
+
body.classList.remove('accessibility-high-contrast', 'accessibility-dark-contrast', 'accessibility-light-contrast');
|
|
295804
|
+
if (settings.contrastMode === 'dark') {
|
|
295805
|
+
body.classList.add('accessibility-dark-contrast');
|
|
295806
|
+
}
|
|
295807
|
+
else if (settings.contrastMode === 'light') {
|
|
295808
|
+
body.classList.add('accessibility-light-contrast');
|
|
295809
|
+
}
|
|
295810
|
+
}, [settings]);
|
|
295811
|
+
const updateSetting = (key, value) => {
|
|
295812
|
+
const newSettings = { ...settings, [key]: value };
|
|
295813
|
+
setSettings(newSettings);
|
|
295814
|
+
storeSettings(newSettings);
|
|
295815
|
+
};
|
|
295816
|
+
const resetSettings = () => {
|
|
295817
|
+
setSettings(defaultSettings);
|
|
295818
|
+
storeSettings(null);
|
|
295819
|
+
};
|
|
295820
|
+
return (jsx(AccessibilityContext.Provider, { value: {
|
|
295821
|
+
settings,
|
|
295822
|
+
updateSetting,
|
|
295823
|
+
resetSettings,
|
|
295824
|
+
isToolbarOpen,
|
|
295825
|
+
setIsToolbarOpen,
|
|
295826
|
+
}, children: children }));
|
|
295827
|
+
}
|
|
295828
|
+
function useAccessibility() {
|
|
295829
|
+
const context = useContext(AccessibilityContext);
|
|
295830
|
+
if (context === undefined) {
|
|
295831
|
+
throw new Error('useAccessibility must be used within an AccessibilityProvider');
|
|
295832
|
+
}
|
|
295833
|
+
return context;
|
|
295834
|
+
}
|
|
295835
|
+
|
|
295836
|
+
// Mirrors the host app's shadcn v4 button rather than ../ui/button so the
|
|
295837
|
+
// menu keeps its exact look: ../ui/button's `[&_svg]:size-4` would shrink the
|
|
295838
|
+
// h-5 icons and the 44px accessibility icon.
|
|
295839
|
+
const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
|
|
295840
|
+
variants: {
|
|
295841
|
+
variant: {
|
|
295842
|
+
default: 'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',
|
|
295843
|
+
outline: 'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',
|
|
295844
|
+
ghost: 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',
|
|
295845
|
+
},
|
|
295846
|
+
size: {
|
|
295847
|
+
default: 'h-9 px-4 py-2 has-[>svg]:px-3',
|
|
295848
|
+
icon: 'size-9',
|
|
295849
|
+
},
|
|
295850
|
+
},
|
|
295851
|
+
defaultVariants: {
|
|
295852
|
+
variant: 'default',
|
|
295853
|
+
size: 'default',
|
|
295854
|
+
},
|
|
295855
|
+
});
|
|
295856
|
+
function AccessibilityButton({ className, variant, size, ...props }) {
|
|
295857
|
+
return (jsx("button", { "data-slot": "button", className: cn(buttonVariants({ variant, size, className })), ...props }));
|
|
295858
|
+
}
|
|
295859
|
+
|
|
295860
|
+
function AccessibilityOption({ icon, label, isActive, onClick, subtext, options, activeIndex, }) {
|
|
295861
|
+
return (jsxs(AccessibilityButton, { onClick: onClick, variant: isActive ? 'default' : 'outline', className: `relative flex h-24 w-full flex-col items-center justify-center gap-1 text-xs font-medium ${isActive
|
|
295862
|
+
? 'border-[#38A1E5] bg-[#38A1E5] text-white hover:bg-[#D0E0FF] hover:text-gray-800'
|
|
295863
|
+
: 'border-gray-200 bg-white text-gray-700 hover:bg-gray-50'}`, children: [isActive && (jsx("div", { className: "absolute top-2 right-2 flex h-4 w-4 items-center justify-center rounded-full bg-[#38A1E5]", children: jsx("div", { className: "h-2 w-2 rounded-full bg-white" }) })), jsx("div", { className: "text-lg", children: icon }), jsx("span", { className: "text-center leading-tight", children: label }), isActive && subtext && (jsxs(Fragment$1, { children: [jsx("span", { className: "text-xs font-medium text-[#38A1E5]", children: subtext }), options && options.length > 0 && (jsx("div", { className: "mt-1 flex gap-1", children: options.map((_, index) => (jsx("div", { className: `h-1 w-3 rounded-full ${index === activeIndex ? 'bg-[#38A1E5]' : 'bg-gray-300'}` }, index))) }))] }))] }));
|
|
295864
|
+
}
|
|
295865
|
+
const BUTTON_CORNERS = [
|
|
295866
|
+
{ corner: 'top-left', labelKey: 'accessibility.toolbar.moveButtonTopLeft', Icon: ArrowUpLeft },
|
|
295867
|
+
{ corner: 'top-right', labelKey: 'accessibility.toolbar.moveButtonTopRight', Icon: ArrowUpRight },
|
|
295868
|
+
{
|
|
295869
|
+
corner: 'bottom-left',
|
|
295870
|
+
labelKey: 'accessibility.toolbar.moveButtonBottomLeft',
|
|
295871
|
+
Icon: ArrowDownLeft,
|
|
295872
|
+
},
|
|
295873
|
+
{
|
|
295874
|
+
corner: 'bottom-right',
|
|
295875
|
+
labelKey: 'accessibility.toolbar.moveButtonBottomRight',
|
|
295876
|
+
Icon: ArrowDownRight,
|
|
295877
|
+
},
|
|
295878
|
+
];
|
|
295879
|
+
function AccessibilityToolbar({ isButtonPositionCustom = false, onResetButtonPosition, onMoveButtonToCorner, } = {}) {
|
|
295880
|
+
const t = useT();
|
|
295881
|
+
const { settings, updateSetting, resetSettings, isToolbarOpen, setIsToolbarOpen } = useAccessibility();
|
|
295882
|
+
if (!isToolbarOpen)
|
|
295883
|
+
return null;
|
|
295884
|
+
const cycleContrastMode = () => {
|
|
295885
|
+
const modes = ['normal', 'invert', 'dark', 'light'];
|
|
295886
|
+
const currentIndex = modes.indexOf(settings.contrastMode);
|
|
295887
|
+
const nextIndex = (currentIndex + 1) % modes.length;
|
|
295888
|
+
updateSetting('contrastMode', modes[nextIndex]);
|
|
295889
|
+
};
|
|
295890
|
+
const cycleTextSize = () => {
|
|
295891
|
+
const sizes = ['normal', 'large', 'larger'];
|
|
295892
|
+
const currentIndex = sizes.indexOf(settings.textSize);
|
|
295893
|
+
const nextIndex = (currentIndex + 1) % sizes.length;
|
|
295894
|
+
updateSetting('textSize', sizes[nextIndex]);
|
|
295895
|
+
};
|
|
295896
|
+
const cycleTextSpacing = () => {
|
|
295897
|
+
const spacings = ['none', 'light', 'moderate', 'heavy'];
|
|
295898
|
+
const currentIndex = spacings.indexOf(settings.textSpacing);
|
|
295899
|
+
const nextIndex = (currentIndex + 1) % spacings.length;
|
|
295900
|
+
updateSetting('textSpacing', spacings[nextIndex]);
|
|
295901
|
+
};
|
|
295902
|
+
const cycleDyslexiaFont = () => {
|
|
295903
|
+
const fonts = ['normal', 'dyslexia', 'legible'];
|
|
295904
|
+
const currentIndex = fonts.indexOf(settings.dyslexiaFont);
|
|
295905
|
+
const nextIndex = (currentIndex + 1) % fonts.length;
|
|
295906
|
+
updateSetting('dyslexiaFont', fonts[nextIndex]);
|
|
295907
|
+
};
|
|
295908
|
+
const cycleTextAlign = () => {
|
|
295909
|
+
const aligns = ['normal', 'left', 'center', 'right', 'justify'];
|
|
295910
|
+
const currentIndex = aligns.indexOf(settings.textAlign);
|
|
295911
|
+
const nextIndex = (currentIndex + 1) % aligns.length;
|
|
295912
|
+
updateSetting('textAlign', aligns[nextIndex]);
|
|
295913
|
+
};
|
|
295914
|
+
const cycleSaturation = () => {
|
|
295915
|
+
const saturations = ['normal', 'high', 'low'];
|
|
295916
|
+
const currentIndex = saturations.indexOf(settings.saturation);
|
|
295917
|
+
const nextIndex = (currentIndex + 1) % saturations.length;
|
|
295918
|
+
updateSetting('saturation', saturations[nextIndex]);
|
|
295919
|
+
};
|
|
295920
|
+
const getContrastLabel = () => {
|
|
295921
|
+
const labels = {
|
|
295922
|
+
normal: t('accessibility.toolbar.contrastPlus'),
|
|
295923
|
+
invert: t('accessibility.toolbar.contrastInvertColors'),
|
|
295924
|
+
dark: t('accessibility.toolbar.contrastDark'),
|
|
295925
|
+
light: t('accessibility.toolbar.contrastLight'),
|
|
295926
|
+
};
|
|
295927
|
+
return labels[settings.contrastMode];
|
|
295928
|
+
};
|
|
295929
|
+
const getTextSizeLabel = () => {
|
|
295930
|
+
const labels = {
|
|
295931
|
+
normal: t('accessibility.toolbar.textSizeNormal'),
|
|
295932
|
+
large: t('accessibility.toolbar.textSizeLarge'),
|
|
295933
|
+
larger: t('accessibility.toolbar.textSizeLarger'),
|
|
295934
|
+
};
|
|
295935
|
+
return labels[settings.textSize];
|
|
295936
|
+
};
|
|
295937
|
+
const getTextSpacingLabel = () => {
|
|
295938
|
+
const labels = {
|
|
295939
|
+
none: t('accessibility.toolbar.textSpacing'),
|
|
295940
|
+
light: t('accessibility.toolbar.spacingLight'),
|
|
295941
|
+
moderate: t('accessibility.toolbar.spacingModerate'),
|
|
295942
|
+
heavy: t('accessibility.toolbar.spacingHeavy'),
|
|
295943
|
+
};
|
|
295944
|
+
return labels[settings.textSpacing];
|
|
295945
|
+
};
|
|
295946
|
+
const getDyslexiaLabel = () => {
|
|
295947
|
+
const labels = {
|
|
295948
|
+
normal: t('accessibility.toolbar.dyslexiaFriendly'),
|
|
295949
|
+
dyslexia: t('accessibility.toolbar.dyslexiaFont'),
|
|
295950
|
+
legible: t('accessibility.toolbar.legibleFont'),
|
|
295951
|
+
};
|
|
295952
|
+
return labels[settings.dyslexiaFont];
|
|
295953
|
+
};
|
|
295954
|
+
const getTextAlignLabel = () => {
|
|
295955
|
+
const labels = {
|
|
295956
|
+
normal: t('accessibility.toolbar.textAlign'),
|
|
295957
|
+
left: t('accessibility.toolbar.alignLeft'),
|
|
295958
|
+
center: t('accessibility.toolbar.alignCenter'),
|
|
295959
|
+
right: t('accessibility.toolbar.alignRight'),
|
|
295960
|
+
justify: t('accessibility.toolbar.justify'),
|
|
295961
|
+
};
|
|
295962
|
+
return labels[settings.textAlign];
|
|
295963
|
+
};
|
|
295964
|
+
const getSaturationLabel = () => {
|
|
295965
|
+
const labels = {
|
|
295966
|
+
normal: t('accessibility.toolbar.saturationNormal'),
|
|
295967
|
+
high: t('accessibility.toolbar.saturationHigh'),
|
|
295968
|
+
low: t('accessibility.toolbar.saturationLow'),
|
|
295969
|
+
};
|
|
295970
|
+
return labels[settings.saturation];
|
|
295971
|
+
};
|
|
295972
|
+
const getTextAlignIcon = () => {
|
|
295973
|
+
const icons = {
|
|
295974
|
+
normal: jsx(AlignLeft, { className: "h-5 w-5" }),
|
|
295975
|
+
left: jsx(AlignLeft, { className: "h-5 w-5" }),
|
|
295976
|
+
center: jsx(AlignCenter, { className: "h-5 w-5" }),
|
|
295977
|
+
right: jsx(AlignRight, { className: "h-5 w-5" }),
|
|
295978
|
+
justify: jsx(AlignJustify, { className: "h-5 w-5" }),
|
|
295979
|
+
};
|
|
295980
|
+
return icons[settings.textAlign];
|
|
295981
|
+
};
|
|
295982
|
+
const toggleTooltips = () => {
|
|
295983
|
+
updateSetting('tooltips', !settings.tooltips);
|
|
295984
|
+
};
|
|
295985
|
+
const toggleCustomCursor = () => {
|
|
295986
|
+
updateSetting('customCursor', !settings.customCursor);
|
|
295987
|
+
};
|
|
295988
|
+
return (jsx(Fragment$1, { children: jsxs("div", { className: "fixed top-0 right-0 z-50 flex h-full w-80 flex-col bg-white shadow-2xl", children: [jsxs("div", { className: "flex flex-shrink-0 items-center justify-between bg-gradient-to-r from-[#38A1E5] to-[#7284FF] p-4 text-white", children: [jsx("h2", { className: "text-lg font-semibold", children: t('accessibility.toolbar.accessibilityMenu') }), jsx(AccessibilityButton, { onClick: () => setIsToolbarOpen(false), variant: "ghost", size: "icon", className: "text-white hover:bg-transparent hover:text-white", children: jsx(X$1, { className: "h-5 w-5" }) })] }), jsxs("div", { className: "flex flex-1 flex-col overflow-y-auto bg-white p-4", onClick: (e) => e.stopPropagation(), children: [jsxs("div", { className: "grid flex-1 grid-cols-2 gap-3", children: [jsx(AccessibilityOption, { icon: jsx(Circle, { className: "h-5 w-5" }), label: t('accessibility.toolbar.contrastPlus'), isActive: settings.contrastMode !== 'normal', onClick: cycleContrastMode, subtext: settings.contrastMode !== 'normal' ? getContrastLabel() : undefined, options: ['normal', 'invert', 'dark', 'light'], activeIndex: ['normal', 'invert', 'dark', 'light'].indexOf(settings.contrastMode) }), jsx(AccessibilityOption, { icon: jsx(Link$1, { className: "h-5 w-5" }), label: t('accessibility.toolbar.highlightLinks'), isActive: settings.highlightLinks, onClick: () => updateSetting('highlightLinks', !settings.highlightLinks) }), jsx(AccessibilityOption, { icon: jsx(Type, { className: "h-5 w-5" }), label: t('accessibility.toolbar.biggerText'), isActive: settings.textSize !== 'normal', onClick: cycleTextSize, subtext: settings.textSize !== 'normal' ? getTextSizeLabel() : undefined, options: ['normal', 'large', 'larger'], activeIndex: ['normal', 'large', 'larger'].indexOf(settings.textSize) }), jsx(AccessibilityOption, { icon: jsx(Minus, { className: "h-5 w-5 rotate-90" }), label: t('accessibility.toolbar.textSpacing'), isActive: settings.textSpacing !== 'none', onClick: cycleTextSpacing, subtext: settings.textSpacing !== 'none' ? getTextSpacingLabel() : undefined, options: ['none', 'light', 'moderate', 'heavy'], activeIndex: ['none', 'light', 'moderate', 'heavy'].indexOf(settings.textSpacing) }), jsx(AccessibilityOption, { icon: jsx(Pause, { className: "h-5 w-5" }), label: t('accessibility.toolbar.pauseAnimations'), isActive: settings.pauseAnimations, onClick: () => updateSetting('pauseAnimations', !settings.pauseAnimations) }), jsx(AccessibilityOption, { icon: jsx(ImageOff, { className: "h-5 w-5" }), label: t('accessibility.toolbar.hideImages'), isActive: settings.hideImages, onClick: () => updateSetting('hideImages', !settings.hideImages) }), jsx(AccessibilityOption, { icon: jsx("span", { className: "text-sm font-bold", children: "Df" }), label: t('accessibility.toolbar.dyslexiaFriendly'), isActive: settings.dyslexiaFont !== 'normal', onClick: cycleDyslexiaFont, subtext: settings.dyslexiaFont !== 'normal' ? getDyslexiaLabel() : undefined, options: ['normal', 'dyslexia', 'legible'], activeIndex: ['normal', 'dyslexia', 'legible'].indexOf(settings.dyslexiaFont) }), jsx(AccessibilityOption, { icon: jsx(MousePointer, { className: "h-5 w-5" }), label: t('accessibility.toolbar.cursor'), isActive: settings.customCursor, onClick: toggleCustomCursor }), jsx(AccessibilityOption, { icon: jsx(MessageSquare, { className: "h-5 w-5" }), label: t('accessibility.toolbar.tooltips'), isActive: settings.tooltips, onClick: toggleTooltips }), jsx(AccessibilityOption, { icon: jsxs("div", { className: "flex flex-col gap-0.5", children: [jsx("div", { className: "h-0.5 w-4 bg-current" }), jsx("div", { className: "h-0.5 w-4 bg-current" }), jsx("div", { className: "h-0.5 w-4 bg-current" })] }), label: t('accessibility.toolbar.lineHeight'), isActive: settings.lineHeight, onClick: () => updateSetting('lineHeight', !settings.lineHeight) }), jsx(AccessibilityOption, { icon: getTextAlignIcon(), label: t('accessibility.toolbar.textAlign'), isActive: settings.textAlign !== 'normal', onClick: cycleTextAlign, subtext: settings.textAlign !== 'normal' ? getTextAlignLabel() : undefined, options: ['normal', 'left', 'center', 'right', 'justify'], activeIndex: ['normal', 'left', 'center', 'right', 'justify'].indexOf(settings.textAlign) }), jsx(AccessibilityOption, { icon: jsx(Droplets, { className: "h-5 w-5" }), label: t('accessibility.toolbar.saturation'), isActive: settings.saturation !== 'normal', onClick: cycleSaturation, subtext: settings.saturation !== 'normal' ? getSaturationLabel() : undefined, options: ['normal', 'high', 'low'], activeIndex: ['normal', 'high', 'low'].indexOf(settings.saturation) })] }), onMoveButtonToCorner && (jsxs("div", { role: "group", "aria-labelledby": "accessibility-move-button-label", className: "mt-4 flex flex-shrink-0 items-center justify-between gap-2", children: [jsx("span", { id: "accessibility-move-button-label", className: "text-xs font-medium text-gray-700", children: t('accessibility.toolbar.moveButtonToCorner') }), jsx("div", { className: "flex gap-1", children: BUTTON_CORNERS.map(({ corner, labelKey, Icon }) => (jsx(AccessibilityButton, { onClick: () => onMoveButtonToCorner(corner), variant: "outline", size: "icon", "aria-label": t(labelKey), title: t(labelKey), className: "h-8 w-8 border-gray-200 bg-white text-gray-700 hover:bg-gray-50", children: jsx(Icon, { className: "h-4 w-4" }) }, corner))) })] })), isButtonPositionCustom && onResetButtonPosition && (jsxs(AccessibilityButton, { onClick: onResetButtonPosition, variant: "outline", className: "mt-4 w-full flex-shrink-0 border-gray-200 bg-white py-3 text-gray-700 hover:bg-gray-50", children: [jsx(RotateCcw, { className: "mr-2 h-4 w-4" }), t('accessibility.toolbar.resetButtonPosition')] })), jsxs(AccessibilityButton, { onClick: () => {
|
|
295989
|
+
resetSettings();
|
|
295990
|
+
onResetButtonPosition === null || onResetButtonPosition === void 0 ? void 0 : onResetButtonPosition();
|
|
295991
|
+
}, className: "mt-4 w-full flex-shrink-0 bg-gradient-to-r from-[#38A1E5] to-[#7284FF] py-3 text-white shadow-lg hover:from-[#2E8BC7] hover:to-[#0066DD]", children: [jsx(RotateCcw, { className: "mr-2 h-4 w-4" }), t('accessibility.toolbar.resetAllAccessibilitySettings')] })] })] }) }));
|
|
295992
|
+
}
|
|
295993
|
+
|
|
295994
|
+
function AccessibilityIcon({ className, title }) {
|
|
295995
|
+
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: 44, height: 44, viewBox: "0 0 60 60", fill: "none", role: "img", "aria-label": title, className: className, children: jsx("path", { d: "M30,4.42857143 C44.12271,4.42857143 55.5714286,15.87729 55.5714286,30 C55.5714286,44.12271 44.12271,55.5714286 30,55.5714286 C15.87729,55.5714286 4.42857143,44.12271 4.42857143,30 C4.42857143,15.87729 15.87729,4.42857143 30,4.42857143 Z M30,6.42857143 C16.9818595,6.42857143 6.42857143,16.9818595 6.42857143,30 C6.42857143,43.0181405 16.9818595,53.5714286 30,53.5714286 C43.0181405,53.5714286 53.5714286,43.0181405 53.5714286,30 C53.5714286,16.9818595 43.0181405,6.42857143 30,6.42857143 Z M40.5936329,24.636146 C40.8208154,24.6942382 41.032297,24.8027599 41.212927,24.9537151 C41.3927444,25.1040671 41.5372605,25.2927156 41.6362456,25.506032 C41.7348561,25.7185411 41.7857143,25.9504498 41.7857143,26.1964545 C41.7780029,26.5779794 41.6395197,26.9452414 41.3935596,27.2352841 C41.1463511,27.5267988 40.8059352,27.7221149 40.4376358,27.7856619 C38.1921773,28.2017648 35.924387,28.4827808 33.6481064,28.6271294 C33.504948,28.636723 33.3651112,28.6758744 33.236922,28.7423749 C33.1082304,28.8090766 32.9940039,28.9018917 32.9011681,29.0153772 C32.8079332,29.1293505 32.7382931,29.2617886 32.6966918,29.404413 C32.6758615,29.4759144 32.6622539,29.5492793 32.6556797,29.6151616 L32.6510699,29.707205 L32.6598659,29.8496307 L32.8523035,31.5976067 C33.0926408,33.748446 33.5345387,35.8701755 34.1700609,37.9296172 L34.4174424,38.6989233 L34.6845982,39.467246 L35.9271291,42.8464114 C35.9992453,43.0440742 36.0318055,43.2541674 36.0229684,43.4645736 C36.0141278,43.6750654 35.9640303,43.8817121 35.8754594,44.0726551 C35.7867069,44.2638976 35.6611068,44.435479 35.5058759,44.5773262 C35.3501721,44.7195962 35.1677426,44.8289881 34.990022,44.8912207 C34.813373,44.9615763 34.6253467,44.9984764 34.4204191,45 C34.1147901,44.9943164 33.8175473,44.8987335 33.5650597,44.7252745 C33.4238771,44.6283171 33.2997507,44.5091367 33.1890431,44.3580526 L33.0826737,44.1959755 L33.0074053,44.0456077 L32.6901551,43.3562659 C31.8320879,41.4806152 31.0484874,39.6428286 30.3335907,37.8221303 L30.0024971,36.9627165 L29.5751047,38.0696169 C29.3403684,38.6636654 29.0998399,39.2560704 28.8536693,39.8464776 L28.4802005,40.730546 L27.9043756,42.0504488 L27.3109116,43.3600706 L27.0273167,43.9425803 C26.8810403,44.3389204 26.5849764,44.6608321 26.2034873,44.8369557 C25.8203243,45.0138521 25.3831542,45.0287926 24.9891662,44.8783588 C24.596572,44.7285499 24.2795594,44.4271943 24.1072539,44.0414047 C23.9885793,43.7756939 23.9446874,43.4836867 23.9834048,43.1768668 L24.016611,42.9910892 L24.0667666,42.8262042 L25.307875,39.4507095 C26.0439275,37.4198431 26.5851782,35.3222044 26.9239335,33.1916604 L27.0414597,32.3912301 L27.141282,31.5772235 L27.3403361,29.8381618 C27.3581635,29.6889408 27.3459492,29.5375642 27.3045081,29.3935084 C27.2630999,29.2497044 27.1934915,29.1162414 27.1000261,29.0011883 C27.0070148,28.8866944 26.8923305,28.7928596 26.7631114,28.7253145 C26.6343439,28.6580256 26.4937323,28.6181655 26.35351,28.6082966 C24.0561093,28.4626746 21.7692364,28.17737 19.5069975,27.7542651 C19.3015835,27.7165557 19.1057712,27.6379419 18.9308258,27.5230481 C18.7563857,27.408486 18.6063103,27.2602422 18.4889941,27.0867756 C18.3721069,26.9139017 18.2901967,26.7194847 18.2478998,26.5149205 C18.2055002,26.3103882 18.2034637,26.0993152 18.2403615,25.9020167 C18.2758029,25.695193 18.3515339,25.4974971 18.4633288,25.3201771 C18.5754166,25.1425366 18.7215515,24.9891682 18.8933065,24.8690391 C19.0655425,24.7486376 19.2599761,24.6643395 19.4651939,24.6211361 C19.6706526,24.577882 19.8826185,24.5767675 20.0822706,24.6166765 C26.6343689,25.8477827 33.3528511,25.8477827 39.8979716,24.6180222 C40.1283133,24.5717053 40.3659882,24.5779122 40.5936329,24.636146 Z M32.8056386,16.182956 C34.3520224,17.7551666 34.3520224,20.3006423 32.80563,21.8728616 C31.2542658,23.450066 28.7353061,23.450066 27.1840106,21.8728616 C25.6375563,20.3006489 25.6375563,17.7551599 27.1839933,16.1829647 C28.7352993,14.6056799 31.2542726,14.6056799 32.8056386,16.182956 Z", fill: "#FFFFFF", fillRule: "nonzero" }) }));
|
|
295996
|
+
}
|
|
295997
|
+
|
|
295998
|
+
function FloatingAccessibilityButton() {
|
|
295999
|
+
const t = useT();
|
|
296000
|
+
const { isToolbarOpen, setIsToolbarOpen } = useAccessibility();
|
|
296001
|
+
return (jsx(AccessibilityButton, { onClick: () => setIsToolbarOpen(!isToolbarOpen), className: "h-14 w-14 rounded-full bg-[#38A1E5] shadow-lg transition-all duration-200 hover:scale-105 hover:bg-[#2E8BC7]", size: "icon", "aria-label": t('accessibility.button.openAccessibilityMenu'), children: jsx(AccessibilityIcon, { title: t('accessibility.button.accessibilityIconAlt'), className: "size-11 text-white" }) }));
|
|
296002
|
+
}
|
|
296003
|
+
|
|
296004
|
+
const DRAGGABLE_SNAP_TRANSITION = 'right 350ms cubic-bezier(0.34, 1.56, 0.64, 1), bottom 350ms cubic-bezier(0.34, 1.56, 0.64, 1)';
|
|
296005
|
+
const VERTICAL_KEYS = { ArrowUp: 1, ArrowDown: -1 };
|
|
296006
|
+
const SIDE_KEYS = {
|
|
296007
|
+
ArrowLeft: 'left',
|
|
296008
|
+
ArrowRight: 'right',
|
|
296009
|
+
};
|
|
296010
|
+
function isAnchor(value) {
|
|
296011
|
+
if (!value || typeof value !== 'object')
|
|
296012
|
+
return false;
|
|
296013
|
+
const { side, bottom } = value;
|
|
296014
|
+
return ((side === 'left' || side === 'right') && typeof bottom === 'number' && Number.isFinite(bottom));
|
|
296015
|
+
}
|
|
296016
|
+
function readStored(storageKey) {
|
|
296017
|
+
try {
|
|
296018
|
+
const raw = window.localStorage.getItem(storageKey);
|
|
296019
|
+
if (!raw)
|
|
296020
|
+
return null;
|
|
296021
|
+
const parsed = JSON.parse(raw);
|
|
296022
|
+
return isAnchor(parsed) ? { side: parsed.side, bottom: parsed.bottom } : null;
|
|
296023
|
+
}
|
|
296024
|
+
catch (_a) {
|
|
296025
|
+
return null;
|
|
296026
|
+
}
|
|
296027
|
+
}
|
|
296028
|
+
function writeStored(storageKey, value) {
|
|
296029
|
+
try {
|
|
296030
|
+
if (value)
|
|
296031
|
+
window.localStorage.setItem(storageKey, JSON.stringify(value));
|
|
296032
|
+
else
|
|
296033
|
+
window.localStorage.removeItem(storageKey);
|
|
296034
|
+
}
|
|
296035
|
+
catch (_a) {
|
|
296036
|
+
// Storage unavailable (private mode, quota, blocked): keep it in memory.
|
|
296037
|
+
}
|
|
296038
|
+
}
|
|
296039
|
+
function prefersReducedMotion() {
|
|
296040
|
+
return (typeof window.matchMedia === 'function' &&
|
|
296041
|
+
window.matchMedia('(prefers-reduced-motion: reduce)').matches);
|
|
296042
|
+
}
|
|
296043
|
+
function viewportSize() {
|
|
296044
|
+
var _a, _b;
|
|
296045
|
+
const vv = window.visualViewport;
|
|
296046
|
+
return {
|
|
296047
|
+
width: (_a = vv === null || vv === void 0 ? void 0 : vv.width) !== null && _a !== void 0 ? _a : window.innerWidth,
|
|
296048
|
+
height: (_b = vv === null || vv === void 0 ? void 0 : vv.height) !== null && _b !== void 0 ? _b : window.innerHeight,
|
|
296049
|
+
};
|
|
296050
|
+
}
|
|
296051
|
+
function useDraggablePosition({ storageKey, threshold = 5, margin = 8, step = 16, }) {
|
|
296052
|
+
const ref = useRef(null);
|
|
296053
|
+
// Viewport changes only re-derive `position` from `stored`, so the element
|
|
296054
|
+
// stays on its side and rotating back restores its height.
|
|
296055
|
+
const [stored, setStored] = useState(null);
|
|
296056
|
+
const [position, setPosition] = useState(null);
|
|
296057
|
+
const [announcement, setAnnouncement] = useState(null);
|
|
296058
|
+
// Never animate while dragging (must track the pointer 1:1) nor on the
|
|
296059
|
+
// initial restore.
|
|
296060
|
+
const [animate, setAnimate] = useState(false);
|
|
296061
|
+
const storedRef = useRef(null);
|
|
296062
|
+
const positionRef = useRef(null);
|
|
296063
|
+
const pressRef = useRef(null);
|
|
296064
|
+
const suppressClickRef = useRef(false);
|
|
296065
|
+
const clamp = useCallback((p) => {
|
|
296066
|
+
var _a, _b, _c;
|
|
296067
|
+
const rect = (_a = ref.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
296068
|
+
const { width, height } = viewportSize();
|
|
296069
|
+
const maxRight = width - ((_b = rect === null || rect === void 0 ? void 0 : rect.width) !== null && _b !== void 0 ? _b : 0) - margin;
|
|
296070
|
+
const maxBottom = height - ((_c = rect === null || rect === void 0 ? void 0 : rect.height) !== null && _c !== void 0 ? _c : 0) - margin;
|
|
296071
|
+
return {
|
|
296072
|
+
right: Math.max(margin, Math.min(p.right, maxRight)),
|
|
296073
|
+
bottom: Math.max(margin, Math.min(p.bottom, maxBottom)),
|
|
296074
|
+
};
|
|
296075
|
+
}, [margin]);
|
|
296076
|
+
const resolve = useCallback((a) => {
|
|
296077
|
+
var _a, _b;
|
|
296078
|
+
const width = (_b = (_a = ref.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().width) !== null && _b !== void 0 ? _b : 0;
|
|
296079
|
+
return clamp({
|
|
296080
|
+
right: a.side === 'right' ? margin : viewportSize().width - width - margin,
|
|
296081
|
+
bottom: a.bottom,
|
|
296082
|
+
});
|
|
296083
|
+
}, [clamp, margin]);
|
|
296084
|
+
const render = useCallback((p) => {
|
|
296085
|
+
positionRef.current = p;
|
|
296086
|
+
setPosition(p);
|
|
296087
|
+
}, []);
|
|
296088
|
+
const commit = useCallback((a) => {
|
|
296089
|
+
storedRef.current = a;
|
|
296090
|
+
setStored(a);
|
|
296091
|
+
writeStored(storageKey, a);
|
|
296092
|
+
}, [storageKey]);
|
|
296093
|
+
const currentPosition = useCallback(() => {
|
|
296094
|
+
var _a, _b, _c;
|
|
296095
|
+
if (positionRef.current)
|
|
296096
|
+
return positionRef.current;
|
|
296097
|
+
const rect = (_a = ref.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
296098
|
+
const { width, height } = viewportSize();
|
|
296099
|
+
return {
|
|
296100
|
+
right: width - ((_b = rect === null || rect === void 0 ? void 0 : rect.right) !== null && _b !== void 0 ? _b : width),
|
|
296101
|
+
bottom: height - ((_c = rect === null || rect === void 0 ? void 0 : rect.bottom) !== null && _c !== void 0 ? _c : height),
|
|
296102
|
+
};
|
|
296103
|
+
}, []);
|
|
296104
|
+
// An exact tie goes right, the default side.
|
|
296105
|
+
const nearestSide = useCallback((p) => {
|
|
296106
|
+
var _a, _b;
|
|
296107
|
+
const width = (_b = (_a = ref.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().width) !== null && _b !== void 0 ? _b : 0;
|
|
296108
|
+
const viewportWidth = viewportSize().width;
|
|
296109
|
+
const centre = viewportWidth - p.right - width / 2;
|
|
296110
|
+
return centre < viewportWidth / 2 ? 'left' : 'right';
|
|
296111
|
+
}, []);
|
|
296112
|
+
const settle = useCallback((a) => {
|
|
296113
|
+
const next = resolve(a);
|
|
296114
|
+
const anchor = { side: a.side, bottom: next.bottom };
|
|
296115
|
+
setAnimate(true);
|
|
296116
|
+
render(next);
|
|
296117
|
+
commit(anchor);
|
|
296118
|
+
return anchor;
|
|
296119
|
+
}, [commit, render, resolve]);
|
|
296120
|
+
const place = useCallback((a) => setAnnouncement(settle(a)), [settle]);
|
|
296121
|
+
useEffect(() => {
|
|
296122
|
+
const saved = readStored(storageKey);
|
|
296123
|
+
storedRef.current = saved;
|
|
296124
|
+
setStored(saved);
|
|
296125
|
+
render(saved && resolve(saved));
|
|
296126
|
+
const reclamp = () => {
|
|
296127
|
+
if (storedRef.current)
|
|
296128
|
+
render(resolve(storedRef.current));
|
|
296129
|
+
};
|
|
296130
|
+
const vv = window.visualViewport;
|
|
296131
|
+
window.addEventListener('resize', reclamp);
|
|
296132
|
+
window.addEventListener('orientationchange', reclamp);
|
|
296133
|
+
vv === null || vv === void 0 ? void 0 : vv.addEventListener('resize', reclamp);
|
|
296134
|
+
return () => {
|
|
296135
|
+
window.removeEventListener('resize', reclamp);
|
|
296136
|
+
window.removeEventListener('orientationchange', reclamp);
|
|
296137
|
+
vv === null || vv === void 0 ? void 0 : vv.removeEventListener('resize', reclamp);
|
|
296138
|
+
};
|
|
296139
|
+
}, [storageKey, resolve, render]);
|
|
296140
|
+
const onPointerDown = useCallback((e) => {
|
|
296141
|
+
if (!e.isPrimary || e.button !== 0)
|
|
296142
|
+
return;
|
|
296143
|
+
suppressClickRef.current = false;
|
|
296144
|
+
pressRef.current = {
|
|
296145
|
+
pointerId: e.pointerId,
|
|
296146
|
+
x: e.clientX,
|
|
296147
|
+
y: e.clientY,
|
|
296148
|
+
origin: currentPosition(),
|
|
296149
|
+
dragging: false,
|
|
296150
|
+
};
|
|
296151
|
+
}, [currentPosition]);
|
|
296152
|
+
const onPointerMove = useCallback((e) => {
|
|
296153
|
+
const press = pressRef.current;
|
|
296154
|
+
if (!press || press.pointerId !== e.pointerId)
|
|
296155
|
+
return;
|
|
296156
|
+
const dx = e.clientX - press.x;
|
|
296157
|
+
const dy = e.clientY - press.y;
|
|
296158
|
+
if (!press.dragging) {
|
|
296159
|
+
if (Math.hypot(dx, dy) < threshold)
|
|
296160
|
+
return;
|
|
296161
|
+
press.dragging = true;
|
|
296162
|
+
suppressClickRef.current = true;
|
|
296163
|
+
setAnimate(false);
|
|
296164
|
+
// Capture only once it is a real drag: capturing on pointerdown would
|
|
296165
|
+
// retarget a plain tap's click away from the button inside.
|
|
296166
|
+
try {
|
|
296167
|
+
e.currentTarget.setPointerCapture(e.pointerId);
|
|
296168
|
+
}
|
|
296169
|
+
catch (_a) {
|
|
296170
|
+
// Pointer already released; the drag still follows in-element moves.
|
|
296171
|
+
}
|
|
296172
|
+
}
|
|
296173
|
+
render(clamp({
|
|
296174
|
+
right: press.origin.right - dx,
|
|
296175
|
+
bottom: press.origin.bottom - dy,
|
|
296176
|
+
}));
|
|
296177
|
+
}, [clamp, render, threshold]);
|
|
296178
|
+
const endPress = useCallback((e) => {
|
|
296179
|
+
const press = pressRef.current;
|
|
296180
|
+
if (!press || press.pointerId !== e.pointerId)
|
|
296181
|
+
return;
|
|
296182
|
+
pressRef.current = null;
|
|
296183
|
+
if (!press.dragging)
|
|
296184
|
+
return;
|
|
296185
|
+
const released = positionRef.current;
|
|
296186
|
+
settle({ side: nearestSide(released), bottom: released.bottom });
|
|
296187
|
+
// A touch drag may never produce a click; don't let the flag swallow the
|
|
296188
|
+
// next genuine activation (e.g. Enter). Click, if any, fires before this.
|
|
296189
|
+
setTimeout(() => {
|
|
296190
|
+
suppressClickRef.current = false;
|
|
296191
|
+
}, 0);
|
|
296192
|
+
}, [nearestSide, settle]);
|
|
296193
|
+
const onClickCapture = useCallback((e) => {
|
|
296194
|
+
if (!suppressClickRef.current)
|
|
296195
|
+
return;
|
|
296196
|
+
suppressClickRef.current = false;
|
|
296197
|
+
e.preventDefault();
|
|
296198
|
+
e.stopPropagation();
|
|
296199
|
+
}, []);
|
|
296200
|
+
// A mouse press on a native-draggable child (e.g. an <img>) starts
|
|
296201
|
+
// HTML drag-and-drop, which fires pointercancel and kills our drag.
|
|
296202
|
+
const onDragStart = useCallback((e) => {
|
|
296203
|
+
e.preventDefault();
|
|
296204
|
+
}, []);
|
|
296205
|
+
const onKeyDown = useCallback((e) => {
|
|
296206
|
+
var _a, _b;
|
|
296207
|
+
const vertical = VERTICAL_KEYS[e.key];
|
|
296208
|
+
const side = SIDE_KEYS[e.key];
|
|
296209
|
+
if ((!vertical && !side) || e.altKey || e.ctrlKey || e.metaKey)
|
|
296210
|
+
return;
|
|
296211
|
+
e.preventDefault();
|
|
296212
|
+
const from = currentPosition();
|
|
296213
|
+
const distance = e.shiftKey ? step * 4 : step;
|
|
296214
|
+
place({
|
|
296215
|
+
side: (_b = side !== null && side !== void 0 ? side : (_a = storedRef.current) === null || _a === void 0 ? void 0 : _a.side) !== null && _b !== void 0 ? _b : nearestSide(from),
|
|
296216
|
+
bottom: from.bottom + (vertical !== null && vertical !== void 0 ? vertical : 0) * distance,
|
|
296217
|
+
});
|
|
296218
|
+
}, [currentPosition, nearestSide, place, step]);
|
|
296219
|
+
const moveToCorner = useCallback((corner) => {
|
|
296220
|
+
var _a, _b;
|
|
296221
|
+
const height = (_b = (_a = ref.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().height) !== null && _b !== void 0 ? _b : 0;
|
|
296222
|
+
place({
|
|
296223
|
+
side: corner.endsWith('right') ? 'right' : 'left',
|
|
296224
|
+
bottom: corner.startsWith('bottom') ? margin : viewportSize().height - height - margin,
|
|
296225
|
+
});
|
|
296226
|
+
}, [margin, place]);
|
|
296227
|
+
const reset = useCallback(() => {
|
|
296228
|
+
pressRef.current = null;
|
|
296229
|
+
setAnimate(false);
|
|
296230
|
+
render(null);
|
|
296231
|
+
commit(null);
|
|
296232
|
+
setAnnouncement(null);
|
|
296233
|
+
}, [commit, render]);
|
|
296234
|
+
return {
|
|
296235
|
+
ref,
|
|
296236
|
+
position,
|
|
296237
|
+
isCustom: stored !== null,
|
|
296238
|
+
announcement,
|
|
296239
|
+
/** CSS `transition` for the rendered offsets; undefined while dragging,
|
|
296240
|
+
* before any user move, and under prefers-reduced-motion. */
|
|
296241
|
+
transition: animate && position && !prefersReducedMotion() ? DRAGGABLE_SNAP_TRANSITION : undefined,
|
|
296242
|
+
reset,
|
|
296243
|
+
moveToCorner,
|
|
296244
|
+
handlers: {
|
|
296245
|
+
onPointerDown,
|
|
296246
|
+
onPointerMove,
|
|
296247
|
+
onPointerUp: endPress,
|
|
296248
|
+
onPointerCancel: endPress,
|
|
296249
|
+
onClickCapture,
|
|
296250
|
+
onDragStart,
|
|
296251
|
+
onKeyDown,
|
|
296252
|
+
},
|
|
296253
|
+
};
|
|
296254
|
+
}
|
|
296255
|
+
|
|
296256
|
+
/**
|
|
296257
|
+
* Draggable floating accessibility button plus its menu. Must be rendered
|
|
296258
|
+
* inside an `AccessibilityProvider`.
|
|
296259
|
+
*/
|
|
296260
|
+
function AccessibilityFab({ defaultPositionClassName = 'bottom-4', storageKey = 'accessibility-fab-position:v2', 'data-testid': testId = 'accessibility-fab', }) {
|
|
296261
|
+
const t = useT();
|
|
296262
|
+
const hintId = useId$2();
|
|
296263
|
+
const { ref, position, isCustom, announcement, transition, reset, moveToCorner, handlers } = useDraggablePosition({ storageKey });
|
|
296264
|
+
return (jsxs(Fragment$1, { children: [jsx("div", { ref: ref, role: "group", "aria-describedby": hintId, className: cn('fixed right-4 z-50 flex touch-none flex-col gap-3', !position && defaultPositionClassName), style: position ? { right: position.right, bottom: position.bottom, transition } : undefined, "data-testid": testId, ...handlers, children: jsx(FloatingAccessibilityButton, {}) }), jsx("span", { id: hintId, className: "sr-only", children: t('accessibility.button.moveHint') }), jsx("div", { role: "status", "aria-live": "polite", className: "sr-only", children: announcement
|
|
296265
|
+
? t('accessibility.button.positionAnnouncement', {
|
|
296266
|
+
side: announcement.side,
|
|
296267
|
+
bottom: Math.round(announcement.bottom),
|
|
296268
|
+
})
|
|
296269
|
+
: '' }), jsx(AccessibilityToolbar, { isButtonPositionCustom: isCustom, onResetButtonPosition: reset, onMoveButtonToCorner: moveToCorner })] }));
|
|
296270
|
+
}
|
|
296271
|
+
|
|
295514
296272
|
function OrganizationTab({ platformKey, setOrganizationLogoFromOutside, tenant, onTenantUpdate, defaultSupportPhone = '', enableSupportPhone, }) {
|
|
295515
296273
|
const t = useT();
|
|
295516
296274
|
const { setMetadata } = useTenantContext();
|
|
@@ -296945,7 +297703,7 @@ const dynamicIconImports = {
|
|
|
296945
297703
|
"a-arrow-down": () => Promise.resolve().then(function () { return aArrowDown; }),
|
|
296946
297704
|
"a-arrow-up": () => Promise.resolve().then(function () { return aArrowUp; }),
|
|
296947
297705
|
"a-large-small": () => Promise.resolve().then(function () { return aLargeSmall; }),
|
|
296948
|
-
"accessibility": () => Promise.resolve().then(function () { return accessibility; }),
|
|
297706
|
+
"accessibility": () => Promise.resolve().then(function () { return accessibility$4; }),
|
|
296949
297707
|
"activity": () => Promise.resolve().then(function () { return activity; }),
|
|
296950
297708
|
"air-vent": () => Promise.resolve().then(function () { return airVent; }),
|
|
296951
297709
|
"airplay": () => Promise.resolve().then(function () { return airplay; }),
|
|
@@ -317058,7 +317816,7 @@ function LiveKitScreenSharing({ tenantKey, mentorUniqueId, sessionId, username,
|
|
|
317058
317816
|
}
|
|
317059
317817
|
|
|
317060
317818
|
function AppSyncBanner({ badge, text, link, linkText }) {
|
|
317061
|
-
return (jsx("div", { className: "mx-auto mb-8 w-full max-w-md", children: jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#D0E0FF] bg-[#F5F8FF] p-2", children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { className: "rounded-md bg-[#D0E0FF] px-2 py-0.5 text-xs font-medium text-[#666768]", children: badge }), jsx("span", { className: "text-sm font-medium text-gray-900", children: text })] }), jsxs(Link$2, { href: link, target: "_blank", className: cn(buttonVariants({
|
|
317819
|
+
return (jsx("div", { className: "mx-auto mb-8 w-full max-w-md", children: jsxs("div", { className: "flex items-center justify-between rounded-lg border border-[#D0E0FF] bg-[#F5F8FF] p-2", children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { className: "rounded-md bg-[#D0E0FF] px-2 py-0.5 text-xs font-medium text-[#666768]", children: badge }), jsx("span", { className: "text-sm font-medium text-gray-900", children: text })] }), jsxs(Link$2, { href: link, target: "_blank", className: cn(buttonVariants$1({
|
|
317062
317820
|
variant: 'ghost',
|
|
317063
317821
|
size: 'sm',
|
|
317064
317822
|
className: 'h-auto p-1 text-sm text-blue-600 hover:text-blue-700',
|
|
@@ -320714,5 +321472,5 @@ var disclaimerModal = /*#__PURE__*/Object.freeze({
|
|
|
320714
321472
|
DisclaimerModal: DisclaimerModal
|
|
320715
321473
|
});
|
|
320716
321474
|
|
|
320717
|
-
export { AGENT_ACCESS_TAB_LABELS, AGENT_ANALYTICS_TAB_LABELS, AGENT_API_TAB_LABELS, AGENT_DATASETS_TAB_LABELS, AGENT_DISCLAIMERS_TAB_LABELS, AGENT_EMBED_TAB_LABELS, AGENT_EVALUATION_TAB_LABELS, AGENT_GRADER_TAB_LABELS, AGENT_HISTORY_TAB_LABELS, AGENT_HUMAN_SUPPORT_TAB_LABELS, AGENT_LLM_TAB_LABELS, AGENT_LTI_TAB_LABELS, AGENT_MEMORY_TAB_LABELS, AGENT_PICKER_LABELS, AGENT_PRIVACY_TAB_LABELS, AGENT_PROMPTS_TAB_LABELS, AGENT_SAFETY_TAB_LABELS, AGENT_SCREENSHARE_TAB_LABELS, AGENT_SEARCH_LABELS, AGENT_SETTINGS_TAB_LABELS, AGENT_SKILLS_TAB_LABELS, AGENT_SPEND_CAPS_TAB_LABELS, AGENT_TASKS_TAB_LABELS, AGENT_TOOLS_TAB_LABELS, AGENT_VOICE_TAB_LABELS, Account, AgentAccessTab, AgentAnalyticsTab, AgentApiTab, AgentCard, AgentDatasetsTab, AgentDisclaimersTab, AgentEmbedTab, AgentEmptyState, AgentEvaluationTab, AgentGraderTab, AgentHistoryTab, AgentHumanSupportTab, AgentLLMTab, AgentLtiTab, AgentMemoryTab, AgentPrivacyTab, AgentPromptsTab, AgentSafetyTab, AgentScreenShareTab, AgentSearch, AgentSearchFilters, AgentSearchInput, AgentSettingsProvider, AgentSettingsTab, AgentSkillsTab, AgentSpendCapsTab, AgentTasksTab, AgentToolsTab, AgentVoiceTab, AppSidebar, CATALOGS, Chat, ClientErrorPage, ConversationStarters$1 as ConversationStarters, CopyButton, CopyMentorModal, CourseBox, CourseContentLayout, CourseContentTabPage, CreatePathwayModal, CredentialDetailModal, CredentialMiniBox, DEFAULT_ANALYTICS_HUB_TABS, DEFAULT_LOCALE, DeleteMentorModal, EMPTY_PROGRAM_SETTINGS_FORM, EdxIframe, ErrorPage, GRADING_TOOL_NAME, GreetingMethod, LLMProviderModal, LocalModelRow, McpTab, MediaBox, MentorSelectionGrid, NavBar, OrganizationTab, PLATFORM_SIDEBAR_FLYOUT_ITEM_COLOR, PLATFORM_SIDEBAR_FLYOUT_TITLE_COLOR, PLATFORM_SIDEBAR_NAV_ACTIVE_BG_OPEN, PLATFORM_SIDEBAR_NAV_MUTED, PathwayDetailModal, PlatformAccountSheet, PlatformSidebar, PlatformSidebarCollapsedLabelFlyout, PlatformSidebarCollapsedNavFlyout, PlatformSidebarFooter, PlatformSidebarNavDivider, PlatformSidebarNavSection, PlatformSidebarSubNavItem, ProfileInfoCards, ProfileTabs, ProgramDetailModal, ProjectsSidebarDropdown, SPEND_CAPS_SUB_TABS, SUPPORTED_LOCALES, SidebarInset, SidebarProvider, SidebarTrigger, SpendCapUsage, SsoLogin, StarButton, UserProfileDropdown, UserProfileModal, WebContainersI18nProvider, formatDateString, getCatalog, getProviderName, initializeLocalStorageWithObject, isValidLocale, resolveAgentPickerLabels, resolveAgentSearchLabels, resolveLLMTabLabels, resolveSettingsTabLabels, useAgentSearch, useAgentSearchWithPagination, useAgentSettings, useAgentStar, useGetChatDetails, usePlatformSidebarFooterActions, usePlatformSidebarNavCallback, useSidebar, useT, useTimeTracker, useToggleTools, useWebContainersI18n, useWebContainersLocale };
|
|
321475
|
+
export { AGENT_ACCESS_TAB_LABELS, AGENT_ANALYTICS_TAB_LABELS, AGENT_API_TAB_LABELS, AGENT_DATASETS_TAB_LABELS, AGENT_DISCLAIMERS_TAB_LABELS, AGENT_EMBED_TAB_LABELS, AGENT_EVALUATION_TAB_LABELS, AGENT_GRADER_TAB_LABELS, AGENT_HISTORY_TAB_LABELS, AGENT_HUMAN_SUPPORT_TAB_LABELS, AGENT_LLM_TAB_LABELS, AGENT_LTI_TAB_LABELS, AGENT_MEMORY_TAB_LABELS, AGENT_PICKER_LABELS, AGENT_PRIVACY_TAB_LABELS, AGENT_PROMPTS_TAB_LABELS, AGENT_SAFETY_TAB_LABELS, AGENT_SCREENSHARE_TAB_LABELS, AGENT_SEARCH_LABELS, AGENT_SETTINGS_TAB_LABELS, AGENT_SKILLS_TAB_LABELS, AGENT_SPEND_CAPS_TAB_LABELS, AGENT_TASKS_TAB_LABELS, AGENT_TOOLS_TAB_LABELS, AGENT_VOICE_TAB_LABELS, AccessibilityFab, AccessibilityProvider, AccessibilityToolbar, Account, AgentAccessTab, AgentAnalyticsTab, AgentApiTab, AgentCard, AgentDatasetsTab, AgentDisclaimersTab, AgentEmbedTab, AgentEmptyState, AgentEvaluationTab, AgentGraderTab, AgentHistoryTab, AgentHumanSupportTab, AgentLLMTab, AgentLtiTab, AgentMemoryTab, AgentPrivacyTab, AgentPromptsTab, AgentSafetyTab, AgentScreenShareTab, AgentSearch, AgentSearchFilters, AgentSearchInput, AgentSettingsProvider, AgentSettingsTab, AgentSkillsTab, AgentSpendCapsTab, AgentTasksTab, AgentToolsTab, AgentVoiceTab, AppSidebar, CATALOGS, Chat, ClientErrorPage, ConversationStarters$1 as ConversationStarters, CopyButton, CopyMentorModal, CourseBox, CourseContentLayout, CourseContentTabPage, CreatePathwayModal, CredentialDetailModal, CredentialMiniBox, DEFAULT_ANALYTICS_HUB_TABS, DEFAULT_LOCALE, DRAGGABLE_SNAP_TRANSITION, DeleteMentorModal, EMPTY_PROGRAM_SETTINGS_FORM, EdxIframe, ErrorPage, FloatingAccessibilityButton, GRADING_TOOL_NAME, GreetingMethod, LLMProviderModal, LocalModelRow, McpTab, MediaBox, MentorSelectionGrid, NavBar, OrganizationTab, PLATFORM_SIDEBAR_FLYOUT_ITEM_COLOR, PLATFORM_SIDEBAR_FLYOUT_TITLE_COLOR, PLATFORM_SIDEBAR_NAV_ACTIVE_BG_OPEN, PLATFORM_SIDEBAR_NAV_MUTED, PathwayDetailModal, PlatformAccountSheet, PlatformSidebar, PlatformSidebarCollapsedLabelFlyout, PlatformSidebarCollapsedNavFlyout, PlatformSidebarFooter, PlatformSidebarNavDivider, PlatformSidebarNavSection, PlatformSidebarSubNavItem, ProfileInfoCards, ProfileTabs, ProgramDetailModal, ProjectsSidebarDropdown, SPEND_CAPS_SUB_TABS, SUPPORTED_LOCALES, SidebarInset, SidebarProvider, SidebarTrigger, SpendCapUsage, SsoLogin, StarButton, UserProfileDropdown, UserProfileModal, WebContainersI18nProvider, formatDateString, getCatalog, getProviderName, initializeLocalStorageWithObject, isValidLocale, resolveAgentPickerLabels, resolveAgentSearchLabels, resolveLLMTabLabels, resolveSettingsTabLabels, useAccessibility, useAgentSearch, useAgentSearchWithPagination, useAgentSettings, useAgentStar, useDraggablePosition, useGetChatDetails, usePlatformSidebarFooterActions, usePlatformSidebarNavCallback, useSidebar, useT, useTimeTracker, useToggleTools, useWebContainersI18n, useWebContainersLocale };
|
|
320718
321476
|
//# sourceMappingURL=index.esm.js.map
|