@abyss-project/commons-front-core 17.2.1 → 18.1.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.
Files changed (66) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +2 -1
  3. package/catalog/captures-plan.ts +120 -116
  4. package/catalog/catalog-entries.ts +149 -148
  5. package/catalog/pages/AppShell.tsx +18 -9
  6. package/catalog/pages/CookieConsent.tsx +54 -31
  7. package/catalog/pages/DeliveryHistory.tsx +14 -1
  8. package/catalog/pages/DeliverySubscriptions.tsx +17 -0
  9. package/catalog/pages/index.ts +166 -165
  10. package/catalog/playwright.ci.config.ts +4 -3
  11. package/catalog/specs/cookie-consent-modal.spec.ts +187 -0
  12. package/dist/CookieConsentSettings-DUoKKRMZ.js +595 -0
  13. package/dist/{Surface-BDfRxVLj.js → Surface-z5TuQzlh.js} +38 -23
  14. package/dist/{Tabs-DEY2HEqj.js → Tabs-C4K0mLME.js} +613 -591
  15. package/dist/components/business/CookieConsent/AbyssCookieConsentProvider.d.ts +11 -3
  16. package/dist/components/business/CookieConsent/CookieConsentBanner.d.ts +4 -3
  17. package/dist/components/business/CookieConsent/CookieConsentPreferences.d.ts +12 -0
  18. package/dist/components/business/CookieConsent/index.d.ts +2 -0
  19. package/dist/components/business/CookieConsent/use-banner-portal.d.ts +36 -0
  20. package/dist/components/business/Deliveries/DeliveryHistory.component.d.ts +4 -3
  21. package/dist/components/business/Deliveries/DeliverySubscriptionForm.d.ts +3 -2
  22. package/dist/components/business/Deliveries/deliveries.logic.d.ts +11 -0
  23. package/dist/components/business/Deliveries/deliveries.types.d.ts +12 -4
  24. package/dist/components/inputs/NumberField/NumberField.d.ts +18 -2
  25. package/dist/components/layers/Toast/toast-clearance.d.ts +5 -0
  26. package/dist/components/structure/AccountMenu/AccountMenu.d.ts +2 -1
  27. package/dist/components/structure/AppShell/SpaceSwitcher.d.ts +4 -2
  28. package/dist/components/structure/AppShell/app-shell.types.d.ts +5 -1
  29. package/dist/components/structure/FilterBar/FilterBar.d.ts +7 -2
  30. package/dist/cookie-consent.js +26 -17
  31. package/dist/{design-theme-Bd0pEPei.js → design-theme-BFkCN7Nz.js} +1 -1
  32. package/dist/{editors-CtkDomwX.js → editors-Eb3PHnxn.js} +27 -27
  33. package/dist/editors.js +1 -1
  34. package/dist/hooks/use-cookie-consent.hook.spec.d.ts +1 -0
  35. package/dist/hooks/use-rich-intl.hook.d.ts +14 -2
  36. package/dist/{index-DtncSsmw.js → index-2lNOK7eK.js} +2 -2
  37. package/dist/{index-CqgMX8kF.js → index-B76nCWpd.js} +2 -2
  38. package/dist/{index-Cl3hwdsZ.js → index-BKRudpMw.js} +2 -2
  39. package/dist/{index-DtpGwH5a.js → index-BaL2x2GW.js} +3 -3
  40. package/dist/{index-CSdO6zlX.js → index-BcO-JFrs.js} +2 -2
  41. package/dist/{index-CEjiERmo.js → index-BlOP01yA.js} +2 -2
  42. package/dist/{index-IVjoNq-p.js → index-Bw4XnSa0.js} +2 -2
  43. package/dist/{index-DnQguWf1.js → index-CFDEfvCD.js} +1 -1
  44. package/dist/{index-FUuoLSZ0.js → index-CQ7z2zKY.js} +4 -4
  45. package/dist/{index-DcV2fWbx.js → index-CRFGogWn.js} +2 -2
  46. package/dist/{index-B9avfa3r.js → index-CUhMNEUo.js} +3 -3
  47. package/dist/{index-psJ1Q-lU.js → index-CWD0waD8.js} +2 -2
  48. package/dist/{index-DKsvuaEj.js → index-CYBvIQsH.js} +3 -3
  49. package/dist/{index-DFZlN4E3.js → index-Ckzcg8qD.js} +4 -4
  50. package/dist/{index-mUtvzoSi.js → index-Ckzmgx9X.js} +3 -3
  51. package/dist/{index-D0EF36wh.js → index-CrZZo4r1.js} +2 -2
  52. package/dist/{index-DZbCUZUp.js → index-CtVoDSIn.js} +2 -2
  53. package/dist/{index-SN7FZBya.js → index-CtkfWhK1.js} +2 -2
  54. package/dist/{index-DVBqUPxf.js → index-DRtBc440.js} +2 -2
  55. package/dist/{index-Ch8JqU5w.js → index-Dqm1dC1j.js} +2 -2
  56. package/dist/{index-BcXqvMY8.js → index-z5ZOXlY8.js} +4 -4
  57. package/dist/index.js +6073 -5920
  58. package/dist/legacy.js +1728 -1707
  59. package/dist/translations/en.d.ts +7 -1
  60. package/dist/translations/fr.d.ts +7 -1
  61. package/dist/utils/cookie-consent-contract.d.ts +55 -0
  62. package/dist/utils/cookie-consent-contract.spec.d.ts +1 -0
  63. package/dist/utils/cookie-storage.utils.d.ts +1 -8
  64. package/dist/utils/index.d.ts +1 -0
  65. package/package.json +5 -5
  66. package/dist/CookieConsentSettings-CtLrSfve.js +0 -505
