@cardenelabs/dragon 0.42.1 → 0.42.2
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/dist/cli.cjs +9 -8
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +9 -8
- package/dist/cli.js.map +1 -1
- package/dist/export.cjs +9 -8
- package/dist/export.cjs.map +1 -1
- package/dist/export.js +9 -8
- package/dist/export.js.map +1 -1
- package/package.json +1 -1
- package/src/export/fonts.ts +13 -6
package/dist/export.cjs
CHANGED
|
@@ -8472,8 +8472,8 @@ var Motion = class {
|
|
|
8472
8472
|
]);
|
|
8473
8473
|
}
|
|
8474
8474
|
/** 少し下から浮いて出る。 */
|
|
8475
|
-
rise(a, b = this.last,
|
|
8476
|
-
return this.vis(a, b, { on: { transform: "translateY(0)" }, off: { transform: `translateY(${LOOK.rise}px)` }, within });
|
|
8475
|
+
rise(a, b = this.last, within2 = false) {
|
|
8476
|
+
return this.vis(a, b, { on: { transform: "translateY(0)" }, off: { transform: `translateY(${LOOK.rise}px)` }, within: within2 });
|
|
8477
8477
|
}
|
|
8478
8478
|
/** 小さな所から弾んで出る。 */
|
|
8479
8479
|
pop(a, b = this.last) {
|
|
@@ -9199,6 +9199,10 @@ function ranges(list) {
|
|
|
9199
9199
|
});
|
|
9200
9200
|
}
|
|
9201
9201
|
var hex = (code) => `U+${code.toString(16).toUpperCase()}`;
|
|
9202
|
+
function within(span, char) {
|
|
9203
|
+
const code = char.codePointAt(0) ?? -1;
|
|
9204
|
+
return span.some(([from, to]) => code >= from && code <= to);
|
|
9205
|
+
}
|
|
9202
9206
|
var shapeless = (char) => /^[\s\p{Cf}\p{Cc}]$/u.test(char);
|
|
9203
9207
|
function shapedIn(span) {
|
|
9204
9208
|
for (const [from, to] of span) {
|
|
@@ -9217,12 +9221,9 @@ async function fontFaces(chars) {
|
|
|
9217
9221
|
PACKAGES.flatMap(({ family, name }) => {
|
|
9218
9222
|
const base = path$1.dirname(require_2.resolve(`@fontsource-variable/${name}/unicode.json`));
|
|
9219
9223
|
const table = JSON.parse(fs.readFileSync(path$1.join(base, "unicode.json"), "utf8"));
|
|
9220
|
-
|
|
9221
|
-
|
|
9222
|
-
const own = chars.filter((char) =>
|
|
9223
|
-
const code = char.codePointAt(0) ?? -1;
|
|
9224
|
-
return span.some(([from, to]) => code >= from && code <= to);
|
|
9225
|
-
});
|
|
9224
|
+
const spans = Object.entries(table).map(([key, list]) => ({ key, span: ranges(list) }));
|
|
9225
|
+
return spans.map(async ({ key, span }, index) => {
|
|
9226
|
+
const own = chars.filter((char) => within(span, char) && !spans.slice(index + 1).some((later) => within(later.span, char)));
|
|
9226
9227
|
if (!own.length) return "";
|
|
9227
9228
|
const filler = own.every(shapeless) ? shapedIn(span) ?? "" : "";
|
|
9228
9229
|
const file = path$1.join(base, "files", `${name}-${key.replace(/[[\]]/g, "")}-wght-normal.woff2`);
|