@formfeed/engine 0.3.11 → 0.3.13

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 (47) hide show
  1. package/index.cjs +2872 -280
  2. package/index.js +2872 -280
  3. package/package.json +3 -2
  4. package/types/frame/audit.d.cts +15 -0
  5. package/types/frame/audit.d.ts +15 -0
  6. package/types/frame/audit.entry.d.cts +1 -0
  7. package/types/frame/audit.entry.d.ts +1 -0
  8. package/types/frame/text-edit.d.cts +8 -1
  9. package/types/frame/text-edit.d.ts +8 -1
  10. package/types/index.d.cts +8 -1
  11. package/types/index.d.ts +8 -1
  12. package/types/lib/accessibility/index.d.cts +201 -0
  13. package/types/lib/accessibility/index.d.ts +201 -0
  14. package/types/lib/accessibility/static.d.cts +40 -0
  15. package/types/lib/accessibility/static.d.ts +40 -0
  16. package/types/lib/assemble.d.cts +16 -0
  17. package/types/lib/assemble.d.ts +16 -0
  18. package/types/lib/einvoice/check.d.cts +181 -0
  19. package/types/lib/einvoice/check.d.ts +181 -0
  20. package/types/lib/einvoice/cii.d.cts +18 -0
  21. package/types/lib/einvoice/cii.d.ts +18 -0
  22. package/types/lib/einvoice/codes.generated.d.cts +14 -0
  23. package/types/lib/einvoice/codes.generated.d.ts +14 -0
  24. package/types/lib/einvoice/decimal.d.cts +29 -0
  25. package/types/lib/einvoice/decimal.d.ts +29 -0
  26. package/types/lib/einvoice/display.d.cts +43 -0
  27. package/types/lib/einvoice/display.d.ts +43 -0
  28. package/types/lib/einvoice/html-text.d.cts +17 -0
  29. package/types/lib/einvoice/html-text.d.ts +17 -0
  30. package/types/lib/einvoice/index.d.cts +45 -0
  31. package/types/lib/einvoice/index.d.ts +45 -0
  32. package/types/lib/einvoice/locate.d.cts +21 -0
  33. package/types/lib/einvoice/locate.d.ts +21 -0
  34. package/types/lib/einvoice/report.d.cts +59 -0
  35. package/types/lib/einvoice/report.d.ts +59 -0
  36. package/types/lib/einvoice/schema.d.cts +293 -0
  37. package/types/lib/einvoice/schema.d.ts +293 -0
  38. package/types/lib/einvoice/skeleton.d.cts +10 -0
  39. package/types/lib/einvoice/skeleton.d.ts +10 -0
  40. package/types/lib/generated/frames.d.cts +4 -2
  41. package/types/lib/generated/frames.d.ts +4 -2
  42. package/types/lib/helpers/document.d.cts +5 -0
  43. package/types/lib/helpers/document.d.ts +5 -0
  44. package/types/lib/preview.d.cts +11 -0
  45. package/types/lib/preview.d.ts +11 -0
  46. package/types/lib/source-edit.d.cts +5 -0
  47. package/types/lib/source-edit.d.ts +5 -0
@@ -29,6 +29,17 @@ export interface PreviewOptions {
29
29
  * `editable`) can be edited in place, and the frame talks to the editor about it by message.
30
30
  */
31
31
  editing?: boolean;
32
+ /**
33
+ * A name the editor gives this document, which the edit session's messages carry back
34
+ * (`formfeed:document` in the head). The editor has the next document ready a moment before the
35
+ * frame takes it; with the name it can tell a click that still came from the one before.
36
+ */
37
+ document?: string;
38
+ /**
39
+ * Run the accessibility audit on the laid-out document (plan 21 §6) and post what it finds:
40
+ * `{ type: 'formfeed:audit', findings }`. For templates that ask for `pdf.ua`.
41
+ */
42
+ audit?: boolean;
32
43
  }
33
44
  /** What the preview frame reports about content wider than the page, or `null` when nothing is. */
34
45
  export interface PreviewOverflow {
@@ -29,6 +29,17 @@ export interface PreviewOptions {
29
29
  * `editable`) can be edited in place, and the frame talks to the editor about it by message.
30
30
  */
31
31
  editing?: boolean;
32
+ /**
33
+ * A name the editor gives this document, which the edit session's messages carry back
34
+ * (`formfeed:document` in the head). The editor has the next document ready a moment before the
35
+ * frame takes it; with the name it can tell a click that still came from the one before.
36
+ */
37
+ document?: string;
38
+ /**
39
+ * Run the accessibility audit on the laid-out document (plan 21 §6) and post what it finds:
40
+ * `{ type: 'formfeed:audit', findings }`. For templates that ask for `pdf.ua`.
41
+ */
42
+ audit?: boolean;
32
43
  }
33
44
  /** What the preview frame reports about content wider than the page, or `null` when nothing is. */
34
45
  export interface PreviewOverflow {
@@ -80,6 +80,11 @@ export declare function editableRegionAt(source: string, engine: EngineId, at: n
80
80
  * preview was being edited): found by its unique original markup, or null.
81
81
  */
82
82
  export declare function findRegionAgain(source: string, engine: EngineId, outer: string): EditableRegion | null;
83
+ /** Where a region's start tag is, as `data-ff-src` names it: line and column, both 1-based. */
84
+ export declare function regionPosition(source: string, region: EditableRegion): {
85
+ line: number;
86
+ column: number;
87
+ };
83
88
  /** The chips of a region in order, with what they stand for. */
84
89
  export declare function regionChips(source: string, region: EditableRegion): RegionChip[];
85
90
  /** What the preview shows while editing: decoded text (whitespace as written), chips and breaks. */
@@ -80,6 +80,11 @@ export declare function editableRegionAt(source: string, engine: EngineId, at: n
80
80
  * preview was being edited): found by its unique original markup, or null.
81
81
  */
82
82
  export declare function findRegionAgain(source: string, engine: EngineId, outer: string): EditableRegion | null;
83
+ /** Where a region's start tag is, as `data-ff-src` names it: line and column, both 1-based. */
84
+ export declare function regionPosition(source: string, region: EditableRegion): {
85
+ line: number;
86
+ column: number;
87
+ };
83
88
  /** The chips of a region in order, with what they stand for. */
84
89
  export declare function regionChips(source: string, region: EditableRegion): RegionChip[];
85
90
  /** What the preview shows while editing: decoded text (whitespace as written), chips and breaks. */