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