@estiva-app/ui 0.63.0 → 0.64.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.
@@ -0,0 +1,11 @@
1
+ /**
2
+ * A code block in the editor, with the colours RichText reads it in (Katerina,
3
+ * 9 October): the same highlight.js languages, the same classes, and the
4
+ * editor's root wears `richTextClassName`, which colours them.
5
+ *
6
+ * It replaces the starter kit's code block: `StarterKit.configure({ codeBlock: false })`,
7
+ * then add `CodeBlockColours`. The block keeps its name, `codeBlock`, and its
8
+ * `language` attribute, so nothing already written changes.
9
+ */
10
+ export declare const CodeBlockColours: import("@tiptap/core").Node<import("@tiptap/extension-code-block-lowlight").CodeBlockLowlightOptions, any>;
11
+ //# sourceMappingURL=CodeBlockColours.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodeBlockColours.d.ts","sourceRoot":"","sources":["../src/CodeBlockColours.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,4GAA4C,CAAA"}
package/dist/Link.d.ts CHANGED
@@ -6,7 +6,7 @@ import type { ComponentPropsWithRef, ReactNode } from 'react';
6
6
  * on 13 September 2026, in three jobs (UIG-27). The looks are the ones those
7
7
  * links already had, reduced by Katerina's ruling:
8
8
  *
9
- * - `text` — a link inside written text: the info colour, always underlined,
9
+ * - `text` — a link inside written text: the theme's link colour, always underlined,
10
10
  * dimming on hover. The look a link in a body of text already had.
11
11
  * - `quiet` — a title or a timestamp that is also a link. It takes the colour
12
12
  * and size of the text it sits in and underlines on hover. Two looks that
@@ -8,7 +8,8 @@ import type { ReactNode } from 'react';
8
8
  * and the two had drifted: headings, list markers, quotes and code differed,
9
9
  * one app had tables and the other dropped them, one had links and the other
10
10
  * printed the brackets (UIG-30). The look here is Katerina's picks of
11
- * 28 September, one per difference, most of them Peek's.
11
+ * 28 September, one per difference, most of them Peek's, with the room and
12
+ * colours she changed on 9 October.
12
13
  *
