@segnavia/format 0.3.0 → 0.5.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.
- package/dist/book.d.ts +274 -0
- package/dist/book.js +131 -0
- package/dist/deck-from-slides.d.ts +116 -0
- package/dist/deck-from-slides.js +36 -0
- package/dist/deck.d.ts +522 -0
- package/dist/deck.js +196 -0
- package/dist/direction.d.ts +6 -0
- package/dist/direction.js +7 -1
- package/dist/index.d.ts +104 -536
- package/dist/index.js +12 -215
- package/dist/lexicon.d.ts +18 -0
- package/dist/lexicon.js +38 -0
- package/dist/numbering.d.ts +19 -0
- package/dist/numbering.js +106 -0
- package/dist/paper.d.ts +20 -1
- package/dist/paper.js +19 -1
- package/dist/scripts.d.ts +8 -0
- package/dist/scripts.js +5 -0
- package/dist/shots-used.d.ts +2 -1
- package/package.json +1 -1
package/dist/direction.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
1
2
|
//#region src/direction.d.ts
|
|
3
|
+
export declare const Direction: z.ZodEnum<{
|
|
4
|
+
ltr: "ltr";
|
|
5
|
+
rtl: "rtl";
|
|
6
|
+
auto: "auto";
|
|
7
|
+
}>;
|
|
2
8
|
export type TextDirection = 'ltr' | 'rtl';
|
|
3
9
|
export declare function firstStrongDirection(text: string): TextDirection | null;
|
|
4
10
|
export declare function languageDirection(lang: string | undefined): TextDirection | null;
|
package/dist/direction.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
1
2
|
//#region src/direction.ts
|
|
3
|
+
const Direction = z.enum([
|
|
4
|
+
"ltr",
|
|
5
|
+
"rtl",
|
|
6
|
+
"auto"
|
|
7
|
+
]);
|
|
2
8
|
const RTL_LETTER = /[\p{Script=Hebrew}\p{Script=Arabic}\p{Script=Syriac}\p{Script=Thaana}\p{Script=Nko}\p{Script=Samaritan}\p{Script=Mandaic}\p{Script=Adlam}\p{Script=Hanifi_Rohingya}\p{Script=Mende_Kikakui}\p{Script=Old_Hungarian}\p{Script=Imperial_Aramaic}\p{Script=Phoenician}]/u;
|
|
3
9
|
const LETTER = /\p{L}/u;
|
|
4
10
|
const RTL_LANGUAGES = /* @__PURE__ */ new Set([
|
|
@@ -36,4 +42,4 @@ function resolveDirection(dir, lang, sample) {
|
|
|
36
42
|
return languageDirection(lang) ?? firstStrongDirection(sample) ?? "ltr";
|
|
37
43
|
}
|
|
38
44
|
//#endregion
|
|
39
|
-
export { firstStrongDirection, languageDirection, resolveDirection };
|
|
45
|
+
export { Direction, firstStrongDirection, languageDirection, resolveDirection };
|