@ingcreators/annot-core 0.1.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 (65) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/LICENSE +201 -0
  3. package/README.md +56 -0
  4. package/dist/auto-capture-options.d.ts +78 -0
  5. package/dist/editor/arrow-markers.d.ts +142 -0
  6. package/dist/editor/bake-translate.d.ts +192 -0
  7. package/dist/editor/font-registry.d.ts +58 -0
  8. package/dist/editor/gradient-utils.d.ts +23 -0
  9. package/dist/editor/history-core.d.ts +48 -0
  10. package/dist/editor/icons/brand-icons.d.ts +53 -0
  11. package/dist/editor/icons/material-symbols.d.ts +105 -0
  12. package/dist/editor/icons/registry.d.ts +179 -0
  13. package/dist/editor/icons/render.d.ts +22 -0
  14. package/dist/editor/icons/sanitize.d.ts +60 -0
  15. package/dist/editor/index.d.ts +13 -0
  16. package/dist/editor/path-utils.d.ts +32 -0
  17. package/dist/editor/property-schema.d.ts +263 -0
  18. package/dist/editor/rich-text-mapper.d.ts +8 -0
  19. package/dist/editor/selection-geometry.d.ts +66 -0
  20. package/dist/editor/shape-utils.d.ts +27 -0
  21. package/dist/editor/svg-format.d.ts +68 -0
  22. package/dist/editor/svg-id-utils.d.ts +37 -0
  23. package/dist/editor/svg-to-annotation-shapes.d.ts +34 -0
  24. package/dist/editor/text-utils.d.ts +212 -0
  25. package/dist/editor/tool-lifecycle.d.ts +56 -0
  26. package/dist/editor/tool-options.d.ts +126 -0
  27. package/dist/editor/tool-panel-adapter.d.ts +105 -0
  28. package/dist/editor/tool-preset-serde.d.ts +43 -0
  29. package/dist/editor/tool-registry.d.ts +320 -0
  30. package/dist/editor/tool-style-reader.d.ts +36 -0
  31. package/dist/editor/tool-style-writer.d.ts +33 -0
  32. package/dist/editor/toolbar-icons.d.ts +84 -0
  33. package/dist/editor/transform-utils.d.ts +127 -0
  34. package/dist/editor/viewport-math.d.ts +69 -0
  35. package/dist/encode/index.d.ts +4 -0
  36. package/dist/encode/options.d.ts +79 -0
  37. package/dist/encode/png8.d.ts +10 -0
  38. package/dist/headless.d.ts +29 -0
  39. package/dist/icons/index.d.ts +15 -0
  40. package/dist/icons/types.d.ts +108 -0
  41. package/dist/index.d.ts +1 -0
  42. package/dist/index.js +3164 -0
  43. package/dist/storage/errors.d.ts +59 -0
  44. package/dist/storage/index.d.ts +6 -0
  45. package/dist/storage/metadata-cache.d.ts +231 -0
  46. package/dist/storage/path.d.ts +49 -0
  47. package/dist/storage/thumbnail-cache.d.ts +110 -0
  48. package/dist/storage/thumbnail.d.ts +31 -0
  49. package/dist/storage/types.d.ts +677 -0
  50. package/dist/utils/assert.d.ts +31 -0
  51. package/dist/utils/constants.d.ts +10 -0
  52. package/dist/utils/dash-utils.d.ts +6 -0
  53. package/dist/utils/desktop-bridge.d.ts +349 -0
  54. package/dist/utils/filename.d.ts +48 -0
  55. package/dist/utils/id.d.ts +21 -0
  56. package/dist/utils/index.d.ts +5 -0
  57. package/dist/utils/types.d.ts +20 -0
  58. package/dist/xmp/xmp-browser.d.ts +39 -0
  59. package/dist/zip/zip-builder.d.ts +8 -0
  60. package/dist/zip/zip-bytes.d.ts +22 -0
  61. package/package.json +58 -0
  62. package/styles/editor.css +1912 -0
  63. package/styles/fonts.css +46 -0
  64. package/styles/property-panel.css +779 -0
  65. package/styles/toolbar.css +673 -0
@@ -0,0 +1,46 @@
1
+ /* Logical font-family stacks — Phase 2 of
2
+ * `docs/plans/multilingual-fonts-os-stack.md`.
3
+ *
4
+ * Three logical tokens (`Annot Sans` / `Annot Serif` / `Annot Mono`)
5
+ * the editor stores in `data-font-family` (and on the inner `<text>`'s
6
+ * `font-family` attribute). The CSS rules below resolve each token to
7
+ * an OS-aware family stack interleaving Latin / CJK / Arabic / Indic /
8
+ * Thai families so the browser's per-codepoint font selection lands on
9
+ * the OS native script font without any web-font download.
10
+ *
11
+ * Stack order matters: Latin families come FIRST so English text in
12
+ * mixed content uses native Latin glyphs (Helvetica Neue, Segoe UI),
13
+ * and CJK families come second so Japanese / Chinese / Korean fall
14
+ * through to the OS native CJK font without dragging the Latin glyphs
15
+ * into a CJK Latin variant.
16
+ *
17
+ * Keep these stacks in sync with `cssStackFor` in
18
+ * `packages/core/src/editor/font-registry.ts` — the registry version
19
+ * is the single source of truth for code paths that need the stack as
20
+ * a string (PNG export inlines it into the SVG `<defs><style>`); this
21
+ * stylesheet ships the same stacks as static CSS for the live editor
22
+ * + gallery + thumbnail panes that just need a stylesheet import.
23
+ */
24
+
25
+ text[font-family="Annot Sans"],
26
+ foreignObject [data-font-family="Annot Sans"] {
27
+ font-family:
28
+ -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial,
29
+ "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, "MS PGothic",
30
+ "PingFang SC", "Microsoft YaHei", "Apple SD Gothic Neo", "Malgun Gothic",
31
+ "Nirmala UI", Tahoma,
32
+ sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
33
+ }
34
+
35
+ text[font-family="Annot Serif"],
36
+ foreignObject [data-font-family="Annot Serif"] {
37
+ font-family:
38
+ Cambria, Georgia, "Yu Mincho", "Hiragino Mincho ProN", SimSun, "Noto Serif CJK SC", serif;
39
+ }
40
+
41
+ text[font-family="Annot Mono"],
42
+ foreignObject [data-font-family="Annot Mono"] {
43
+ font-family:
44
+ "SF Mono", Menlo, Consolas, "Cascadia Mono", "Yu Gothic Mono", "Noto Sans Mono CJK JP",
45
+ monospace;
46
+ }