Skip to content

Commit

Permalink
Deployed using Blazing fast GitHub Pages deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
nin-jin committed Dec 3, 2023
1 parent a323358 commit ddc037b
Show file tree
Hide file tree
Showing 13 changed files with 239 additions and 220 deletions.
40 changes: 21 additions & 19 deletions node.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ declare namespace $ {
};
}

declare namespace $ {
function $mol_func_name(this: $, func: Function): string;
function $mol_func_name_from<Target extends Function>(target: Target, source: Function): Target;
}

declare namespace $ {
class $mol_object2 {
static $: typeof $$;
Expand All @@ -63,6 +68,7 @@ declare namespace $ {
static toString(): string;
destructor(): void;
toString(): string;
static toJSON(): string;
toJSON(): any;
}
}
Expand Down Expand Up @@ -235,11 +241,6 @@ declare namespace $ {
}
}

declare namespace $ {
function $mol_func_name(this: $, func: Function): string;
function $mol_func_name_from<Target extends Function>(target: Target, source: Function): Target;
}

declare namespace $ {
function $mol_guid(length?: number, exists?: (id: string) => boolean): string;
}
Expand Down Expand Up @@ -615,6 +616,7 @@ declare namespace $ {
type $mol_style_unit_angle = 'deg' | 'rad' | 'grad' | 'turn';
type $mol_style_unit_time = 's' | 'ms';
type $mol_style_unit_any = $mol_style_unit_length | $mol_style_unit_angle | $mol_style_unit_time;
type $mol_style_unit_str<Quanity extends $mol_style_unit_any> = `${number}${Quanity}`;
class $mol_style_unit<Literal extends $mol_style_unit_any> extends $mol_decor<number> {
readonly literal: Literal;
constructor(value: number, literal: Literal);
Expand Down Expand Up @@ -662,22 +664,22 @@ declare namespace $ {
static vary<Name extends string, Value extends string>(name: Name, defaultValue?: Value): $mol_style_func<"var", Name | (Name | Value)[]>;
static url<Href extends string>(href: Href): $mol_style_func<"url", string>;
static hsla(hue: number, saturation: number, lightness: number, alpha: number): $mol_style_func<"hsla", (number | `${number}%`)[]>;
static clamp(min: $mol_style_unit<any>, mid: $mol_style_unit<any>, max: $mol_style_unit<any>): $mol_style_func<"clamp", $mol_style_unit<any>[]>;
static clamp(min: $mol_style_unit_str<any>, mid: $mol_style_unit_str<any>, max: $mol_style_unit_str<any>): $mol_style_func<"clamp", `${number}${any}`[]>;
static rgba(red: number, green: number, blue: number, alpha: number): $mol_style_func<"rgba", number[]>;
static scale(zoom: number): $mol_style_func<"scale", number[]>;
static linear(...breakpoints: Array<number | [number, number | $mol_style_unit<'%'>]>): $mol_style_func<"linear", string[]>;
static linear(...breakpoints: Array<number | [number, number | $mol_style_unit_str<'%'>]>): $mol_style_func<"linear", string[]>;
static cubic_bezier(x1: number, y1: number, x2: number, y2: number): $mol_style_func<"cubic-bezier", number[]>;
static steps(value: number, step_position: 'jump-start' | 'jump-end' | 'jump-none' | 'jump-both' | 'start' | 'end'): $mol_style_func<"steps", (number | "end" | "start" | "jump-start" | "jump-end" | "jump-none" | "jump-both")[]>;
static blur(value?: $mol_style_unit<$mol_style_unit_length>): $mol_style_func<"blur", string | $mol_style_unit<$mol_style_unit_length>>;
static brightness(value?: number | $mol_style_unit<'%'>): $mol_style_func<"brightness", string | number | $mol_style_unit<"%">>;
static contrast(value?: number | $mol_style_unit<'%'>): $mol_style_func<"contrast", string | number | $mol_style_unit<"%">>;
static drop_shadow(color: $mol_style_properties_color, x_offset: $mol_style_unit<$mol_style_unit_length>, y_offset: $mol_style_unit<$mol_style_unit_length>, blur_radius?: $mol_style_unit<$mol_style_unit_length>): $mol_style_func<"drop-shadow", ($mol_style_unit<$mol_style_unit_length> | $mol_style_properties_color)[]>;
static grayscale(value?: number | $mol_style_unit<'%'>): $mol_style_func<"grayscale", string | number | $mol_style_unit<"%">>;
static hue_rotate(value?: 0 | $mol_style_unit<$mol_style_unit_angle>): $mol_style_func<"hue-rotate", string | 0 | $mol_style_unit<$mol_style_unit_angle>>;
static invert(value?: number | $mol_style_unit<'%'>): $mol_style_func<"invert", string | number | $mol_style_unit<"%">>;
static opacity(value?: number | $mol_style_unit<'%'>): $mol_style_func<"opacity", string | number | $mol_style_unit<"%">>;
static sepia(value?: number | $mol_style_unit<'%'>): $mol_style_func<"sepia", string | number | $mol_style_unit<"%">>;
static saturate(value?: number | $mol_style_unit<'%'>): $mol_style_func<"saturate", string | number | $mol_style_unit<"%">>;
static blur(value?: $mol_style_unit_str<$mol_style_unit_length>): $mol_style_func<"blur", string>;
static brightness(value?: number | $mol_style_unit_str<'%'>): $mol_style_func<"brightness", string | number>;
static contrast(value?: number | $mol_style_unit_str<'%'>): $mol_style_func<"contrast", string | number>;
static drop_shadow(color: $mol_style_properties_color, x_offset: $mol_style_unit_str<$mol_style_unit_length>, y_offset: $mol_style_unit_str<$mol_style_unit_length>, blur_radius?: $mol_style_unit_str<$mol_style_unit_length>): $mol_style_func<"drop-shadow", (`${number}%` | `${number}px` | `${number}mm` | `${number}cm` | `${number}Q` | `${number}in` | `${number}pc` | `${number}pt` | `${number}cap` | `${number}ch` | `${number}em` | `${number}rem` | `${number}ex` | `${number}ic` | `${number}lh` | `${number}rlh` | `${number}vh` | `${number}vw` | `${number}vi` | `${number}vb` | `${number}vmin` | `${number}vmax` | $mol_style_properties_color)[]>;
static grayscale(value?: number | $mol_style_unit_str<'%'>): $mol_style_func<"grayscale", string | number>;
static hue_rotate(value?: 0 | $mol_style_unit_str<$mol_style_unit_angle>): $mol_style_func<"hue-rotate", string | 0>;
static invert(value?: number | $mol_style_unit_str<'%'>): $mol_style_func<"invert", string | number>;
static opacity(value?: number | $mol_style_unit_str<'%'>): $mol_style_func<"opacity", string | number>;
static sepia(value?: number | $mol_style_unit_str<'%'>): $mol_style_func<"sepia", string | number>;
static saturate(value?: number | $mol_style_unit_str<'%'>): $mol_style_func<"saturate", string | number>;
}
}

Expand Down Expand Up @@ -1113,8 +1115,8 @@ declare namespace $ {

declare namespace $ {
function $mol_tree2_bin_to_bytes(tree: $mol_tree2): Uint8Array;
function $mol_tree2_bin_from_bytes(bytes: ArrayLike<number>, span: $mol_span): $mol_tree2;
function $mol_tree2_bin_from_string(str: string, span: $mol_span): $mol_tree2;
function $mol_tree2_bin_from_bytes(bytes: ArrayLike<number>, span?: $mol_span): $mol_tree2;
function $mol_tree2_bin_from_string(str: string, span?: $mol_span): $mol_tree2;
}

declare namespace $ {
Expand Down
2 changes: 1 addition & 1 deletion node.deps.json

Large diffs are not rendered by default.

73 changes: 38 additions & 35 deletions node.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion node.js.map

Large diffs are not rendered by default.

73 changes: 38 additions & 35 deletions node.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,38 @@ var $;
;
"use strict";
var $;
(function ($) {
const named = new WeakSet();
function $mol_func_name(func) {
let name = func.name;
if (name?.length > 1)
return name;
if (named.has(func))
return name;
for (let key in this) {
try {
if (this[key] !== func)
continue;
name = key;
Object.defineProperty(func, 'name', { value: name });
break;
}
catch { }
}
named.add(func);
return name;
}
$.$mol_func_name = $mol_func_name;
function $mol_func_name_from(target, source) {
Object.defineProperty(target, 'name', { value: source.name });
return target;
}
$.$mol_func_name_from = $mol_func_name_from;
})($ || ($ = {}));
//mol/func/name/name.ts
;
"use strict";
var $;
(function ($) {
class $mol_object2 {
static $ = $;
Expand Down Expand Up @@ -194,6 +226,9 @@ var $;
toString() {
return this[Symbol.toStringTag] || this.constructor.name + '()';
}
static toJSON() {
return this.$.$mol_func_name(this);
}
toJSON() {
return this.toString();
}
Expand Down Expand Up @@ -845,38 +880,6 @@ var $;
;
"use strict";
var $;
(function ($) {
const named = new WeakSet();
function $mol_func_name(func) {
let name = func.name;
if (name?.length > 1)
return name;
if (named.has(func))
return name;
for (let key in this) {
try {
if (this[key] !== func)
continue;
name = key;
Object.defineProperty(func, 'name', { value: name });
break;
}
catch { }
}
named.add(func);
return name;
}
$.$mol_func_name = $mol_func_name;
function $mol_func_name_from(target, source) {
Object.defineProperty(target, 'name', { value: source.name });
return target;
}
$.$mol_func_name_from = $mol_func_name_from;
})($ || ($ = {}));
//mol/func/name/name.ts
;
"use strict";
var $;
(function ($) {
function $mol_guid(length = 8, exists = () => false) {
for (;;) {
Expand Down Expand Up @@ -4206,13 +4209,13 @@ var $;
return Uint8Array.from(tree.kids, kid => parseInt(kid.value, 16));
}
$.$mol_tree2_bin_to_bytes = $mol_tree2_bin_to_bytes;
function $mol_tree2_bin_from_bytes(bytes, span) {
function $mol_tree2_bin_from_bytes(bytes, span = $mol_span.unknown) {
return $mol_tree2.list(Array.from(bytes, code => {
return $mol_tree2.data(code.toString(16).padStart(2, '0'), [], span);
}), span);
}
$.$mol_tree2_bin_from_bytes = $mol_tree2_bin_from_bytes;
function $mol_tree2_bin_from_string(str, span) {
function $mol_tree2_bin_from_string(str, span = $mol_span.unknown) {
return $mol_tree2_bin_from_bytes([...new TextEncoder().encode(str)], span);
}
$.$mol_tree2_bin_from_string = $mol_tree2_bin_from_string;
Expand Down Expand Up @@ -9574,7 +9577,7 @@ var $;
throw new Error('Empty token');
var prefix = found[1];
if (prefix)
handle('', prefix, [], start);
handle('', prefix, [prefix], start);
var suffix = found[2];
if (!suffix)
continue;
Expand Down
Loading

0 comments on commit ddc037b

Please sign in to comment.