@inshapardaz/likhari-react 0.1.18-dev.124 → 0.1.18-dev.128

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.
@@ -1 +1 @@
1
- {"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../src/components/Toolbar.tsx"],"names":[],"mappings":"AAiEA,OAAO,EAAgB,KAAK,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEzE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAA6D,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAItG,OAAO,KAAK,EAAE,MAAM,EAAW,MAAM,iBAAiB,CAAC;AAwevD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,2BAA2B,CAAC;IACpC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sEAAsE;IACtE,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,wFAAwF;IACxF,SAAS,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IAC1B,oFAAoF;IACpF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kGAAkG;IAClG,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B;AAED,wBAAgB,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAkC,EAAE,SAAiB,EAAE,MAAa,EAAE,MAAM,EAAE,EAAE,YAAY,+BAqgCxJ"}
1
+ {"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../src/components/Toolbar.tsx"],"names":[],"mappings":"AAiEA,OAAO,EAAgB,KAAK,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEzE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAA6D,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAItG,OAAO,KAAK,EAAE,MAAM,EAAW,MAAM,iBAAiB,CAAC;AAwevD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,2BAA2B,CAAC;IACpC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sEAAsE;IACtE,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,wFAAwF;IACxF,SAAS,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IAC1B,oFAAoF;IACpF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kGAAkG;IAClG,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B;AAED,wBAAgB,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAkC,EAAE,SAAiB,EAAE,MAAa,EAAE,MAAM,EAAE,EAAE,YAAY,+BAugCxJ"}
@@ -240,6 +240,8 @@ export function Toolbar({ config, onSave, isDirty, showSave, fontOptions = DEFAU
240
240
  // Lexical's read/update context has already closed, so any $-prefixed
241
241
  // node method (getFormatType() included) must not be deferred into it.
242
242
  const elementFormat = ($isElementNode(element) ? element.getFormatType() : 'start') || 'start';
243
+ const poetryLayout = poetryBlock?.getLayout();
244
+ const poetryAlign = poetryBlock?.getAlign();
243
245
  setState((s) => ({
244
246
  ...s,
245
247
  blockType,
@@ -256,8 +258,8 @@ export function Toolbar({ config, onSave, isDirty, showSave, fontOptions = DEFAU
256
258
  canMergeCells: false,
257
259
  canUnmergeCell,
258
260
  inPoetry: poetryBlock !== null,
259
- poetryLayout: poetryBlock?.getLayout() ?? s.poetryLayout,
260
- poetryAlign: poetryBlock?.getAlign() ?? s.poetryAlign,
261
+ poetryLayout: poetryLayout ?? s.poetryLayout,
262
+ poetryAlign: poetryAlign ?? s.poetryAlign,
261
263
  }));
262
264
  });
263
265
  }, [editor]);
@@ -378,9 +378,13 @@
378
378
  Own type scale and spacing, distinct from body text — the .likhari-ltr/
379
379
  .likhari-rtl per-block classes (above) already switch font-family for this
380
380
  element same as any other block; these rules layer poetry's own size/
381
- line-height/gap on top, combined with those same classes. */
381
+ line-height/gap on top, combined with those same classes.
382
+ Capped width + auto margins read verse as a centered block on the page —
383
+ conventional poetry typesetting — rather than a full-width paragraph where
384
+ a short line just hugs the start edge regardless of its own text-align. */
382
385
  .likhari-poetry {
383
- margin: 0 0 1.4em 0;
386
+ margin: 0 auto 1.4em auto;
387
+ max-width: 70%;
384
388
  }
385
389
 
386
390
  .likhari-poetry.likhari-ltr {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inshapardaz/likhari-react",
3
- "version": "0.1.18-dev.124",
3
+ "version": "0.1.18-dev.128",
4
4
  "description": "React implementation of the Likhari editor, built on @lexical/react.",
5
5
  "license": "MIT",
6
6
  "repository": {