@oim-media/core 1.27.11 → 1.27.12

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/README.md CHANGED
@@ -26,7 +26,7 @@ URLs only) and `@oim-media/core/generative` and `@oim-media/core/generative/cata
26
26
 
27
27
  - `OimMetadataSchema`, `OvmMetadataSchema`, `OIMOrOVMMetadata`: Zod schemas of the
28
28
  metadata. Types `OIMMetadata`, `OVMMetadata`, `Slot`, `TextMark`, `Reveal`, ...
29
- - `CONTRACT_VERSION`: the contract version this build implements (`"1.27.11"`).
29
+ - `CONTRACT_VERSION`: the contract version this build implements (`"1.27.12"`).
30
30
  - `BASE_CONTRACT_VERSION`, `PLAYER_CAPABILITIES`, `VERSION_BY_CAPABILITY`, `minVersionFor`.
31
31
  - `MAX_SLOTS`, `MAX_MARKS`, `MARK_NAME`, `PALETTE_NAME_PATTERN`, `CSS_GRADIENT_PATTERN`.
32
32
 
@@ -41,7 +41,7 @@
41
41
  * the format can change without the player being touched. Tying both numbers
42
42
  * together would make an internal fix look like a format break.
43
43
  */
44
- export declare const CONTRACT_VERSION = "1.27.11";
44
+ export declare const CONTRACT_VERSION = "1.27.12";
45
45
  /**
46
46
  * The first version of the format. Whatever requires nothing more requires this.
47
47
  *
@@ -41,7 +41,8 @@
41
41
  * the format can change without the player being touched. Tying both numbers
42
42
  * together would make an internal fix look like a format break.
43
43
  */
44
- export const CONTRACT_VERSION = "1.27.11";
44
+ export const CONTRACT_VERSION = "1.27.12";
45
+ // 1.27.12: an SVG layer upgrades from its content, not svgRawXml; no format change.
45
46
  // 1.27.11: fixes to the 2.0 upgrade (corner shorthand, hollow text, SVG icons, colour under a photo); no format change.
46
47
  // 1.27.10: no format change; the player paints from 2.0 and a zone is a group without its flow.
47
48
  // 1.27.9: numbers beyond +/-(2^53 - 1) have no canonical form; the Rust crate parses decimals exactly.
@@ -78,7 +78,9 @@ function shapeGeometry(ctx, slot, media) {
78
78
  if (fromLayers)
79
79
  return fromLayers;
80
80
  }
81
- const xml = typeof rawXml === "string" && rawXml ? rawXml : drawsMarkup(slot) ? media : undefined;
81
+ // 1.x painted the content of a markup layer; svgRawXml is the untouched original it was edited from.
82
+ const content = drawsMarkup(slot) && typeof media === "string" && /<svg/i.test(media) ? media : undefined;
83
+ const xml = content ?? (typeof rawXml === "string" && rawXml ? rawXml : drawsMarkup(slot) ? media : undefined);
82
84
  if (xml) {
83
85
  const parsed = svgToPaths(xml);
84
86
  if (parsed.ok)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oim-media/core",
3
- "version": "1.27.11",
3
+ "version": "1.27.12",
4
4
  "description": "Core of the OIM format: the contract schema, binary extraction from PNG and the shared rendering logic used by every OIM player.",
5
5
  "keywords": [
6
6
  "oim",