@kubex/zinc 1.1.63 → 1.1.64

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.
@@ -3253,6 +3253,53 @@
3253
3253
  }
3254
3254
  ]
3255
3255
  },
3256
+ {
3257
+ "name": "zn-remarkd-editor",
3258
+ "description": "A Notion-style block editor for remarkd content. Blocks render inline; click one to edit its source.\n---\n\n\n### **Events:**\n - **zn-input** - Emitted on each keystroke while editing a block.\n- **zn-change** - Emitted when a block edit is committed and the value changes.\n\n### **Methods:**\n - **focus()** - Starts editing the first block, or a new block if the document is empty.\n- **blur()** - Commits any in-progress block edit.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **toolbar** - The always-visible block-insert toolbar.\n- **block** - A rendered block wrapper.\n- **rendered** - The rendered remarkd output of a block.\n- **input** - The textarea shown while editing a block.\n- **slash-menu** - The context menu opened by typing \"/\" in a block.",
3259
+ "attributes": [
3260
+ {
3261
+ "name": "name",
3262
+ "description": "The name of the control, submitted as part of form data.",
3263
+ "values": []
3264
+ },
3265
+ {
3266
+ "name": "value",
3267
+ "description": "The current remarkd source.",
3268
+ "values": []
3269
+ },
3270
+ {
3271
+ "name": "placeholder",
3272
+ "description": "Placeholder shown when the document is empty.",
3273
+ "values": []
3274
+ },
3275
+ {
3276
+ "name": "attachment-url",
3277
+ "description": "Endpoint for image uploads. Posting the file metadata here must return\n`{uploadPath, uploadUrl}`; the file is then PUT to `uploadUrl` and\n`uploadPath` is inserted into the document. When unset, adding an image\nprompts for a URL instead.",
3278
+ "values": []
3279
+ },
3280
+ {
3281
+ "name": "required",
3282
+ "description": "Makes the editor required for form submission.",
3283
+ "values": []
3284
+ },
3285
+ {
3286
+ "name": "readonly",
3287
+ "description": "Makes the editor read-only.",
3288
+ "values": []
3289
+ },
3290
+ {
3291
+ "name": "disabled",
3292
+ "description": "Disables the editor.",
3293
+ "values": []
3294
+ }
3295
+ ],
3296
+ "references": [
3297
+ {
3298
+ "name": "Documentation",
3299
+ "url": "https://zinc.style/components/remarkd-editor"
3300
+ }
3301
+ ]
3302
+ },
3256
3303
  {
3257
3304
  "name": "zn-reveal",
3258
3305
  "description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\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.",
@@ -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.63",
4
+ "version": "1.1.64",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -7589,6 +7589,114 @@
7589
7589
  ]
7590
7590
  }
7591
7591
  },
