@kubex/zinc 1.1.163 → 1.1.165

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.
@@ -32416,8 +32416,8 @@
32416
32416
  ],
32417
32417
  "events": [
32418
32418
  {
32419
- "description": "Emitted as an example.",
32420
- "name": "zn-event-name"
32419
+ "description": "Emitted each time the popup is positioned.",
32420
+ "name": "zn-reposition"
32421
32421
  }
32422
32422
  ],
32423
32423
  "attributes": [
@@ -32622,7 +32622,7 @@
32622
32622
  "tagNameWithoutPrefix": "popup",
32623
32623
  "tagName": "zn-popup",
32624
32624
  "customElement": true,
32625
- "jsDoc": "/**\n * @summary Short summary of the component's intended use.\n * @documentation https://zinc.style/components/popup\n * @status experimental\n * @since 1.0\n *\n * @dependency zn-example\n *\n * @event zn-event-name - Emitted as an example.\n *\n * @slot - The default slot.\n * @slot example - An example slot.\n *\n * @csspart base - The component's base wrapper.\n *\n * @cssproperty --example - An example CSS custom property.\n */",
32625
+ "jsDoc": "/**\n * @summary Short summary of the component's intended use.\n * @documentation https://zinc.style/components/popup\n * @status experimental\n * @since 1.0\n *\n * @dependency zn-example\n *\n * @event zn-reposition - Emitted each time the popup is positioned.\n *\n * @slot - The default slot.\n * @slot example - An example slot.\n *\n * @csspart base - The component's base wrapper.\n *\n * @cssproperty --example - An example CSS custom property.\n */",
32626
32626
  "documentation": "https://zinc.style/components/popup",
32627
32627
  "status": "experimental",
32628
32628
  "since": "1.0",
@@ -37234,6 +37234,25 @@
37234
37234
  ],
37235
37235
  "description": "Splits remarkd source into blocks on blank lines, keeping fenced /\ndelimited containers (``` ==== !!!! .... ---- ____ **** ////) as single blocks."
37236
37236
  },
37237
+ {
37238
+ "kind": "method",
37239
+ "name": "scanBlocks",
37240
+ "privacy": "private",
37241
+ "return": {
37242
+ "type": {
37243
+ "text": "{ blocks: string[]; open: boolean }"
37244
+ }
37245
+ },
37246
+ "parameters": [
37247
+ {
37248
+ "name": "source",
37249
+ "type": {
37250
+ "text": "string"
37251
+ }
37252
+ }
37253
+ ],
37254
+ "description": "`splitBlocks`, plus whether the source ends inside an unclosed container, where a blank line does not split."
37255
+ },
37237
37256
  {
37238
37257
  "kind": "method",
37239
37258
  "name": "fenceMarker",
@@ -37629,6 +37648,60 @@
37629
37648
  "name": "handleEditKeydown",
37630
37649
  "privacy": "private"
37631
37650
  },
37651
+ {
37652
+ "kind": "method",
37653
+ "name": "finishedDraft",
37654
+ "privacy": "private",
37655
+ "return": {
37656
+ "type": {
37657
+ "text": "string | null"
37658
+ }
37659
+ },
37660
+ "parameters": [
37661
+ {
37662
+ "name": "value",
37663
+ "type": {
37664
+ "text": "string"
37665
+ }
37666
+ },
37667
+ {
37668
+ "name": "start",
37669
+ "type": {
37670
+ "text": "number"
37671
+ }
37672
+ },
37673
+ {
37674
+ "name": "end",
37675
+ "type": {
37676
+ "text": "number"
37677
+ }
37678
+ }
37679
+ ],
37680
+ "description": "The draft to commit when Enter should finish the block — pressed on a trailing blank line or\nempty list item, outside any container — with that line dropped. Null otherwise."
37681
+ },
37682
+ {
37683
+ "kind": "method",
37684
+ "name": "isPlainEnter",
37685
+ "privacy": "private",
37686
+ "return": {
37687
+ "type": {
37688
+ "text": "boolean"
37689
+ }
37690
+ },
37691
+ "parameters": [
37692
+ {
37693
+ "name": "e",
37694
+ "type": {
37695
+ "text": "KeyboardEvent"
37696
+ }
37697
+ }
37698
+ ]
37699
+ },
37700
+ {
37701
+ "kind": "field",
37702
+ "name": "handleRawKeydown",
37703
+ "privacy": "private"
37704
+ },
37632
37705
  {
37633
37706
  "kind": "method",
37634
37707
  "name": "isSlashBlock",
@@ -37997,7 +38070,39 @@
37997
38070
  }
37998
38071
  }
37999
38072
  ],
