@4bitlabs/sci0 5.0.1 → 6.1.0
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/_virtual/_rolldown/runtime.js +13 -0
- package/dist/index.d.ts +26 -26
- package/dist/index.js +12 -46
- package/dist/matchers/index.d.ts +11 -0
- package/dist/matchers/index.d.ts.map +1 -0
- package/dist/matchers/index.js +26 -0
- package/dist/matchers/index.js.map +1 -0
- package/dist/matchers/number-predicate.d.ts +6 -0
- package/dist/matchers/number-predicate.d.ts.map +1 -0
- package/dist/matchers/number-predicate.js +7 -0
- package/dist/matchers/number-predicate.js.map +1 -0
- package/dist/matchers/resource-map-predicate.d.ts +6 -0
- package/dist/matchers/resource-map-predicate.d.ts.map +1 -0
- package/dist/matchers/type-and-number-predicate.d.ts +10 -0
- package/dist/matchers/type-and-number-predicate.d.ts.map +1 -0
- package/dist/matchers/type-and-number-predicate.js +19 -0
- package/dist/matchers/type-and-number-predicate.js.map +1 -0
- package/dist/matchers/type-predicates.d.ts +17 -0
- package/dist/matchers/type-predicates.d.ts.map +1 -0
- package/dist/matchers/type-predicates.js +17 -0
- package/dist/matchers/type-predicates.js.map +1 -0
- package/dist/matchers/utils.d.ts +6 -0
- package/dist/matchers/utils.d.ts.map +1 -0
- package/dist/matchers/utils.js +6 -0
- package/dist/matchers/utils.js.map +1 -0
- package/dist/models/cel.d.ts +7 -4
- package/dist/models/cel.d.ts.map +1 -1
- package/dist/models/cursor.d.ts +6 -3
- package/dist/models/cursor.d.ts.map +1 -1
- package/dist/models/draw-codes.d.ts +4 -5
- package/dist/models/draw-codes.d.ts.map +1 -1
- package/dist/models/draw-command.d.ts +5 -2
- package/dist/models/draw-command.d.ts.map +1 -1
- package/dist/models/draw-commands.d.ts +16 -46
- package/dist/models/draw-commands.d.ts.map +1 -1
- package/dist/models/draw-mode.d.ts +21 -18
- package/dist/models/draw-mode.d.ts.map +1 -1
- package/dist/models/draw-mode.js +20 -25
- package/dist/models/draw-mode.js.map +1 -1
- package/dist/models/font-face.d.ts +7 -4
- package/dist/models/font-face.d.ts.map +1 -1
- package/dist/models/pattern-code.d.ts +4 -5
- package/dist/models/pattern-code.d.ts.map +1 -1
- package/dist/models/pic.d.ts +6 -3
- package/dist/models/pic.d.ts.map +1 -1
- package/dist/models/resource-header.d.ts +12 -9
- package/dist/models/resource-header.d.ts.map +1 -1
- package/dist/models/resource-id.d.ts +10 -5
- package/dist/models/resource-id.d.ts.map +1 -1
- package/dist/models/resource-id.js +28 -36
- package/dist/models/resource-id.js.map +1 -1
- package/dist/models/resource-map.d.ts +7 -4
- package/dist/models/resource-map.d.ts.map +1 -1
- package/dist/models/resource-type.d.ts +5 -2
- package/dist/models/resource-type.d.ts.map +1 -1
- package/dist/models/resource-types.d.ts +15 -10
- package/dist/models/resource-types.d.ts.map +1 -1
- package/dist/models/resource-types.js +17 -13
- package/dist/models/resource-types.js.map +1 -1
- package/dist/models/view.d.ts +16 -13
- package/dist/models/view.d.ts.map +1 -1
- package/dist/parsers/compression.d.ts +4 -1
- package/dist/parsers/compression.d.ts.map +1 -1
- package/dist/parsers/compression.js +36 -54
- package/dist/parsers/compression.js.map +1 -1
- package/dist/parsers/mapping.d.ts +5 -3
- package/dist/parsers/mapping.d.ts.map +1 -1
- package/dist/parsers/mapping.js +18 -23
- package/dist/parsers/mapping.js.map +1 -1
- package/dist/parsers/parse-cel.js +26 -29
- package/dist/parsers/parse-cel.js.map +1 -1
- package/dist/parsers/parse-cursor-options.d.ts +10 -7
- package/dist/parsers/parse-cursor-options.d.ts.map +1 -1
- package/dist/parsers/parse-cursor.d.ts +6 -3
- package/dist/parsers/parse-cursor.d.ts.map +1 -1
- package/dist/parsers/parse-cursor.js +34 -36
- package/dist/parsers/parse-cursor.js.map +1 -1
- package/dist/parsers/parse-font-options.d.ts +6 -3
- package/dist/parsers/parse-font-options.d.ts.map +1 -1
- package/dist/parsers/parse-font.d.ts +6 -3
- package/dist/parsers/parse-font.d.ts.map +1 -1
- package/dist/parsers/parse-font.js +27 -30
- package/dist/parsers/parse-font.js.map +1 -1
- package/dist/parsers/parse-pic.d.ts +8 -5
- package/dist/parsers/parse-pic.d.ts.map +1 -1
- package/dist/parsers/parse-pic.js +22 -28
- package/dist/parsers/parse-pic.js.map +1 -1
- package/dist/parsers/parse-view.d.ts +5 -2
- package/dist/parsers/parse-view.d.ts.map +1 -1
- package/dist/parsers/parse-view.js +45 -41
- package/dist/parsers/parse-view.js.map +1 -1
- package/dist/parsers/pic/handlers.js +272 -208
- package/dist/parsers/pic/handlers.js.map +1 -1
- package/dist/parsers/pic/op-codes.js +37 -45
- package/dist/parsers/pic/op-codes.js.map +1 -1
- package/dist/parsers/pic/pic-state.js +16 -8
- package/dist/parsers/pic/pic-state.js.map +1 -1
- package/dist/parsers/pic/points.js +19 -45
- package/dist/parsers/pic/points.js.map +1 -1
- package/dist/parsers/resource-header.d.ts +6 -3
- package/dist/parsers/resource-header.d.ts.map +1 -1
- package/dist/parsers/resource-header.js +15 -20
- package/dist/parsers/resource-header.js.map +1 -1
- package/dist/utils/exhaustive.js +5 -4
- package/dist/utils/exhaustive.js.map +1 -1
- package/dist/utils/repeat.js +5 -7
- package/dist/utils/repeat.js.map +1 -1
- package/package.json +21 -14
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/models/cel.js +0 -3
- package/dist/models/cel.js.map +0 -1
- package/dist/models/cursor.js +0 -3
- package/dist/models/cursor.js.map +0 -1
- package/dist/models/draw-codes.js +0 -3
- package/dist/models/draw-codes.js.map +0 -1
- package/dist/models/draw-command.js +0 -3
- package/dist/models/draw-command.js.map +0 -1
- package/dist/models/draw-commands.js +0 -3
- package/dist/models/draw-commands.js.map +0 -1
- package/dist/models/font-face.js +0 -3
- package/dist/models/font-face.js.map +0 -1
- package/dist/models/pattern-code.js +0 -3
- package/dist/models/pattern-code.js.map +0 -1
- package/dist/models/pic.js +0 -3
- package/dist/models/pic.js.map +0 -1
- package/dist/models/resource-header.js +0 -3
- package/dist/models/resource-header.js.map +0 -1
- package/dist/models/resource-map.js +0 -3
- package/dist/models/resource-map.js.map +0 -1
- package/dist/models/resource-type.js +0 -3
- package/dist/models/resource-type.js.map +0 -1
- package/dist/models/view.js +0 -3
- package/dist/models/view.js.map +0 -1
- package/dist/parsers/parse-cel.d.ts +0 -3
- package/dist/parsers/parse-cel.d.ts.map +0 -1
- package/dist/parsers/parse-cursor-options.js +0 -3
- package/dist/parsers/parse-cursor-options.js.map +0 -1
- package/dist/parsers/parse-font-options.js +0 -3
- package/dist/parsers/parse-font-options.js.map +0 -1
- package/dist/parsers/pic/handlers.d.ts +0 -8
- package/dist/parsers/pic/handlers.d.ts.map +0 -1
- package/dist/parsers/pic/op-codes.d.ts +0 -32
- package/dist/parsers/pic/op-codes.d.ts.map +0 -1
- package/dist/parsers/pic/pic-state.d.ts +0 -10
- package/dist/parsers/pic/pic-state.d.ts.map +0 -1
- package/dist/parsers/pic/points.d.ts +0 -6
- package/dist/parsers/pic/points.d.ts.map +0 -1
- package/dist/utils/exhaustive.d.ts +0 -2
- package/dist/utils/exhaustive.d.ts.map +0 -1
- package/dist/utils/repeat.d.ts +0 -2
- package/dist/utils/repeat.d.ts.map +0 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __exportAll = (all, no_symbols) => {
|
|
4
|
+
let target = {};
|
|
5
|
+
for (var name in all) __defProp(target, name, {
|
|
6
|
+
get: all[name],
|
|
7
|
+
enumerable: true
|
|
8
|
+
});
|
|
9
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
10
|
+
return target;
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { __exportAll };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
import { ResourceHeader } from "./models/resource-header.js";
|
|
2
|
+
import { ResourceMap } from "./models/resource-map.js";
|
|
3
|
+
import { resource_types_d_exports } from "./models/resource-types.js";
|
|
4
|
+
import { ResourceType } from "./models/resource-type.js";
|
|
5
|
+
import { Cel } from "./models/cel.js";
|
|
6
|
+
import { DrawMode } from "./models/draw-mode.js";
|
|
7
|
+
import { DrawCodes } from "./models/draw-codes.js";
|
|
8
|
+
import { PatternCode } from "./models/pattern-code.js";
|
|
9
|
+
import { draw_commands_d_exports } from "./models/draw-commands.js";
|
|
10
|
+
import { DrawCommand } from "./models/draw-command.js";
|
|
11
|
+
import { resource_id_d_exports } from "./models/resource-id.js";
|
|
12
|
+
import { index_d_exports } from "./matchers/index.js";
|
|
13
|
+
import { parseAllMappings } from "./parsers/mapping.js";
|
|
14
|
+
import { parseHeaderFrom, parseHeaderWithPayload } from "./parsers/resource-header.js";
|
|
15
|
+
import { decompress } from "./parsers/compression.js";
|
|
16
|
+
import { ParseCursorOptions } from "./parsers/parse-cursor-options.js";
|
|
17
|
+
import { ParseFontOptions } from "./parsers/parse-font-options.js";
|
|
18
|
+
import { Cursor } from "./models/cursor.js";
|
|
19
|
+
import { parseCursor } from "./parsers/parse-cursor.js";
|
|
20
|
+
import { FontFace } from "./models/font-face.js";
|
|
21
|
+
import { parseFont } from "./parsers/parse-font.js";
|
|
22
|
+
import { Loop, View } from "./models/view.js";
|
|
23
|
+
import { parseView } from "./parsers/parse-view.js";
|
|
24
|
+
import { Pic } from "./models/pic.js";
|
|
25
|
+
import { parsePic } from "./parsers/parse-pic.js";
|
|
26
|
+
export { type Cel, type Cursor, type DrawCodes, type DrawCommand, type draw_commands_d_exports as DrawCommands, DrawMode, type FontFace, type Loop, type ParseCursorOptions, type ParseFontOptions, type PatternCode, type Pic, resource_id_d_exports as Resource, type ResourceHeader, type ResourceMap, index_d_exports as ResourceMatchers, type ResourceType, resource_types_d_exports as ResourceTypes, type View, decompress, parseAllMappings, parseCursor, parseFont, parseHeaderFrom, parseHeaderWithPayload, parsePic, parseView };
|
package/dist/index.js
CHANGED
|
@@ -1,46 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.parsePic = exports.parseView = exports.parseFont = exports.parseCursor = exports.decompress = exports.parseHeaderWithPayload = exports.parseHeaderFrom = exports.parseAllMappings = exports.ResourceTypes = exports.Resource = exports.DrawMode = void 0;
|
|
27
|
-
var draw_mode_1 = require("./models/draw-mode");
|
|
28
|
-
Object.defineProperty(exports, "DrawMode", { enumerable: true, get: function () { return draw_mode_1.DrawMode; } });
|
|
29
|
-
exports.Resource = __importStar(require("./models/resource-id"));
|
|
30
|
-
exports.ResourceTypes = __importStar(require("./models/resource-types"));
|
|
31
|
-
var mapping_1 = require("./parsers/mapping");
|
|
32
|
-
Object.defineProperty(exports, "parseAllMappings", { enumerable: true, get: function () { return mapping_1.parseAllMappings; } });
|
|
33
|
-
var resource_header_1 = require("./parsers/resource-header");
|
|
34
|
-
Object.defineProperty(exports, "parseHeaderFrom", { enumerable: true, get: function () { return resource_header_1.parseHeaderFrom; } });
|
|
35
|
-
Object.defineProperty(exports, "parseHeaderWithPayload", { enumerable: true, get: function () { return resource_header_1.parseHeaderWithPayload; } });
|
|
36
|
-
var compression_1 = require("./parsers/compression");
|
|
37
|
-
Object.defineProperty(exports, "decompress", { enumerable: true, get: function () { return compression_1.decompress; } });
|
|
38
|
-
var parse_cursor_1 = require("./parsers/parse-cursor");
|
|
39
|
-
Object.defineProperty(exports, "parseCursor", { enumerable: true, get: function () { return parse_cursor_1.parseCursor; } });
|
|
40
|
-
var parse_font_1 = require("./parsers/parse-font");
|
|
41
|
-
Object.defineProperty(exports, "parseFont", { enumerable: true, get: function () { return parse_font_1.parseFont; } });
|
|
42
|
-
var parse_view_1 = require("./parsers/parse-view");
|
|
43
|
-
Object.defineProperty(exports, "parseView", { enumerable: true, get: function () { return parse_view_1.parseView; } });
|
|
44
|
-
var parse_pic_1 = require("./parsers/parse-pic");
|
|
45
|
-
Object.defineProperty(exports, "parsePic", { enumerable: true, get: function () { return parse_pic_1.parsePic; } });
|
|
46
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import { DrawMode } from "./models/draw-mode.js";
|
|
2
|
+
import { resource_types_exports } from "./models/resource-types.js";
|
|
3
|
+
import { resource_id_exports } from "./models/resource-id.js";
|
|
4
|
+
import { matchers_exports } from "./matchers/index.js";
|
|
5
|
+
import { parseAllMappings } from "./parsers/mapping.js";
|
|
6
|
+
import { parseHeaderFrom, parseHeaderWithPayload } from "./parsers/resource-header.js";
|
|
7
|
+
import { decompress } from "./parsers/compression.js";
|
|
8
|
+
import { parseCursor } from "./parsers/parse-cursor.js";
|
|
9
|
+
import { parseFont } from "./parsers/parse-font.js";
|
|
10
|
+
import { parseView } from "./parsers/parse-view.js";
|
|
11
|
+
import { parsePic } from "./parsers/parse-pic.js";
|
|
12
|
+
export { DrawMode, resource_id_exports as Resource, matchers_exports as ResourceMatchers, resource_types_exports as ResourceTypes, decompress, parseAllMappings, parseCursor, parseFont, parseHeaderFrom, parseHeaderWithPayload, parsePic, parseView };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ResourceMapPredicate } from "./resource-map-predicate.js";
|
|
2
|
+
import { matchResourceNumber } from "./number-predicate.js";
|
|
3
|
+
import { isCursorPredicate, isFontPredicate, isMemoryPredicate, isPatchPredicate, isPicPredicate, isScriptPredicate, isSoundPredicate, isTextPredicate, isViewPredicate, isVocabPredicate, matchResourceType } from "./type-predicates.js";
|
|
4
|
+
import { joinResourcePredicates } from "./utils.js";
|
|
5
|
+
import { match } from "./type-and-number-predicate.js";
|
|
6
|
+
declare namespace index_d_exports {
|
|
7
|
+
export { ResourceMapPredicate, isCursorPredicate, isFontPredicate, isMemoryPredicate, isPatchPredicate, isPicPredicate, isScriptPredicate, isSoundPredicate, isTextPredicate, isViewPredicate, isVocabPredicate, joinResourcePredicates, match, matchResourceNumber, matchResourceType };
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { type ResourceMapPredicate, index_d_exports, isCursorPredicate, isFontPredicate, isMemoryPredicate, isPatchPredicate, isPicPredicate, isScriptPredicate, isSoundPredicate, isTextPredicate, isViewPredicate, isVocabPredicate, joinResourcePredicates, match, matchResourceNumber, matchResourceType };
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/matchers/index.ts"],"mappings":""}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { matchResourceNumber } from "./number-predicate.js";
|
|
3
|
+
import { isCursorPredicate, isFontPredicate, isMemoryPredicate, isPatchPredicate, isPicPredicate, isScriptPredicate, isSoundPredicate, isTextPredicate, isViewPredicate, isVocabPredicate, matchResourceType } from "./type-predicates.js";
|
|
4
|
+
import { joinResourcePredicates } from "./utils.js";
|
|
5
|
+
import { match } from "./type-and-number-predicate.js";
|
|
6
|
+
//#region src/matchers/index.ts
|
|
7
|
+
var matchers_exports = /* @__PURE__ */ __exportAll({
|
|
8
|
+
isCursorPredicate: () => isCursorPredicate,
|
|
9
|
+
isFontPredicate: () => isFontPredicate,
|
|
10
|
+
isMemoryPredicate: () => isMemoryPredicate,
|
|
11
|
+
isPatchPredicate: () => isPatchPredicate,
|
|
12
|
+
isPicPredicate: () => isPicPredicate,
|
|
13
|
+
isScriptPredicate: () => isScriptPredicate,
|
|
14
|
+
isSoundPredicate: () => isSoundPredicate,
|
|
15
|
+
isTextPredicate: () => isTextPredicate,
|
|
16
|
+
isViewPredicate: () => isViewPredicate,
|
|
17
|
+
isVocabPredicate: () => isVocabPredicate,
|
|
18
|
+
joinResourcePredicates: () => joinResourcePredicates,
|
|
19
|
+
match: () => match,
|
|
20
|
+
matchResourceNumber: () => matchResourceNumber,
|
|
21
|
+
matchResourceType: () => matchResourceType
|
|
22
|
+
});
|
|
23
|
+
//#endregion
|
|
24
|
+
export { isCursorPredicate, isFontPredicate, isMemoryPredicate, isPatchPredicate, isPicPredicate, isScriptPredicate, isSoundPredicate, isTextPredicate, isViewPredicate, isVocabPredicate, joinResourcePredicates, match, matchResourceNumber, matchResourceType, matchers_exports };
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/matchers/index.ts"],"sourcesContent":["export type { ResourceMapPredicate } from './resource-map-predicate.js';\n\nexport { matchResourceNumber } from './number-predicate.js';\nexport { matchResourceType } from './type-predicates.js';\nexport { joinResourcePredicates } from './utils.js';\n\nexport {\n isViewPredicate,\n isPicPredicate,\n isScriptPredicate,\n isTextPredicate,\n isSoundPredicate,\n isMemoryPredicate,\n isVocabPredicate,\n isFontPredicate,\n isCursorPredicate,\n isPatchPredicate,\n} from './type-predicates.js';\n\nexport { match } from './type-and-number-predicate.js';\n"],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ResourceMapPredicate } from "./resource-map-predicate.js";
|
|
2
|
+
//#region src/matchers/number-predicate.d.ts
|
|
3
|
+
declare const matchResourceNumber: (...targets: number[]) => ResourceMapPredicate;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { matchResourceNumber };
|
|
6
|
+
//# sourceMappingURL=number-predicate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"number-predicate.d.ts","names":[],"sources":["../../src/matchers/number-predicate.ts"],"mappings":";;cAIa,yBACP,sBAAoB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { getNumber } from "../models/resource-id.js";
|
|
2
|
+
//#region src/matchers/number-predicate.ts
|
|
3
|
+
const matchResourceNumber = (...targets) => (it) => [...targets].some((target) => getNumber(it.id) === target);
|
|
4
|
+
//#endregion
|
|
5
|
+
export { matchResourceNumber };
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=number-predicate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"number-predicate.js","names":[],"sources":["../../src/matchers/number-predicate.ts"],"sourcesContent":["import type { ResourceMap } from '../models/resource-map.js';\nimport { getNumber } from '../models/resource-id.js';\nimport type { ResourceMapPredicate } from './resource-map-predicate.js';\n\nexport const matchResourceNumber =\n (...targets: number[]): ResourceMapPredicate =>\n (it: ResourceMap) =>\n [...targets].some((target) => getNumber(it.id) === target);\n"],"mappings":";;AAIA,MAAa,uBACV,GAAG,aACH,OACC,CAAC,GAAG,OAAO,CAAC,CAAC,MAAM,WAAW,UAAU,GAAG,EAAE,MAAM,MAAM"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ResourceMap } from "../models/resource-map.js";
|
|
2
|
+
//#region src/matchers/resource-map-predicate.d.ts
|
|
3
|
+
type ResourceMapPredicate = (it: ResourceMap) => boolean;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { ResourceMapPredicate };
|
|
6
|
+
//# sourceMappingURL=resource-map-predicate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource-map-predicate.d.ts","names":[],"sources":["../../src/matchers/resource-map-predicate.ts"],"mappings":";;KAEY,wBAAwB,IAAI"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ResourceType } from "../models/resource-type.js";
|
|
2
|
+
import { ResourceMapPredicate } from "./resource-map-predicate.js";
|
|
3
|
+
//#region src/matchers/type-and-number-predicate.d.ts
|
|
4
|
+
declare const match: (criteria?: {
|
|
5
|
+
number?: number | number[];
|
|
6
|
+
type?: ResourceType | ResourceType[];
|
|
7
|
+
}) => ResourceMapPredicate;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { match };
|
|
10
|
+
//# sourceMappingURL=type-and-number-predicate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-and-number-predicate.d.ts","names":[],"sources":["../../src/matchers/type-and-number-predicate.ts"],"mappings":";;;cAKa,QACX;EACE;EACA,OAAO,eAAe;MAEvB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { matchResourceNumber } from "./number-predicate.js";
|
|
2
|
+
import { joinResourcePredicates } from "./utils.js";
|
|
3
|
+
//#region src/matchers/type-and-number-predicate.ts
|
|
4
|
+
const match = (criteria = {}) => {
|
|
5
|
+
const predicates = [];
|
|
6
|
+
if (criteria.number !== void 0) {
|
|
7
|
+
const set = Array.isArray(criteria.number) ? criteria.number : [criteria.number];
|
|
8
|
+
predicates.push(matchResourceNumber(...set));
|
|
9
|
+
}
|
|
10
|
+
if (criteria.type !== void 0) {
|
|
11
|
+
const set = Array.isArray(criteria.type) ? criteria.type : [criteria.type];
|
|
12
|
+
predicates.push(matchResourceNumber(...set));
|
|
13
|
+
}
|
|
14
|
+
return joinResourcePredicates(...predicates);
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { match };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=type-and-number-predicate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-and-number-predicate.js","names":[],"sources":["../../src/matchers/type-and-number-predicate.ts"],"sourcesContent":["import type { ResourceType } from '../models/resource-type.js';\nimport type { ResourceMapPredicate } from './resource-map-predicate.js';\nimport { joinResourcePredicates } from './utils.js';\nimport { matchResourceNumber } from './number-predicate.js';\n\nexport const match = (\n criteria: {\n number?: number | number[];\n type?: ResourceType | ResourceType[];\n } = {},\n): ResourceMapPredicate => {\n const predicates = [];\n if (criteria.number !== undefined) {\n const set = Array.isArray(criteria.number)\n ? criteria.number\n : [criteria.number];\n predicates.push(matchResourceNumber(...set));\n }\n\n if (criteria.type !== undefined) {\n const set = Array.isArray(criteria.type) ? criteria.type : [criteria.type];\n predicates.push(matchResourceNumber(...set));\n }\n\n return joinResourcePredicates(...predicates);\n};\n"],"mappings":";;;AAKA,MAAa,SACX,WAGI,CAAC,MACoB;CACzB,MAAM,aAAa,CAAC;CACpB,IAAI,SAAS,WAAW,KAAA,GAAW;EACjC,MAAM,MAAM,MAAM,QAAQ,SAAS,MAAM,IACrC,SAAS,SACT,CAAC,SAAS,MAAM;EACpB,WAAW,KAAK,oBAAoB,GAAG,GAAG,CAAC;CAC7C;CAEA,IAAI,SAAS,SAAS,KAAA,GAAW;EAC/B,MAAM,MAAM,MAAM,QAAQ,SAAS,IAAI,IAAI,SAAS,OAAO,CAAC,SAAS,IAAI;EACzE,WAAW,KAAK,oBAAoB,GAAG,GAAG,CAAC;CAC7C;CAEA,OAAO,uBAAuB,GAAG,UAAU;AAC7C"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ResourceType } from "../models/resource-type.js";
|
|
2
|
+
import { ResourceMapPredicate } from "./resource-map-predicate.js";
|
|
3
|
+
//#region src/matchers/type-predicates.d.ts
|
|
4
|
+
declare const matchResourceType: (...targets: ResourceType[]) => ResourceMapPredicate;
|
|
5
|
+
declare const isViewPredicate: ResourceMapPredicate;
|
|
6
|
+
declare const isPicPredicate: ResourceMapPredicate;
|
|
7
|
+
declare const isScriptPredicate: ResourceMapPredicate;
|
|
8
|
+
declare const isTextPredicate: ResourceMapPredicate;
|
|
9
|
+
declare const isSoundPredicate: ResourceMapPredicate;
|
|
10
|
+
declare const isMemoryPredicate: ResourceMapPredicate;
|
|
11
|
+
declare const isVocabPredicate: ResourceMapPredicate;
|
|
12
|
+
declare const isFontPredicate: ResourceMapPredicate;
|
|
13
|
+
declare const isCursorPredicate: ResourceMapPredicate;
|
|
14
|
+
declare const isPatchPredicate: ResourceMapPredicate;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { isCursorPredicate, isFontPredicate, isMemoryPredicate, isPatchPredicate, isPicPredicate, isScriptPredicate, isSoundPredicate, isTextPredicate, isViewPredicate, isVocabPredicate, matchResourceType };
|
|
17
|
+
//# sourceMappingURL=type-predicates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-predicates.d.ts","names":[],"sources":["../../src/matchers/type-predicates.ts"],"mappings":";;;cAiBa,uBACP,SAAS,mBAAiB;cAInB,iBAAiB;cAGjB,gBAAgB;cAEhB,mBAAmB;cAGnB,iBAAiB;cAGjB,kBAAkB;cAGlB,mBAAmB;cAGnB,kBAAkB;cAGlB,iBAAiB;cAGjB,mBAAmB;cAGnB,kBAAkB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { getType } from "../models/resource-id.js";
|
|
2
|
+
//#region src/matchers/type-predicates.ts
|
|
3
|
+
const matchResourceType = (...targets) => (it) => [...targets].some((target) => getType(it.id) === target);
|
|
4
|
+
const isViewPredicate = matchResourceType(0);
|
|
5
|
+
const isPicPredicate = matchResourceType(1);
|
|
6
|
+
const isScriptPredicate = matchResourceType(2);
|
|
7
|
+
const isTextPredicate = matchResourceType(3);
|
|
8
|
+
const isSoundPredicate = matchResourceType(4);
|
|
9
|
+
const isMemoryPredicate = matchResourceType(5);
|
|
10
|
+
const isVocabPredicate = matchResourceType(6);
|
|
11
|
+
const isFontPredicate = matchResourceType(7);
|
|
12
|
+
const isCursorPredicate = matchResourceType(8);
|
|
13
|
+
const isPatchPredicate = matchResourceType(9);
|
|
14
|
+
//#endregion
|
|
15
|
+
export { isCursorPredicate, isFontPredicate, isMemoryPredicate, isPatchPredicate, isPicPredicate, isScriptPredicate, isSoundPredicate, isTextPredicate, isViewPredicate, isVocabPredicate, matchResourceType };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=type-predicates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-predicates.js","names":[],"sources":["../../src/matchers/type-predicates.ts"],"sourcesContent":["import type { ResourceMap } from '../models/resource-map.js';\nimport { getType } from '../models/resource-id.js';\nimport {\n CURSOR_TYPE,\n FONT_TYPE,\n MEMORY_TYPE,\n PATCH_TYPE,\n PIC_TYPE,\n SCRIPT_TYPE,\n SOUND_TYPE,\n TEXT_TYPE,\n VIEW_TYPE,\n VOCAB_TYPE,\n} from '../models/resource-types.js';\nimport type { ResourceType } from '../models/resource-type.js';\nimport type { ResourceMapPredicate } from './resource-map-predicate.js';\n\nexport const matchResourceType =\n (...targets: ResourceType[]): ResourceMapPredicate =>\n (it: ResourceMap) =>\n [...targets].some((target) => getType(it.id) === target);\n\nexport const isViewPredicate: ResourceMapPredicate =\n matchResourceType(VIEW_TYPE);\n\nexport const isPicPredicate: ResourceMapPredicate = matchResourceType(PIC_TYPE);\n\nexport const isScriptPredicate: ResourceMapPredicate =\n matchResourceType(SCRIPT_TYPE);\n\nexport const isTextPredicate: ResourceMapPredicate =\n matchResourceType(TEXT_TYPE);\n\nexport const isSoundPredicate: ResourceMapPredicate =\n matchResourceType(SOUND_TYPE);\n\nexport const isMemoryPredicate: ResourceMapPredicate =\n matchResourceType(MEMORY_TYPE);\n\nexport const isVocabPredicate: ResourceMapPredicate =\n matchResourceType(VOCAB_TYPE);\n\nexport const isFontPredicate: ResourceMapPredicate =\n matchResourceType(FONT_TYPE);\n\nexport const isCursorPredicate: ResourceMapPredicate =\n matchResourceType(CURSOR_TYPE);\n\nexport const isPatchPredicate: ResourceMapPredicate =\n matchResourceType(PATCH_TYPE);\n"],"mappings":";;AAiBA,MAAa,qBACV,GAAG,aACH,OACC,CAAC,GAAG,OAAO,CAAC,CAAC,MAAM,WAAW,QAAQ,GAAG,EAAE,MAAM,MAAM;AAE3D,MAAa,kBACX,kBAAA,CAA2B;AAE7B,MAAa,iBAAuC,kBAAA,CAA0B;AAE9E,MAAa,oBACX,kBAAA,CAA6B;AAE/B,MAAa,kBACX,kBAAA,CAA2B;AAE7B,MAAa,mBACX,kBAAA,CAA4B;AAE9B,MAAa,oBACX,kBAAA,CAA6B;AAE/B,MAAa,mBACX,kBAAA,CAA4B;AAE9B,MAAa,kBACX,kBAAA,CAA2B;AAE7B,MAAa,oBACX,kBAAA,CAA6B;AAE/B,MAAa,mBACX,kBAAA,CAA4B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ResourceMapPredicate } from "./resource-map-predicate.js";
|
|
2
|
+
//#region src/matchers/utils.d.ts
|
|
3
|
+
declare const joinResourcePredicates: (...predicates: ResourceMapPredicate[]) => ResourceMapPredicate;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { joinResourcePredicates };
|
|
6
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","names":[],"sources":["../../src/matchers/utils.ts"],"mappings":";;cAGa,4BACP,YAAY,2BAAyB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","names":[],"sources":["../../src/matchers/utils.ts"],"sourcesContent":["import type { ResourceMapPredicate } from './resource-map-predicate.js';\nimport type { ResourceMap } from '../models/resource-map.js';\n\nexport const joinResourcePredicates =\n (...predicates: ResourceMapPredicate[]): ResourceMapPredicate =>\n (it: ResourceMap) =>\n [...predicates].every((fn) => fn(it));\n"],"mappings":";AAGA,MAAa,0BACV,GAAG,gBACH,OACC,CAAC,GAAG,UAAU,CAAC,CAAC,OAAO,OAAO,GAAG,EAAE,CAAC"}
|
package/dist/models/cel.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { IndexedPixelData } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { IndexedPixelData } from "@4bitlabs/image";
|
|
2
|
+
//#region src/models/cel.d.ts
|
|
3
|
+
interface Cel extends IndexedPixelData {
|
|
4
|
+
dx: number;
|
|
5
|
+
dy: number;
|
|
5
6
|
}
|
|
7
|
+
//#endregion
|
|
8
|
+
export { Cel };
|
|
6
9
|
//# sourceMappingURL=cel.d.ts.map
|
package/dist/models/cel.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cel.d.ts","
|
|
1
|
+
{"version":3,"file":"cel.d.ts","names":[],"sources":["../../src/models/cel.ts"],"mappings":";;UAEiB,YAAY;EAC3B;EACA"}
|
package/dist/models/cursor.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { IndexedPixelData } from "@4bitlabs/image";
|
|
2
|
+
//#region src/models/cursor.d.ts
|
|
3
|
+
interface Cursor extends IndexedPixelData {
|
|
4
|
+
readonly hotspot: readonly [number, number];
|
|
4
5
|
}
|
|
6
|
+
//#endregion
|
|
7
|
+
export { Cursor };
|
|
5
8
|
//# sourceMappingURL=cursor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cursor.d.ts","
|
|
1
|
+
{"version":3,"file":"cursor.d.ts","names":[],"sources":["../../src/models/cursor.ts"],"mappings":";;UAEiB,eAAe;WACrB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
];
|
|
1
|
+
//#region src/models/draw-codes.d.ts
|
|
2
|
+
type DrawCodes = readonly [visual: number, priority: number, control: number];
|
|
3
|
+
//#endregion
|
|
4
|
+
export { DrawCodes };
|
|
6
5
|
//# sourceMappingURL=draw-codes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"draw-codes.d.ts","
|
|
1
|
+
{"version":3,"file":"draw-codes.d.ts","names":[],"sources":["../../src/models/draw-codes.ts"],"mappings":";KAAY,sBACV,gBACA,kBACA"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { BrushCommand, EmbeddedCelCommand, FillCommand, PolylineCommand, SetPaletteCommand, UpdatePaletteCommand } from "./draw-commands.js";
|
|
2
|
+
//#region src/models/draw-command.d.ts
|
|
3
|
+
type DrawCommand = BrushCommand | FillCommand | PolylineCommand | SetPaletteCommand | UpdatePaletteCommand | EmbeddedCelCommand;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { DrawCommand };
|
|
3
6
|
//# sourceMappingURL=draw-command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"draw-command.d.ts","
|
|
1
|
+
{"version":3,"file":"draw-command.d.ts","names":[],"sources":["../../src/models/draw-command.ts"],"mappings":";;KASY,cACR,eACA,cACA,kBACA,oBACA,uBACA"}
|
|
@@ -1,47 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
];
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
drawCodes: DrawCodes,
|
|
18
|
-
...patternCode: PatternCode,
|
|
19
|
-
textureCode: number
|
|
20
|
-
],
|
|
21
|
-
Vec2
|
|
22
|
-
];
|
|
23
|
-
export type FillCommand = [
|
|
24
|
-
'FILL',
|
|
25
|
-
[
|
|
26
|
-
drawMode: DrawMode,
|
|
27
|
-
drawCodes: DrawCodes
|
|
28
|
-
],
|
|
29
|
-
Vec2
|
|
30
|
-
];
|
|
31
|
-
export type PolylineCommand = [
|
|
32
|
-
'PLINE',
|
|
33
|
-
[
|
|
34
|
-
drawMode: DrawMode,
|
|
35
|
-
drawCodes: DrawCodes
|
|
36
|
-
],
|
|
37
|
-
...Vec2[]
|
|
38
|
-
];
|
|
39
|
-
export type EmbeddedCelCommand = [
|
|
40
|
-
'CEL',
|
|
41
|
-
[
|
|
42
|
-
drawMode: DrawMode
|
|
43
|
-
],
|
|
44
|
-
pos: Vec2,
|
|
45
|
-
cel: Cel
|
|
46
|
-
];
|
|
1
|
+
import { Cel } from "./cel.js";
|
|
2
|
+
import { DrawMode } from "./draw-mode.js";
|
|
3
|
+
import { DrawCodes } from "./draw-codes.js";
|
|
4
|
+
import { PatternCode } from "./pattern-code.js";
|
|
5
|
+
import { Vec2 } from "@4bitlabs/vec2";
|
|
6
|
+
declare namespace draw_commands_d_exports {
|
|
7
|
+
export { BrushCommand, EmbeddedCelCommand, FillCommand, PolylineCommand, SetPaletteCommand, UpdatePaletteCommand };
|
|
8
|
+
}
|
|
9
|
+
type SetPaletteCommand = ["SET_PALETTE", [pal: number], ...number[]];
|
|
10
|
+
type UpdatePaletteCommand = ["UPDATE_PALETTE", [], ...[pal: number, idx: number, color: number][]];
|
|
11
|
+
type BrushCommand = ["BRUSH", [drawMode: DrawMode, drawCodes: DrawCodes, ...patternCode: PatternCode, textureCode: number], Vec2];
|
|
12
|
+
type FillCommand = ["FILL", [drawMode: DrawMode, drawCodes: DrawCodes], Vec2];
|
|
13
|
+
type PolylineCommand = ["PLINE", [drawMode: DrawMode, drawCodes: DrawCodes], ...Vec2[]];
|
|
14
|
+
type EmbeddedCelCommand = ["CEL", [drawMode: DrawMode], pos: Vec2, cel: Cel];
|
|
15
|
+
//#endregion
|
|
16
|
+
export { BrushCommand, EmbeddedCelCommand, FillCommand, PolylineCommand, SetPaletteCommand, UpdatePaletteCommand, draw_commands_d_exports };
|
|
47
17
|
//# sourceMappingURL=draw-commands.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"draw-commands.d.ts","
|
|
1
|
+
{"version":3,"file":"draw-commands.d.ts","names":[],"sources":["../../src/models/draw-commands.ts"],"mappings":";;;;;;;;KAMY,qCAAqC;KAErC,kDAGN,aAAa,aAAa;KAGpB,0BAGR,UAAU,UACV,WAAW,cACR,aAAa,aAChB,sBAEF;KAGU,wBAET,UAAU,UAAU,WAAW,YAChC;KAGU,6BAET,UAAU,UAAU,WAAW,eAC7B;KAGO,8BAET,UAAU,WACX,KAAK,MACL,KAAK"}
|
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
//#region src/models/draw-mode.d.ts
|
|
2
|
+
declare enum DrawMode {
|
|
3
|
+
Visual = 1,
|
|
4
|
+
Priority = 2,
|
|
5
|
+
Control = 4,
|
|
6
|
+
/** @hidden */
|
|
7
|
+
___ = 0,
|
|
8
|
+
/** @hidden */
|
|
9
|
+
VP_ = 3,
|
|
10
|
+
/** @hidden */
|
|
11
|
+
V_C = 5,
|
|
12
|
+
/** @hidden */
|
|
13
|
+
_CP = 6,
|
|
14
|
+
/** @hidden */
|
|
15
|
+
VPC = 7
|
|
15
16
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
declare namespace DrawMode {
|
|
18
|
+
const isVisualMode: (mode: DrawMode) => boolean;
|
|
19
|
+
const isPriorityMode: (mode: DrawMode) => boolean;
|
|
20
|
+
const isControlMode: (mode: DrawMode) => boolean;
|
|
20
21
|
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { DrawMode };
|
|
21
24
|
//# sourceMappingURL=draw-mode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"draw-mode.d.ts","
|
|
1
|
+
{"version":3,"file":"draw-mode.d.ts","names":[],"sources":["../../src/models/draw-mode.ts"],"mappings":";aAAY;EACV;EACA;EACA;;EAGA;;EAEA;;EAEA;;EAEA;;EAEA;;kBAIe;QACF,eAAgB,MAAM;QAGtB,iBAAkB,MAAM;QAGxB,gBAAiB,MAAM"}
|
package/dist/models/draw-mode.js
CHANGED
|
@@ -1,26 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
(function (DrawMode) {
|
|
22
|
-
DrawMode.isVisualMode = (mode) => (mode & DrawMode.Visual) === DrawMode.Visual;
|
|
23
|
-
DrawMode.isPriorityMode = (mode) => (mode & DrawMode.Priority) === DrawMode.Priority;
|
|
24
|
-
DrawMode.isControlMode = (mode) => (mode & DrawMode.Control) === DrawMode.Control;
|
|
25
|
-
})(DrawMode || (exports.DrawMode = DrawMode = {}));
|
|
1
|
+
//#region src/models/draw-mode.ts
|
|
2
|
+
let DrawMode = /* @__PURE__ */ function(DrawMode) {
|
|
3
|
+
DrawMode[DrawMode["Visual"] = 1] = "Visual";
|
|
4
|
+
DrawMode[DrawMode["Priority"] = 2] = "Priority";
|
|
5
|
+
DrawMode[DrawMode["Control"] = 4] = "Control";
|
|
6
|
+
DrawMode[DrawMode["___"] = 0] = "___";
|
|
7
|
+
DrawMode[DrawMode["VP_"] = 3] = "VP_";
|
|
8
|
+
DrawMode[DrawMode["V_C"] = 5] = "V_C";
|
|
9
|
+
DrawMode[DrawMode["_CP"] = 6] = "_CP";
|
|
10
|
+
DrawMode[DrawMode["VPC"] = 7] = "VPC";
|
|
11
|
+
return DrawMode;
|
|
12
|
+
}({});
|
|
13
|
+
(function(_DrawMode) {
|
|
14
|
+
_DrawMode.isVisualMode = (mode) => (mode & 1) === 1;
|
|
15
|
+
_DrawMode.isPriorityMode = (mode) => (mode & 2) === 2;
|
|
16
|
+
_DrawMode.isControlMode = (mode) => (mode & 4) === 4;
|
|
17
|
+
})(DrawMode || (DrawMode = {}));
|
|
18
|
+
//#endregion
|
|
19
|
+
export { DrawMode };
|
|
20
|
+
|
|
26
21
|
//# sourceMappingURL=draw-mode.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"draw-mode.js","
|
|
1
|
+
{"version":3,"file":"draw-mode.js","names":[],"sources":["../../src/models/draw-mode.ts"],"sourcesContent":["export enum DrawMode {\n Visual = 0b001,\n Priority = 0b010,\n Control = 0b100,\n\n /** @hidden */\n ___ = 0b000,\n /** @hidden */\n VP_ = 0b011,\n /** @hidden */\n V_C = 0b101,\n /** @hidden */\n _CP = 0b110,\n /** @hidden */\n VPC = 0b111,\n}\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace DrawMode {\n export const isVisualMode = (mode: DrawMode): boolean =>\n ((mode & DrawMode.Visual) as DrawMode) === DrawMode.Visual;\n\n export const isPriorityMode = (mode: DrawMode): boolean =>\n ((mode & DrawMode.Priority) as DrawMode) === DrawMode.Priority;\n\n export const isControlMode = (mode: DrawMode): boolean =>\n ((mode & DrawMode.Control) as DrawMode) === DrawMode.Control;\n}\n"],"mappings":";AAAA,IAAY,WAAL,yBAAA,UAAA;CACL,SAAA,SAAA,YAAA,KAAA;CACA,SAAA,SAAA,cAAA,KAAA;CACA,SAAA,SAAA,aAAA,KAAA;CAGA,SAAA,SAAA,SAAA,KAAA;CAEA,SAAA,SAAA,SAAA,KAAA;CAEA,SAAA,SAAA,SAAA,KAAA;CAEA,SAAA,SAAA,SAAA,KAAA;CAEA,SAAA,SAAA,SAAA,KAAA;;AACF,EAAA,CAAA,CAAA;CAGO,SAAA,WAAA;CACwB,UAAA,gBAAA,UACzB,OAAA,OAAA;CAE2B,UAAA,kBAAA,UAC3B,OAAA,OAAA;CAE0B,UAAA,iBAAA,UAC1B,OAAA,OAAA;AACL,EAAA,CAAA,aAAA,WAAA,CAAA,EAAD"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { IndexedPixelData } from "@4bitlabs/image";
|
|
2
|
+
//#region src/models/font-face.d.ts
|
|
3
|
+
interface FontFace {
|
|
4
|
+
characters: IndexedPixelData[];
|
|
5
|
+
lineHeight: number;
|
|
5
6
|
}
|
|
7
|
+
//#endregion
|
|
8
|
+
export { FontFace };
|
|
6
9
|
//# sourceMappingURL=font-face.d.ts.map
|