7592
+ {
7593
+ "name": "zn-remarkd-editor",
7594
+ "description": "A Notion-style block editor for remarkd content. Blocks render inline; click one to edit its source.\n---\n\n\n### **Events:**\n - **zn-input** - Emitted on each keystroke while editing a block.\n- **zn-change** - Emitted when a block edit is committed and the value changes.\n\n### **Methods:**\n - **focus()** - Starts editing the first block, or a new block if the document is empty.\n- **blur()** - Commits any in-progress block edit.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **toolbar** - The always-visible block-insert toolbar.\n- **block** - A rendered block wrapper.\n- **rendered** - The rendered remarkd output of a block.\n- **input** - The textarea shown while editing a block.\n- **slash-menu** - The context menu opened by typing \"/\" in a block.",
7595
+ "doc-url": "",
7596
+ "attributes": [
7597
+ {
7598
+ "name": "name",
7599
+ "description": "The name of the control, submitted as part of form data.",
7600
+ "value": { "type": "string", "default": "''" }
7601
+ },
7602
+ {
7603
+ "name": "value",
7604
+ "description": "The current remarkd source.",
7605
+ "value": { "type": "string", "default": "''" }
7606
+ },
7607
+ {
7608
+ "name": "placeholder",
7609
+ "description": "Placeholder shown when the document is empty.",
7610
+ "value": { "type": "string", "default": "'Type something…'" }
7611
+ },
7612
+ {
7613
+ "name": "attachment-url",
7614
+ "description": "Endpoint for image uploads. Posting the file metadata here must return\n`{uploadPath, uploadUrl}`; the file is then PUT to `uploadUrl` and\n`uploadPath` is inserted into the document. When unset, adding an image\nprompts for a URL instead.",
7615
+ "value": { "type": "string", "default": "''" }
7616
+ },
7617
+ {
7618
+ "name": "required",
7619
+ "description": "Makes the editor required for form submission.",
7620
+ "value": { "type": "boolean", "default": "false" }
7621
+ },
7622
+ {
7623
+ "name": "readonly",
7624
+ "description": "Makes the editor read-only.",
7625
+ "value": { "type": "boolean", "default": "false" }
7626
+ },
7627
+ {
7628
+ "name": "disabled",
7629
+ "description": "Disables the editor.",
7630
+ "value": { "type": "boolean", "default": "false" }
7631
+ }
7632
+ ],
7633
+ "events": [
7634
+ {
7635
+ "name": "zn-input",
7636
+ "description": "Emitted on each keystroke while editing a block."
7637
+ },
7638
+ {
7639
+ "name": "zn-change",
7640
+ "description": "Emitted when a block edit is committed and the value changes."
7641
+ }
7642
+ ],
7643
+ "js": {
7644
+ "properties": [
7645
+ {
7646
+ "name": "name",
7647
+ "description": "The name of the control, submitted as part of form data.",
7648
+ "type": "string"
7649
+ },
7650
+ {
7651
+ "name": "value",
7652
+ "description": "The current remarkd source.",
7653
+ "type": "string"
7654
+ },
7655
+ {
7656
+ "name": "defaultValue",
7657
+ "description": "The default value — used when resetting the form.",
7658
+ "type": "string"
7659
+ },
7660
+ {
7661
+ "name": "placeholder",
7662
+ "description": "Placeholder shown when the document is empty.",
7663
+ "type": "string"
7664
+ },
7665
+ {
7666
+ "name": "attachmentUrl",
7667
+ "description": "Endpoint for image uploads. Posting the file metadata here must return\n`{uploadPath, uploadUrl}`; the file is then PUT to `uploadUrl` and\n`uploadPath` is inserted into the document. When unset, adding an image\nprompts for a URL instead.",
7668
+ "type": "string"
7669
+ },
7670
+ {
7671
+ "name": "required",
7672
+ "description": "Makes the editor required for form submission.",
7673
+ "type": "boolean"
7674
+ },
7675
+ {
7676
+ "name": "readonly",
7677
+ "description": "Makes the editor read-only.",
7678
+ "type": "boolean"
7679
+ },
7680
+ {
7681
+ "name": "disabled",
7682
+ "description": "Disables the editor.",
7683
+ "type": "boolean"
7684
+ },
7685
+ { "name": "validity", "type": "ValidityState" },
7686
+ { "name": "validationMessage", "type": "string" }
7687
+ ],
7688
+ "events": [
7689
+ {
7690
+ "name": "zn-input",
7691
+ "description": "Emitted on each keystroke while editing a block."
7692
+ },
7693
+ {
7694
+ "name": "zn-change",
7695
+ "description": "Emitted when a block edit is committed and the value changes."
7696
+ }
7697
+ ]
7698
+ }
7699
+ },
7592
7700
  {
7593
7701
  "name": "zn-reveal",
7594
7702
  "description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\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.",
package/dist/zn.d.ts CHANGED
@@ -3120,6 +3120,7 @@ declare module "components/query-builder/query-builder.component" {
3120
3120
  name: string;
3121
3121
  value: PropertyKey;
3122
3122
  showValues: string[];
3123
+ private get _usedFilterIds();
3123
3124
  get validationMessage(): string;
3124
3125
  get validity(): ValidityState;
3125
3126
  protected firstUpdated(_changedProperties: PropertyValues): void;
@@ -7057,6 +7058,8 @@ declare module "components/file/file.component" {
7057
7058
  'zn-dialog': typeof ZnDialog;
7058
7059
  };
7059
7060
  private readonly formControlController;
7061
+ /** Set when the user clears the control; reset when a file is chosen. */
7062
+ private clearedByUser;
7060
7063
  private readonly hasSlotController;
7061
7064
  private readonly localize;
7062
7065
  private userIsDragging;
@@ -8695,6 +8698,154 @@ declare module "components/markdown-editor/index" {
8695
8698
  }
8696
8699
  }
8697
8700
  }
