@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 CHANGED
@@ -8526,8 +8526,8 @@ var Motion = class {
8526
8526
  ]);
8527
8527
  }
8528
8528
  /** 少し下から浮いて出る。 */
8529
- rise(a, b = this.last, within = false) {
8530
- return this.vis(a, b, { on: { transform: "translateY(0)" }, off: { transform: `translateY(${LOOK.rise}px)` }, within });
8529
+ rise(a, b = this.last, within2 = false) {
8530
+ return this.vis(a, b, { on: { transform: "translateY(0)" }, off: { transform: `translateY(${LOOK.rise}px)` }, within: within2 });
8531
8531
  }
8532
8532
  /** 小さな所から弾んで出る。 */
8533
8533
  pop(a, b = this.last) {
@@ -9253,6 +9253,10 @@ function ranges(list2) {
9253
9253
  });
9254
9254
  }
9255
9255
  var hex = (code) => `U+${code.toString(16).toUpperCase()}`;
9256
+ function within(span, char) {
9257
+ const code = char.codePointAt(0) ?? -1;
9258
+ return span.some(([from, to]) => code >= from && code <= to);
9259
+ }
9256
9260
  var shapeless = (char) => /^[\s\p{Cf}\p{Cc}]$/u.test(char);
9257
9261
  function shapedIn(span) {
9258
9262
  for (const [from, to] of span) {
@@ -9271,12 +9275,9 @@ async function fontFaces(chars) {
9271
9275
  PACKAGES.flatMap(({ family, name }) => {
9272
9276
  const base = path$1.dirname(require_2.resolve(`@fontsource-variable/${name}/unicode.json`));
9273
9277
  const table = JSON.parse(fs.readFileSync(path$1.join(base, "unicode.json"), "utf8"));
9274
- return Object.entries(table).map(async ([key, list2]) => {
9275
- const span = ranges(list2);
9276
- const own = chars.filter((char) => {
9277
- const code = char.codePointAt(0) ?? -1;
9278
- return span.some(([from, to]) => code >= from && code <= to);
9279
- });
9278
+ const spans = Object.entries(table).map(([key, list2]) => ({ key, span: ranges(list2) }));
9279
+ return spans.map(async ({ key, span }, index) => {
9280
+ const own = chars.filter((char) => within(span, char) && !spans.slice(index + 1).some((later) => within(later.span, char)));
9280
9281
  if (!own.length) return "";
9281
9282
  const filler = own.every(shapeless) ? shapedIn(span) ?? "" : "";
9282
9283
  const file = path$1.join(base, "files", `${name}-${key.replace(/[[\]]/g, "")}-wght-normal.woff2`);