@siladev/qalam 0.1.14 → 0.2.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.
Files changed (33) hide show
  1. package/dist/{QalamEditor-DJFh0zOj.js → QalamEditor-sYrI0Izl.js} +3871 -3693
  2. package/dist/QalamRenderer-CQRQmyKZ.js +340 -0
  3. package/dist/editor/QalamEditor.d.ts.map +1 -1
  4. package/dist/editor/components/AutoInput.d.ts +9 -0
  5. package/dist/editor/components/AutoInput.d.ts.map +1 -0
  6. package/dist/editor/components/BlockquoteView.d.ts +3 -0
  7. package/dist/editor/components/BlockquoteView.d.ts.map +1 -0
  8. package/dist/editor/components/HadithRefView.d.ts.map +1 -1
  9. package/dist/editor/components/PoemView.d.ts +1 -1
  10. package/dist/editor/components/PoemView.d.ts.map +1 -1
  11. package/dist/editor/components/QuoteView.d.ts +3 -0
  12. package/dist/editor/components/QuoteView.d.ts.map +1 -0
  13. package/dist/editor/components/Toolbar.d.ts.map +1 -1
  14. package/dist/editor/extensions/blockquote-repeat.d.ts.map +1 -1
  15. package/dist/editor/extensions/poem.d.ts.map +1 -1
  16. package/dist/editor/extensions/quote.d.ts +12 -0
  17. package/dist/editor/extensions/quote.d.ts.map +1 -0
  18. package/dist/editor/index.js +1 -1
  19. package/dist/index.js +2 -2
  20. package/dist/renderer/QalamRenderer.d.ts.map +1 -1
  21. package/dist/renderer/index.js +1 -1
  22. package/dist/renderer/tatweel.d.ts.map +1 -1
  23. package/dist/resolver/index.js +18 -13
  24. package/dist/resolver/resolve.d.ts.map +1 -1
  25. package/dist/schema/index.d.ts +1 -1
  26. package/dist/schema/index.d.ts.map +1 -1
  27. package/dist/schema/index.js +58 -39
  28. package/dist/schema/schema.d.ts.map +1 -1
  29. package/dist/schema/types.d.ts +24 -2
  30. package/dist/schema/types.d.ts.map +1 -1
  31. package/dist/styles.css +260 -6
  32. package/package.json +1 -1
  33. package/dist/QalamRenderer-h6i48SCj.js +0 -309
