@formicoidea/labre-ddd-shared 0.42.0 → 0.45.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.
@@ -1,10 +1,8 @@
1
1
  /**
2
- * Uniform fit of a fixed reference design (`refW × refH`) into an element of
3
- * size `w × h`: scale factor + centring offsets (letterboxed), undistorted.
2
+ * Uniform fit of a fixed reference design into an element, THE one in the
3
+ * library: `@labre/affine-block-surface`'s `refScale`. Re-exported here because
4
+ * the DDD stencils have always called it by this name — the body used to be
5
+ * copied here, and in two other packages besides (R37, one source of truth).
4
6
  */
5
- export declare function refScale(w: number, h: number, refW: number, refH: number): {
6
- s: number;
7
- ox: number;
8
- oy: number;
9
- };
7
+ export { refScale } from '@formicoidea/labre-core/blocks/surface';
10
8
  export declare const FONT_FAMILY = "Inter, sans-serif";
@@ -1,9 +1,8 @@
1
1
  /**
2
- * Uniform fit of a fixed reference design (`refW × refH`) into an element of
3
- * size `w × h`: scale factor + centring offsets (letterboxed), undistorted.
2
+ * Uniform fit of a fixed reference design into an element, THE one in the
3
+ * library: `@labre/affine-block-surface`'s `refScale`. Re-exported here because
4
+ * the DDD stencils have always called it by this name — the body used to be
5
+ * copied here, and in two other packages besides (R37, one source of truth).
4
6
  */
5
- export function refScale(w, h, refW, refH) {
6
- const s = Math.min(w / refW, h / refH);
7
- return { s, ox: (w - refW * s) / 2, oy: (h - refH * s) / 2 };
8
- }
7
+ export { refScale } from '@formicoidea/labre-core/blocks/surface';
9
8
  export const FONT_FAMILY = 'Inter, sans-serif';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@formicoidea/labre-ddd-shared",
3
3
  "description": "Labre ddd-shared — shared building blocks for @formicoidea/labre-core frameworks.",
4
- "version": "0.42.0",
4
+ "version": "0.45.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "author": "lajola",
@@ -19,7 +19,8 @@
19
19
  "dist"
20
20
  ],
21
21
  "dependencies": {
22
- "@formicoidea/labre-core": "0.42.0",
23
- "lit": "^3.2.0"
22
+ "@formicoidea/labre-core": "0.45.0",
23
+ "lit": "^3.2.0",
24
+ "yjs": "^13.6.21"
24
25
  }
25
26
  }