38000
- "description": "Applies an inline mark to the open block's textarea: wraps the selection, toggles the\nmark off when it is already wrapped, or inserts a selected placeholder when there is\nno selection. Goes through `editingDraft` so `zn-input` still fires."
38073
+ "description": "Applies an inline mark to the open block's textarea: wraps the selection, toggles the\nmark off when it is already wrapped, or inserts a selected placeholder when there is\nno selection."
38074
+ },
38075
+ {
38076
+ "kind": "method",
38077
+ "name": "applyDraftEdit",
38078
+ "privacy": "private",
38079
+ "parameters": [
38080
+ {
38081
+ "name": "input",
38082
+ "type": {
38083
+ "text": "HTMLTextAreaElement"
38084
+ }
38085
+ },
38086
+ {
38087
+ "name": "value",
38088
+ "type": {
38089
+ "text": "string"
38090
+ }
38091
+ },
38092
+ {
38093
+ "name": "selectionStart",
38094
+ "type": {
38095
+ "text": "number"
38096
+ }
38097
+ },
38098
+ {
38099
+ "name": "selectionEnd",
38100
+ "type": {
38101
+ "text": "number"
38102
+ }
38103
+ }
38104
+ ],
38105
+ "description": "Writes a programmatic edit to the open block's textarea. Goes through `editingDraft` so `zn-input` still fires."
38001
38106
  },
38002
38107
  {
38003
38108
  "kind": "field",
@@ -53826,7 +53931,7 @@
53826
53931
  "package": {
53827
53932
  "name": "@kubex/zinc",
53828
53933
  "description": "A collection of web components for building web applications based off of @shoelace-style/Shoelace",
53829
- "version": "1.1.163",
53934
+ "version": "1.1.165",
53830
53935
  "author": "",
53831
53936
  "license": "MIT"
53832
53937
  }
@@ -3111,7 +3111,7 @@
3111
3111
  },