13
14
  * **It takes the tree, not the text.** The caller parses (the format comes from
14
15
  * the item's tag, never from the body) and hands the blocks in. So this package
@@ -1 +1 @@
1
- {"version":3,"file":"RichText.d.ts","sourceRoot":"","sources":["../src/RichText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,SAAS,EAAE,MAAM,OAAO,CAAA;AAIlD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,yEAAyE;AACzE,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;IACxB,4EAA4E;IAC5E,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,0DAA0D;AAC1D,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,sEAAsE;IACtE,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC/B,MAAM,CAAC,EAAE,SAAS,WAAW,EAAE,CAAA;IAC/B,QAAQ,CAAC,EAAE,SAAS,aAAa,EAAE,CAAA;CACpC;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,OAAO,CAAA;AAE9C,MAAM,WAAW,aAAa;IAC5B,gCAAgC;IAChC,MAAM,EAAE,SAAS,aAAa,EAAE,CAAA;IAChC;;;;OAIG;IACH,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,SAAS,CAAA;IACxC,mEAAmE;IACnE,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,E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AAO,CAAA;AAE9C,MAAM,WAAW,aAAa;IAC5B,gCAAgC;IAChC,MAAM,EAAE,SAAS,aAAa,EAAE,CAAA;IAChC;;;;OAIG;IACH,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,SAAS,CAAA;IACxC,mEAAmE;IACnE,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,KAAK,SAAS,CAAA;IACpE;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,SAAS,GAAG,SAAS,CAAA;CAC9D;AAqCD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,GAAE,YAAwB,EAAE,SAAS,CAAC,EAAE,MAAM,UAGnF;AA0KD,wBAAgB,QAAQ,CAAC,EACvB,MAAM,EACN,IAAgB,EAChB,UAA2B,EAC3B,eAA+C,EAC/C,WAAW,GACZ,EAAE,aAAa,sCAQf"}
@@ -0,0 +1,29 @@
1
+ import { type ReactNode } from 'react';
2
+ /**
3
+ * Colours inside a code block, by language (Katerina, 9 October).
4
+ *
5
+ * highlight.js reads the code and names each word (a keyword, a string, a
6
+ * comment); RichText's class list gives each name its colour from the theme's
7
+ * `syntax-*` tokens. The same instance colours the editor's code block
8
+ * (`CodeBlockColours`), so what is written looks the same as what is read.
9
+ *
10
+ * `common` is highlight.js's 37 everyday languages. A language outside them, or
11
+ * none, leaves the code in one colour.
12
+ */
13
+ export declare const lowlight: {
14
+ highlight: (language: string, value: string, options?: Readonly<import("lowlight").Options> | null | undefined) => import("hast").Root;
15
+ highlightAuto: (value: string, options?: Readonly<import("lowlight").AutoOptions> | null | undefined) => import("hast").Root;
16
+ listLanguages: () => Array<string>;
17
+ register: {
18
+ (grammars: Readonly<Record<string, import("highlight.js").LanguageFn>>): undefined;
19
+ (name: string, grammar: import("highlight.js").LanguageFn): undefined;
20
+ };
21
+ registerAlias: {
22
+ (aliases: Readonly<Record<string, ReadonlyArray<string> | string>>): undefined;
23
+ (language: string, alias: ReadonlyArray<string> | string): undefined;
24
+ };
25
+ registered: (aliasOrName: string) => boolean;
26
+ };
27
+ /** The code, its words wrapped in highlight.js's classes; the text as it is when the language is unknown. */
28
+ export declare function codeColours(text: string, language?: string): ReactNode;
29
+ //# sourceMappingURL=codeColours.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codeColours.d.ts","sourceRoot":"","sources":["../src/codeColours.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAGrD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ;wDANb,CAAC;0CACmB,CAAC;;;;;;;;;;;CAKiB,CAAA;AAc9C,6GAA6G;AAC7G,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAGtE"}
package/dist/editor.d.ts CHANGED
@@ -9,6 +9,7 @@
9
9
  */
10
10
  export { KeptSelection, SelectionToolbar, normalizeHref, type MarkId, type SelectionToolbarProps } from './SelectionToolbar';
11
11
  export { PastedImages, pastedImages, pastedImageName, type PastedImagesOptions, type ClipboardSource } from './PastedImages';
12
+ export { CodeBlockColours } from './CodeBlockColours';
12
13
  export { suggestionPopup, isSuggestionActive, isSuggestionOpen, type SuggestionPopupOptions } from './suggestionPopup';
13
14
  export { EditorBlockHandle, blockDropCursor, deleteBlock, moveBlock, duplicateBlock, startBlockDrag, type EditorBlockHandleProps, type BlockTurnInto } from './EditorBlockHandle';
14
15
  export { PersonMention, UrgentPersonMention, CaptionedReference, ReferenceTrigger, SlashCommands, peopleMenu, referenceMenu, filterPeople, urgentPubkeys, filterReferences, formatSection, applyFormat, typeTrigger, filterSlashSections, FORMATS, type MentionPerson, type PersonMentionOptions, type CaptionedItem, type CaptionedReferenceOptions, type ReferenceTriggerOptions, type ReferenceMenuOptions, type SlashCommand, type SlashSection, type SlashCommandsOptions, type FormatId, type FormatDef, type CodeFormat, } from './ComposerTriggers';
@@ -1 +1 @@
1
- {"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../src/editor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,aAAa,EAAE,KAAK,MAAM,EAAE,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAC5H,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,KAAK,mBAAmB,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAC5H,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AACtH,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,KAAK,sBAAsB,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACjL,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,aAAa,EACb,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,WAAW,EACX,mBAAmB,EACnB,OAAO,EACP,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,UAAU,GAChB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,OAAO,EACP,YAAY,EACZ,aAAa,EACb,cAAc,EACd,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KA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B,KAAK,mBAAmB,GACzB,MAAM,cAAc,CAAA"}
package/dist/editor.js CHANGED
@@ -338,6 +338,17 @@ var PastedImages = Extension2.create({
338
338
  }
339
339
  });
340
340
 
341
+ // src/CodeBlockColours.ts
342
+ import { CodeBlockLowlight } from "@tiptap/extension-code-block-lowlight";
343
+
344
+ // src/codeColours.ts
345
+ import { createElement } from "react";
346
+ import { common, createLowlight } from "lowlight";
347
+ var lowlight = createLowlight(common);
348
+
349
+ // src/CodeBlockColours.ts
350
+ var CodeBlockColours = CodeBlockLowlight.configure({ lowlight });
351
+
341
352
  // src/suggestionPopup.tsx
342
353
  import { forwardRef, useRef as useRef2, useImperativeHandle } from "react";
343
354
  import { ReactRenderer } from "@tiptap/react";
@@ -1160,6 +1171,7 @@ export {
1160
1171
  AttachmentNode,
1161
1172
  BlockId,
1162
1173
  CaptionedReference,
1174
+ CodeBlockColours,
1163
1175
  EditorBlockHandle,
1164
1176
  FORMATS,
1165
1177
  KeptSelection,