8701
+ declare module "components/remarkd-editor/remarkd-editor.component" {
8702
+ import { type CSSResultGroup, type PropertyValues } from 'lit';
8703
+ import ZincElement from "internal/zinc-element";
8704
+ import type { ZincFormControl } from "internal/zinc-element";
8705
+ /**
8706
+ * @summary A Notion-style block editor for remarkd content. Blocks render inline; click one to edit its source.
8707
+ * @documentation https://zinc.style/components/remarkd-editor
8708
+ * @status experimental
8709
+ * @since 1.0
8710
+ *
8711
+ * @dependency zn-button
8712
+ * @dependency zn-button-group
8713
+ * @dependency zn-icon
8714
+ * @dependency zn-dialog
8715
+ * @dependency zn-file
8716
+ * @dependency zn-input
8717
+ *
8718
+ * @event zn-input - Emitted on each keystroke while editing a block.
8719
+ * @event zn-change - Emitted when a block edit is committed and the value changes.
8720
+ *
8721
+ * @csspart base - The component's base wrapper.
8722
+ * @csspart toolbar - The always-visible block-insert toolbar.
8723
+ * @csspart block - A rendered block wrapper.
8724
+ * @csspart rendered - The rendered remarkd output of a block.
8725
+ * @csspart input - The textarea shown while editing a block.
8726
+ * @csspart slash-menu - The context menu opened by typing "/" in a block.
8727
+ */
8728
+ export default class ZnRemarkdEditor extends ZincElement implements ZincFormControl {
8729
+ static styles: CSSResultGroup;
8730
+ private readonly formControlController;
8731
+ private editingDraft;
8732
+ private suppressValueSync;
8733
+ private suppressBlurCommit;
8734
+ private validationInput;
8735
+ private blocks;
8736
+ private editingIndex;
8737
+ private slashMenuOpen;
8738
+ private slashQuery;
8739
+ private slashActiveIndex;
8740
+ private imageDialogOpen;
8741
+ private dropIndicator;
8742
+ private dragIndex;
8743
+ private editShell;
8744
+ private imageInsertIndex;
8745
+ private pendingDragHandle;
8746
+ private dragStartX;
8747
+ private dragStartY;
8748
+ private dragGhost;
8749
+ /** The name of the control, submitted as part of form data. */
8750
+ name: string;
8751
+ /** The current remarkd source. */
8752
+ value: string;
8753
+ /** The default value — used when resetting the form. */
8754
+ defaultValue: string;
8755
+ /** Placeholder shown when the document is empty. */
8756
+ placeholder: string;
8757
+ /**
8758
+ * Endpoint for image uploads. Posting the file metadata here must return
8759
+ * `{uploadPath, uploadUrl}`; the file is then PUT to `uploadUrl` and
8760
+ * `uploadPath` is inserted into the document. When unset, adding an image
8761
+ * prompts for a URL instead.
8762
+ */
8763
+ attachmentUrl: string;
8764
+ /** Makes the editor required for form submission. */
8765
+ required: boolean;
8766
+ /** Makes the editor read-only. */
8767
+ readonly: boolean;
8768
+ /** Disables the editor. */
8769
+ disabled: boolean;
8770
+ get validity(): ValidityState;
8771
+ get validationMessage(): string;
8772
+ checkValidity(): boolean;
8773
+ getForm(): HTMLFormElement | null;
8774
+ reportValidity(): boolean;
8775
+ setCustomValidity(message: string): void;
8776
+ /** Starts editing the first block, or a new block if the document is empty. */
8777
+ focus(): void;
8778
+ /** Commits any in-progress block edit. */
8779
+ blur(): void;
8780
+ protected firstUpdated(_changedProperties: PropertyValues): void;
8781
+ disconnectedCallback(): void;
8782
+ handleValueChange(): void;
8783
+ /**
8784
+ * Splits remarkd source into blocks on blank lines, keeping fenced /
8785
+ * delimited containers (``` ==== !!!! .... ----) as single blocks.
8786
+ */
8787
+ private splitBlocks;
8788
+ private fenceMarker;
8789
+ private closesFence;
8790
+ private updateBlocks;
8791
+ private handleRenderedClick;
8792
+ private toggleCheckbox;
8793
+ private startEdit;
8794
+ /**
8795
+ * The remarkd chrome the editing block should keep, derived from its first
8796
+ * line — so a NOTE still looks like a note while its source is edited.
8797
+ */
8798
+ private computeEditShell;
8799
+ private focusInput;
8800
+ private addBlockAt;
8801
+ /** Inserts a draft block — committed (or dropped, if left empty) on blur. */
8802
+ private insertDraftBlock;
8803
+ /**
8804
+ * Blur handler for the editing textarea. Re-renders that replace the
8805
+ * focused textarea (e.g. Shift+Enter committing and opening the next
8806
+ * block) fire blur mid-transition — `suppressBlurCommit` masks those.
8807
+ */
8808
+ private handleEditBlur;
8809
+ /** Commits the in-progress edit; returns the index after the committed parts. */
8810
+ private commitEdit;
8811
+ private get filteredSlashItems();
8812
+ private handleDraftInput;
8813
+ private handleEditKeydown;
8814
+ private applySlashItem;
8815
+ private handleEditPaste;
8816
+ private handleDragOver;
8817
+ private handleDrop;
8818
+ /** The insertion index a drop at `y` maps to, from the rendered block positions. */
8819
+ private insertionIndexFromY;
8820
+ private handleHandlePointerDown;
8821
+ private handleDragPointerMove;
8822
+ private handleDragPointerUp;
8823
+ private cancelDrag;
8824
+ private createDragGhost;
8825
+ private moveDragGhost;
8826
+ private pickImage;
8827
+ private handleImageDialogClose;
8828
+ private handleImageInsert;
8829
+ private insertImage;
8830
+ private uploadImage;
8831
+ private autosize;
8832
+ private handleToolbarInsert;
8833
+ private renderSlashMenu;
8834
+ private renderBlock;
8835
+ render(): import("lit-html").TemplateResult<1>;
8836
+ private renderImageDialog;
8837
+ }
8838
+ }
8839
+ declare module "components/remarkd-editor/index" {
8840
+ import ZnRemarkdEditor from "components/remarkd-editor/remarkd-editor.component";
8841
+ export * from "components/remarkd-editor/remarkd-editor.component";
8842
+ export default ZnRemarkdEditor;
8843
+ global {
8844
+ interface HTMLElementTagNameMap {
8845
+ 'zn-remarkd-editor': ZnRemarkdEditor;
8846
+ }
8847
+ }
8848
+ }
8698
8849
  declare module "components/flow-builder/flow.types" {
8699
8850
  import type { TemplateResult } from 'lit';
8700
8851
  /** Which steps-panel tab a node type appears under. */
@@ -10528,6 +10679,7 @@ declare module "zinc" {
10528
10679
  export { default as OptGroup } from "components/opt-group/index";
10529
10680
  export { default as PriorityList } from "components/priority-list/index";
10530
10681
  export { default as MarkdownEditor } from "components/markdown-editor/index";
10682
+ export { default as RemarkdEditor } from "components/remarkd-editor/index";
10531
10683
  export { default as FlowBuilder } from "components/flow-builder/index";
10532
10684
  export { default as FlowSteps } from "components/flow-builder/modules/flow-steps/index";
10533
10685
  export { default as FlowStepGroup } from "components/flow-builder/modules/flow-step-group/index";