@operato/font 10.29.74 → 10.29.76
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
### [10.29.76](https://github.com/hatiolab/operato/compare/v10.29.75...v10.29.76) (2026-11-09)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @operato/font
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
### [10.29.74](https://github.com/hatiolab/operato/compare/v10.29.73...v10.29.74) (2026-11-08)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @operato/font
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@operato/font",
|
|
3
3
|
"description": "User interface to select font and create font.",
|
|
4
4
|
"author": "heartyoh",
|
|
5
|
-
"version": "10.29.
|
|
5
|
+
"version": "10.29.76",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/src/index.js",
|
|
8
8
|
"module": "dist/src/index.js",
|
|
@@ -51,15 +51,15 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@material/web": "^2.0.0",
|
|
54
|
-
"@operato/attachment": "^10.29.
|
|
54
|
+
"@operato/attachment": "^10.29.76",
|
|
55
55
|
"@operato/headroom": "^10.29.1",
|
|
56
56
|
"@operato/i18n": "^10.29.27",
|
|
57
|
-
"@operato/input": "^10.29.
|
|
58
|
-
"@operato/layout": "^10.29.
|
|
59
|
-
"@operato/property-editor": "^10.29.
|
|
57
|
+
"@operato/input": "^10.29.76",
|
|
58
|
+
"@operato/layout": "^10.29.76",
|
|
59
|
+
"@operato/property-editor": "^10.29.76",
|
|
60
60
|
"@operato/pull-to-refresh": "^10.29.23",
|
|
61
|
-
"@operato/shell": "^10.29.
|
|
62
|
-
"@operato/utils": "^10.29.
|
|
61
|
+
"@operato/shell": "^10.29.76",
|
|
62
|
+
"@operato/utils": "^10.29.76",
|
|
63
63
|
"webfontloader": "^1.6.28"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"prettier --write"
|
|
97
97
|
]
|
|
98
98
|
},
|
|
99
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "08d33aec6fbe7c55cbb8e5018781a8500c792d4d"
|
|
100
100
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '../src/font-creation-card.js';
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { aTimeout, expect, fixture } from '@open-wc/testing';
|
|
2
|
-
import { html } from 'lit';
|
|
3
|
-
import '../src/font-creation-card.js';
|
|
4
|
-
/**
|
|
5
|
-
* The font card's file pick.
|
|
6
|
-
*
|
|
7
|
-
* ## Why this is tested
|
|
8
|
-
*
|
|
9
|
-
* The card picked font files with its own `ox-file-selector`, one of several file pickers that did
|
|
10
|
-
* the same thing. It now uses `ox-input-file`, the one picker. What must hold: picked font files
|
|
11
|
-
* reach `create-font`, a file that is not a font is refused, picking does not flip the card, and
|
|
12
|
-
* reset empties the pick.
|
|
13
|
-
*/
|
|
14
|
-
describe('font-creation-card', () => {
|
|
15
|
-
const drop = (area, ...files) => {
|
|
16
|
-
const dataTransfer = new DataTransfer();
|
|
17
|
-
files.forEach(one => dataTransfer.items.add(one));
|
|
18
|
-
area.dispatchEvent(new DragEvent('drop', { dataTransfer, bubbles: true, cancelable: true }));
|
|
19
|
-
};
|
|
20
|
-
it('takes the picked font files into create-font', async () => {
|
|
21
|
-
const card = await fixture(html `<font-creation-card></font-creation-card>`);
|
|
22
|
-
card.provider = 'custom';
|
|
23
|
-
await card.updateComplete;
|
|
24
|
-
const picker = card.renderRoot.querySelector('ox-input-file');
|
|
25
|
-
expect(picker, 'the card has no picker').to.exist;
|
|
26
|
-
drop(picker, new File(['x'], 'brand.woff2'), new File(['x'], 'notes.txt', { type: 'text/plain' }));
|
|
27
|
-
await aTimeout(0);
|
|
28
|
-
await card.updateComplete;
|
|
29
|
-
expect(card.files.map((one) => one.name), 'a non-font was taken').to.deep.equal(['brand.woff2']);
|
|
30
|
-
let detail;
|
|
31
|
-
card.addEventListener('create-font', (e) => (detail = e.detail));
|
|
32
|
-
const form = card.renderRoot.querySelector('form');
|
|
33
|
-
form.elements.namedItem('name').value = 'Brand';
|
|
34
|
-
form.dispatchEvent(new Event('submit', { cancelable: true }));
|
|
35
|
-
expect(detail.files.map((one) => one.name)).to.deep.equal(['brand.woff2']);
|
|
36
|
-
});
|
|
37
|
-
it('does not flip when the picker is clicked, and reset empties the pick', async () => {
|
|
38
|
-
const card = await fixture(html `<font-creation-card></font-creation-card>`);
|
|
39
|
-
card.provider = 'custom';
|
|
40
|
-
card.classList.add('flipped');
|
|
41
|
-
await card.updateComplete;
|
|
42
|
-
const picker = card.renderRoot.querySelector('ox-input-file');
|
|
43
|
-
picker.click();
|
|
44
|
-
expect(card.classList.contains('flipped'), 'clicking the picker flipped the card').to.equal(true);
|
|
45
|
-
drop(picker, new File(['x'], 'brand.ttf'));
|
|
46
|
-
await aTimeout(0);
|
|
47
|
-
card.reset();
|
|
48
|
-
await card.updateComplete;
|
|
49
|
-
expect(card.files).to.deep.equal([]);
|
|
50
|
-
expect(picker.value).to.deep.equal([]);
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
//# sourceMappingURL=font-creation-card.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"font-creation-card.test.js","sourceRoot":"","sources":["../../test/font-creation-card.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAE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AI,CAAC,CAAA;QAEjG,IAAI,CAAC,MAAM,EAAE,IAAI,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC,CAAC,CAAA;QAC1C,MAAM,QAAQ,CAAC,CAAC,CAAC,CAAA;QACjB,IAAI,CAAC,KAAK,EAAE,CAAA;QACZ,MAAM,IAAI,CAAC,cAAc,CAAA;QAEzB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;QACpC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;IACxC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA","sourcesContent":["import { aTimeout, expect, fixture } from '@open-wc/testing'\nimport { html } from 'lit'\n\nimport '../src/font-creation-card.js'\n\n/**\n * The font card's file pick.\n *\n * ## Why this is tested\n *\n * The card picked font files with its own `ox-file-selector`, one of several file pickers that did\n * the same thing. It now uses `ox-input-file`, the one picker. What must hold: picked font files\n * reach `create-font`, a file that is not a font is refused, picking does not flip the card, and\n * reset empties the pick.\n */\ndescribe('font-creation-card', () => {\n const drop = (area: HTMLElement, ...files: File[]) => {\n const dataTransfer = new DataTransfer()\n files.forEach(one => dataTransfer.items.add(one))\n area.dispatchEvent(new DragEvent('drop', { dataTransfer, bubbles: true, cancelable: true }))\n }\n\n it('takes the picked font files into create-font', async () => {\n const card: any = await fixture(html`<font-creation-card></font-creation-card>`)\n card.provider = 'custom'\n await card.updateComplete\n\n const picker = card.renderRoot.querySelector('ox-input-file')\n expect(picker, 'the card has no picker').to.exist\n\n drop(picker, new File(['x'], 'brand.woff2'), new File(['x'], 'notes.txt', { type: 'text/plain' }))\n await aTimeout(0)\n await card.updateComplete\n\n expect(card.files.map((one: File) => one.name), 'a non-font was taken').to.deep.equal(['brand.woff2'])\n\n let detail: any\n card.addEventListener('create-font', (e: CustomEvent) => (detail = e.detail))\n const form = card.renderRoot.querySelector('form')\n ;(form.elements.namedItem('name') as HTMLInputElement).value = 'Brand'\n form.dispatchEvent(new Event('submit', { cancelable: true }))\n\n expect(detail.files.map((one: File) => one.name)).to.deep.equal(['brand.woff2'])\n })\n\n it('does not flip when the picker is clicked, and reset empties the pick', async () => {\n const card: any = await fixture(html`<font-creation-card></font-creation-card>`)\n card.provider = 'custom'\n card.classList.add('flipped')\n await card.updateComplete\n\n const picker = card.renderRoot.querySelector('ox-input-file')\n picker.click()\n expect(card.classList.contains('flipped'), 'clicking the picker flipped the card').to.equal(true)\n\n drop(picker, new File(['x'], 'brand.ttf'))\n await aTimeout(0)\n card.reset()\n await card.updateComplete\n\n expect(card.files).to.deep.equal([])\n expect(picker.value).to.deep.equal([])\n })\n})\n"]}
|