@@ -1,4 +1,4 @@
1
- const m = /* @__PURE__ */ new Set([
1
+ const p = /* @__PURE__ */ new Set([
2
2
  "doc",
3
3
  "paragraph",
4
4
  "heading",
@@ -11,15 +11,16 @@ const m = /* @__PURE__ */ new Set([
11
11
  "bayt",
12
12
  "quranRef",
13
13
  "hadithRef",
14
+ "quote",
14
15
  "hardBreak"
15
- ]), p = /* @__PURE__ */ new Set(["bold", "italic", "link", "repeat"]), h = /* @__PURE__ */ new Set(["bold", "italic", "repeat", "propheticSpeech"]), y = /* @__PURE__ */ new Set([1, 2, 3]);
16
- function l(i, a, t, n) {
16
+ ]), m = /* @__PURE__ */ new Set(["bold", "italic", "link", "repeat"]), h = /* @__PURE__ */ new Set(["bold", "italic", "repeat", "propheticSpeech"]), y = /* @__PURE__ */ new Set([1, 2, 3]);
17
+ function r(i, a, t, n) {
17
18
  if (!i || typeof i != "object") {
18
19
  t.push({ path: a, message: "Node must be an object" });
19
20
  return;
20
21
  }
21
22
  const o = i.type;
22
- if (!o || !m.has(o)) {
23
+ if (!o || !p.has(o)) {
23
24
  t.push({ path: a, message: `Invalid node type: "${o}"` });
24
25
  return;
25
26
  }
@@ -32,12 +33,12 @@ function l(i, a, t, n) {
32
33
  (!e || !y.has(e.level)) && t.push({
33
34
  path: a,
34
35
  message: `Invalid heading level: ${e?.level}. Allowed: 1, 2, 3`
35
- }), c(i, a, t);
36
+ }), l(i, a, t);
36
37
  break;
37
38
  }
38
39
  case "paragraph": {
39
40
  const e = i.attrs;
40
- e?.repeat !== void 0 && (typeof e.repeat != "number" || e.repeat < 1) && t.push({ path: a, message: `Invalid repeat: ${e.repeat}` }), c(i, a, t);
41
+ e?.repeat !== void 0 && (typeof e.repeat != "number" || e.repeat < 1) && t.push({ path: a, message: `Invalid repeat: ${e.repeat}` }), l(i, a, t);
41
42
  break;
42
43
  }
43
44
  case "bulletList":
@@ -53,28 +54,34 @@ function l(i, a, t, n) {
53
54
  break;
54
55
  case "blockquote": {
55
56
  const e = i.attrs;
56
- e?.repeat !== void 0 && (typeof e.repeat != "number" || e.repeat < 1) && t.push({ path: a, message: `Invalid repeat: ${e.repeat}` }), u(i, a, t);
57
+ e?.repeat !== void 0 && (typeof e.repeat != "number" || e.repeat < 1) && t.push({ path: a, message: `Invalid repeat: ${e.repeat}` }), e?.citation !== void 0 && typeof e.citation != "string" && t.push({ path: a, message: "blockquote citation must be a string" }), u(i, a, t);
57
58
  break;
58
59
  }
59
60
  case "text":
60
- typeof i.text != "string" && t.push({ path: a, message: "Text node must have a string text field" }), g(i, a, t, n ?? p);
61
+ typeof i.text != "string" && t.push({ path: a, message: "Text node must have a string text field" }), g(i, a, t, n ?? m);
61
62
  break;
62
63
  case "quranRef":
63
64
  d(i, a, t);
64
65
  break;
65
66
  case "hadithRef":
67
+ v(i, a, t);
68
+ break;
69
+ case "quote":
66
70
  b(i, a, t);
67
71
  break;
68
- case "poem":
69
- u(i, a, t, "bayt");
72
+ case "poem": {
73
+ const e = i.attrs;
74
+ e?.citation !== void 0 && typeof e.citation != "string" && t.push({ path: a, message: "poem citation must be a string" }), u(i, a, t, "bayt");
70
75
  break;
76
+ }
71
77
  case "bayt": {
72
- const e = i.attrs?.parts;
73
- if (!Array.isArray(e) || e.length < 1 || e.length > 3)
78
+ const e = i.attrs, s = e?.parts;
79
+ if (!Array.isArray(s) || s.length < 1 || s.length > 3)
74
80
  t.push({ path: a, message: "bayt must have 1 to 3 parts" });
75
81
  else
76
- for (let s = 0; s < e.length; s++)
77
- typeof e[s] != "string" && t.push({ path: `${a}.parts[${s}]`, message: "bayt part must be a string" });
82
+ for (let c = 0; c < s.length; c++)
83
+ typeof s[c] != "string" && t.push({ path: `${a}.parts[${c}]`, message: "bayt part must be a string" });
84
+ e?.repeat !== void 0 && (typeof e.repeat != "number" || e.repeat < 1) && t.push({ path: a, message: `Invalid bayt repeat: ${e.repeat}` });
78
85
  break;
79
86
  }
80
87
  }
@@ -83,45 +90,45 @@ function u(i, a, t, n) {
83
90
  const o = i.content;
84
91
  if (!(!o || !Array.isArray(o)))
85
92
  for (let e = 0; e < o.length; e++) {
86
- const s = o[e], f = `${a}.content[${e}]`;
93
+ const s = o[e], c = `${a}.content[${e}]`;
87
94
  n && s.type !== n && t.push({
88
- path: f,
95
+ path: c,
89
96
  message: `Expected ${n}, got ${s.type}`
90
- }), l(s, f, t);
97
+ }), r(s, c, t);
91
98
  }
92
99
  }
93
- function c(i, a, t) {
100
+ function l(i, a, t) {
94
101
  const n = i.content;
95
102
  if (!n || !Array.isArray(n)) return;
96
- const o = /* @__PURE__ */ new Set(["text", "quranRef", "hadithRef", "hardBreak"]);
103
+ const o = /* @__PURE__ */ new Set(["text", "quranRef", "hadithRef", "quote", "hardBreak"]);
97
104
  for (let e = 0; e < n.length; e++) {
98
- const s = n[e], f = `${a}.content[${e}]`;
105
+ const s = n[e], c = `${a}.content[${e}]`;
99
106
  o.has(s.type) || t.push({
100
- path: f,
107
+ path: c,
101
108
  message: `Invalid inline content type: "${s.type}"`
102
- }), l(s, f, t);
109
+ }), r(s, c, t);
103
110
  }
104
111
  }