3112
3112
  {
3113
3113
  "name": "zn-popup",
3114
- "description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Methods:**\n - **reposition()** - Forces the popup to recalculate and reposition itself.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
3114
+ "description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-reposition** - Emitted each time the popup is positioned.\n\n### **Methods:**\n - **reposition()** - Forces the popup to recalculate and reposition itself.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
3115
3115
  "attributes": [
3116
3116
  {
3117
3117
  "name": "anchor",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@kubex/zinc",
4
- "version": "1.1.163",
4
+ "version": "1.1.165",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -7380,7 +7380,7 @@
7380
7380
  },
7381
7381
  {
7382
7382
  "name": "zn-popup",
7383
- "description": "Short summary of the component's intended use.\n\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Methods:**\n - **reposition()** - Forces the popup to recalculate and reposition itself.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
7383
+ "description": "Short summary of the component's intended use.\n\n---\n\n\n### **Events:**\n - **zn-reposition** - Emitted each time the popup is positioned.\n\n### **Methods:**\n - **reposition()** - Forces the popup to recalculate and reposition itself.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
7384
7384
  "doc-url": "",
7385
7385
  "attributes": [
7386
7386
  {
@@ -7508,7 +7508,10 @@
7508
7508
  { "name": "example", "description": "An example slot." }
7509
7509
  ],
7510
7510
  "events": [
7511
- { "name": "zn-event-name", "description": "Emitted as an example." }
7511
+ {
7512
+ "name": "zn-reposition",
7513
+ "description": "Emitted each time the popup is positioned."
7514
+ }
7512
7515
  ],
7513
7516
  "js": {
7514
7517
  "properties": [
@@ -7631,8 +7634,8 @@
7631
7634
  ],
7632
7635
  "events": [
7633
7636
  {
7634
- "name": "zn-event-name",
7635
- "description": "Emitted as an example."
7637
+ "name": "zn-reposition",
7638
+ "description": "Emitted each time the popup is positioned."
7636
7639
  }
7637
7640
  ]
7638
7641
  }
package/dist/zn.d.ts CHANGED
@@ -351,7 +351,7 @@ declare module "components/popup/popup.component" {
351
351
  *
352
352
  * @dependency zn-example
353
353
  *
354
- * @event zn-event-name - Emitted as an example.
354
+ * @event zn-reposition - Emitted each time the popup is positioned.
355
355
  *
356
356
  * @slot - The default slot.
357
357
  * @slot example - An example slot.
@@ -9272,6 +9272,11 @@ declare module "components/remarkd-editor/actions" {
9272
9272
  after?: string;
9273
9273
  placeholder?: string;
9274
9274
  }
9275
+ /** A shortcut on the platform modifier: Cmd on Apple devices, Ctrl elsewhere. */
9276
+ export interface Shortcut {
9277
+ key: string;
9278
+ shift?: boolean;
9279
+ }
9275
9280
  export interface EditorAction {
9276
9281
  /** Stable id, used for toolbar keys and tests. */
9277
9282
  key: string;
@@ -9288,6 +9293,7 @@ declare module "components/remarkd-editor/actions" {
9288
9293
  caretOffset?: number;
9289
9294
  /** Actions that open their own picker instead of inserting text. */
9290
9295
  opens?: 'image' | 'include' | 'link';
9296
+ shortcut?: Shortcut;
9291
9297
  }
9292
9298
  /** Toolbar order, most-used first — the last groups are the first to collapse. */
9293
9299
  export const ACTION_GROUPS: {
@@ -9295,9 +9301,28 @@ declare module "components/remarkd-editor/actions" {
9295
9301
  label: string;
9296
9302
  }[];
9297
9303
  export const EDITOR_ACTIONS: EditorAction[];
9304
+ export function isApple(): boolean;
9305
+ export function matchesShortcut(e: KeyboardEvent, shortcut: Shortcut): boolean;
9306
+ /** The shortcut as shown to people, e.g. `⌘⇧X` or `Ctrl+Shift+X`. */
9307
+ export function shortcutLabel(shortcut: Shortcut): string;
9298
9308
  /** The registry as slash menu entries. Picker actions insert nothing; the menu emits their action id. */
9299
9309
  export function slashItems(actions: EditorAction[]): SlashMenuItem[];
9300
9310
  }
9311
+ declare module "components/remarkd-editor/list-continuation" {
9312
+ /** A textarea edit: the new value and where the caret lands in it. */
9313
+ export interface TextEdit {
9314
+ value: string;
9315
+ caret: number;
9316
+ }
9317
+ /** Whether `line` is a list marker with nothing after it — `- `, `2. `, `- [ ] `, or a bare `::`. */
9318
+ export function isEmptyListItem(line: string): boolean;
9319
+ /**
9320
+ * What Enter does on a list line: continues the list with the next marker, or ends it by
9321
+ * clearing the marker of an item that has no text. Null when Enter should just insert a
9322
+ * newline — no list line, a selection, or the caret before the marker.
9323
+ */
9324
+ export function continueList(value: string, start: number, end: number): TextEdit | null;
9325
+ }
9301
9326
  declare module "internal/toolbar-overflow" {
9302
9327
  import type { ReactiveController, ReactiveControllerHost } from 'lit';
9303
9328
  interface ToolbarOverflowOptions {
@@ -9476,6 +9501,8 @@ declare module "components/remarkd-editor/remarkd-editor.component" {
9476
9501
  * delimited containers (``` ==== !!!! .... ---- ____ **** ////) as single blocks.
9477
9502
  */
9478
9503
  private splitBlocks;
9504
+ /** `splitBlocks`, plus whether the source ends inside an unclosed container, where a blank line does not split. */
9505
+ private scanBlocks;
9479
9506
  private fenceMarker;
9480
9507
  private closesFence;
9481
9508
  private updateBlocks;
@@ -9527,6 +9554,13 @@ declare module "components/remarkd-editor/remarkd-editor.component" {
9527
9554
  private commitEdit;
9528
9555
  private handleDraftInput;
9529
9556
  private handleEditKeydown;
9557
+ /**
9558
+ * The draft to commit when Enter should finish the block — pressed on a trailing blank line or
9559
+ * empty list item, outside any container — with that line dropped. Null otherwise.
9560
+ */
9561
+ private finishedDraft;
9562
+ private isPlainEnter;
9563
+ private handleRawKeydown;
9530
9564
  /** Whether the block being edited is nothing but the slash command. */
9531
9565
  private isSlashBlock;
9532
9566
  private mountSlashMenu;
@@ -9592,9 +9626,11 @@ declare module "components/remarkd-editor/remarkd-editor.component" {
9592
9626
  /**
9593
9627
  * Applies an inline mark to the open block's textarea: wraps the selection, toggles the
9594
9628
  * mark off when it is already wrapped, or inserts a selected placeholder when there is
9595
- * no selection. Goes through `editingDraft` so `zn-input` still fires.
9629
+ * no selection.
9596
9630
  */
9597
9631
  private applyInline;
9632
+ /** Writes a programmatic edit to the open block's textarea. Goes through `editingDraft` so `zn-input` still fires. */
9633
+ private applyDraftEdit;
9598
9634
  private toggleRawMode;
9599
9635
  private focusRaw;
9600
9636
  /**
@@ -13336,6 +13372,14 @@ declare module "events/zn-slash-insert" {
13336
13372
  }
13337
13373
  }
13338
13374
  }
13375
+ declare module "events/zn-reposition" {
13376
+ export type ZnRepositionEvent = CustomEvent<Record<PropertyKey, never>>;
13377
+ global {
13378
+ interface GlobalEventHandlersEventMap {
13379
+ 'zn-reposition': ZnRepositionEvent;
13380
+ }
13381
+ }
13382
+ }
13339
13383
  declare module "events/events" {
13340
13384
  export type { ZnAfterHideEvent } from "events/zn-after-hide";
13341
13385
  export type { ZnAfterShowEvent } from "events/zn-after-show";
@@ -13360,6 +13404,7 @@ declare module "events/events" {
13360
13404
  export type { ZnThemeSubmitEvent } from "events/zn-theme-submit";
13361
13405
  export type { ZnSlashSelectEvent } from "events/zn-slash-select";
13362
13406
  export type { ZnSlashInsertEvent } from "events/zn-slash-insert";
13407
+ export type { ZnRepositionEvent } from "events/zn-reposition";
13363
13408
  }
13364
13409
  declare module "zinc" {
13365
13410
  export { default as Button } from "components/button/index";