@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/cli.js
CHANGED
|
@@ -8520,8 +8520,8 @@ var Motion = class {
|
|
|
8520
8520
|
]);
|
|
8521
8521
|
}
|
|
8522
8522
|
/** 少し下から浮いて出る。 */
|
|
8523
|
-
rise(a, b = this.last,
|
|
8524
|
-
return this.vis(a, b, { on: { transform: "translateY(0)" }, off: { transform: `translateY(${LOOK.rise}px)` }, within });
|
|
8523
|
+
rise(a, b = this.last, within2 = false) {
|
|
8524
|
+
return this.vis(a, b, { on: { transform: "translateY(0)" }, off: { transform: `translateY(${LOOK.rise}px)` }, within: within2 });
|
|
8525
8525
|
}
|
|
8526
8526
|
/** 小さな所から弾んで出る。 */
|
|
8527
8527
|
pop(a, b = this.last) {
|
|
@@ -9247,6 +9247,10 @@ function ranges(list2) {
|
|
|
9247
9247
|
});
|
|
9248
9248
|
}
|
|
9249
9249
|
var hex = (code) => `U+${code.toString(16).toUpperCase()}`;
|
|
9250
|
+
function within(span, char) {
|
|
9251
|
+
const code = char.codePointAt(0) ?? -1;
|
|
9252
|
+
return span.some(([from, to]) => code >= from && code <= to);
|
|
9253
|
+
}
|
|
9250
9254
|
var shapeless = (char) => /^[\s\p{Cf}\p{Cc}]$/u.test(char);
|
|
9251
9255
|
function shapedIn(span) {
|
|
9252
9256
|
for (const [from, to] of span) {
|
|
@@ -9265,12 +9269,9 @@ async function fontFaces(chars) {
|
|
|
9265
9269
|
PACKAGES.flatMap(({ family, name }) => {
|
|
9266
9270
|
const base = dirname(require_2.resolve(`@fontsource-variable/${name}/unicode.json`));
|
|
9267
9271
|
const table = JSON.parse(readFileSync(join$1(base, "unicode.json"), "utf8"));
|
|
9268
|
-
|
|
9269
|
-
|
|
9270
|
-
const own = chars.filter((char) =>
|
|
9271
|
-
const code = char.codePointAt(0) ?? -1;
|
|
9272
|
-
return span.some(([from, to]) => code >= from && code <= to);
|
|
9273
|
-
});
|
|
9272
|
+
const spans = Object.entries(table).map(([key, list2]) => ({ key, span: ranges(list2) }));
|
|
9273
|
+
return spans.map(async ({ key, span }, index) => {
|
|
9274
|
+
const own = chars.filter((char) => within(span, char) && !spans.slice(index + 1).some((later) => within(later.span, char)));
|
|
9274
9275
|
if (!own.length) return "";
|
|
9275
9276
|
const filler = own.every(shapeless) ? shapedIn(span) ?? "" : "";
|
|
9276
9277
|
const file = join$1(base, "files", `${name}-${key.replace(/[[\]]/g, "")}-wght-normal.woff2`);
|