@inditextech/weave-sdk 5.7.0-SNAPSHOT.596.1 → 5.7.0-SNAPSHOT.599.1

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/types.d.ts CHANGED
@@ -1869,15 +1869,58 @@ declare class WeaveTextNode extends WeaveNode {
1869
1869
  * `text` is a derived mirror: block texts joined by `\n`.
1870
1870
  */
1871
1871
  type WeaveTextMarks = {
1872
+ bold?: boolean;
1873
+ italic?: boolean;
1874
+ underline?: boolean;
1875
+ strike?: boolean;
1876
+ color?: string;
1877
+ /** Ratio of the node base `fontSize` (1 is omitted). */
1878
+ size?: number;
1879
+ family?: string;
1880
+ /** Multiplier of the run font size (clamped 0.5 to 4). */
1881
+ lineHeight?: number;
1872
1882
  link?: string;
1873
1883
  [mark: string]: unknown;
1874
1884
  };
1885
+ type WeaveTextMarkKey = 'bold' | 'italic' | 'underline' | 'strike' | 'color' | 'size' | 'family' | 'lineHeight' | 'link';
1886
+ type WeaveTextListKind = 'ul' | 'ol';
1887
+ type WeaveTextBlockAlign = 'left' | 'center' | 'right';
1875
1888
  type WeaveTextRun = {
1876
1889
  t: string;
1877
1890
  m?: WeaveTextMarks;
1878
1891
  };
1879
1892
  type WeaveTextBlock = {
1880
1893
  runs: WeaveTextRun[];
1894
+ kind?: WeaveTextListKind;
1895
+ depth?: number;
1896
+ start?: number;
1897
+ align?: WeaveTextBlockAlign;
1898
+ };
1899
+ type MarkState = 'all' | 'none' | 'some';
1900
+ type MarkQuery = {
1901
+ state: MarkState;
1902
+ value?: unknown;
1903
+ };
1904
+ type WeaveTextSelectionFormat = {
1905
+ bold: MarkQuery;
1906
+ italic: MarkQuery;
1907
+ underline: MarkQuery;
1908
+ strike: MarkQuery;
1909
+ color: MarkQuery;
1910
+ family: MarkQuery;
1911
+ link: MarkQuery;
1912
+ lineHeight: MarkQuery;
1913
+ /** Paragraph alignment of the blocks in the range. */
1914
+ align: {
1915
+ state: MarkState;
1916
+ value?: WeaveTextBlockAlign;
1917
+ };
1918
+ /** `value` in px (ratio * base); `none` reports the base size. */
1919
+ size: MarkQuery;
1920
+ list: {
1921
+ kind: WeaveTextListKind | 'none' | 'mixed';
1922
+ depth?: number;
1923
+ };
1881
1924
  };
1882
1925
  //#endregion
1883
1926
  //#region src/nodes/text-v2/layout/engine.d.ts
@@ -1899,6 +1942,8 @@ type TextLayoutStyle = {
1899
1942
  letterSpacing: number;
1900
1943
  wrap: TextWrap;
1901
1944
  align: TextAlign;
1945
+ /** List indent per depth, as a multiple of `fontSize` (default 1.5). */
1946
+ indentStep?: number;
1902
1947
  };
1903
1948
  /** Bounds supplied by the target. `undefined` width/height means "auto". */
1904
1949
  type TextLayoutBounds = {
@@ -1913,6 +1958,19 @@ type LayoutSegment = {
1913
1958
  /** x offset relative to the line start. */
1914
1959
  x: number;
1915
1960
  width: number;
1961
+ /** Run index inside its paragraph (hit testing / hover). */
1962
+ run: number;
1963
+ /** Resolved canvas font and size (px) of the run. */
1964
+ font: string;
1965
+ fontSize: number;
1966
+ };
1967
+ type LayoutMarker = {
1968
+ text: string;
1969
+ /** x relative to the content box (before padding). */
1970
+ x: number;
1971
+ font: string;
1972
+ fontSize: number;
1973
+ color?: string;
1916
1974
  };
1917
1975
  type LayoutLine = {
1918
1976
  paragraph: number;
@@ -1927,6 +1985,14 @@ type LayoutLine = {
1927
1985
  /** Alignment x offset (0 for left). */
1928
1986
  offsetX: number;
1929
1987
  y: number;
1988
+ /** Line box height and baseline offset from the line top. */
1989
+ height: number;
1990
+ baseline: number;
1991
+ /** Indent of the text (list blocks), already included in `offsetX`. */
1992
+ indent: number;
1993
+ marker?: LayoutMarker;
1994
+ /** Resolved paragraph alignment. */
1995
+ align: TextAlign;
1930
1996
  segments: LayoutSegment[];
1931
1997
  lastInParagraph: boolean;
1932
1998
  };
@@ -1937,10 +2003,17 @@ type TextLayout = {
1937
2003
  /** Font size, like `Konva.Text.getTextHeight()`. */
1938
2004
  textHeight: number;
1939
2005
  lineHeightPx: number;
2006
+ /** Sum of line heights (without padding). */
2007
+ contentHeight: number;
1940
2008
  /** Resolved node size, like `Konva.Text.width()/height()`. */
1941
2009
  width: number;
1942
2010
  height: number;
1943
2011
  };
2012
+ type FontMetrics = {
2013
+ ascent: number;
2014
+ descent: number;
2015
+ };
2016
+ type MetricsProvider = (font: string, size: number) => FontMetrics;
1944
2017
  declare class TextLayoutEngine {
1945
2018
  private readonly measure;
1946
2019
  private readonly cache;
@@ -1948,11 +2021,14 @@ declare class TextLayoutEngine {
1948
2021
  /** Entries by signature, so paragraphs that shifted index are reused. */
1949
2022
  private pool;
1950
2023
  private lastParagraphsRelaid;
1951
- constructor(measurer?: TextMeasurer);
2024
+ private readonly metrics;
2025
+ constructor(measurer?: TextMeasurer, metrics?: MetricsProvider);
1952
2026
  /** Number of paragraphs recomputed by the last `layout()` call. */
1953
2027
  getLastRelaidCount(): number;
1954
2028
  clearCaches(): void;
1955
- private paragraphSig;
2029
+ /** Text indent of a block in px (0 for plain paragraphs). */
2030
+ private indentFor;
2031
+ private sigFor;
1956
2032
  /**
1957
2033
  * Pre-compute paragraph layouts for `blocks` within a time budget so a
1958
2034
  * following `layout()` is cheap. Call repeatedly until it returns true.
@@ -1963,6 +2039,7 @@ declare class TextLayoutEngine {
1963
2039
  layout(blocks: WeaveTextBlock[], style: TextLayoutStyle, bounds: TextLayoutBounds): TextLayout;
1964
2040
  /** Append a paragraph's lines to `lines`; stops once a fixed height is full. */
1965
2041
  private emitLines;
2042
+ private stepPx;
1966
2043
  private rangeWidth;
1967
2044
  /**
1968
2045
  * Longest prefix of graphemes[start..n) that fits `maxWidth`, found with an
@@ -1971,6 +2048,9 @@ declare class TextLayoutEngine {
1971
2048
  */
1972
2049
  private longestFit;
1973
2050
  private layoutParagraph;
2051
+ /** Per-line box height and baseline from the runs on each line. */
2052
+ private measureLines;
2053
+ private wrapParagraph;
1974
2054
  private buildSegments;
1975
2055
  }
1976
2056
  //#endregion
@@ -2004,14 +2084,41 @@ declare class WeaveTextV2Shape extends Konva.Shape {
2004
2084
  private blocksKey;
2005
2085
  private blocksCache;
2006
2086
  private viewport;
2087
+ private indentStepValue;
2088
+ private linkStyle;
2089
+ private hoveredRun;
2007
2090
  constructor(config?: TextV2ShapeConfig);
2008
2091
  text(): string;
2009
2092
  text(value: string): this;
2010
2093
  setText(value: string | null | undefined): this;
2094
+ /**
2095
+ * List indent per depth, as a multiple of `fontSize`. Not a node attr: it
2096
+ * comes from the node config and must not be serialized into the document.
2097
+ */
2098
+ setIndentStep(step: number | undefined): this;
2099
+ /** Link run colours (from the node config; not serialized). */
2100
+ setLinkStyle(style: {
2101
+ color: string;
2102
+ hoverColor: string;
2103
+ }): this;
2104
+ /** Run under the pointer (`paragraph:run`), repainted with the hover colour. */
2105
+ setHoveredRun(key: string | null): this;
2106
+ getHoveredRun(): string | null;
2107
+ /**
2108
+ * Link run at a point in node-local coordinates (the legacy node-level
2109
+ * `link` wins: runs are then not links).
2110
+ */
2111
+ linkAtPoint(point: {
2112
+ x: number;
2113
+ y: number;
2114
+ }): {
2115
+ key: string;
2116
+ url: string;
2117
+ } | null;
2011
2118
  /** Resolved blocks: stored or lazily synthesized (never written back). */
2012
2119
  getBlocks(): WeaveTextBlock[];
2013
2120
  /** Replace content with blocks, keeping the `text` mirror in sync. */
2014
- setBlocks(blocks: WeaveTextBlock[]): this;
2121
+ setBlocks(blocks: WeaveTextBlock[] | undefined): this;
2015
2122
  fontSize(): number;
2016
2123
  fontSize(v: number): this;
2017
2124
  fontFamily(): string;
@@ -2034,6 +2141,14 @@ declare class WeaveTextV2Shape extends Konva.Shape {
2034
2141
  wrap(v: TextWrap): this;
2035
2142
  textDecoration(): string;
2036
2143
  textDecoration(v: string): this;
2144
+ /**
2145
+ * Always stroke under the node transform. Weave turns `strokeScaleEnabled`
2146
+ * off while a node is transformed; Konva then resets the canvas transform
2147
+ * before stroking, which only works for path shapes. `strokeText` is not a
2148
+ * path, so the outline was painted at local coordinates on the canvas
2149
+ * origin at stage scale 1 (visible over other nodes while resizing).
2150
+ */
2151
+ getStrokeScaleEnabled(): boolean;
2037
2152
  private accessor;
2038
2153
  getTextWidth(): number;
2039
2154
  getTextHeight(): number;
@@ -2052,7 +2167,7 @@ declare class WeaveTextV2Shape extends Konva.Shape {
2052
2167
  height: number;
2053
2168
  };
2054
2169
  /** Rendered width of a string with this shape's font and letter spacing. */
2055
- measureText(text: string): number;
2170
+ measureText(text: string, font?: string): number;
2056
2171
  /** Offset of the first line inside the box (padding + vertical align). */
2057
2172
  getContentOffset(): {
2058
2173
  x: number;
@@ -2065,12 +2180,20 @@ declare class WeaveTextV2Shape extends Konva.Shape {
2065
2180
  y1: number;
2066
2181
  y2: number;
2067
2182
  } | null): void;
2183
+ /**
2184
+ * Visible y-range in local coordinates, derived from the context being
2185
+ * painted (current transform + backing canvas size) instead of the stage.
2186
+ * The stage is not the paint target during export (off-screen canvases,
2187
+ * tiles, server-side), so using it culled visible lines. Returns null (paint
2188
+ * everything) when the transform cannot be read.
2189
+ */
2068
2190
  private visibleRange;
2069
2191
  _sceneFunc: (ctx: Konva.Context, shape: Konva.Shape) => void;
2070
2192
  /** Vertical offset of the text block inside the box (verticalAlign). */
2071
2193
  private verticalOffset;
2072
2194
  private paintLine;
2073
2195
  private strokeDecoration;
2196
+ private strokeSegment;
2074
2197
  private paintSegment;
2075
2198
  private fillText;
2076
2199
  _hitFunc: (ctx: Konva.Context, shape: Konva.Shape) => void;
@@ -2103,10 +2226,35 @@ type WeaveTextV2OutlineProperties = {
2103
2226
  * Unlike `WeaveTextNode`, `edition` has no `borderSize` (there is no DOM
2104
2227
  * textarea border to size): the edit box outline is `edition.outline`.
2105
2228
  */
2229
+ type WeaveTextV2FollowPadding = {
2230
+ top: number;
2231
+ right: number;
2232
+ bottom: number;
2233
+ left: number;
2234
+ };
2106
2235
  type WeaveTextV2EditionProperties = {
2107
2236
  outline: WeaveTextV2OutlineProperties;
2237
+ /**
2238
+ * Margin, in screen pixels per side, kept between the caret and the stage
2239
+ * edges when the stage pans to follow it while editing. Raise a side when
2240
+ * app UI (toolbars, sidebars) covers that edge. Default 40 on every side.
2241
+ */
2242
+ followPadding: WeaveTextV2FollowPadding;
2243
+ };
2244
+ type WeaveTextV2RichTextProperties = {
2245
+ /**
2246
+ * Enables formatting commands, shortcuts and list key rules. Marks and
2247
+ * lists already in a document always render, whatever this value.
2248
+ */
2249
+ enabled: boolean;
2250
+ /**
2251
+ * List indent per depth as a multiple of the node `fontSize` (default
2252
+ * 1.5). Must be the same on every client, or wrapping differs.
2253
+ */
2254
+ indentStep: number;
2108
2255
  };
2109
2256
  type WeaveTextV2Properties = Omit<WeaveTextProperties, 'edition'> & {
2257
+ richText: WeaveTextV2RichTextProperties;
2110
2258
  edition: WeaveTextV2EditionProperties;
2111
2259
  sizeWarning: WeaveTextV2SizeWarningProperties;
2112
2260
  };
@@ -2129,6 +2277,7 @@ declare class WeaveTextV2Node extends WeaveNode {
2129
2277
  private editingNodeId;
2130
2278
  private session;
2131
2279
  private sizeWarned;
2280
+ private selectionTimer;
2132
2281
  private nodeRenderedAddedRegistered;
2133
2282
  private keyPressHandler;
2134
2283
  constructor(params?: WeaveTextV2NodeParams);
@@ -2161,67 +2310,172 @@ declare class WeaveTextV2Node extends WeaveNode {
2161
2310
  private setupTransform;
2162
2311
  onUpdate(nodeInstance: WeaveElementInstance, nextProps: WeaveElementAttributes): void;
2163
2312
  serialize(instance: WeaveElementInstance): WeaveStateElement;
2313
+ private linkCtxMenuGuardRegistered;
2314
+ private linkHoverText;
2315
+ private linkModifier;
2316
+ private linkHoverRefresh;
2317
+ private linkHitAt;
2318
+ private registerLinkContextMenuGuard;
2164
2319
  private setupLinkBehavior;
2320
+ private localPointer;
2321
+ private lastLinkOpen;
2322
+ private openUrl;
2165
2323
  private openTextLink;
2166
2324
  getLink(nodeInstance: WeaveElementInstance): string | undefined;
2167
2325
  setLink(nodeInstance: WeaveElementInstance, url: string): void;
2168
2326
  removeLink(nodeInstance: WeaveElementInstance): void;
2327
+ private indentStep;
2328
+ /**
2329
+ * Rich text is on for a node when its `richText` attribute says so;
2330
+ * nodes without the attribute follow `config.richText.enabled`.
2331
+ */
2332
+ isRich(nodeInstance: WeaveElementInstance): boolean;
2333
+ isRichTextEnabled(nodeInstance?: WeaveElementInstance): boolean;
2334
+ private activeSession;
2335
+ private emitFormatChange;
2336
+ /** Selection events fire often while dragging: coalesce them. */
2337
+ private scheduleSelectionEvent;
2338
+ /**
2339
+ * Format of the active selection while editing, otherwise of `range`
2340
+ * (default: the whole text). Sizes are px.
2341
+ */
2342
+ getSelectionFormat(nodeInstance: WeaveElementInstance, range?: {
2343
+ start: number;
2344
+ end: number;
2345
+ }): WeaveTextSelectionFormat;
2346
+ /**
2347
+ * Run a block transform on a non-editing node: one `updateNode`, so one
2348
+ * Weave undo step. Returns false when rich text is disabled.
2349
+ */
2350
+ private commandOnNode;
2351
+ /**
2352
+ * Set a mark (`undefined` clears it). `size` is in px. While the node is
2353
+ * being edited it applies to the editor selection, otherwise to `range`
2354
+ * (default: the whole text).
2355
+ */
2356
+ applyMark(nodeInstance: WeaveElementInstance, key: WeaveTextMarkKey, value: unknown, range?: {
2357
+ start: number;
2358
+ end: number;
2359
+ }): boolean;
2360
+ /** Link a range (or the editor selection) to an http(s) URL. */
2361
+ setRunLink(nodeInstance: WeaveElementInstance, url: string, range?: {
2362
+ start: number;
2363
+ end: number;
2364
+ }): boolean;
2365
+ removeRunLink(nodeInstance: WeaveElementInstance, range?: {
2366
+ start: number;
2367
+ end: number;
2368
+ }): boolean;
2369
+ toggleMark(nodeInstance: WeaveElementInstance, key: WeaveTextMarkKey, range?: {
2370
+ start: number;
2371
+ end: number;
2372
+ }): boolean;
2373
+ toggleList(nodeInstance: WeaveElementInstance, kind: WeaveTextListKind, range?: {
2374
+ start: number;
2375
+ end: number;
2376
+ }): boolean;
2377
+ /** Align every paragraph touched by the range (default: all). */
2378
+ setAlign(nodeInstance: WeaveElementInstance, align: WeaveTextBlockAlign | undefined, range?: {
2379
+ start: number;
2380
+ end: number;
2381
+ }): boolean;
2382
+ indent(nodeInstance: WeaveElementInstance, range?: {
2383
+ start: number;
2384
+ end: number;
2385
+ }): boolean;
2386
+ outdent(nodeInstance: WeaveElementInstance, range?: {
2387
+ start: number;
2388
+ end: number;
2389
+ }): boolean;
2390
+ /**
2391
+ * Scale the whole text: sets the node `fontSize` (px); size marks are
2392
+ * ratios of it, so every run scales with it.
2393
+ */
2394
+ setBaseFontSize(nodeInstance: WeaveElementInstance, px: number): boolean;
2169
2395
  resetSmartLayout(textNode: WeaveTextV2Shape): void;
2170
2396
  static defaultState<WeaveTextProperties>(nodeId: string, params?: {
2171
2397
  config: WeaveTextProperties;
2172
2398
  }): WeaveStateElement;
2173
2399
  static addNodeState(defaultNodeState: WeaveStateElement, props: WeaveElementAttributes): WeaveStateElement;
2174
2400
  static updateNodeState(prevNodeState: WeaveStateElement, nextProps: WeaveElementAttributes): WeaveStateElement;
2175
- static getSchema(): import("zod").ZodObject<{
2401
+ static getSchema(): z.ZodObject<{
2176
2402
  [x: string]: any;
2177
- type: import("zod").ZodLiteral<"text">;
2178
- props: import("zod").ZodObject<{
2179
- nodeType: import("zod").ZodLiteral<"text">;
2180
- width: import("zod").ZodNumber;
2181
- height: import("zod").ZodOptional<import("zod").ZodNumber>;
2182
- fontFamily: import("zod").ZodDefault<import("zod").ZodString>;
2183
- fontSize: import("zod").ZodDefault<import("zod").ZodNumber>;
2184
- fontStyle: import("zod").ZodDefault<import("zod").ZodString>;
2185
- fontVariant: import("zod").ZodEnum<{
2403
+ type: z.ZodLiteral<"text">;
2404
+ props: z.ZodObject<{
2405
+ nodeType: z.ZodLiteral<"text">;
2406
+ width: z.ZodNumber;
2407
+ height: z.ZodOptional<z.ZodNumber>;
2408
+ fontFamily: z.ZodDefault<z.ZodString>;
2409
+ fontSize: z.ZodDefault<z.ZodNumber>;
2410
+ fontStyle: z.ZodDefault<z.ZodString>;
2411
+ fontVariant: z.ZodEnum<{
2186
2412
  normal: "normal";
2187
2413
  "small-caps": "small-caps";
2188
2414
  }>;
2189
- textDecoration: import("zod").ZodDefault<import("zod").ZodEnum<{
2415
+ textDecoration: z.ZodDefault<z.ZodEnum<{
2190
2416
  "": "";
2191
2417
  "line-through": "line-through";
2192
2418
  underline: "underline";
2193
2419
  }>>;
2194
- letterSpacing: import("zod").ZodDefault<import("zod").ZodNumber>;
2195
- lineHeight: import("zod").ZodDefault<import("zod").ZodNumber>;
2196
- align: import("zod").ZodDefault<import("zod").ZodEnum<{
2420
+ letterSpacing: z.ZodDefault<z.ZodNumber>;
2421
+ lineHeight: z.ZodDefault<z.ZodNumber>;
2422
+ align: z.ZodDefault<z.ZodEnum<{
2197
2423
  left: "left";
2198
2424
  center: "center";
2199
2425
  right: "right";
2200
2426
  justify: "justify";
2201
2427
  }>>;
2202
- verticalAlign: import("zod").ZodDefault<import("zod").ZodEnum<{
2428
+ verticalAlign: z.ZodDefault<z.ZodEnum<{
2203
2429
  top: "top";
2204
2430
  middle: "middle";
2205
2431
  bottom: "bottom";
2206
2432
  }>>;
2207
- fill: import("zod").ZodDefault<import("zod").ZodString>;
2208
- text: import("zod").ZodDefault<import("zod").ZodString>;
2209
- link: import("zod").ZodOptional<import("zod").ZodString>;
2210
- linkPreviousFill: import("zod").ZodOptional<import("zod").ZodString>;
2211
- linkPreviousTextDecoration: import("zod").ZodOptional<import("zod").ZodString>;
2212
- strokeEnabled: import("zod").ZodDefault<import("zod").ZodBoolean>;
2213
- stroke: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
2214
- strokeWidth: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
2215
- strokeScaleEnabled: import("zod").ZodDefault<import("zod").ZodBoolean>;
2216
- fillAfterStrokeEnabled: import("zod").ZodDefault<import("zod").ZodBoolean>;
2217
- layout: import("zod").ZodDefault<import("zod").ZodEnum<{
2433
+ fill: z.ZodDefault<z.ZodString>;
2434
+ text: z.ZodDefault<z.ZodString>;
2435
+ link: z.ZodOptional<z.ZodString>;
2436
+ linkPreviousFill: z.ZodOptional<z.ZodString>;
2437
+ linkPreviousTextDecoration: z.ZodOptional<z.ZodString>;
2438
+ strokeEnabled: z.ZodDefault<z.ZodBoolean>;
2439
+ stroke: z.ZodDefault<z.ZodOptional<z.ZodString>>;
2440
+ strokeWidth: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2441
+ strokeScaleEnabled: z.ZodDefault<z.ZodBoolean>;
2442
+ fillAfterStrokeEnabled: z.ZodDefault<z.ZodBoolean>;
2443
+ layout: z.ZodDefault<z.ZodEnum<{
2218
2444
  readonly SMART: "smart";
2219
2445
  readonly AUTO_ALL: "auto-all";
2220
2446
  readonly AUTO_HEIGHT: "auto-height";
2221
2447
  readonly FIXED: "fixed";
2222
2448
  }>>;
2223
- }, import("zod/v4/core").$strip>;
2224
- }, import("zod/v4/core").$strip>;
2449
+ richText: z.ZodOptional<z.ZodBoolean>;
2450
+ blocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
2451
+ runs: z.ZodArray<z.ZodObject<{
2452
+ t: z.ZodString;
2453
+ m: z.ZodOptional<z.ZodObject<{
2454
+ bold: z.ZodOptional<z.ZodBoolean>;
2455
+ italic: z.ZodOptional<z.ZodBoolean>;
2456
+ underline: z.ZodOptional<z.ZodBoolean>;
2457
+ strike: z.ZodOptional<z.ZodBoolean>;
2458
+ color: z.ZodOptional<z.ZodString>;
2459
+ size: z.ZodOptional<z.ZodNumber>;
2460
+ family: z.ZodOptional<z.ZodString>;
2461
+ lineHeight: z.ZodOptional<z.ZodNumber>;
2462
+ link: z.ZodOptional<z.ZodString>;
2463
+ }, z.core.$loose>>;
2464
+ }, z.core.$strip>>;
2465
+ kind: z.ZodOptional<z.ZodEnum<{
2466
+ ul: "ul";
2467
+ ol: "ol";
2468
+ }>>;
2469
+ depth: z.ZodOptional<z.ZodNumber>;
2470
+ start: z.ZodOptional<z.ZodNumber>;
2471
+ align: z.ZodOptional<z.ZodEnum<{
2472
+ left: "left";
2473
+ center: "center";
2474
+ right: "right";
2475
+ }>>;
2476
+ }, z.core.$strip>>>;
2477
+ }, z.core.$strip>;
2478
+ }, z.core.$strip>;
2225
2479
  }
2226
2480
  //#endregion
2227
2481
  //#region src/nodes/image/constants.d.ts
@@ -4088,10 +4342,22 @@ declare class WeaveTextToolAction extends WeaveAction {
4088
4342
  protected cancelAction: () => void;
4089
4343
  onPropsChange: undefined;
4090
4344
  onInit: undefined;
4091
- constructor();
4345
+ private readonly toolName;
4346
+ private readonly initialProps;
4347
+ /**
4348
+ * `name` and `props` let an app register several text tools, e.g. a
4349
+ * plain one and one creating rich text nodes (`props: { richText: true }`).
4350
+ */
4351
+ constructor(params?: {
4352
+ name?: string;
4353
+ props?: WeaveElementAttributes;
4354
+ });
4092
4355
  initialize(): void;
4093
4356
  getName(): string;
4094
4357
  initProps(): {
4358
+ id?: string;
4359
+ nodeType?: string;
4360
+ children?: import("@inditextech/weave-types").WeaveStateElement[];
4095
4361
  text: string;
4096
4362
  layout: "smart";
4097
4363
  fontSize: number;