@@ -1,11 +1,19 @@
1
1
  import { default as React } from 'react';
2
2
  import { UseCookieConsent } from '../../../hooks/use-cookie-consent.hook';
3
- export declare const useAbyssCookieConsent: () => UseCookieConsent;
3
+ /** What the provider offers: the consent, plus the way to reopen its preferences at any time. */
4
+ export interface AbyssCookieConsentApi extends UseCookieConsent {
5
+ /**
6
+ * Opens the preferences modal of the banner, whether or not a choice was already made (then it
7
+ * starts from that choice). It is what a « Manage cookies » entry of an app calls.
8
+ */
9
+ openPreferences: () => void;
10
+ }
11
+ export declare const useAbyssCookieConsent: () => AbyssCookieConsentApi;
4
12
  /**
5
13
  * The consent of the closest `<AbyssCookieConsentProvider>`, `null` outside one: for a consumer
6
14
  * that must work without the provider (`AbyssRumProvider` then reads every category as refused).
7
15
  */
8
- export declare const useOptionalAbyssCookieConsent: () => UseCookieConsent | null;
16
+ export declare const useOptionalAbyssCookieConsent: () => AbyssCookieConsentApi | null;
9
17
  export interface AbyssCookieConsentProviderProps {
10
18
  children: React.ReactNode;
11
19
  consentVersion: string;
@@ -20,6 +28,6 @@ export interface AbyssCookieConsentProviderProps {
20
28
  * their cookie banner. The prop had exactly one observed use, and it was the bug; removing it
21
29
  * is what makes the mistake impossible rather than merely fixed.
22
30
  */
23
- renderBanner?: (api: UseCookieConsent) => React.ReactNode;
31
+ renderBanner?: (api: AbyssCookieConsentApi) => React.ReactNode;
24
32
  }
25
33
  export declare const AbyssCookieConsentProvider: React.FC<AbyssCookieConsentProviderProps>;
@@ -1,5 +1,6 @@
1
- import { UseCookieConsent } from '../../../hooks/use-cookie-consent.hook';
1
+ import { AbyssCookieConsentApi } from './AbyssCookieConsentProvider';
2
+ import { ReactPortal } from 'react';
2
3
  export interface CookieConsentBannerProps {
3
- api: UseCookieConsent;
4
+ api: AbyssCookieConsentApi;
4
5
  }
5
- export declare function CookieConsentBanner({ api }: CookieConsentBannerProps): import("react/jsx-runtime").JSX.Element;
6
+ export declare function CookieConsentBanner({ api }: CookieConsentBannerProps): ReactPortal | null;
@@ -0,0 +1,12 @@
1
+ import { UseCookieConsent } from '../../../hooks/use-cookie-consent.hook';
2
+ export interface CookieConsentPreferencesProps {
3
+ api: UseCookieConsent;
4
+ open: boolean;
5
+ onClose: () => void;
6
+ }
7
+ /**
8
+ * The preferences of the cookie consent, as a modal: the one the banner's « Personnaliser » opens
9
+ * and the one « Gérer les cookies » reopens after a choice. Each opening starts from the stored
10
+ * choice (every non-essential category off before any), and « Enregistrer mes choix » stores it.
11
+ */
12
+ export declare function CookieConsentPreferences({ api, open, onClose, }: CookieConsentPreferencesProps): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,10 @@
1
1
  export * from './AbyssCookieConsentProvider';
2
2
  export * from '../../../utils/privacy-link.constant';
3
3
  export * from './CookieConsentBanner';
4
+ export * from './CookieConsentPreferences';
4
5
  export * from './CookieConsentSettings';
5
6
  export * from '../../../hooks/use-cookie-consent.hook';
7
+ export * from '../../../utils/cookie-consent-contract';
6
8
  export * from '../../../utils/cookie-storage.utils';
7
9
  export * from '../../../utils/cookie-consent-reconcile.utils';
8
10
  export * from '../../../utils/cookie-consent.types';
@@ -0,0 +1,36 @@
1
+ /** Set on the modal that currently hosts the banner, so a global rule can make it stop above the banner. */
2
+ export declare const MODAL_HOST_ATTRIBUTE = "data-abyss-cookie-banner-host";
3
+ export interface ActiveModal {
4
+ /** The MUI modal root, a child of `body`. */
5
+ host: HTMLElement;
6
+ /**
7
+ * The `aria-modal` surface of the modal (the dialog, the sheet, the drawer). MUI's focus trap
8
+ * pulls the focus back inside the modal, and the readers that honour `aria-modal` (WebKit,
9
+ * VoiceOver) read the surface only: the banner is heard and reached from within.
10
+ */
11
+ surface: HTMLElement;
12
+ }
13
+ /**
14
+ * The open modal on top of the page, if any: the last `body` child that is a MUI modal root holding
15
+ * an `aria-modal` surface (a dialog, a sheet, a drawer), still shown. A popover or an anchored panel
16
+ * is not one, though its surface is `aria-modal` too: it is gone as soon as the visitor picks
17
+ * something, and the banner has no reason to follow it into a box that clips what is fixed in it.
18
+ */
19
+ export declare const findActiveModal: () => ActiveModal | null;
20
+ export interface BannerPortal {
21
+ /** Where to render the banner; `null` until the browser can host it (server render). */
22
+ container: HTMLElement | null;
23
+ /** The modal the container currently sits in, `null` while it sits in `body`. */
24
+ modalHost: HTMLElement | null;
25
+ }
26
+ /**
27
+ * Gives the banner a container that is never inside an inert part of the page (#747).
28
+ *
29
+ * MUI hides every child of `body` from assistive technology, and keeps the focus inside the open
30
+ * modal: a banner left among the page's content, or in `body`, can neither be heard nor reached by
31
+ * keyboard while a dialog or a wizard is open. So the container follows the modal on top: it is
32
+ * moved into that modal's `aria-modal` surface (inside its focus trap and its accessibility
33
+ * subtree), and back to `body` once no modal is open. The banner is rendered in it with a portal,
34
+ * so it keeps the React context (theme, messages) of the provider.
35
+ */
36
+ export declare const useBannerPortal: () => BannerPortal;
@@ -1,8 +1,9 @@
1
1
  import { FC } from 'react';
2
2
  import { DeliveryHistoryProps } from './deliveries.types';
3
3
  /**
4
- * The deliveries of a scope (usually one subscription): a paginated list with a status filter, a
5
- * detail drawer (request, headers sent, response, timeline) and a replay of the deliveries that
6
- * ended. Data and actions come through props.
4
+ * The deliveries of a scope (usually one subscription, named under the title by its URL and its
5
+ * events): a paginated list with a status filter, a detail drawer (event data, headers sent,
6
+ * response, timeline) and a replay of the deliveries that ended. Data and actions come through
7
+ * props.
7
8
  */
8
9
  export declare const DeliveryHistory: FC<DeliveryHistoryProps>;
@@ -16,8 +16,9 @@ interface DeliverySubscriptionFormProps {
16
16
  }
17
17
  /**
18
18
  * The body of the create and edit drawer. It lives inside the drawer so that closing it drops the
19
- * typed values. The source is chosen at creation and cannot change after; its event types are the
20
- * only ones offered, and the body format only exists for a Form subscription.
19
+ * typed values. The source is chosen at creation and cannot change after (no choice is drawn when
20
+ * the host offers one source); its event types are the only ones offered, and the body format only
21
+ * exists for a Form subscription.
21
22
  */
22
23
  export declare function DeliverySubscriptionForm({ subscription, sources, eventTypesBySource, onSubmit, onCancel, }: DeliverySubscriptionFormProps): import("react/jsx-runtime").JSX.Element;
23
24
  export {};
@@ -15,6 +15,17 @@ export declare const JSON_FORMAT: DeliveryFormat;
15
15
  export declare const DISCORD_FORMAT: DeliveryFormat;
16
16
  /** Rows asked per page of every list. */
17
17
  export declare const DELIVERIES_PAGE_SIZE = 20;
18
+ /** The characters of a URL kept whole at its end when it is cut in the middle. */
19
+ export declare const URL_TAIL_LENGTH = 18;
20
+ /**
21
+ * A URL in two parts for an ellipsis in the middle: the head may be cut, the tail (the end of the
22
+ * path, where two URLs of one host differ) always shows. A URL short enough to never be cut in a
23
+ * way that hides its tail has no tail.
24
+ */
25
+ export declare const splitUrlForMiddleEllipsis: (url: string) => {
26
+ head: string;
27
+ tail: string;
28
+ };
18
29
  /** The badge tone of an execution state: `domainTokens.executionState` is made of `status.*`. */
19
30
  export declare const executionStateTone: (state: ExecutionState) => StatusTone;
20
31
  export declare const deliveryStatusTone: (status: DeliveryStatus) => StatusTone;
@@ -37,8 +37,11 @@ export interface DeliverySubscriptionsProps {
37
37
  remove(id: string): Promise<void>;
38
38
  resetSecret(id: string): Promise<DeliverySubscriptionWithSecret>;
39
39
  onOpenHistory(subscription: IDeliverySubscription): void;
40
- /** Where « Ouvrir dans Flow » leads. */
41
- flowUrl: string;
40
+ /**
41
+ * Where « Ouvrir dans Flow » leads: a Flow page that shows the same data. Without it, no link is
42
+ * drawn.
43
+ */
44
+ flowUrl?: string;
42
45
  permissions: DeliverySubscriptionPermissions;
43
46
  }
44
47
  export interface DeliveryHistoryProps {
@@ -47,8 +50,13 @@ export interface DeliveryHistoryProps {
47
50
  /** A replay is a new attempt with the same delivery id. */
48
51
  replayDelivery(id: string): Promise<void>;
49
52
  canReplay: boolean;
50
- /** Where « Ouvrir dans Flow » leads. */
51
- flowUrl: string;
53
+ /**
54
+ * The subscription whose deliveries are listed: its full URL and its events head the screen.
55
+ * Without it, the header names no subscription.
56
+ */
57
+ getSubscription?(): Promise<IDeliverySubscription>;
58
+ /** Where « Ouvrir dans Flow » leads; without it, no link is drawn. */
59
+ flowUrl?: string;
52
60
  }
53
61
  export interface ScheduledTasksProps {
54
62
  list(params: IPaginateScheduledTaskQuery): Promise<BasePaginate<IScheduledTask>>;
@@ -1,3 +1,4 @@
1
+ import { ReactNode } from 'react';
1
2
  export interface NumberFieldProps {
2
3
  label: string;
3
4
  /** The number shown; `null` for an empty field. */
@@ -8,6 +9,21 @@ export interface NumberFieldProps {
8
9
  decimals?: number;
9
10
  /** Lowest number kept when the field is left; 0 by default. */
10
11
  min?: number;
12
+ /** Highest number kept when the field is left; none by default. */
13
+ max?: number;
14
+ /** Keep the label as the field's accessible name but do not draw it (a field in a dense row). */
15
+ hideLabel?: boolean;
16
+ /** Replaces the label as the input's accessible name (`aria-label`). */
17
+ ariaLabel?: string;
18
+ /** A hint under the field, always shown. */
19
+ help?: ReactNode;
20
+ /**
21
+ * The error message: the field turns to the danger color and is marked invalid. `true` marks the
22
+ * field invalid with no message line; `false`, `null` and `''` leave it valid.
23
+ */
24
+ error?: ReactNode;
25
+ /** `data-testid` of the input. */
26
+ testId?: string;
11
27
  disabled?: boolean;
12
28
  /** Unit or currency shown at the end of the field (`€`, `Go`). */
13
29
  adornment?: string;
@@ -15,7 +31,7 @@ export interface NumberFieldProps {
15
31
  /**
16
32
  * A labelled number input that follows the language of the viewer: « 1 234,50 » in French,
17
33
  * « 1,234.50 » in English. While focused it shows what is typed (either decimal mark is read);
18
- * on leaving it clamps to `min`, rounds to `decimals` and formats again. A value changed from
34
+ * on leaving it clamps to `min` and `max`, rounds to `decimals` and formats again. A value changed from
19
35
  * outside (a linked field) is shown at once unless the field is being edited.
20
36
  */
21
- export declare function NumberField({ label, value, onChange, decimals, min, disabled, adornment, }: NumberFieldProps): import("react/jsx-runtime").JSX.Element;
37
+ export declare function NumberField({ label, value, onChange, decimals, min, max, hideLabel, ariaLabel, help, error, testId, disabled, adornment, }: NumberFieldProps): import("react/jsx-runtime").JSX.Element;
@@ -4,3 +4,8 @@
4
4
  * never covers the banner. Unset while nothing occupies the corner.
5
5
  */
6
6
  export declare const TOAST_CLEARANCE_VAR = "--abyss-toast-clearance";
7
+ /**
8
+ * The same distance, published only while an open modal hosts the banner: the modal stops there, so
9
+ * the banner never covers its actions (#747). Unset otherwise.
10
+ */
11
+ export declare const MODAL_CLEARANCE_VAR = "--abyss-cookie-banner-modal-clearance";
@@ -23,6 +23,7 @@ export interface AccountMenuProps {
23
23
  /**
24
24
  * The account entry of the top bar: the viewer's avatar opens a menu with their name and email,
25
25
  * the host's entries (account, settings, billing…), « Report a problem » under an installed
26
- * `AbyssRumProvider`, the dark theme switch and the logout.
26
+ * `AbyssRumProvider`, « Manage cookies » under an `AbyssCookieConsentProvider` (it reopens the
27
+ * consent preferences), the dark theme switch and the logout.
27
28
  */
28
29
  export declare function AccountMenu({ user, themeMode, onThemeModeChange, items, onLogout, }: AccountMenuProps): import("react/jsx-runtime").JSX.Element;
@@ -1,13 +1,15 @@
1
1
  import { AppShellProduct, AppShellSpaces } from './app-shell.types';
2
2
  interface SpaceSwitcherProps {
3
3
  product: AppShellProduct;
4
- space: AppShellSpaces;
4
+ /** Absent: the card only names the product, and nothing opens. */
5
+ space?: AppShellSpaces;
5
6
  /** Icon only, its text in a tooltip (tablet rail). */
6
7
  compact: boolean;
7
8
  }
8
9
  /**
9
10
  * The space card at the top of the navigation (mock-up `.scopecard`): product icon, product name
10
- * and current space; it opens the menu of the viewer's spaces, personal or organization.
11
+ * and current space; it opens the menu of the viewer's spaces, personal or organization. Without
12
+ * `space` there is nothing to switch: the card is a plain, non-interactive product mark.
11
13
  */
12
14
  export declare function SpaceSwitcher({ product, space, compact }: SpaceSwitcherProps): import("react/jsx-runtime").JSX.Element;
13
15
  export {};
@@ -88,7 +88,11 @@ export interface AppShellFooterItem {
88
88
  }
89
89
  export interface AppShellProps {
90
90
  product: AppShellProduct;
91
- space: AppShellSpaces;
91
+ /**
92
+ * Organization or project menu. Absent (the back-office has no space to switch): no selector is
93
+ * rendered in the sidebar, the rail or the drawer, and the card only shows the product.
94
+ */
95
+ space?: AppShellSpaces;
92
96
  nav: NavSection[];
93
97
  activeItemId: string;
94
98
  mainSpaceLink?: AppShellMainSpaceLink;
@@ -7,7 +7,11 @@ export interface FilterBarSearch {
7
7
  }
8
8
  export interface FilterBarProps {
9
9
  search?: FilterBarSearch;
10
- /** The filter controls (selects, segmented controls, chips), inline from `md` up. */
10
+ /**
11
+ * The filter controls (selects, segmented controls, chips), inline from `md` up. A bar with
12
+ * nothing here (`null`, `undefined`, `false`) is only a search field: no "Filtres" button and no
13
+ * sheet on a phone.
14
+ */
11
15
  filters: ReactNode;
12
16
  /** Number of filters that differ from their default: shown on the mobile button, enables reset. */
13
17
  activeCount: number;
@@ -16,6 +20,7 @@ export interface FilterBarProps {
16
20
  /**
17
21
  * The search and filter row above a list (mock-up `.fbar`). From `md` up the filters sit inline
18
22
  * next to the search field; below `md` the search field stays and the filters move into a bottom
19
- * drawer, opened by a button that carries the number of active filters.
23
+ * drawer, opened by a button that carries the number of active filters. A bar without filters
24
+ * keeps only the search field, on every width.
20
25
  */
21
26
  export declare function FilterBar({ search, filters, activeCount, onReset, }: FilterBarProps): import("react/jsx-runtime").JSX.Element;
@@ -1,19 +1,28 @@
1
- import { A as e, d as a, C as n, b as C, D as i, R as t, V as r, e as A, r as k, f as c, u as l, c as f, a as b, w as u } from "./CookieConsentSettings-CtLrSfve.js";
2
- import { f as E } from "./Surface-BDfRxVLj.js";
1
+ import { A as o, g as a, h as n, e as C, i as t, f as i, j as r, k as A, C as E, b as O, c as S, D as _, R as k, o as I, m as c, l as d, n as N, r as T, p as l, u as f, d as D, a as R, w as V } from "./CookieConsentSettings-DUoKKRMZ.js";
2
+ import { f as p } from "./Surface-z5TuQzlh.js";
3
3
  export {
4
- e as AbyssCookieConsentProvider,
5
- a as COOKIE_NAME,
6
- n as CookieConsentBanner,
7
- C as CookieConsentSettings,
8
- i as DEFAULT_PRIVACY_HREF,
9
- t as ReconcileAction,
10
- r as VALIDITY_DAYS,
11
- A as clearCookie,
12
- E as flattenTranslations,
13
- k as readCookie,
14
- c as reconcile,
15
- l as useAbyssCookieConsent,
16
- f as useCookieConsent,
17
- b as useOptionalAbyssCookieConsent,
18
- u as writeCookie
4
+ o as AbyssCookieConsentProvider,
5
+ a as CONSENT_VALIDITY_DAYS,
6
+ n as CONSENT_VALIDITY_MS,
7
+ C as CONSENT_VERSION,
8
+ t as COOKIE_MAX_AGE_SECONDS,
9
+ i as COOKIE_NAME,
10
+ r as COOKIE_PATH,
11
+ A as COOKIE_SAME_SITE,
12
+ E as CookieConsentBanner,
13
+ O as CookieConsentPreferences,
14
+ S as CookieConsentSettings,
15
+ _ as DEFAULT_PRIVACY_HREF,
16
+ k as ReconcileAction,
17
+ I as clearCookie,
18
+ c as decodeStoredConsent,
19
+ d as encodeStoredConsent,
20
+ p as flattenTranslations,
21
+ N as isStoredConsentValid,
22
+ T as readCookie,
23
+ l as reconcile,
24
+ f as useAbyssCookieConsent,
25
+ D as useCookieConsent,
26
+ R as useOptionalAbyssCookieConsent,
27
+ V as writeCookie
19
28
  };
@@ -2,7 +2,7 @@ import { B as Mt, C as DW, D as PW, F as KW, f as WW, m as af, n as b3, G as BW,
2
2
  import { W as JW, r as zW, C as ZW } from "./index-D7cgykJH.js";
3
3
  import * as ga from "react";
4
4
  import PT, { useRef as gt, useEffect as xr, useState as Pr, useCallback as xe, useMemo as Ye, useLayoutEffect as fE, createContext as no, forwardRef as ms, createElement as Tr, useContext as ji, memo as Kt, cloneElement as $W, Component as dE, Fragment as t2, isValidElement as eB } from "react";
5
- import { u as tB, T as qc, v as rB, H as hE, l as gE, r as pE, q as vE, y as mE, z as bE, J as nB, K as iB, I as aB, o as oB } from "./Surface-BDfRxVLj.js";
5
+ import { u as tB, T as qc, v as rB, H as hE, l as gE, r as pE, q as vE, y as mE, z as bE, J as nB, K as iB, I as aB, o as oB } from "./Surface-z5TuQzlh.js";
6
6
  import KT from "@mui/icons-material/InsertDriveFile";
7
7
  import sB from "@mui/icons-material/Image";
8
8
  import uB from "@mui/icons-material/PictureAsPdf";
@@ -9,14 +9,14 @@ import { c as fn } from "./clsx-OuTLNxxd.js";
9
9
  import { c as cO, d as gc, e as HG, f as Hz, g as aO, h as Pz, j as oO, k as rO, l as UO, m as hO, n as Az, o as FO, p as ZO, q as PG, s as uO, t as mO, v as VO, w as QO, x as AG, y as WO, z as pO, S as NO, B as RO } from "./index-C27b790L.js";
10
10
  import { styled as Rt, useTheme as bO } from "@mui/material/styles";
11
11
  import { useIntl as gl } from "react-intl";
12
- import { s as NU, d as ys, D as ds, p as E, h as El, M as Zo, b as uo, a as _d, S as MO, t as bu, g as Z0, e as vo, m as RF, c as PW, i as SO, u as TO } from "./Surface-BDfRxVLj.js";
12
+ import { s as NU, d as ys, D as ds, p as E, h as El, M as Zo, c as uo, a as _d, b as MO, t as bu, i as Z0, g as vo, m as RF, e as PW, j as SO, u as TO } from "./Surface-z5TuQzlh.js";
13
13
  import Vl from "@mui/material/Button";
14
14
  import LM from "@mui/material/Checkbox";
15
15
  import zQ from "@mui/material/CircularProgress";
16
16
  import mo from "@mui/material/FormControlLabel";
17
17
  import WV from "@mui/material/OutlinedInput";
18
18
  import DM from "@mui/material/Switch";
19
- import { R as wb, F as pV, C as bF, a as MF, h as Mu, S as iZ, D as _z, k as JO, T as GO, N as fM, A as yO, u as BO, d as XO, j as YO } from "./Tabs-DEY2HEqj.js";
19
+ import { R as wb, F as pV, C as bF, a as MF, h as Mu, S as iZ, D as _z, k as JO, T as GO, N as fM, A as yO, u as BO, d as XO, j as YO } from "./Tabs-C4K0mLME.js";
20
20
  import { PDFDocument as Ka, PDFTextField as qz, PDFCheckBox as $z, PDFDropdown as t9, PDFRadioGroup as e9, PDFOptionList as kO, degrees as Ib, StandardFonts as SN, BlendMode as zO, rgb as LO } from "pdf-lib";
21
21
  import * as _G from "pdfjs-dist";
22
22
  import DO from "@mui/icons-material/OpenInNew";
@@ -14225,7 +14225,7 @@ function Ut(l) {
14225
14225
  return new CH(oS.define(l));
14226
14226
  }
14227
14227
  function ra(l) {
14228
- return import("./index-IVjoNq-p.js").then((t) => t.sql({ dialect: t[l] }));
14228
+ return import("./index-Bw4XnSa0.js").then((t) => t.sql({ dialect: t[l] }));
14229
14229
  }
14230
14230
  const Y7 = [
14231
14231
  // New-style language modes
@@ -14233,7 +14233,7 @@ const Y7 = [
14233
14233
  name: "C",
14234
14234
  extensions: ["c", "h", "ino"],
14235
14235
  load() {
14236
- return import("./index-DcV2fWbx.js").then((l) => l.cpp());
14236
+ return import("./index-CRFGogWn.js").then((l) => l.cpp());
14237
14237
  }
14238
14238
  }),
14239
14239
  /* @__PURE__ */ A.of({
@@ -14241,7 +14241,7 @@ const Y7 = [
14241
14241
  alias: ["cpp"],
14242
14242
  extensions: ["cpp", "c++", "cc", "cxx", "hpp", "h++", "hh", "hxx"],
14243
14243
  load() {
14244
- return import("./index-DcV2fWbx.js").then((l) => l.cpp());
14244
+ return import("./index-CRFGogWn.js").then((l) => l.cpp());
14245
14245
  }
14246
14246
  }),
14247
14247
  /* @__PURE__ */ A.of({
@@ -14256,14 +14256,14 @@ const Y7 = [
14256
14256
  name: "CSS",
14257
14257
  extensions: ["css"],
14258
14258
  load() {
14259
- return import("./index-Cl3hwdsZ.js").then((l) => l.css());
14259
+ return import("./index-BKRudpMw.js").then((l) => l.css());
14260
14260
  }
14261
14261
  }),
14262
14262
  /* @__PURE__ */ A.of({
14263
14263
  name: "Go",
14264
14264
  extensions: ["go"],
14265
14265
  load() {
14266
- return import("./index-DtncSsmw.js").then((l) => l.go());
14266
+ return import("./index-2lNOK7eK.js").then((l) => l.go());
14267
14267
  }
14268
14268
  }),
14269
14269
  /* @__PURE__ */ A.of({
@@ -14271,14 +14271,14 @@ const Y7 = [
14271
14271
  alias: ["xhtml"],
14272
14272
  extensions: ["html", "htm", "handlebars", "hbs"],
14273
14273
  load() {
14274
- return import("./index-BcXqvMY8.js").then((l) => l.html());
14274
+ return import("./index-z5ZOXlY8.js").then((l) => l.html());
14275
14275
  }
14276
14276
  }),
14277
14277
  /* @__PURE__ */ A.of({
14278
14278
  name: "Java",
14279
14279
  extensions: ["java"],
14280
14280
  load() {
14281
- return import("./index-CSdO6zlX.js").then((l) => l.java());
14281
+ return import("./index-BcO-JFrs.js").then((l) => l.java());
14282
14282
  }
14283
14283
  }),
14284
14284
  /* @__PURE__ */ A.of({
@@ -14286,7 +14286,7 @@ const Y7 = [
14286
14286
  alias: ["ecmascript", "js", "node"],
14287
14287
  extensions: ["js", "mjs", "cjs"],
14288
14288
  load() {
14289
- return import("./index-psJ1Q-lU.js").then((l) => l.javascript());
14289
+ return import("./index-CWD0waD8.js").then((l) => l.javascript());
14290
14290
  }
14291
14291
  }),
14292
14292
  /* @__PURE__ */ A.of({
@@ -14294,28 +14294,28 @@ const Y7 = [
14294
14294
  alias: ["json5"],
14295
14295
  extensions: ["json", "map"],
14296
14296
  load() {
14297
- return import("./index-DZbCUZUp.js").then((l) => l.json());
14297
+ return import("./index-CtVoDSIn.js").then((l) => l.json());
14298
14298
  }
14299
14299
  }),
14300
14300
  /* @__PURE__ */ A.of({
14301
14301
  name: "JSX",
14302
14302
  extensions: ["jsx"],
14303
14303
  load() {
14304
- return import("./index-psJ1Q-lU.js").then((l) => l.javascript({ jsx: !0 }));
14304
+ return import("./index-CWD0waD8.js").then((l) => l.javascript({ jsx: !0 }));
14305
14305
  }
14306
14306
  }),
14307
14307
  /* @__PURE__ */ A.of({
14308
14308
  name: "LESS",
14309
14309
  extensions: ["less"],
14310
14310
  load() {
14311
- return import("./index-mUtvzoSi.js").then((l) => l.less());
14311
+ return import("./index-Ckzmgx9X.js").then((l) => l.less());
14312
14312
  }
14313
14313
  }),
14314
14314
  /* @__PURE__ */ A.of({
14315
14315
  name: "Liquid",
14316
14316
  extensions: ["liquid"],
14317
14317
  load() {
14318
- return import("./index-DKsvuaEj.js").then((l) => l.liquid());
14318
+ return import("./index-CYBvIQsH.js").then((l) => l.liquid());
14319
14319
  }
14320
14320
  }),
14321
14321
  /* @__PURE__ */ A.of({
@@ -14328,7 +14328,7 @@ const Y7 = [
14328
14328
  name: "Markdown",
14329
14329
  extensions: ["md", "markdown", "mkd"],
14330
14330
  load() {
14331
- return import("./index-SN7FZBya.js").then((l) => l.markdown());
14331
+ return import("./index-CtkfWhK1.js").then((l) => l.markdown());
14332
14332
  }
14333
14333
  }),
14334
14334
  /* @__PURE__ */ A.of({
@@ -14347,7 +14347,7 @@ const Y7 = [
14347
14347
  name: "PHP",
14348
14348
  extensions: ["php", "php3", "php4", "php5", "php7", "phtml"],
14349
14349
  load() {
14350
- return import("./index-DtpGwH5a.js").then((l) => l.php());
14350
+ return import("./index-BaL2x2GW.js").then((l) => l.php());
14351
14351
  }
14352
14352
  }),
14353
14353
  /* @__PURE__ */ A.of({
@@ -14368,28 +14368,28 @@ const Y7 = [
14368
14368
  extensions: ["BUILD", "bzl", "py", "pyw"],
14369
14369
  filename: /^(BUCK|BUILD)$/,
14370
14370
  load() {
14371
- return import("./index-CqgMX8kF.js").then((l) => l.python());
14371
+ return import("./index-B76nCWpd.js").then((l) => l.python());
14372
14372
  }
14373
14373
  }),
14374
14374
  /* @__PURE__ */ A.of({
14375
14375
  name: "Rust",
14376
14376
  extensions: ["rs"],
14377
14377
  load() {
14378
- return import("./index-Ch8JqU5w.js").then((l) => l.rust());
14378
+ return import("./index-Dqm1dC1j.js").then((l) => l.rust());
14379
14379
  }
14380
14380
  }),
14381
14381
  /* @__PURE__ */ A.of({
14382
14382
  name: "Sass",
14383
14383
  extensions: ["sass"],
14384
14384
  load() {
14385
- return import("./index-B9avfa3r.js").then((l) => l.sass({ indented: !0 }));
14385
+ return import("./index-CUhMNEUo.js").then((l) => l.sass({ indented: !0 }));
14386
14386
  }
14387
14387
  }),
14388
14388
  /* @__PURE__ */ A.of({
14389
14389
  name: "SCSS",
14390
14390
  extensions: ["scss"],
14391
14391
  load() {
14392
- return import("./index-B9avfa3r.js").then((l) => l.sass());
14392
+ return import("./index-CUhMNEUo.js").then((l) => l.sass());
14393
14393
  }
14394
14394
  }),
14395
14395
  /* @__PURE__ */ A.of({
@@ -14409,7 +14409,7 @@ const Y7 = [
14409
14409
  name: "TSX",
14410
14410
  extensions: ["tsx"],
14411
14411
  load() {
14412
- return import("./index-psJ1Q-lU.js").then((l) => l.javascript({ jsx: !0, typescript: !0 }));
14412
+ return import("./index-CWD0waD8.js").then((l) => l.javascript({ jsx: !0, typescript: !0 }));
14413
14413
  }
14414
14414
  }),
14415
14415
  /* @__PURE__ */ A.of({
@@ -14417,14 +14417,14 @@ const Y7 = [
14417
14417
  alias: ["ts"],
14418
14418
  extensions: ["ts", "mts", "cts"],
14419
14419
  load() {
14420
- return import("./index-psJ1Q-lU.js").then((l) => l.javascript({ typescript: !0 }));
14420
+ return import("./index-CWD0waD8.js").then((l) => l.javascript({ typescript: !0 }));
14421
14421
  }
14422
14422
  }),
14423
14423
  /* @__PURE__ */ A.of({
14424
14424
  name: "WebAssembly",
14425
14425
  extensions: ["wat", "wast"],
14426
14426
  load() {
14427
- return import("./index-DVBqUPxf.js").then((l) => l.wast());
14427
+ return import("./index-DRtBc440.js").then((l) => l.wast());
14428
14428
  }
14429
14429
  }),
14430
14430
  /* @__PURE__ */ A.of({
@@ -14432,7 +14432,7 @@ const Y7 = [
14432
14432
  alias: ["rss", "wsdl", "xsd"],
14433
14433
  extensions: ["xml", "xsl", "xsd", "svg"],
14434
14434
  load() {
14435
- return import("./index-D0EF36wh.js").then((l) => l.xml());
14435
+ return import("./index-CrZZo4r1.js").then((l) => l.xml());
14436
14436
  }
14437
14437
  }),
14438
14438
  /* @__PURE__ */ A.of({
@@ -14440,7 +14440,7 @@ const Y7 = [
14440
14440
  alias: ["yml"],
14441
14441
  extensions: ["yaml", "yml"],
14442
14442
  load() {
14443
- return import("./index-CEjiERmo.js").then((l) => l.yaml());
14443
+ return import("./index-BlOP01yA.js").then((l) => l.yaml());
14444
14444
  }
14445
14445
  }),
14446
14446
  // Legacy modes ported from CodeMirror 5
@@ -15236,13 +15236,13 @@ const Y7 = [
15236
15236
  name: "Vue",
15237
15237
  extensions: ["vue"],
15238
15238
  load() {
15239
- return import("./index-DFZlN4E3.js").then((l) => l.vue());
15239
+ return import("./index-Ckzcg8qD.js").then((l) => l.vue());
15240
15240
  }
15241
15241
  }),
15242
15242
  /* @__PURE__ */ A.of({
15243
15243
  name: "Angular Template",
15244
15244
  load() {
15245
- return import("./index-FUuoLSZ0.js").then((l) => l.angular());
15245
+ return import("./index-CQ7z2zKY.js").then((l) => l.angular());
15246
15246
  }
15247
15247
  })
15248
15248
  ], k7 = "#e5c07b", G5 = "#e06c75", z7 = "#56b6c2", L7 = "#ffffff", kV = "#abb2bf", D2 = "#7d8799", D7 = "#61afef", f7 = "#98c379", y5 = "#d19a66", w7 = "#c678dd", I7 = "#21252b", B5 = "#2c313a", X5 = "#282c34", HN = "#353a42", x7 = "#3E4451", Y5 = "#528bff", C7 = /* @__PURE__ */ At.theme({
package/dist/editors.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Q as o, R as s, S as r, M as t, O as i, K as n, Y as d, U as g, W as p, X as E, V as l, Z as f } from "./editors-CtkDomwX.js";
1
+ import { Q as o, R as s, S as r, M as t, O as i, K as n, Y as d, U as g, W as p, X as E, V as l, Z as f } from "./editors-Eb3PHnxn.js";
2
2
  export {
3
3
  o as CodeEditor,
4
4
  s as ExpressionCodeEditor,
@@ -0,0 +1 @@
1
+ export {};