@glassly/miniapp 0.3.0-dev.1 → 0.3.0-dev.460
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/README.md +219 -74
- package/dist/background/index.d.ts +14 -8
- package/dist/background/index.d.ts.map +1 -1
- package/dist/background/index.js +4 -0
- package/dist/background/index.js.map +1 -1
- package/dist/background/register.d.ts +1 -1
- package/dist/background/register.js +1 -1
- package/dist/display/index.d.ts +23 -0
- package/dist/display/index.d.ts.map +1 -0
- package/dist/display/index.js +17 -0
- package/dist/display/index.js.map +1 -0
- package/dist/display/measurer/TextMeasurer.d.ts +160 -0
- package/dist/display/measurer/TextMeasurer.d.ts.map +1 -0
- package/dist/display/measurer/TextMeasurer.js +272 -0
- package/dist/display/measurer/TextMeasurer.js.map +1 -0
- package/dist/display/measurer/index.d.ts +10 -0
- package/dist/display/measurer/index.d.ts.map +1 -0
- package/dist/display/measurer/index.js +11 -0
- package/dist/display/measurer/index.js.map +1 -0
- package/dist/display/measurer/script-detection.d.ts +53 -0
- package/dist/display/measurer/script-detection.d.ts.map +1 -0
- package/dist/display/measurer/script-detection.js +184 -0
- package/dist/display/measurer/script-detection.js.map +1 -0
- package/dist/display/pixelArt.d.ts +22 -0
- package/dist/display/pixelArt.d.ts.map +1 -0
- package/dist/display/pixelArt.js +126 -0
- package/dist/display/pixelArt.js.map +1 -0
- package/dist/display/profiles/g1.d.ts +33 -0
- package/dist/display/profiles/g1.d.ts.map +1 -0
- package/dist/display/profiles/g1.js +214 -0
- package/dist/display/profiles/g1.js.map +1 -0
- package/dist/display/profiles/g2.d.ts +13 -0
- package/dist/display/profiles/g2.d.ts.map +1 -0
- package/dist/display/profiles/g2.js +34 -0
- package/dist/display/profiles/g2.js.map +1 -0
- package/dist/display/profiles/index.d.ts +12 -0
- package/dist/display/profiles/index.d.ts.map +1 -0
- package/dist/display/profiles/index.js +15 -0
- package/dist/display/profiles/index.js.map +1 -0
- package/dist/display/profiles/nex.d.ts +10 -0
- package/dist/display/profiles/nex.d.ts.map +1 -0
- package/dist/display/profiles/nex.js +150 -0
- package/dist/display/profiles/nex.js.map +1 -0
- package/dist/display/profiles/types.d.ts +103 -0
- package/dist/display/profiles/types.d.ts.map +1 -0
- package/dist/display/profiles/types.js +2 -0
- package/dist/display/profiles/types.js.map +1 -0
- package/dist/display/profiles/z100.d.ts +33 -0
- package/dist/display/profiles/z100.d.ts.map +1 -0
- package/dist/display/profiles/z100.js +182 -0
- package/dist/display/profiles/z100.js.map +1 -0
- package/dist/display/scene/types.d.ts +292 -0
- package/dist/display/scene/types.d.ts.map +1 -0
- package/dist/display/scene/types.js +0 -0
- package/dist/display/scene/types.js.map +1 -0
- package/dist/display/wrapper/TextWrapper.d.ts +102 -0
- package/dist/display/wrapper/TextWrapper.d.ts.map +1 -0
- package/dist/display/wrapper/TextWrapper.js +469 -0
- package/dist/display/wrapper/TextWrapper.js.map +1 -0
- package/dist/display/wrapper/index.d.ts +12 -0
- package/dist/display/wrapper/index.d.ts.map +1 -0
- package/dist/display/wrapper/index.js +12 -0
- package/dist/display/wrapper/index.js.map +1 -0
- package/dist/display/wrapper/types.d.ts +75 -0
- package/dist/display/wrapper/types.d.ts.map +1 -0
- package/dist/display/wrapper/types.js +11 -0
- package/dist/display/wrapper/types.js.map +1 -0
- package/dist/globals.d.ts +5 -5
- package/dist/globals.d.ts.map +1 -1
- package/dist/globals.js +1 -1
- package/dist/globals.js.map +1 -1
- package/dist/hardware.d.ts +4 -18
- package/dist/hardware.d.ts.map +1 -1
- package/dist/hardware.js +2 -13
- package/dist/hardware.js.map +1 -1
- package/dist/index.d.ts +16 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/knownApps.d.ts +26 -0
- package/dist/knownApps.d.ts.map +1 -0
- package/dist/knownApps.js +140 -0
- package/dist/knownApps.js.map +1 -0
- package/dist/mirror/canvas.d.ts +22 -0
- package/dist/mirror/canvas.d.ts.map +1 -0
- package/dist/mirror/canvas.js +311 -0
- package/dist/mirror/canvas.js.map +1 -0
- package/dist/mirror/geometry.d.ts +69 -0
- package/dist/mirror/geometry.d.ts.map +1 -0
- package/dist/mirror/geometry.js +75 -0
- package/dist/mirror/geometry.js.map +1 -0
- package/dist/mirror/index.d.ts +3 -0
- package/dist/mirror/index.d.ts.map +1 -0
- package/dist/mirror/index.js +2 -0
- package/dist/mirror/index.js.map +1 -0
- package/dist/mirror/types.d.ts +40 -0
- package/dist/mirror/types.d.ts.map +1 -0
- package/dist/mirror/types.js +2 -0
- package/dist/mirror/types.js.map +1 -0
- package/dist/modules/auth.d.ts +1 -1
- package/dist/modules/auth.d.ts.map +1 -1
- package/dist/modules/auth.js +2 -2
- package/dist/modules/auth.js.map +1 -1
- package/dist/modules/compass.d.ts +47 -0
- package/dist/modules/compass.d.ts.map +1 -0
- package/dist/modules/compass.js +39 -0
- package/dist/modules/compass.js.map +1 -0
- package/dist/modules/display.d.ts +192 -8
- package/dist/modules/display.d.ts.map +1 -1
- package/dist/modules/display.js +40 -3
- package/dist/modules/display.js.map +1 -1
- package/dist/modules/events.d.ts +30 -2
- package/dist/modules/events.d.ts.map +1 -1
- package/dist/modules/events.js.map +1 -1
- package/dist/modules/input.d.ts +40 -1
- package/dist/modules/input.d.ts.map +1 -1
- package/dist/modules/input.js +45 -1
- package/dist/modules/input.js.map +1 -1
- package/dist/modules/latest-render-scheduler.d.ts +19 -0
- package/dist/modules/latest-render-scheduler.d.ts.map +1 -0
- package/dist/modules/latest-render-scheduler.js +54 -0
- package/dist/modules/latest-render-scheduler.js.map +1 -0
- package/dist/modules/lightSensor.d.ts +44 -0
- package/dist/modules/lightSensor.d.ts.map +1 -0
- package/dist/modules/lightSensor.js +33 -0
- package/dist/modules/lightSensor.js.map +1 -0
- package/dist/modules/mic.d.ts +3 -2
- package/dist/modules/mic.d.ts.map +1 -1
- package/dist/modules/mic.js +3 -2
- package/dist/modules/mic.js.map +1 -1
- package/dist/modules/miniapps.d.ts +2 -0
- package/dist/modules/miniapps.d.ts.map +1 -1
- package/dist/modules/miniapps.js.map +1 -1
- package/dist/modules/mirror.d.ts +16 -0
- package/dist/modules/mirror.d.ts.map +1 -0
- package/dist/modules/mirror.js +40 -0
- package/dist/modules/mirror.js.map +1 -0
- package/dist/modules/mono-text-rows.d.ts +20 -0
- package/dist/modules/mono-text-rows.d.ts.map +1 -0
- package/dist/modules/mono-text-rows.js +26 -0
- package/dist/modules/mono-text-rows.js.map +1 -0
- package/dist/modules/navigation.d.ts.map +1 -1
- package/dist/modules/navigation.js +21 -14
- package/dist/modules/navigation.js.map +1 -1
- package/dist/modules/phone.d.ts +26 -1
- package/dist/modules/phone.d.ts.map +1 -1
- package/dist/modules/phone.js +28 -0
- package/dist/modules/phone.js.map +1 -1
- package/dist/modules/settings.d.ts +45 -0
- package/dist/modules/settings.d.ts.map +1 -0
- package/dist/modules/settings.js +54 -0
- package/dist/modules/settings.js.map +1 -0
- package/dist/modules/system.d.ts +21 -0
- package/dist/modules/system.d.ts.map +1 -1
- package/dist/modules/system.js +12 -0
- package/dist/modules/system.js.map +1 -1
- package/dist/modules/transcription.d.ts +3 -2
- package/dist/modules/transcription.d.ts.map +1 -1
- package/dist/modules/transcription.js +3 -2
- package/dist/modules/transcription.js.map +1 -1
- package/dist/protocol.d.ts +65 -5
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +66 -5
- package/dist/protocol.js.map +1 -1
- package/dist/react/MirrorCanvas.d.ts +10 -0
- package/dist/react/MirrorCanvas.d.ts.map +1 -0
- package/dist/react/MirrorCanvas.js +23 -0
- package/dist/react/MirrorCanvas.js.map +1 -0
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +1 -0
- package/dist/react/index.js.map +1 -1
- package/dist/react/useColorScheme.d.ts +2 -3
- package/dist/react/useColorScheme.d.ts.map +1 -1
- package/dist/react/useColorScheme.js +15 -8
- package/dist/react/useColorScheme.js.map +1 -1
- package/dist/react/useRpc.js +2 -2
- package/dist/react/useRpc.js.map +1 -1
- package/dist/react/useSafeArea.d.ts.map +1 -1
- package/dist/react/useSafeArea.js +2 -2
- package/dist/react/useSafeArea.js.map +1 -1
- package/dist/session.d.ts +50 -4
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +35 -6
- package/dist/session.js.map +1 -1
- package/dist/transport/auto.d.ts +2 -2
- package/dist/transport/auto.js +2 -2
- package/dist/transport/dispatch.d.ts +1 -1
- package/dist/transport/dispatch.js +1 -1
- package/dist/transport/mock.d.ts +4 -4
- package/dist/transport/mock.d.ts.map +1 -1
- package/dist/transport/mock.js +31 -7
- package/dist/transport/mock.js.map +1 -1
- package/dist/ui/index.d.ts +2 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +1 -0
- package/dist/ui/index.js.map +1 -1
- package/package.json +19 -3
- package/src/background/index.ts +26 -4
- package/src/background/register.ts +1 -1
- package/src/display/index.ts +83 -0
- package/src/display/measurer/TextMeasurer.ts +346 -0
- package/src/display/measurer/index.ts +21 -0
- package/src/display/measurer/script-detection.ts +218 -0
- package/src/display/pixelArt.ts +141 -0
- package/src/display/profiles/g1.ts +237 -0
- package/src/display/profiles/g2.ts +39 -0
- package/src/display/profiles/index.ts +28 -0
- package/src/display/profiles/nex.ts +166 -0
- package/src/display/profiles/types.ts +132 -0
- package/src/display/profiles/z100.ts +198 -0
- package/src/display/scene/types.ts +335 -0
- package/src/display/wrapper/TextWrapper.ts +546 -0
- package/src/display/wrapper/index.ts +15 -0
- package/src/display/wrapper/types.ts +102 -0
- package/src/globals.ts +5 -5
- package/src/hardware.ts +6 -21
- package/src/index.ts +34 -6
- package/src/knownApps.ts +170 -0
- package/src/mirror/canvas.ts +322 -0
- package/src/mirror/geometry.ts +128 -0
- package/src/mirror/index.ts +2 -0
- package/src/mirror/types.ts +38 -0
- package/src/modules/auth.ts +2 -2
- package/src/modules/compass.ts +69 -0
- package/src/modules/display.ts +222 -12
- package/src/modules/events.ts +27 -1
- package/src/modules/input.ts +55 -2
- package/src/modules/latest-render-scheduler.ts +55 -0
- package/src/modules/lightSensor.ts +61 -0
- package/src/modules/mic.ts +3 -2
- package/src/modules/miniapps.ts +2 -0
- package/src/modules/mirror.ts +42 -0
- package/src/modules/mono-text-rows.ts +30 -0
- package/src/modules/navigation.ts +20 -14
- package/src/modules/phone.ts +40 -1
- package/src/modules/settings.ts +64 -0
- package/src/modules/system.ts +30 -1
- package/src/modules/transcription.ts +3 -2
- package/src/protocol.ts +72 -5
- package/src/react/MirrorCanvas.tsx +35 -0
- package/src/react/index.ts +3 -0
- package/src/react/useColorScheme.ts +17 -8
- package/src/react/useRpc.ts +2 -2
- package/src/react/useSafeArea.ts +2 -2
- package/src/session.ts +78 -8
- package/src/transport/auto.ts +2 -2
- package/src/transport/dispatch.ts +1 -1
- package/src/transport/mock.ts +42 -11
- package/src/ui/index.ts +3 -0
- package/dist/modules/heading.d.ts +0 -16
- package/dist/modules/heading.d.ts.map +0 -1
- package/dist/modules/heading.js +0 -20
- package/dist/modules/heading.js.map +0 -1
- package/src/modules/heading.ts +0 -23
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"g2.js","sourceRoot":"","sources":["../../../src/display/profiles/g2.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,mEAAmE;AACnE,OAAO,EAAC,UAAU,EAAC,MAAM,MAAM,CAAA;AAE/B,MAAM,CAAC,MAAM,UAAU,GAAmB;IACxC,GAAG,UAAU;IACb,EAAE,EAAE,mBAAmB;IACvB,IAAI,EAAE,mBAAmB;IACzB,sEAAsE;IACtE,mDAAmD;IACnD,QAAQ,EAAE,CAAC;IACX,0EAA0E;IAC1E,2EAA2E;IAC3E,yEAAyE;IACzE,oCAAoC;IACpC,YAAY,EAAE,EAAE;CACjB,CAAA;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAA;AAEpC;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Display Profiles
|
|
3
|
+
*
|
|
4
|
+
* Hardware-specific configurations for smart glasses displays.
|
|
5
|
+
* Each profile defines display dimensions, font metrics, and constraints.
|
|
6
|
+
*/
|
|
7
|
+
export type { DisplayProfile, FontMetrics, UniformScriptWidths, FallbackConfig, DisplayConstraints, ScriptType, } from "./types";
|
|
8
|
+
export { G1_PROFILE, G1_PROFILE_LEGACY, G1_HYPHEN_WIDTH_PX, G1_SPACE_WIDTH_PX } from "./g1";
|
|
9
|
+
export { Z100_PROFILE, Z100_HYPHEN_WIDTH_PX, Z100_SPACE_WIDTH_PX } from "./z100";
|
|
10
|
+
export { G2_PROFILE, G2_HYPHEN_WIDTH_PX, G2_SPACE_WIDTH_PX } from "./g2";
|
|
11
|
+
export { NEX_PROFILE, NEX_HYPHEN_WIDTH_PX, NEX_SPACE_WIDTH_PX } from "./nex";
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/display/profiles/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EACV,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,UAAU,GACX,MAAM,SAAS,CAAA;AAGhB,OAAO,EAAC,UAAU,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,iBAAiB,EAAC,MAAM,MAAM,CAAA;AAGzF,OAAO,EAAC,YAAY,EAAE,oBAAoB,EAAE,mBAAmB,EAAC,MAAM,QAAQ,CAAA;AAG9E,OAAO,EAAC,UAAU,EAAE,kBAAkB,EAAE,iBAAiB,EAAC,MAAM,MAAM,CAAA;AAGtE,OAAO,EAAC,WAAW,EAAE,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,OAAO,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Display Profiles
|
|
3
|
+
*
|
|
4
|
+
* Hardware-specific configurations for smart glasses displays.
|
|
5
|
+
* Each profile defines display dimensions, font metrics, and constraints.
|
|
6
|
+
*/
|
|
7
|
+
// G1 Profiles
|
|
8
|
+
export { G1_PROFILE, G1_PROFILE_LEGACY, G1_HYPHEN_WIDTH_PX, G1_SPACE_WIDTH_PX } from "./g1";
|
|
9
|
+
// Z100 Profile
|
|
10
|
+
export { Z100_PROFILE, Z100_HYPHEN_WIDTH_PX, Z100_SPACE_WIDTH_PX } from "./z100";
|
|
11
|
+
// G2 Profile
|
|
12
|
+
export { G2_PROFILE, G2_HYPHEN_WIDTH_PX, G2_SPACE_WIDTH_PX } from "./g2";
|
|
13
|
+
// Mentra Nex Profile (a.k.a. Mentra Display)
|
|
14
|
+
export { NEX_PROFILE, NEX_HYPHEN_WIDTH_PX, NEX_SPACE_WIDTH_PX } from "./nex";
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/display/profiles/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAYH,cAAc;AACd,OAAO,EAAC,UAAU,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,iBAAiB,EAAC,MAAM,MAAM,CAAA;AAEzF,eAAe;AACf,OAAO,EAAC,YAAY,EAAE,oBAAoB,EAAE,mBAAmB,EAAC,MAAM,QAAQ,CAAA;AAE9E,aAAa;AACb,OAAO,EAAC,UAAU,EAAE,kBAAkB,EAAE,iBAAiB,EAAC,MAAM,MAAM,CAAA;AAEtE,6CAA6C;AAC7C,OAAO,EAAC,WAAW,EAAE,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,OAAO,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DisplayProfile } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Mentra Nex Smart Glasses Display Profile
|
|
4
|
+
*
|
|
5
|
+
* Also known as "Mentra Display" - a new Glassly glasses model with display capabilities.
|
|
6
|
+
*/
|
|
7
|
+
export declare const NEX_PROFILE: DisplayProfile;
|
|
8
|
+
export declare const NEX_HYPHEN_WIDTH_PX = 8;
|
|
9
|
+
export declare const NEX_SPACE_WIDTH_PX = 4;
|
|
10
|
+
//# sourceMappingURL=nex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nex.d.ts","sourceRoot":"","sources":["../../../src/display/profiles/nex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,SAAS,CAAA;AAoHtC;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,cAwCzB,CAAA;AAED,eAAO,MAAM,mBAAmB,IAAI,CAAA;AAEpC,eAAO,MAAM,kBAAkB,IAAI,CAAA"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mentra Nex glyph widths
|
|
3
|
+
*/
|
|
4
|
+
const NEX_GLYPH_WIDTHS = {
|
|
5
|
+
// Punctuation & Symbols
|
|
6
|
+
" ": 5,
|
|
7
|
+
"!": 5,
|
|
8
|
+
'"': 8,
|
|
9
|
+
"#": 14,
|
|
10
|
+
"$": 12,
|
|
11
|
+
"%": 18,
|
|
12
|
+
"&": 14,
|
|
13
|
+
"'": 5,
|
|
14
|
+
"(": 7,
|
|
15
|
+
")": 7,
|
|
16
|
+
"*": 8,
|
|
17
|
+
"+": 12,
|
|
18
|
+
",": 5,
|
|
19
|
+
"-": 8,
|
|
20
|
+
".": 5,
|
|
21
|
+
"/": 7,
|
|
22
|
+
// Numbers
|
|
23
|
+
"0": 12,
|
|
24
|
+
"1": 12,
|
|
25
|
+
"2": 12,
|
|
26
|
+
"3": 12,
|
|
27
|
+
"4": 12,
|
|
28
|
+
"5": 12,
|
|
29
|
+
"6": 12,
|
|
30
|
+
"7": 12,
|
|
31
|
+
"8": 12,
|
|
32
|
+
"9": 12,
|
|
33
|
+
// More punctuation
|
|
34
|
+
":": 6,
|
|
35
|
+
";": 6,
|
|
36
|
+
"<": 12,
|
|
37
|
+
"=": 12,
|
|
38
|
+
">": 12,
|
|
39
|
+
"?": 9,
|
|
40
|
+
"@": 18,
|
|
41
|
+
// Uppercase
|
|
42
|
+
"A": 12,
|
|
43
|
+
"B": 13,
|
|
44
|
+
"C": 12,
|
|
45
|
+
"D": 13,
|
|
46
|
+
"E": 11,
|
|
47
|
+
"F": 11,
|
|
48
|
+
"G": 14,
|
|
49
|
+
"H": 14,
|
|
50
|
+
"I": 8,
|
|
51
|
+
"J": 10,
|
|
52
|
+
"K": 12,
|
|
53
|
+
"L": 10,
|
|
54
|
+
"M": 16,
|
|
55
|
+
"N": 14,
|
|
56
|
+
"O": 14,
|
|
57
|
+
"P": 12,
|
|
58
|
+
"Q": 14,
|
|
59
|
+
"R": 13,
|
|
60
|
+
"S": 11,
|
|
61
|
+
"T": 11,
|
|
62
|
+
"U": 13,
|
|
63
|
+
"V": 12,
|
|
64
|
+
"W": 18,
|
|
65
|
+
"X": 12,
|
|
66
|
+
"Y": 11,
|
|
67
|
+
"Z": 11,
|
|
68
|
+
// Brackets & special
|
|
69
|
+
"[": 6,
|
|
70
|
+
"\\": 7,
|
|
71
|
+
"]": 6,
|
|
72
|
+
"^": 12,
|
|
73
|
+
"_": 11,
|
|
74
|
+
"`": 12,
|
|
75
|
+
// Lowercase
|
|
76
|
+
"a": 11,
|
|
77
|
+
"b": 11,
|
|
78
|
+
"c": 10,
|
|
79
|
+
"d": 11,
|
|
80
|
+
"e": 11,
|
|
81
|
+
"f": 6,
|
|
82
|
+
"g": 11,
|
|
83
|
+
"h": 11,
|
|
84
|
+
"i": 5,
|
|
85
|
+
"j": 5,
|
|
86
|
+
"k": 10,
|
|
87
|
+
"l": 5,
|
|
88
|
+
"m": 17,
|
|
89
|
+
"n": 11,
|
|
90
|
+
"o": 11,
|
|
91
|
+
"p": 11,
|
|
92
|
+
"q": 11,
|
|
93
|
+
"r": 7,
|
|
94
|
+
"s": 10,
|
|
95
|
+
"t": 7,
|
|
96
|
+
"u": 11,
|
|
97
|
+
"v": 10,
|
|
98
|
+
"w": 15,
|
|
99
|
+
"x": 10,
|
|
100
|
+
"y": 10,
|
|
101
|
+
"z": 9,
|
|
102
|
+
// More special
|
|
103
|
+
"{": 7,
|
|
104
|
+
"|": 6,
|
|
105
|
+
"}": 7,
|
|
106
|
+
"~": 12,
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* Mentra Nex Smart Glasses Display Profile
|
|
110
|
+
*
|
|
111
|
+
* Also known as "Mentra Display" - a new Glassly glasses model with display capabilities.
|
|
112
|
+
*/
|
|
113
|
+
export const NEX_PROFILE = {
|
|
114
|
+
id: "mentra-nex",
|
|
115
|
+
name: "Mentra Nex",
|
|
116
|
+
// Display dimensions — 500x220 usable region centered in the 640x480 A6N
|
|
117
|
+
// panel (firmware mos_display_config.c: margins 70/130). Canvas coordinates
|
|
118
|
+
// are relative to this virtual screen; the physical panel is bigger, 500x220
|
|
119
|
+
// is the public drawable canvas.
|
|
120
|
+
displayWidthPx: 480,
|
|
121
|
+
displayHeightPx: 220,
|
|
122
|
+
maxLines: 8,
|
|
123
|
+
maxPayloadBytes: 450, // Matches firmware MAX_TEXT_LEN / DisplayText.text cap; delivered via fragmented BLE transport
|
|
124
|
+
bleChunkSize: 176,
|
|
125
|
+
// Font metrics
|
|
126
|
+
fontMetrics: {
|
|
127
|
+
glyphWidths: new Map(Object.entries(NEX_GLYPH_WIDTHS)),
|
|
128
|
+
defaultGlyphWidth: 16,
|
|
129
|
+
renderFormula: (glyphWidth) => glyphWidth,
|
|
130
|
+
uniformScripts: {
|
|
131
|
+
cjk: 20,
|
|
132
|
+
hiragana: 18,
|
|
133
|
+
katakana: 18,
|
|
134
|
+
korean: 24,
|
|
135
|
+
cyrillic: 18,
|
|
136
|
+
},
|
|
137
|
+
fallback: {
|
|
138
|
+
latinMaxWidth: 16,
|
|
139
|
+
unknownBehavior: "useLatinMax",
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
constraints: {
|
|
143
|
+
minCharsBeforeHyphen: 3,
|
|
144
|
+
noStartChars: [".", ",", "!", "?", ":", ";", ")", "]", "}", "。", ",", "!", "?", ":", ";", ")", "】", "」"],
|
|
145
|
+
noEndChars: ["(", "[", "{", "(", "【", "「"],
|
|
146
|
+
},
|
|
147
|
+
};
|
|
148
|
+
export const NEX_HYPHEN_WIDTH_PX = 8;
|
|
149
|
+
export const NEX_SPACE_WIDTH_PX = 4;
|
|
150
|
+
//# sourceMappingURL=nex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nex.js","sourceRoot":"","sources":["../../../src/display/profiles/nex.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,gBAAgB,GAA2B;IAC/C,wBAAwB;IACxB,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,EAAE;IACP,GAAG,EAAE,EAAE;IACP,GAAG,EAAE,EAAE;IACP,GAAG,EAAE,EAAE;IACP,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,EAAE;IACP,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,CAAC;IAEN,UAAU;IACV,GAAG,EAAE,EAAE;IACP,GAAG,EAAE,EAAE;IACP,GAAG,EAAE,EAAE;IACP,GAAG,EAAE,EAAE;IACP,GAAG,EAAE,EAAE;IACP,GAAG,EAAE,EAAE;IACP,GAAG,EAAE,EAAE;IACP,GAAG,EAAE,EAAE;IACP,GAAG,EAAE,EAAE;IACP,GAAG,EAAE,EAAE;IAEP,mBAAmB;IACnB,GAAG,EAAE,CAAC;IACN,GAAG,E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,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;QACxG,UAAU,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;KAC3C;CACF,CAAA;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAA;AAEpC,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAA"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Display profile for a specific glasses model.
|
|
3
|
+
* All text measurement and wrapping derives from this configuration.
|
|
4
|
+
*/
|
|
5
|
+
export interface DisplayProfile {
|
|
6
|
+
/** Unique identifier for this glasses model */
|
|
7
|
+
id: string;
|
|
8
|
+
/** Human-readable name */
|
|
9
|
+
name: string;
|
|
10
|
+
/** Display width in pixels */
|
|
11
|
+
displayWidthPx: number;
|
|
12
|
+
/** Display height in pixels (if applicable) */
|
|
13
|
+
displayHeightPx?: number;
|
|
14
|
+
/** Maximum number of lines that can be displayed */
|
|
15
|
+
maxLines: number;
|
|
16
|
+
/**
|
|
17
|
+
* CALIBRATED line height in px for box-height→line-count math (scene
|
|
18
|
+
* pipeline). When absent, host-side height clipping is skipped entirely and
|
|
19
|
+
* text wraps to the box width with the firmware clipping vertically in-box
|
|
20
|
+
* (legacy behavior) — it is deliberately NOT derived from canvas math, which
|
|
21
|
+
* proved wrong on hardware (see profileLineHeightPx in scene/process.ts).
|
|
22
|
+
*/
|
|
23
|
+
lineHeightPx?: number;
|
|
24
|
+
/** Maximum safe payload size in bytes (for BLE transmission) */
|
|
25
|
+
maxPayloadBytes: number;
|
|
26
|
+
/** BLE chunk size for transmission */
|
|
27
|
+
bleChunkSize: number;
|
|
28
|
+
/** Font metrics for text measurement */
|
|
29
|
+
fontMetrics: FontMetrics;
|
|
30
|
+
/** Optional constraints */
|
|
31
|
+
constraints?: DisplayConstraints;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Font metrics for pixel-accurate text measurement.
|
|
35
|
+
*/
|
|
36
|
+
export interface FontMetrics {
|
|
37
|
+
/**
|
|
38
|
+
* Map of character to glyph width in pixels.
|
|
39
|
+
* Keys are single characters.
|
|
40
|
+
*/
|
|
41
|
+
glyphWidths: Map<string, number>;
|
|
42
|
+
/** Default glyph width for unmapped characters */
|
|
43
|
+
defaultGlyphWidth: number;
|
|
44
|
+
/**
|
|
45
|
+
* Formula to convert glyph width to rendered pixel width.
|
|
46
|
+
* G1 example: (glyphWidth + 1) * 2
|
|
47
|
+
*/
|
|
48
|
+
renderFormula: (glyphWidth: number) => number;
|
|
49
|
+
/**
|
|
50
|
+
* Uniform-width scripts - verified to render all characters at same width.
|
|
51
|
+
* These are NOT averages - they are the actual uniform width in RENDERED pixels.
|
|
52
|
+
*/
|
|
53
|
+
uniformScripts: UniformScriptWidths;
|
|
54
|
+
/**
|
|
55
|
+
* Fallback configuration for unmapped characters.
|
|
56
|
+
*/
|
|
57
|
+
fallback: FallbackConfig;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Uniform width scripts - these scripts render all characters at the same width.
|
|
61
|
+
* Values are in RENDERED pixels (after applying renderFormula if applicable).
|
|
62
|
+
* Verified through hardware testing.
|
|
63
|
+
*/
|
|
64
|
+
export interface UniformScriptWidths {
|
|
65
|
+
/** Chinese, Japanese Kanji - all chars same width */
|
|
66
|
+
cjk: number;
|
|
67
|
+
/** Japanese Hiragana - all chars same width */
|
|
68
|
+
hiragana: number;
|
|
69
|
+
/** Japanese Katakana - all chars same width */
|
|
70
|
+
katakana: number;
|
|
71
|
+
/** Korean Hangul - all chars same width */
|
|
72
|
+
korean: number;
|
|
73
|
+
/** Russian, etc. - all chars same width */
|
|
74
|
+
cyrillic: number;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Fallback strategy for unmapped characters.
|
|
78
|
+
*/
|
|
79
|
+
export interface FallbackConfig {
|
|
80
|
+
/**
|
|
81
|
+
* Max known Latin width for safe fallback (in rendered pixels).
|
|
82
|
+
* Using max ensures we never overflow (worst case: slight under-utilization).
|
|
83
|
+
*/
|
|
84
|
+
latinMaxWidth: number;
|
|
85
|
+
/** What to do with completely unknown characters */
|
|
86
|
+
unknownBehavior: "useLatinMax" | "throw" | "filter";
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Optional display constraints.
|
|
90
|
+
*/
|
|
91
|
+
export interface DisplayConstraints {
|
|
92
|
+
/** Minimum characters before allowing hyphen break */
|
|
93
|
+
minCharsBeforeHyphen?: number;
|
|
94
|
+
/** Characters that should not appear at start of line (kinsoku) */
|
|
95
|
+
noStartChars?: string[];
|
|
96
|
+
/** Characters that should not appear at end of line (kinsoku) */
|
|
97
|
+
noEndChars?: string[];
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Script type for character classification.
|
|
101
|
+
*/
|
|
102
|
+
export type ScriptType = "latin" | "cjk" | "hiragana" | "katakana" | "korean" | "cyrillic" | "numbers" | "punctuation" | "unsupported";
|
|
103
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/display/profiles/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,+CAA+C;IAC/C,EAAE,EAAE,MAAM,CAAA;IAEV,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAA;IAEZ,8BAA8B;IAC9B,cAAc,EAAE,MAAM,CAAA;IAEtB,+CAA+C;IAC/C,eAAe,CAAC,EAAE,MAAM,CAAA;IAExB,oDAAoD;IACpD,QAAQ,EAAE,MAAM,CAAA;IAEhB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB,gEAAgE;IAChE,eAAe,EAAE,M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AU,GACV,SAAS,GACT,aAAa,GACb,aAAa,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/display/profiles/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { DisplayProfile } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Vuzix Z100 Smart Glasses Display Profile
|
|
4
|
+
*
|
|
5
|
+
* The Z100 has a green monochrome display with 640x480 resolution.
|
|
6
|
+
* It uses the Vuzix Ultralite SDK and Noto Sans font family.
|
|
7
|
+
*
|
|
8
|
+
* Display specs:
|
|
9
|
+
* - Resolution: 640x480
|
|
10
|
+
* - Usable text width: ~390px (empirically tested - SDK applies margins)
|
|
11
|
+
* - Color: Green monochrome
|
|
12
|
+
* - Max text lines: 7
|
|
13
|
+
* - Font: Noto Sans Regular at 21px
|
|
14
|
+
* - No bitmap support via text commands
|
|
15
|
+
* - Adjustable brightness
|
|
16
|
+
*
|
|
17
|
+
* NOTE: The Vuzix Ultralite SDK handles text rendering internally and applies
|
|
18
|
+
* its own margins/padding. The usable text width is significantly less than
|
|
19
|
+
* the physical 640px resolution. Empirical testing shows ~42 characters of
|
|
20
|
+
* mixed text (387px measured) fits on one line before the SDK wraps.
|
|
21
|
+
*/
|
|
22
|
+
export declare const Z100_PROFILE: DisplayProfile;
|
|
23
|
+
/**
|
|
24
|
+
* Get the hyphen width for Z100 in pixels.
|
|
25
|
+
* Used for line breaking calculations.
|
|
26
|
+
*/
|
|
27
|
+
export declare const Z100_HYPHEN_WIDTH_PX = 7;
|
|
28
|
+
/**
|
|
29
|
+
* Get the space width for Z100 in pixels.
|
|
30
|
+
* Used for column alignment calculations.
|
|
31
|
+
*/
|
|
32
|
+
export declare const Z100_SPACE_WIDTH_PX = 5;
|
|
33
|
+
//# sourceMappingURL=z100.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"z100.d.ts","sourceRoot":"","sources":["../../../src/display/profiles/z100.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,SAAS,CAAA;AAyHtC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,YAAY,EAAE,cA4C1B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,IAAI,CAAA;AAErC;;;GAGG;AACH,eAAO,MAAM,mBAAmB,IAAI,CAAA"}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vuzix Z100 glyph widths - extracted from NotoSans-Regular.ttf at 21px
|
|
3
|
+
*
|
|
4
|
+
* These are pixel widths at the default font size used by the Z100 display.
|
|
5
|
+
* The Z100 uses Noto Sans as its system font.
|
|
6
|
+
*
|
|
7
|
+
* Extracted using: node scripts/extract-font-metrics.js NotoSans-Regular.ttf 21
|
|
8
|
+
*/
|
|
9
|
+
const Z100_GLYPH_WIDTHS = {
|
|
10
|
+
// Space and punctuation
|
|
11
|
+
" ": 5,
|
|
12
|
+
"!": 6,
|
|
13
|
+
'"': 9,
|
|
14
|
+
"#": 14,
|
|
15
|
+
"$": 12,
|
|
16
|
+
"%": 17,
|
|
17
|
+
"&": 15,
|
|
18
|
+
"'": 5,
|
|
19
|
+
"(": 6,
|
|
20
|
+
")": 6,
|
|
21
|
+
"*": 12,
|
|
22
|
+
"+": 12,
|
|
23
|
+
",": 6,
|
|
24
|
+
"-": 7, // Hyphen width - important for line breaking
|
|
25
|
+
".": 6,
|
|
26
|
+
"/": 8,
|
|
27
|
+
// Numbers
|
|
28
|
+
"0": 12,
|
|
29
|
+
"1": 12,
|
|
30
|
+
"2": 12,
|
|
31
|
+
"3": 12,
|
|
32
|
+
"4": 12,
|
|
33
|
+
"5": 12,
|
|
34
|
+
"6": 12,
|
|
35
|
+
"7": 12,
|
|
36
|
+
"8": 12,
|
|
37
|
+
"9": 12,
|
|
38
|
+
// More punctuation
|
|
39
|
+
":": 6,
|
|
40
|
+
";": 6,
|
|
41
|
+
"<": 12,
|
|
42
|
+
"=": 12,
|
|
43
|
+
">": 12,
|
|
44
|
+
"?": 9,
|
|
45
|
+
"@": 19,
|
|
46
|
+
// Uppercase
|
|
47
|
+
"A": 13,
|
|
48
|
+
"B": 14,
|
|
49
|
+
"C": 13,
|
|
50
|
+
"D": 15,
|
|
51
|
+
"E": 12,
|
|
52
|
+
"F": 11,
|
|
53
|
+
"G": 15,
|
|
54
|
+
"H": 16,
|
|
55
|
+
"I": 7,
|
|
56
|
+
"J": 6,
|
|
57
|
+
"K": 13,
|
|
58
|
+
"L": 11,
|
|
59
|
+
"M": 19,
|
|
60
|
+
"N": 16,
|
|
61
|
+
"O": 16,
|
|
62
|
+
"P": 13,
|
|
63
|
+
"Q": 16,
|
|
64
|
+
"R": 13,
|
|
65
|
+
"S": 12,
|
|
66
|
+
"T": 12,
|
|
67
|
+
"U": 15,
|
|
68
|
+
"V": 13,
|
|
69
|
+
"W": 20,
|
|
70
|
+
"X": 12,
|
|
71
|
+
"Y": 12,
|
|
72
|
+
"Z": 12,
|
|
73
|
+
// Brackets & special
|
|
74
|
+
"[": 7,
|
|
75
|
+
"\\": 8,
|
|
76
|
+
"]": 7,
|
|
77
|
+
"^": 12,
|
|
78
|
+
"_": 9,
|
|
79
|
+
"`": 6,
|
|
80
|
+
// Lowercase
|
|
81
|
+
"a": 12,
|
|
82
|
+
"b": 13,
|
|
83
|
+
"c": 10,
|
|
84
|
+
"d": 13,
|
|
85
|
+
"e": 12,
|
|
86
|
+
"f": 7,
|
|
87
|
+
"g": 13,
|
|
88
|
+
"h": 13,
|
|
89
|
+
"i": 5,
|
|
90
|
+
"j": 5,
|
|
91
|
+
"k": 11,
|
|
92
|
+
"l": 5,
|
|
93
|
+
"m": 20,
|
|
94
|
+
"n": 13,
|
|
95
|
+
"o": 13,
|
|
96
|
+
"p": 13,
|
|
97
|
+
"q": 13,
|
|
98
|
+
"r": 9,
|
|
99
|
+
"s": 10,
|
|
100
|
+
"t": 8,
|
|
101
|
+
"u": 13,
|
|
102
|
+
"v": 11,
|
|
103
|
+
"w": 17,
|
|
104
|
+
"x": 11,
|
|
105
|
+
"y": 11,
|
|
106
|
+
"z": 10,
|
|
107
|
+
// More special
|
|
108
|
+
"{": 8,
|
|
109
|
+
"|": 12,
|
|
110
|
+
"}": 8,
|
|
111
|
+
"~": 12,
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Vuzix Z100 Smart Glasses Display Profile
|
|
115
|
+
*
|
|
116
|
+
* The Z100 has a green monochrome display with 640x480 resolution.
|
|
117
|
+
* It uses the Vuzix Ultralite SDK and Noto Sans font family.
|
|
118
|
+
*
|
|
119
|
+
* Display specs:
|
|
120
|
+
* - Resolution: 640x480
|
|
121
|
+
* - Usable text width: ~390px (empirically tested - SDK applies margins)
|
|
122
|
+
* - Color: Green monochrome
|
|
123
|
+
* - Max text lines: 7
|
|
124
|
+
* - Font: Noto Sans Regular at 21px
|
|
125
|
+
* - No bitmap support via text commands
|
|
126
|
+
* - Adjustable brightness
|
|
127
|
+
*
|
|
128
|
+
* NOTE: The Vuzix Ultralite SDK handles text rendering internally and applies
|
|
129
|
+
* its own margins/padding. The usable text width is significantly less than
|
|
130
|
+
* the physical 640px resolution. Empirical testing shows ~42 characters of
|
|
131
|
+
* mixed text (387px measured) fits on one line before the SDK wraps.
|
|
132
|
+
*/
|
|
133
|
+
export const Z100_PROFILE = {
|
|
134
|
+
id: "vuzix-z100",
|
|
135
|
+
name: "Vuzix Z100",
|
|
136
|
+
// Display dimensions
|
|
137
|
+
// Empirically tested: ~42 chars of mixed text (387px) fits before SDK wraps
|
|
138
|
+
// Using 390px to account for measurement variance
|
|
139
|
+
displayWidthPx: 390,
|
|
140
|
+
maxLines: 7,
|
|
141
|
+
// BLE constraints
|
|
142
|
+
// Z100 uses Vuzix Ultralite SDK which handles chunking internally
|
|
143
|
+
// These are conservative values for direct BLE if needed
|
|
144
|
+
maxPayloadBytes: 512,
|
|
145
|
+
bleChunkSize: 180,
|
|
146
|
+
// Font metrics - Noto Sans Regular at 21px
|
|
147
|
+
fontMetrics: {
|
|
148
|
+
glyphWidths: new Map(Object.entries(Z100_GLYPH_WIDTHS)),
|
|
149
|
+
defaultGlyphWidth: 12, // Average width from extracted metrics
|
|
150
|
+
// Z100 uses direct pixel widths, no render formula needed
|
|
151
|
+
renderFormula: (glyphWidth) => glyphWidth,
|
|
152
|
+
// Uniform-width scripts for CJK and other non-Latin
|
|
153
|
+
// Noto Sans CJK characters are typically wider
|
|
154
|
+
uniformScripts: {
|
|
155
|
+
cjk: 21, // Full-width CJK characters
|
|
156
|
+
hiragana: 21,
|
|
157
|
+
katakana: 21,
|
|
158
|
+
korean: 21,
|
|
159
|
+
cyrillic: 14, // Cyrillic is similar to Latin in Noto Sans
|
|
160
|
+
},
|
|
161
|
+
fallback: {
|
|
162
|
+
latinMaxWidth: 20, // 'W' and 'm' are the widest at 20px
|
|
163
|
+
unknownBehavior: "useLatinMax",
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
constraints: {
|
|
167
|
+
minCharsBeforeHyphen: 3,
|
|
168
|
+
noStartChars: [".", ",", "!", "?", ":", ";", ")", "]", "}", "。", ",", "!", "?", ":", ";", ")", "】", "」"],
|
|
169
|
+
noEndChars: ["(", "[", "{", "(", "【", "「"],
|
|
170
|
+
},
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* Get the hyphen width for Z100 in pixels.
|
|
174
|
+
* Used for line breaking calculations.
|
|
175
|
+
*/
|
|
176
|
+
export const Z100_HYPHEN_WIDTH_PX = 7;
|
|
177
|
+
/**
|
|
178
|
+
* Get the space width for Z100 in pixels.
|
|
179
|
+
* Used for column alignment calculations.
|
|
180
|
+
*/
|
|
181
|
+
export const Z100_SPACE_WIDTH_PX = 5;
|
|
182
|
+
//# sourceMappingURL=z100.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"z100.js","sourceRoot":"","sources":["../../../src/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