@kubex/zinc 1.1.117 → 1.1.119

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/zn.d.ts CHANGED
@@ -7322,35 +7322,30 @@ declare module "components/form-group/form-group.component" {
7322
7322
  forceCols: boolean;
7323
7323
  layout: string;
7324
7324
  pad: boolean;
7325
- /** The scroller the label is tracked against by hand; null while native sticky is enough. */
7326
- private tracked;
7325
+ /** The scroll containers we have clipped, against the inline overflow each carried before. */
7326
+ private readonly clipped;
7327
7327
  private frame;
7328
- private rebind;
7329
- private offset;
7330
7328
  private resizeObserver;
7331
7329
  connectedCallback(): void;
7332
7330
  disconnectedCallback(): void;
7333
7331
  protected firstUpdated(changedProperties: PropertyValues): void;
7334
7332
  private get labelColumn();
7335
- /** Coalesces scroll and resize work into one frame, and out of the ResizeObserver callback. */
7333
+ /** Coalesces resize work into one frame, and out of the ResizeObserver callback. */
7336
7334
  private schedule;
7335
+ private readonly onViewportResize;
7337
7336
  /**
7338
- * Native sticky only follows the nearest scroll container. Where that container isn't the one
7339
- * the user actually scrolls — a `zn-panel` body sized to its content inside a scrolling
7340
- * slideout, say — the label never moves, so it gets translated by hand instead.
7337
+ * Native sticky anchors to the nearest scroll container, even one that cannot scroll — a `zn-panel` body sized to
7338
+ * its content, say — where it then holds the label still for the whole scroll. `overflow: clip` clips without
7339
+ * making a scroll container, so clipping those takes them out of sticky's search and the label follows the box the
7340
+ * user actually scrolls, moved by the compositor rather than by hand.
7341
7341
  */
7342
- private findScroller;
7343
- private trackScroller;
7344
- /** The document scrolls through the window, every other scroller reports its own events. */
7345
- private scrollTarget;
7346
- private readonly onScroll;
7347
- private readonly onViewportResize;
7348
- private positionLabel;
7342
+ private freeSticky;
7343
+ private clip;
7344
+ private release;
7349
7345
  /** The box native sticky would anchor to, whether or not it can be scrolled. */
7350
- private nearestScrollContainer;
7351
- /** The nearest ancestor the user can actually scroll, falling back to the document. */
7352
- private scrollingAncestor;
7346
+ private isStickyAnchor;
7353
7347
  private isScrollContainer;
7348
+ private overflows;
7354
7349
  /** Walks the flattened tree, so slots and shadow boundaries are crossed the way layout does. */
7355
7350
  private ancestors;
7356
7351
  render(): import("lit-html").TemplateResult<1>;
@@ -9132,10 +9127,7 @@ declare module "components/translations/translations.component" {
9132
9127
  hasTranslation(language: string): boolean;
9133
9128
  /** The chip shown against a language, in the select's value and against each of its options. */
9134
9129
  private languageState;
9135
- /**
9136
- * `English (EN)` — the configured name plus its code, unless the name already is the code, in which case the code
9137
- * alone. `languages` is written both ways: `{"en": "English"}` and `{"en": "EN"}`.
9138
- */
9130
+ /** The configured name, or the code where `languages` does not name the language. */
9139
9131
  private languageLabel;
9140
9132
  /**
9141
9133
  * `values`, falling back to the `value` attribute it is built from while that is still pending. A parent
@@ -9309,7 +9301,7 @@ declare module "components/animated-button/index" {
9309
9301
  declare module "components/translation-group/translation-group.component" {
9310
9302
  import { type CSSResultGroup, type PropertyValues } from 'lit';
9311
9303
  import ZnChip from "components/chip/index";
9312
- import ZnHeader from "components/header/index";
9304
+ import ZnFormGroup from "components/form-group/index";
9313
9305
  import ZnOption from "components/option/index";
9314
9306
  import ZnPanel from "components/panel/panel.component";
9315
9307
  import ZnSelect from "components/select/index";
@@ -9320,8 +9312,12 @@ declare module "components/translation-group/translation-group.component" {
9320
9312
  * @status experimental
9321
9313
  * @since 1.0
9322
9314
  *
9323
- * The select sits at the top right of the header, opposite the caption. Choosing a language switches every child at
9324
- * once, and each child hides its own select while it is in a group — `grouped` is set on them here.
9315
+ * The fields sit in a `zn-form-group`, so the caption, help text and the language select share its label column and
9316
+ * the fields line up with every other form group around them. Choosing a language switches every child at once, and
9317
+ * each child hides its own select while it is in a group — `grouped` is set on them here.
9318
+ *
9319
+ * The select is searchable. Each option holds its language code as its value, so typing `de` finds German without the
9320
+ * code being on show.
9325
9321
  *
9326
9322
  * Closed, the select carries how many target languages are done — `1/5`. Its options each carry a chip aggregated
9327
9323
  * across the children:
@@ -9336,11 +9332,11 @@ declare module "components/translation-group/translation-group.component" {
9336
9332
  * The children own their values; this component only chooses which language is shown and reports on what they hold.
9337
9333
  * It reads them back on every child `zn-change`, so the chips and the count follow an edit as it is typed.
9338
9334
  *
9339
- * Extends `zn-panel`, so `caption`, `icon`, `flush`, `transparent` and the `footer` slot behave as they do there.
9340
- * Nested inside another panel, add `inline` to drop the chrome and keep the fields aligned with the surrounding form.
9335
+ * Extends `zn-panel`, so `caption`, `flush`, `transparent` and the `footer` slot behave as they do there. Nested
9336
+ * inside another panel, add `inline` to drop the chrome and keep the fields aligned with the surrounding form.
9341
9337
  *
9342
9338
  * @dependency zn-chip
9343
- * @dependency zn-header
9339
+ * @dependency zn-form-group
9344
9340
  * @dependency zn-option
9345
9341
  * @dependency zn-select
9346
9342
  *
@@ -9350,27 +9346,29 @@ declare module "components/translation-group/translation-group.component" {
9350
9346
  * @slot actions - Buttons for the bottom of the panel, on the white body rather than the grey footer. They sit on
9351
9347
  * the right, as zinc's form action rows do; `align="start"` moves one to the left. Write them in the order they
9352
9348
  * should be read — the sides are set by CSS ordering, so markup order is what a keyboard follows.
9353
- * @slot footer - Content displayed in the grey panel footer. The header belongs to the language select; nothing
9354
- * else is slotted into it.
9349
+ * @slot footer - Content displayed in the grey panel footer.
9355
9350
  *
9356
9351
  * @csspart base - The component's base wrapper.
9352
+ * @csspart form-group - The form group holding the caption, the language select and the fields.
9357
9353
  * @csspart actions - The row of buttons at the bottom of the body.
9358
- * @csspart language-field - The label and select that choose the language every child is editing.
9354
+ * @csspart language-field - The select that chooses the language every child is editing, in the group's chip slot.
9359
9355
  * @csspart language-select - The select itself.
9360
9356
  */
9361
9357
  export default class ZnTranslationGroup extends ZnPanel {
9362
9358
  static styles: CSSResultGroup;
9363
9359
  static dependencies: {
9364
9360
  'zn-chip': typeof ZnChip;
9365
- 'zn-header': typeof ZnHeader;
9361
+ 'zn-form-group': typeof ZnFormGroup;
9366
9362
  'zn-option': typeof ZnOption;
9367
9363
  'zn-select': typeof ZnSelect;
9368
9364
  };
9369
9365
  private readonly _slotController;
9370
- /** The caption shown in the panel header. An alias for the inherited `caption`, which wins where both are set. */
9366
+ /** The form group's label. An alias for the inherited `caption`, which wins where both are set. */
9371
9367
  label: string;
9368
+ /** Sits under the label, above the language select, as help text does in any other form group. */
9369
+ helpText: string;
9372
9370
  /**
9373
- * Drops the panel chrome — border, background and padding — so the group reads as a section of the form around it
9371
+ * Drops the panel chrome — border, background and padding — so the group reads as a section of the surrounding form
9374
9372
  * rather than a panel of its own. For groups nested inside another panel, where the fields would otherwise sit
9375
9373
  * indented behind a second border.
9376
9374
  */
@@ -9402,7 +9400,7 @@ declare module "components/translation-group/translation-group.component" {
9402
9400
  * count are read off the children, so a child's edit has to bring the group back round.
9403
9401
  */
9404
9402
  private languageState;
9405
- /** `English (EN)`, or the code alone where the configured name already is the code. */
9403
+ /** The configured name, or the code where `languages` does not name the language. */
9406
9404
  private displayName;
9407
9405
  /** Children take their language list from the group, so a change to `languages` has to reach them. */
9408
9406
  private syncChildLanguages;
@@ -9726,7 +9724,7 @@ declare module "components/remarkd-editor/actions" {
9726
9724
  /** Where the caret lands within `prefix`. Defaults to the end. */
9727
9725
  caretOffset?: number;
9728
9726
  /** Actions that open their own picker instead of inserting text. */
9729
- opens?: 'image' | 'include';
9727
+ opens?: 'image' | 'include' | 'link';
9730
9728
  }
9731
9729
  /** Toolbar order, most-used first — the last groups are the first to collapse. */
9732
9730
  export const ACTION_GROUPS: {
@@ -9842,6 +9840,16 @@ declare module "components/remarkd-editor/remarkd-editor.component" {
9842
9840
  private includeLoadFailed;
9843
9841
  private includePickerIndex;
9844
9842
  private includeQuery;
9843
+ private linkPickerOpen;
9844
+ private linkQuery;
9845
+ private linkResults;
9846
+ private linkSearchFailed;
9847
+ private linkSelection;
9848
+ private linkSearchTimer?;
9849
+ private linkSearchToken;
9850
+ /** Resolved link targets by reference; a null value is one the app does not know. */
9851
+ private linkRefs;
9852
+ private linkRefsPending;
9845
9853
  private pendingDragHandle;
9846
9854
  private dragStartX;
9847
9855
  private dragStartY;
@@ -9868,6 +9876,13 @@ declare module "components/remarkd-editor/remarkd-editor.component" {
9868
9876
  * chips rendered for `include::` directives and feeds the include picker.
9869
9877
  */
9870
9878
  includeUrl: string;
9879
+ /**
9880
+ * Endpoint the article link picker searches, as
9881
+ * `{"items":[{ref,kind,title,context,status}]}`. Queried with `?q=<term>` as
9882
+ * the author types and with `?refs=a,b` to resolve the references a body
9883
+ * already carries.
9884
+ */
9885
+ linkUrl: string;
9871
9886
  /** Adds a toolbar toggle that swaps the block view for the full remarkd source. */
9872
9887
  allowRaw: boolean;
9873
9888
  /** Makes the editor required for form submission. */
@@ -9891,6 +9906,7 @@ declare module "components/remarkd-editor/remarkd-editor.component" {
9891
9906
  disconnectedCallback(): void;
9892
9907
  handleValueChange(): void;
9893
9908
  handleIncludeUrlChange(): void;
9909
+ handleLinkUrlChange(): void;
9894
9910
  /**
9895
9911
  * Splits remarkd source into blocks on blank lines, keeping fenced /
9896
9912
  * delimited containers (``` ==== !!!! .... ---- ____ **** ////) as single blocks.
@@ -9975,6 +9991,15 @@ declare module "components/remarkd-editor/remarkd-editor.component" {
9975
9991
  private moveDragGhost;
9976
9992
  private pickImage;
9977
9993
  private pickInclude;
9994
+ /**
9995
+ * Opens the picker over the block being edited. The caret range is captured
9996
+ * now: the picker's own filter takes focus, so the textarea's selection is
9997
+ * gone by the time an option is chosen.
9998
+ */
9999
+ private pickLink;
10000
+ private closeLinkPicker;
10001
+ /** Debounced; only the newest response is kept. */
10002
+ private searchLinks;
9978
10003
  private closeIncludePicker;
9979
10004
  private insertInclude;
9980
10005
  private closeImagePicker;
@@ -9992,6 +10017,13 @@ declare module "components/remarkd-editor/remarkd-editor.component" {
9992
10017
  private hasIncludeBlock;
9993
10018
  /** Fetches the include list once; every later caller shares the same promise. */
9994
10019
  private loadIncludeOptions;
10020
+ /**
10021
+ * Resolves the references in the body that have not been resolved yet, so a
10022
+ * link whose target is gone can be marked. A failed request records nothing:
10023
+ * an unanswered reference is not a broken one.
10024
+ */
10025
+ private resolveContentLinks;
10026
+ private markContentLinks;
9995
10027
  private autosize;
9996
10028
  /**
9997
10029
  * Applies an inline mark to the open block's textarea: wraps the selection, toggles the
@@ -10038,8 +10070,11 @@ declare module "components/remarkd-editor/remarkd-editor.component" {
10038
10070
  */
10039
10071
  private renderConditional;
10040
10072
  private renderBlock;
10041
- /** An inline action needs an open block to apply its mark to. */
10073
+ /** Inline marks and the article link both apply into an open block, not a new one. */
10042
10074
  private isActionDisabled;
10075
+ /** A picker action with no endpoint configured is not offered at all. */
10076
+ private actionAvailable;
10077
+ private slashItemAvailable;
10043
10078
  /** Routes a toolbar/menu action to the inline or block insert path — the one place both
10044
10079
  * `renderAction` and `renderMenuAction` call, so the bar and the overflow menu cannot
10045
10080
  * drift out of sync on what a given action actually does. */
@@ -10053,6 +10088,8 @@ declare module "components/remarkd-editor/remarkd-editor.component" {
10053
10088
  /** The block views, with the inline image picker spliced in when active. */
10054
10089
  private renderBody;
10055
10090
  private renderIncludePicker;
10091
+ private renderLinkPicker;
10092
+ private insertLink;
10056
10093
  private renderImagePicker;
10057
10094
  }
10058
10095
  }