@inshapardaz/likhari-react 0.1.14 → 0.1.15-dev.118
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/EditorRoot.d.ts.map +1 -1
- package/dist/EditorRoot.js +3 -1
- package/dist/blocks/FootnoteListNode.d.ts +46 -0
- package/dist/blocks/FootnoteListNode.d.ts.map +1 -0
- package/dist/blocks/FootnoteListNode.js +117 -0
- package/dist/blocks/FootnoteNode.d.ts +38 -0
- package/dist/blocks/FootnoteNode.d.ts.map +1 -0
- package/dist/blocks/FootnoteNode.js +90 -0
- package/dist/blocks/LayoutNode.d.ts +54 -0
- package/dist/blocks/LayoutNode.d.ts.map +1 -0
- package/dist/blocks/LayoutNode.js +138 -0
- package/dist/blocks/footnoteActions.d.ts +9 -0
- package/dist/blocks/footnoteActions.d.ts.map +1 -0
- package/dist/blocks/footnoteActions.js +42 -0
- package/dist/blocks/layoutActions.d.ts +12 -0
- package/dist/blocks/layoutActions.d.ts.map +1 -0
- package/dist/blocks/layoutActions.js +39 -0
- package/dist/components/LayoutDialog.d.ts +11 -0
- package/dist/components/LayoutDialog.d.ts.map +1 -0
- package/dist/components/LayoutDialog.js +24 -0
- package/dist/components/TableDialog.d.ts +2 -2
- package/dist/components/TableDialog.js +2 -2
- package/dist/components/Toolbar.d.ts.map +1 -1
- package/dist/components/Toolbar.js +36 -9
- package/dist/i18n/strings.d.ts +8 -0
- package/dist/i18n/strings.d.ts.map +1 -1
- package/dist/i18n/strings.js +24 -0
- package/dist/nodes.d.ts.map +1 -1
- package/dist/nodes.js +8 -0
- package/dist/plugins/FootnotePlugin.d.ts +9 -0
- package/dist/plugins/FootnotePlugin.d.ts.map +1 -0
- package/dist/plugins/FootnotePlugin.js +51 -0
- package/dist/plugins/LayoutPlugin.d.ts +9 -0
- package/dist/plugins/LayoutPlugin.d.ts.map +1 -0
- package/dist/plugins/LayoutPlugin.js +23 -0
- package/dist/table/tableActions.d.ts +13 -0
- package/dist/table/tableActions.d.ts.map +1 -1
- package/dist/table/tableActions.js +86 -2
- package/dist/theme/editor.css +76 -4
- package/dist/theme/editorTheme.d.ts.map +1 -1
- package/dist/theme/editorTheme.js +11 -0
- package/package.json +1 -1
package/dist/theme/editor.css
CHANGED
|
@@ -178,6 +178,10 @@
|
|
|
178
178
|
font-family: 'IBM Plex Serif', Georgia, serif;
|
|
179
179
|
font-size: 15px;
|
|
180
180
|
line-height: 1.75;
|
|
181
|
+
/* Scopes the footnote-reference counter to the whole document (editor.css
|
|
182
|
+
footnote rules below), so numbering is consistent regardless of which
|
|
183
|
+
blocks the references happen to sit in. */
|
|
184
|
+
counter-reset: likhari-footnote-ref;
|
|
181
185
|
}
|
|
182
186
|
|
|
183
187
|
.likhari-content-editable[dir='rtl'] {
|
|
@@ -186,6 +190,25 @@
|
|
|
186
190
|
line-height: 2.3;
|
|
187
191
|
}
|
|
188
192
|
|
|
193
|
+
/* Per-block direction (requirements doc §3.2, "mixed-direction documents"):
|
|
194
|
+
Lexical detects each block's own direction from its first strong-direction
|
|
195
|
+
character and tags it with one of these theme classes independently of
|
|
196
|
+
the document's overall locale — an Urdu paragraph inside an English essay,
|
|
197
|
+
or an English heading inside an Urdu document, gets its own script-correct
|
|
198
|
+
font rather than inheriting the canvas-wide default. Set directly on the
|
|
199
|
+
block, so it wins over the inherited rule above regardless of specificity. */
|
|
200
|
+
.likhari-rtl {
|
|
201
|
+
font-family: 'Noto Nastaliq Urdu', serif;
|
|
202
|
+
font-size: 20px;
|
|
203
|
+
line-height: 2.3;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.likhari-ltr {
|
|
207
|
+
font-family: 'IBM Plex Serif', Georgia, serif;
|
|
208
|
+
font-size: 15px;
|
|
209
|
+
line-height: 1.75;
|
|
210
|
+
}
|
|
211
|
+
|
|
189
212
|
.likhari-placeholder {
|
|
190
213
|
position: absolute;
|
|
191
214
|
top: 20px;
|
|
@@ -298,10 +321,59 @@
|
|
|
298
321
|
}
|
|
299
322
|
}
|
|
300
323
|
|
|
301
|
-
/*
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
324
|
+
/* Columns layout (lexical-editor-spec.md §4.9) — a CSS grid row whose
|
|
325
|
+
column count/widths come from the node's own inline style, not this
|
|
326
|
+
stylesheet, so each container can differ. */
|
|
327
|
+
.likhari-layout-container {
|
|
328
|
+
display: grid;
|
|
329
|
+
gap: 24px;
|
|
330
|
+
margin: 0 0 1em 0;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.likhari-layout-item {
|
|
334
|
+
min-width: 0;
|
|
335
|
+
overflow-wrap: break-word;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.likhari-layout-item > :last-child {
|
|
339
|
+
margin-bottom: 0;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
/* Footnotes (lexical-editor-spec.md §4.10). The bracketed number on both
|
|
343
|
+
the inline reference and its list entry is a CSS counter, not stored
|
|
344
|
+
state — Lexical insert/delete/reorder of the underlying nodes renumbers
|
|
345
|
+
both sequences automatically as long as list items stay in the same
|
|
346
|
+
order their references were inserted (FootnotePlugin's insert command
|
|
347
|
+
always appends in that order). */
|
|
348
|
+
.likhari-footnote-ref {
|
|
349
|
+
counter-increment: likhari-footnote-ref;
|
|
350
|
+
cursor: default;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.likhari-footnote-ref::after {
|
|
354
|
+
content: '[' counter(likhari-footnote-ref) ']';
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.likhari-footnote-list {
|
|
358
|
+
counter-reset: likhari-footnote-item;
|
|
359
|
+
list-style: none;
|
|
360
|
+
margin: 2em 0 0 0;
|
|
361
|
+
padding-inline-start: 1.5em;
|
|
362
|
+
border-top: 1px solid var(--editor-line);
|
|
363
|
+
padding-top: 0.75em;
|
|
364
|
+
font-size: 0.9em;
|
|
365
|
+
color: var(--editor-ink-soft);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.likhari-footnote-item {
|
|
369
|
+
counter-increment: likhari-footnote-item;
|
|
370
|
+
margin: 0.3em 0;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.likhari-footnote-item::marker {
|
|
374
|
+
content: '[' counter(likhari-footnote-item) '] ';
|
|
375
|
+
}
|
|
376
|
+
|
|
305
377
|
.likhari-table {
|
|
306
378
|
border-collapse: collapse;
|
|
307
379
|
margin: 1em 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editorTheme.d.ts","sourceRoot":"","sources":["../../src/theme/editorTheme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"editorTheme.d.ts","sourceRoot":"","sources":["../../src/theme/editorTheme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,kBA+CzB,CAAC"}
|
|
@@ -4,6 +4,12 @@
|
|
|
4
4
|
* (the "headless + default theme" requirement, UI spec §10).
|
|
5
5
|
*/
|
|
6
6
|
export const editorTheme = {
|
|
7
|
+
// Applied by Lexical's reconciler to each top-level block based on that
|
|
8
|
+
// block's own detected direction — see the comment in editor.css. This is
|
|
9
|
+
// the per-block half of mixed-direction document support (requirements
|
|
10
|
+
// doc §3.2); the EditorRoot `dir` prop handles the whole-document default.
|
|
11
|
+
ltr: 'likhari-ltr',
|
|
12
|
+
rtl: 'likhari-rtl',
|
|
7
13
|
paragraph: 'likhari-paragraph',
|
|
8
14
|
quote: 'likhari-quote',
|
|
9
15
|
heading: {
|
|
@@ -34,6 +40,11 @@ export const editorTheme = {
|
|
|
34
40
|
hr: 'likhari-hr',
|
|
35
41
|
image: 'likhari-image-block',
|
|
36
42
|
pageBreak: 'likhari-page-break',
|
|
43
|
+
layoutContainer: 'likhari-layout-container',
|
|
44
|
+
layoutItem: 'likhari-layout-item',
|
|
45
|
+
footnoteReference: 'likhari-footnote-ref',
|
|
46
|
+
footnoteList: 'likhari-footnote-list',
|
|
47
|
+
footnoteItem: 'likhari-footnote-item',
|
|
37
48
|
table: 'likhari-table',
|
|
38
49
|
tableRow: 'likhari-table-row',
|
|
39
50
|
tableCell: 'likhari-table-cell',
|