@flighthq/text 0.2.0 → 0.2.1-next.423.3350e53

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.
@@ -2,7 +2,7 @@ export function computeTextFormatFontString(format) {
2
2
  const style = format.italic ? 'italic' : 'normal';
3
3
  const weight = format.bold ? 'bold' : 'normal';
4
4
  const size = format.size ?? 12;
5
- const family = format.font ?? 'serif';
5
+ const family = format.font ?? 'sans-serif';
6
6
  return `${style} ${weight} ${size}px ${family}`;
7
7
  }
8
8
  //# sourceMappingURL=textFormatFont.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"textFormatFont.js","sourceRoot":"","sources":["../src/textFormatFont.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,2BAA2B,CAAC,MAAkB;IAC5D,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;IAClD,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC/C,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;IAC/B,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,IAAI,OAAO,CAAC;IACtC,OAAO,GAAG,KAAK,IAAI,MAAM,IAAI,IAAI,MAAM,MAAM,EAAE,CAAC;AAClD,CAAC"}
1
+ {"version":3,"file":"textFormatFont.js","sourceRoot":"","sources":["../src/textFormatFont.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,2BAA2B,CAAC,MAAkB;IAC5D,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;IAClD,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC/C,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;IAC/B,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,IAAI,YAAY,CAAC;IAC3C,OAAO,GAAG,KAAK,IAAI,MAAM,IAAI,IAAI,MAAM,MAAM,EAAE,CAAC;AAClD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flighthq/text",
3
- "version": "0.2.0",
3
+ "version": "0.2.1-next.423.3350e53",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/flighthq/flight.git",
@@ -32,13 +32,13 @@
32
32
  "clean:dist": "tsx ../../scripts/clean-package-dist.ts"
33
33
  },
34
34
  "dependencies": {
35
- "@flighthq/displayobject": "0.2.0",
36
- "@flighthq/entity": "0.2.0",
37
- "@flighthq/geometry": "0.2.0",
38
- "@flighthq/node": "0.2.0",
39
- "@flighthq/signals": "0.2.0",
40
- "@flighthq/textlayout": "0.2.0",
41
- "@flighthq/types": "0.2.0"
35
+ "@flighthq/displayobject": "0.2.1-next.423.3350e53",
36
+ "@flighthq/entity": "0.2.1-next.423.3350e53",
37
+ "@flighthq/geometry": "0.2.1-next.423.3350e53",
38
+ "@flighthq/node": "0.2.1-next.423.3350e53",
39
+ "@flighthq/signals": "0.2.1-next.423.3350e53",
40
+ "@flighthq/textlayout": "0.2.1-next.423.3350e53",
41
+ "@flighthq/types": "0.2.1-next.423.3350e53"
42
42
  },
43
43
  "devDependencies": {
44
44
  "typescript": "^5.3.0"
@@ -13,8 +13,7 @@ describe('computeTextFormatFontString', () => {
13
13
 
14
14
  it('uses defaults when size and font are omitted', () => {
15
15
  const font = computeTextFormatFontString({});
16
- expect(font).toContain('12px');
17
- expect(font).toContain('serif');
16
+ expect(font).toBe('normal normal 12px sans-serif');
18
17
  });
19
18
 
20
19
  it('uses italic style when italic is true', () => {