@zebrash/core 0.1.4 → 1.0.1
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.
|
@@ -5,9 +5,11 @@
|
|
|
5
5
|
* the bytes, and returns them as `Uint8Array`. Called via the `package.json`
|
|
6
6
|
* `"browser"` field swap when bundling for the browser.
|
|
7
7
|
*
|
|
8
|
-
* Default base URL serves the fonts
|
|
9
|
-
* jsdelivr.
|
|
10
|
-
*
|
|
8
|
+
* Default base URL serves the fonts from the published `@zebrash/core`
|
|
9
|
+
* tarball via jsdelivr. The `files` field in core's package.json includes
|
|
10
|
+
* `src/assets/fonts`, so this path is stable across repo restructures and
|
|
11
|
+
* doesn't depend on branch state. Override via `setFontBaseUrl(...)` to
|
|
12
|
+
* self-host (CSP, offline, version-pinning).
|
|
11
13
|
*/
|
|
12
14
|
export type FontKey = "HelveticaBold" | "DejavuSansMono" | "DejavuSansMonoBold" | "ZplGS";
|
|
13
15
|
export declare function setFontBaseUrl(url: string): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fonts-browser.d.ts","sourceRoot":"","sources":["../../src/assets/fonts-browser.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"fonts-browser.d.ts","sourceRoot":"","sources":["../../src/assets/fonts-browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,MAAM,OAAO,GAAG,eAAe,GAAG,gBAAgB,GAAG,oBAAoB,GAAG,OAAO,CAAC;AAW1F,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAEhD;AAED,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAEpD;AAKD,wBAAsB,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,CAoBvE"}
|
|
@@ -5,9 +5,11 @@
|
|
|
5
5
|
* the bytes, and returns them as `Uint8Array`. Called via the `package.json`
|
|
6
6
|
* `"browser"` field swap when bundling for the browser.
|
|
7
7
|
*
|
|
8
|
-
* Default base URL serves the fonts
|
|
9
|
-
* jsdelivr.
|
|
10
|
-
*
|
|
8
|
+
* Default base URL serves the fonts from the published `@zebrash/core`
|
|
9
|
+
* tarball via jsdelivr. The `files` field in core's package.json includes
|
|
10
|
+
* `src/assets/fonts`, so this path is stable across repo restructures and
|
|
11
|
+
* doesn't depend on branch state. Override via `setFontBaseUrl(...)` to
|
|
12
|
+
* self-host (CSP, offline, version-pinning).
|
|
11
13
|
*/
|
|
12
14
|
const filenames = {
|
|
13
15
|
HelveticaBold: "HelveticaBoldCondensedCustom.ttf",
|
|
@@ -15,7 +17,7 @@ const filenames = {
|
|
|
15
17
|
DejavuSansMonoBold: "DejaVuSansMonoBold.ttf",
|
|
16
18
|
ZplGS: "ZplGSCustom.ttf",
|
|
17
19
|
};
|
|
18
|
-
let baseUrl = "https://cdn.jsdelivr.net/
|
|
20
|
+
let baseUrl = "https://cdn.jsdelivr.net/npm/@zebrash/core/src/assets/fonts/";
|
|
19
21
|
export function setFontBaseUrl(url) {
|
|
20
22
|
baseUrl = url.endsWith("/") ? url : `${url}/`;
|
|
21
23
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zebrash/core",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Engine for the @zebrash family — pure-TS ZPL parser + renderer. Internal package; consume @zebrash/node or @zebrash/browser.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"barcode",
|
|
7
|
+
"label",
|
|
8
|
+
"label-printer",
|
|
9
|
+
"parser",
|
|
10
|
+
"png",
|
|
11
|
+
"renderer",
|
|
12
|
+
"svg",
|
|
13
|
+
"typescript",
|
|
14
|
+
"zebra",
|
|
15
|
+
"zebra-printer",
|
|
16
|
+
"zebrash",
|
|
17
|
+
"zpl",
|
|
18
|
+
"zpl-ii"
|
|
19
|
+
],
|
|
5
20
|
"homepage": "https://github.com/Fountain-Bio/zebrash-ts#readme",
|
|
6
21
|
"bugs": "https://github.com/Fountain-Bio/zebrash-ts/issues",
|
|
7
22
|
"license": "MIT",
|