@formfeed/engine 0.2.0 → 0.3.1

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 (67) hide show
  1. package/README.md +2 -1
  2. package/THIRD_PARTY_LICENSES.md +31 -0
  3. package/index.cjs +4286 -172
  4. package/index.js +4286 -172
  5. package/package.json +1 -1
  6. package/types/index.d.cts +19 -9
  7. package/types/index.d.ts +19 -9
  8. package/types/lib/assemble.d.cts +24 -9
  9. package/types/lib/assemble.d.ts +24 -9
  10. package/types/lib/brand.d.cts +46 -0
  11. package/types/lib/brand.d.ts +46 -0
  12. package/types/lib/helpers/document.d.cts +24 -0
  13. package/types/lib/helpers/document.d.ts +24 -0
  14. package/types/lib/helpers/index.d.cts +1 -0
  15. package/types/lib/helpers/index.d.ts +1 -0
  16. package/types/lib/helpers/office.d.cts +4 -0
  17. package/types/lib/helpers/office.d.ts +4 -0
  18. package/types/lib/import/apitemplate.d.cts +63 -0
  19. package/types/lib/import/apitemplate.d.ts +63 -0
  20. package/types/lib/office/detect.d.cts +36 -0
  21. package/types/lib/office/detect.d.ts +36 -0
  22. package/types/lib/office/drawings.d.cts +120 -0
  23. package/types/lib/office/drawings.d.ts +120 -0
  24. package/types/lib/office/errors.d.cts +21 -0
  25. package/types/lib/office/errors.d.ts +21 -0
  26. package/types/lib/office/fonts.d.cts +21 -0
  27. package/types/lib/office/fonts.d.ts +21 -0
  28. package/types/lib/office/ids.d.cts +1 -0
  29. package/types/lib/office/ids.d.ts +1 -0
  30. package/types/lib/office/index.d.cts +18 -0
  31. package/types/lib/office/index.d.ts +18 -0
  32. package/types/lib/office/render.d.cts +79 -0
  33. package/types/lib/office/render.d.ts +79 -0
  34. package/types/lib/office/sanitise.d.cts +35 -0
  35. package/types/lib/office/sanitise.d.ts +35 -0
  36. package/types/lib/office/slides.d.cts +47 -0
  37. package/types/lib/office/slides.d.ts +47 -0
  38. package/types/lib/office/starter-pptx.d.cts +6 -0
  39. package/types/lib/office/starter-pptx.d.ts +6 -0
  40. package/types/lib/office/starter.d.cts +24 -0
  41. package/types/lib/office/starter.d.ts +24 -0
  42. package/types/lib/office/structure.d.cts +51 -0
  43. package/types/lib/office/structure.d.ts +51 -0
  44. package/types/lib/office/tags.d.cts +51 -0
  45. package/types/lib/office/tags.d.ts +51 -0
  46. package/types/lib/office/template-text.d.cts +59 -0
  47. package/types/lib/office/template-text.d.ts +59 -0
  48. package/types/lib/office/xml.d.cts +44 -0
  49. package/types/lib/office/xml.d.ts +44 -0
  50. package/types/lib/office/zip.d.cts +49 -0
  51. package/types/lib/office/zip.d.ts +49 -0
  52. package/types/lib/output.d.cts +29 -0
  53. package/types/lib/output.d.ts +29 -0
  54. package/types/lib/preview.d.cts +14 -2
  55. package/types/lib/preview.d.ts +14 -2
  56. package/types/lib/schema-diff.d.cts +27 -0
  57. package/types/lib/schema-diff.d.ts +27 -0
  58. package/types/lib/schema.d.cts +8 -0
  59. package/types/lib/schema.d.ts +8 -0
  60. package/types/lib/snippets.d.cts +38 -1
  61. package/types/lib/snippets.d.ts +38 -1
  62. package/types/lib/source-positions.d.cts +27 -0
  63. package/types/lib/source-positions.d.ts +27 -0
  64. package/types/lib/types.d.cts +37 -1
  65. package/types/lib/types.d.ts +37 -1
  66. package/types/types/modules.d.cts +1 -0
  67. package/types/types/modules.d.ts +1 -0
package/README.md CHANGED
@@ -42,7 +42,8 @@ The supported surface is the `Engine` interface (`compile`, `analyze`, `render`)
42
42
  | `analysis/` | Block pairing and sample-data checks behind every `analyze()` |
43
43
  | `schema.ts` | `inferSchema(sample)` to JSON Schema 2020-12 |
44
44
  | `assemble.ts` | Template settings, print reset, `assembleDocument()` and `renderVersion()` (body, header, footer, title) |
45
- | `import/` | `importApitemplate()`: converts apitemplate.io templates |
45
+ | `import/` | `importApitemplate()` and `importApitemplateFromApi()`, `importPdfmonkey()` and `importJsreport()`: convert templates of apitemplate.io, PDFMonkey and jsreport into Formfeed drafts |
46
+ | `office/` | Word and PowerPoint templates: `renderOffice()` fills a `.docx` or `.pptx` file, `analyzeOffice()` lists its tags, variables and findings per part and paragraph, `OfficeTemplateError` carries the findings of a document that cannot be filled, and `starterDocument()` and `starterPresentation()` return example files with their sample data |
46
47
 
47
48
  ## Documentation
48
49
 
@@ -0,0 +1,31 @@
1
+ # Third-party licences
2
+
3
+ `@formfeed/engine` includes code from the following npm packages, each under its own licence.
4
+
5
+ ## fflate 0.8.3
6
+
7
+ Licence: MIT
8
+
9
+ ```text
10
+ MIT License
11
+
12
+ Copyright (c) 2026 Arjun Barrett
13
+
14
+ Permission is hereby granted, free of charge, to any person obtaining a copy
15
+ of this software and associated documentation files (the "Software"), to deal
16
+ in the Software without restriction, including without limitation the rights
17
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18
+ copies of the Software, and to permit persons to whom the Software is
19
+ furnished to do so, subject to the following conditions:
20
+
21
+ The above copyright notice and this permission notice shall be included in all
22
+ copies or substantial portions of the Software.
23
+
24
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30
+ SOFTWARE.
31
+ ```