105
112
  function g(i, a, t, n) {
106
113
  const o = i.marks;
107
114
  if (!(!o || !Array.isArray(o)))
108
115
  for (let e = 0; e < o.length; e++) {
109
- const s = o[e], f = s.type;
110
- if (n.has(f) || t.push({
116
+ const s = o[e], c = s.type;
117
+ if (n.has(c) || t.push({
111
118
  path: `${a}.marks[${e}]`,
112
- message: `Invalid mark type: "${f}"`
113
- }), f === "link") {
114
- const r = s.attrs;
115
- (!r || typeof r.href != "string") && t.push({
119
+ message: `Invalid mark type: "${c}"`
120
+ }), c === "link") {
121
+ const f = s.attrs;
122
+ (!f || typeof f.href != "string") && t.push({
116
123
  path: `${a}.marks[${e}]`,
117
124
  message: "Link mark must have an href attribute"
118
125
  });
119
126
  }
120
- if (f === "repeat") {
121
- const r = s.attrs;
122
- (!r || typeof r.count != "number" || r.count < 2) && t.push({
127
+ if (c === "repeat") {
128
+ const f = s.attrs;
129
+ (!f || typeof f.count != "number" || f.count < 2) && t.push({
123
130
  path: `${a}.marks[${e}]`,
124
- message: `Invalid repeat count: ${r?.count}`
131
+ message: `Invalid repeat count: ${f?.count}`
125
132
  });
126
133
  }
127
134
  }
@@ -139,11 +146,23 @@ function d(i, a, t) {
139
146
  return;
140
147
  }
141
148
  for (let e = 0; e < o.length; e++) {
142
- const s = o[e], f = `${a}.segments[${e}]`;
143
- (typeof s.fromAya != "number" || s.fromAya < 1) && t.push({ path: f, message: `Invalid fromAya: ${s.fromAya}` }), s.fromWord !== null && s.fromWord !== void 0 && (typeof s.fromWord != "number" || s.fromWord < 1) && t.push({ path: f, message: `Invalid fromWord: ${s.fromWord}` }), s.toAya !== null && s.toAya !== void 0 && (typeof s.toAya != "number" || s.toAya < 1) && t.push({ path: f, message: `Invalid toAya: ${s.toAya}` }), s.toWord !== null && s.toWord !== void 0 && (typeof s.toWord != "number" || s.toWord < 1) && t.push({ path: f, message: `Invalid toWord: ${s.toWord}` }), (typeof s.repeat != "number" || s.repeat < 1) && t.push({ path: f, message: `Invalid repeat: ${s.repeat}` });
149
+ const s = o[e], c = `${a}.segments[${e}]`;
150
+ (typeof s.fromAya != "number" || s.fromAya < 1) && t.push({ path: c, message: `Invalid fromAya: ${s.fromAya}` }), s.fromWord !== null && s.fromWord !== void 0 && (typeof s.fromWord != "number" || s.fromWord < 1) && t.push({ path: c, message: `Invalid fromWord: ${s.fromWord}` }), s.toAya !== null && s.toAya !== void 0 && (typeof s.toAya != "number" || s.toAya < 1) && t.push({ path: c, message: `Invalid toAya: ${s.toAya}` }), s.toWord !== null && s.toWord !== void 0 && (typeof s.toWord != "number" || s.toWord < 1) && t.push({ path: c, message: `Invalid toWord: ${s.toWord}` }), (typeof s.repeat != "number" || s.repeat < 1) && t.push({ path: c, message: `Invalid repeat: ${s.repeat}` });
144
151
  }
145
152
  }
146
153
  function b(i, a, t) {
154
+ const n = i.attrs;
155
+ n?.citation !== void 0 && typeof n.citation != "string" && t.push({ path: a, message: "quote citation must be a string" });
156
+ const o = i.content;
157
+ if (o && Array.isArray(o)) {
158
+ const e = /* @__PURE__ */ new Set(["text", "quranRef", "hadithRef", "hardBreak"]);
159
+ for (let s = 0; s < o.length; s++) {
160
+ const c = o[s], f = `${a}.content[${s}]`;
161
+ e.has(c.type) || t.push({ path: f, message: `Invalid quote content type: "${c.type}"` }), r(c, f, t);
162
+ }
163
+ }
164
+ }
165
+ function v(i, a, t) {
147
166
  const n = i.attrs;
148
167
  if (!n) {
149
168
  t.push({ path: a, message: "hadithRef must have attrs" });
@@ -154,12 +173,12 @@ function b(i, a, t) {
154
173
  if (o && Array.isArray(o)) {
155
174
  const e = /* @__PURE__ */ new Set(["text", "quranRef", "hardBreak"]);
156
175
  for (let s = 0; s < o.length; s++) {
157
- const f = o[s], r = `${a}.content[${s}]`;
158
- e.has(f.type) || t.push({ path: r, message: `Invalid hadithRef content type: "${f.type}"` }), l(f, r, t, h);
176
+ const c = o[s], f = `${a}.content[${s}]`;
177
+ e.has(c.type) || t.push({ path: f, message: `Invalid hadithRef content type: "${c.type}"` }), r(c, f, t, h);
159
178
  }
160
179
  }
161
180
  }
162
- function v(i) {
181
+ function A(i) {
163
182
  const a = [];
164
183
  if (!i || typeof i != "object")
165
184
  return { valid: !1, errors: [{ path: "", message: "AST must be an object" }] };
@@ -167,8 +186,8 @@ function v(i) {
167
186
  return t.type !== "doc" ? {
168
187
  valid: !1,
169
188
  errors: [{ path: "", message: `Root must be type "doc", got "${t.type}"` }]
170
- } : (l(t, "doc", a), { valid: a.length === 0, errors: a });
189
+ } : (r(t, "doc", a), { valid: a.length === 0, errors: a });
171
190
  }
172
191
  export {
173
- v as validateAST
192
+ A as validateAST
174
193
  };
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/schema/schema.ts"],"names":[],"mappings":"AAqBA,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AA+SD,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,eAAe,EAAE,CAAC;CAC3B;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,gBAAgB,CAkB1D"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/schema/schema.ts"],"names":[],"mappings":"AAsBA,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AA0VD,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,eAAe,EAAE,CAAC;CAC3B;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,gBAAgB,CAkB1D"}
@@ -36,6 +36,7 @@ export interface QalamBlockquote {
36
36
  type: "blockquote";
37
37
  attrs?: {
38
38
  repeat?: number;
39
+ citation?: string;
39
40
  };
40
41
  content: QalamBlock[];
41
42
  }
@@ -44,13 +45,17 @@ export interface QalamBayt {
44
45
  attrs: {
45
46
  parts: [string] | [string, string] | [string, string, string];
46
47
  separator?: boolean;
48
+ repeat?: number;
47
49
  };
48
50
  }
49
51
  export interface QalamPoem {
50
52
  type: "poem";
53
+ attrs?: {
54
+ citation?: string;
55
+ };
51
56
  content: QalamBayt[];
52
57
  }
53
- export type QalamInline = QalamText | QalamQuranRef | QalamHadithRef | QalamHardBreak;
58
+ export type QalamInline = QalamText | QalamQuranRef | QalamHadithRef | QalamQuote | QalamHardBreak;
54
59
  export interface QalamText {
55
60
  type: "text";
56
61
  text: string;
@@ -82,6 +87,22 @@ export interface QalamRepeatMark {
82
87
  export interface QalamPropheticSpeechMark {
83
88
  type: "propheticSpeech";
84
89
  }
90
+ export interface QalamQuote {
91
+ type: "quote";
92
+ attrs: {
93
+ citation: string;
94
+ };
95
+ content?: QalamQuoteContent[];
96
+ }
97
+ export type QalamQuoteContent = QalamText | QalamQuranRef | QalamHadithRef | QalamHardBreak;
98
+ export type QalamQuoteContentResolved = QalamText | QalamQuranRefResolved | QalamHadithRefResolved | QalamHardBreak;
99
+ export interface QalamQuoteResolved {
100
+ type: "quote";
101
+ attrs: {
102
+ citation: string;
103
+ };
104
+ content?: QalamQuoteContentResolved[];
105
+ }
85
106
  export interface QuranSegment {
86
107
  fromAya: number;
87
108
  fromWord: number | null;
@@ -116,7 +137,7 @@ export interface QalamQuranRefResolved {
116
137
  attrs: QuranRefAttrs;
117
138
  resolved: ResolvedQuranData;
118
139
  }
119
- export type QalamInlineResolved = QalamText | QalamQuranRefResolved | QalamHadithRefResolved | QalamHardBreak;
140
+ export type QalamInlineResolved = QalamText | QalamQuranRefResolved | QalamHadithRefResolved | QalamQuoteResolved | QalamHardBreak;
120
141
  export interface QalamParagraphResolved {
121
142
  type: "paragraph";
122
143
  attrs?: {
@@ -151,6 +172,7 @@ export interface QalamBlockquoteResolved {
151
172
  type: "blockquote";
152
173
  attrs?: {
153
174
  repeat?: number;
175
+ citation?: string;
154
176
  };
155
177
  content: QalamBlockResolved[];
156
178
  }
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/schema/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,EAAE,UAAU,EAAE,CAAC;CACvB;AAED,MAAM,MAAM,UAAU,GAClB,cAAc,GACd,YAAY,GACZ,eAAe,GACf,gBAAgB,GAChB,eAAe,GACf,SAAS,CAAC;AAEd,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5B,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE;QAAE,KAAK,EAAE,CAAC,GAAG,CAAC,GAAG,C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,WAAW,CAAC;IAClB,KAAK,EAAE,cAAc,CAAC;IACtB,OAAO,CAAC,EAAE,qBAAqB,EAAE,CAAC;CACnC;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,cAAc,CAAC;IACtB,OAAO,CAAC,EAAE,6BAA6B,EAAE,CAAC;CAC3C;AAED,MAAM,MAAM,6BAA6B,GAAG,SAAS,GAAG,qBAAqB,GAAG,cAAc,CAAC"}
package/dist/styles.css CHANGED
@@ -181,14 +181,12 @@
181
181
  text-decoration: underline !important;
182
182
  }
183
183
 
184
- .qalam-editor__content p[data-repeat],
185
- .qalam-editor__content blockquote[data-repeat] {
184
+ .qalam-editor__content p[data-repeat] {
186
185
  position: relative;
187
186
  }
188
187
 
189
188
  /* Ghost spacer at end to reserve room */
190
- .qalam-editor__content p[data-repeat]::after,
191
- .qalam-editor__content blockquote[data-repeat]::after {
189
+ .qalam-editor__content p[data-repeat]::after {
192
190
  content: attr(data-repeat-label);
193
191
  font-family: "Amiri", serif;
194
192
  font-size: 0.7em;
@@ -200,8 +198,7 @@
200
198
  }
201
199
 
202
200
  /* Real badge positioned at bottom-left */
203
- .qalam-editor__content p[data-repeat]::before,
204
- .qalam-editor__content blockquote[data-repeat]::before {
201
+ .qalam-editor__content p[data-repeat]::before {
205
202
  content: attr(data-repeat-label);
206
203
  position: absolute;
207
204
  bottom: 4px;
@@ -242,6 +239,52 @@
242
239
  color: var(--qalam-blockquote-text) !important;
243
240
  }
244
241
 
242
+ .qalam-blockquote-body {
243
+ min-height: 1em;
244
+ }
245
+
246
+ .qalam-blockquote-footer {
247
+ display: flex;
248
+ align-items: center;
249
+ gap: 8px;
250
+ margin-top: 4px;
251
+ }
252
+
253
+ .qalam-blockquote-citation-input {
254
+ font-family: "Amiri", serif;
255
+ font-size: 0.85em;
256
+ border: none;
257
+ border-bottom: 1px dashed var(--qalam-citation);
258
+ background: transparent;
259
+ color: var(--qalam-citation);
260
+ outline: none;
261
+ padding: 0;
262
+ direction: rtl;
263
+ text-align: right;
264
+ }
265
+
266
+ .qalam-blockquote-meta-bracket {
267
+ color: var(--qalam-citation);
268
+ font-family: "Amiri", serif;
269
+ font-size: 0.85em;
270
+ }
271
+
272
+ .qalam-blockquote-citation-input::placeholder {
273
+ color: var(--qalam-text-dim);
274
+ font-style: italic;
275
+ }
276
+
277
+ .qalam-blockquote-repeat-badge {
278
+ font-family: "Amiri", serif;
279
+ font-size: 0.7em;
280
+ font-weight: bold;
281
+ color: var(--qalam-repeat);
282
+ background: var(--qalam-repeat-bg);
283
+ padding: 1px 6px;
284
+ border-radius: 8px;
285
+ }
286
+
287
+
245
288
  /* Toolbar */
246
289
 
247
290
  .qalam-toolbar {
@@ -455,6 +498,38 @@
455
498
  .qalam-popover__checkbox input[type="checkbox"] {
456
499
  width: 14px;
457
500
  height: 14px;
501
+ accent-color: var(--qalam-accent);
502
+ }
503
+
504
+ .qalam-dark .qalam-popover__checkbox input[type="checkbox"] {
505
+ appearance: none;
506
+ -webkit-appearance: none;
507
+ width: 14px;
508
+ height: 14px;
509
+ border: 1.5px solid var(--qalam-border);
510
+ border-radius: 3px;
511
+ background: var(--qalam-bg-alt);
512
+ cursor: pointer;
513
+ position: relative;
514
+ flex-shrink: 0;
515
+ }
516
+
517
+ .qalam-dark .qalam-popover__checkbox input[type="checkbox"]:checked {
518
+ background: var(--qalam-accent);
519
+ border-color: var(--qalam-accent);
520
+ }
521
+
522
+ .qalam-dark .qalam-popover__checkbox input[type="checkbox"]:checked::after {
523
+ content: "";
524
+ position: absolute;
525
+ left: 3px;
526
+ top: 1px;
527
+ width: 5px;
528
+ height: 8px;
529
+ border: 2px solid #1a1a1a;
530
+ border-top: none;
531
+ border-left: none;
532
+ transform: rotate(45deg);
458
533
  }
459
534
 
460
535
  .qalam-popover__suggestions {
@@ -867,6 +942,21 @@
867
942
  outline: none;
868
943
  padding: 0;
869
944
  direction: rtl;
945
+ text-align: right;
946
+ }
947
+
948
+ .qalam-hadith-meta-bracket {
949
+ color: var(--qalam-hadith-citation-color);
950
+ font-family: "Amiri", serif;
951
+ font-size: 0.72em;
952
+ }
953
+
954
+ .qalam-hadith-meta-sep {
955
+ color: var(--qalam-hadith-citation-color);
956
+ font-family: "Amiri", serif;
957
+ font-size: 0.72em;
958
+ margin: 0 4px;
959
+ vertical-align: baseline;
870
960
  }
871
961
 
872
962
  .qalam-hadith-citation-input::placeholder,
@@ -875,6 +965,62 @@
875
965
  font-style: italic;
876
966
  }
877
967
 
968
+ /* Inline quote node (editor) */
969
+ .qalam-quote-ref {
970
+ display: inline;
971
+ border-radius: 4px;
972
+ padding: 0 2px;
973
+ }
974
+
975
+ .qalam-quote-ref--selected {
976
+ outline: 2px solid var(--qalam-citation);
977
+ outline-offset: 2px;
978
+ border-radius: 4px;
979
+ }
980
+
981
+ .qalam-quote-bracket {
982
+ color: var(--qalam-citation);
983
+ font-family: "Amiri", serif;
984
+ font-size: 1.1em;
985
+ }
986
+
987
+ .qalam-quote-body {
988
+ display: inline;
989
+ font-family: "Amiri", serif;
990
+ color: var(--qalam-text);
991
+ }
992
+
993
+ .qalam-quote-meta {
994
+ display: inline-flex;
995
+ align-items: center;
996
+ margin-right: 6px;
997
+ vertical-align: baseline;
998
+ }
999
+
1000
+ .qalam-quote-citation-input {
1001
+ font-family: "Amiri", serif;
1002
+ font-size: 0.85em;
1003
+ border: none;
1004
+ border-bottom: 1px dashed var(--qalam-citation);
1005
+ background: transparent;
1006
+ color: var(--qalam-citation);
1007
+ outline: none;
1008
+ padding: 0;
1009
+ direction: rtl;
1010
+ text-align: right;
1011
+ }
1012
+
1013
+ .qalam-quote-meta-bracket {
1014
+ color: var(--qalam-citation);
1015
+ font-family: "Amiri", serif;
1016
+ font-size: 0.85em;
1017
+ }
1018
+
1019
+ .qalam-quote-citation-input::placeholder {
1020
+ color: var(--qalam-text-dim);
1021
+ font-style: italic;
1022
+ }
1023
+
878
1024
  /* Prophetic speech mark (editor) */
879
1025
  .qalam-prophetic-speech {
880
1026
  color: var(--qalam-hadith);
@@ -916,6 +1062,55 @@
916
1062
  color: var(--qalam-text-secondary);
917
1063
  }
918
1064
 
1065
+ /* Inline quote (renderer) */
1066
+ .qalam-render-quote-bracket {
1067
+ color: var(--qalam-citation);
1068
+ font-family: "Amiri", serif;
1069
+ }
1070
+
1071
+ .qalam-render-quote-citation {
1072
+ font-family: "Amiri", serif;
1073
+ font-size: 0.75em;
1074
+ font-style: normal;
1075
+ color: var(--qalam-citation);
1076
+ padding-right: 4px;
1077
+ }
1078
+
1079
+ /* Blockquote citation (renderer) */
1080
+ .qalam-render-blockquote-citation {
1081
+ display: block;
1082
+ font-family: "Amiri", serif;
1083
+ font-size: 0.75em;
1084
+ font-style: normal;
1085
+ color: var(--qalam-citation);
1086
+ margin-top: 4px;
1087
+ }
1088
+
1089
+ .qalam-render-poem__repeat-badge {
1090
+ position: absolute;
1091
+ right: calc(100% + 2px);
1092
+ top: 50%;
1093
+ transform: translateY(-50%);
1094
+ font-family: "Amiri", serif;
1095
+ font-size: 0.7em;
1096
+ font-weight: bold;
1097
+ color: var(--qalam-inline-repeat);
1098
+ background: var(--qalam-inline-repeat-bg);
1099
+ padding: 1px 6px;
1100
+ border-radius: 8px;
1101
+ white-space: nowrap;
1102
+ }
1103
+
1104
+ .qalam-render-poem-citation {
1105
+ display: block;
1106
+ font-family: "Amiri", serif;
1107
+ font-size: 0.75em;
1108
+ font-style: normal;
1109
+ color: var(--qalam-citation);
1110
+ text-align: center;
1111
+ margin-top: 4px;
1112
+ }
1113
+
919
1114
  /* Prophetic speech mark (renderer) */
920
1115
  .qalam-render-prophetic-speech {
921
1116
  color: var(--qalam-hadith);
@@ -981,6 +1176,34 @@
981
1176
  opacity: 1;
982
1177
  }
983
1178
 
1179
+ .qalam-poem__repeat-group {
1180
+ display: inline-flex;
1181
+ align-items: center;
1182
+ gap: 2px;
1183
+ }
1184
+
1185
+ .qalam-poem__repeat-label {
1186
+ font-size: 12px;
1187
+ color: var(--qalam-repeat);
1188
+ }
1189
+
1190
+ .qalam-poem__repeat-input {
1191
+ width: 32px;
1192
+ height: 22px;
1193
+ padding: 0 2px;
1194
+ border: 1px solid var(--qalam-border);
1195
+ border-radius: 4px;
1196
+ font-size: 12px;
1197
+ text-align: center;
1198
+ outline: none;
1199
+ background: var(--qalam-bg-alt);
1200
+ color: var(--qalam-text);
1201
+ }
1202
+
1203
+ .qalam-poem__repeat-input:focus {
1204
+ border-color: var(--qalam-repeat);
1205
+ }
1206
+
984
1207
  .qalam-poem__action-btn {
985
1208
  border: 1px dashed var(--qalam-border);
986
1209
  background: none;
@@ -999,6 +1222,36 @@
999
1222
  color: var(--qalam-accent);
1000
1223
  }
1001
1224
 
1225
+ .qalam-poem__citation {
1226
+ display: flex;
1227
+ align-items: center;
1228
+ justify-content: center;
1229
+ margin-top: 8px;
1230
+ }
1231
+
1232
+ .qalam-poem__citation-bracket {
1233
+ color: var(--qalam-citation);
1234
+ font-family: "Amiri", serif;
1235
+ font-size: 0.85em;
1236
+ }
1237
+
1238
+ .qalam-poem__citation-input {
1239
+ font-family: "Amiri", serif;
1240
+ font-size: 0.85em;
1241
+ border: none;
1242
+ border-bottom: 1px dashed var(--qalam-citation);
1243
+ background: transparent;
1244
+ color: var(--qalam-citation);
1245
+ outline: none;
1246
+ padding: 0;
1247
+ direction: rtl;
1248
+ text-align: right;
1249
+ }
1250
+
1251
+ .qalam-poem__citation-input::placeholder {
1252
+ color: var(--qalam-text-dim);
1253
+ font-style: italic;
1254
+ }
1002
1255
 
1003
1256
  .qalam-poem__add-line {
1004
1257
  display: flex;
@@ -1147,6 +1400,7 @@
1147
1400
  .qalam-render-poem__bayt {
1148
1401
  display: flex;
1149
1402
  justify-content: center;
1403
+ position: relative;
1150
1404
  }
1151
1405
 
1152
1406
  .qalam-render-poem__shatr {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@siladev/qalam",
3
- "version": "0.1.14",
3
+ "version": "0.2.0",
4
4
  "description": "Islamic content editor with Quran verse references",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",