moqtail 0.14.0 → 0.16.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.
Files changed (44) hide show
  1. package/README.md +153 -473
  2. package/dist/{client-Z7egUKTO.cjs → client-DQ5aGbLR.cjs} +1100 -1099
  3. package/dist/client-DUzLw_Y8.d.cts +1932 -0
  4. package/dist/{client-BW1agDFV.mjs → client-DVi4Nh1J.mjs} +942 -947
  5. package/dist/client-epHqMdHm.d.mts +1932 -0
  6. package/dist/client.cjs +121 -4
  7. package/dist/client.d.cts +23 -1933
  8. package/dist/client.d.mts +23 -1933
  9. package/dist/client.mjs +117 -2
  10. package/dist/emitter-UbeRcbuf.mjs +109 -0
  11. package/dist/{logger-c2NoQqtx.cjs → emitter-qNJYD3yQ.cjs} +61 -2
  12. package/dist/index-B-BMK-b6.d.mts +2090 -0
  13. package/dist/index-BtemTtwe.d.cts +2090 -0
  14. package/dist/{index-DBbxKcc1.d.cts → index-CNn9BgO6.d.mts} +168 -337
  15. package/dist/index.cjs +39 -34
  16. package/dist/index.d.cts +20 -4
  17. package/dist/index.d.mts +20 -4
  18. package/dist/index.mjs +5 -4
  19. package/dist/logger-B8IYkljn.d.cts +64 -0
  20. package/dist/logger-B8IYkljn.d.mts +64 -0
  21. package/dist/model.cjs +208 -359
  22. package/dist/model.d.cts +2896 -2
  23. package/dist/model.d.mts +17 -2
  24. package/dist/model.mjs +207 -359
  25. package/dist/player/component.cjs +317 -0
  26. package/dist/player/component.d.cts +50 -0
  27. package/dist/player/component.d.mts +50 -0
  28. package/dist/player/component.mjs +315 -0
  29. package/dist/player-CJayEzwt.cjs +6750 -0
  30. package/dist/player-DcctWhyM.mjs +6599 -0
  31. package/dist/player.cjs +27 -0
  32. package/dist/player.d.cts +17 -0
  33. package/dist/player.d.mts +17 -0
  34. package/dist/player.mjs +1 -0
  35. package/dist/rolldown-runtime-CmQyd0Gu.cjs +27 -0
  36. package/dist/util.cjs +9 -10
  37. package/dist/util.d.cts +20 -13
  38. package/dist/util.d.mts +20 -13
  39. package/dist/util.mjs +4 -6
  40. package/package.json +45 -5
  41. package/dist/index-DBbxKcc1.d.mts +0 -3051
  42. package/dist/logger-ByDB8lYF.mjs +0 -56
  43. package/dist/logger-dEoueCj7.d.cts +0 -35
  44. package/dist/logger-dEoueCj7.d.mts +0 -35
@@ -1,56 +0,0 @@
1
- //#region src/util/logger.ts
2
- /**
3
- * Copyright 2026 The MOQtail Authors
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- let LogLevel = /* @__PURE__ */ function(LogLevel) {
18
- LogLevel[LogLevel["DEBUG"] = 0] = "DEBUG";
19
- LogLevel[LogLevel["LOG"] = 1] = "LOG";
20
- LogLevel[LogLevel["WARN"] = 2] = "WARN";
21
- LogLevel[LogLevel["ERROR"] = 3] = "ERROR";
22
- LogLevel[LogLevel["NONE"] = 4] = "NONE";
23
- return LogLevel;
24
- }({});
25
- const _config = {
26
- level: 2,
27
- enabledModules: null
28
- };
29
- function setLogLevel(level) {
30
- _config.level = level;
31
- }
32
- function setLogEnabledModules(modules) {
33
- _config.enabledModules = modules;
34
- }
35
- var Logger = class {
36
- isEnabled(module, level) {
37
- if (level < _config.level) return false;
38
- if (_config.enabledModules !== null && !_config.enabledModules.includes(module)) return false;
39
- return true;
40
- }
41
- debug(module, ...args) {
42
- if (this.isEnabled(module, 0)) console.debug(`[MOQtail][${module}]`, ...args);
43
- }
44
- log(module, ...args) {
45
- if (this.isEnabled(module, 1)) console.log(`[MOQtail][${module}]`, ...args);
46
- }
47
- warn(module, ...args) {
48
- if (this.isEnabled(module, 2)) console.warn(`[MOQtail][${module}]`, ...args);
49
- }
50
- error(module, ...args) {
51
- if (this.isEnabled(module, 3)) console.error(`[MOQtail][${module}]`, ...args);
52
- }
53
- };
54
- const logger = new Logger();
55
- //#endregion
56
- export { setLogLevel as a, setLogEnabledModules as i, Logger as n, logger as r, LogLevel as t };
@@ -1,35 +0,0 @@
1
- //#region src/util/logger.d.ts
2
- /**
3
- * Copyright 2026 The MOQtail Authors
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- declare enum LogLevel {
18
- DEBUG = 0,
19
- LOG = 1,
20
- WARN = 2,
21
- ERROR = 3,
22
- NONE = 4
23
- }
24
- declare function setLogLevel(level: LogLevel): void;
25
- declare function setLogEnabledModules(modules: string[] | null): void;
26
- declare class Logger {
27
- private isEnabled;
28
- debug(module: string, ...args: unknown[]): void;
29
- log(module: string, ...args: unknown[]): void;
30
- warn(module: string, ...args: unknown[]): void;
31
- error(module: string, ...args: unknown[]): void;
32
- }
33
- declare const logger: Logger;
34
- //#endregion
35
- export { setLogLevel as a, setLogEnabledModules as i, Logger as n, logger as r, LogLevel as t };
@@ -1,35 +0,0 @@
1
- //#region src/util/logger.d.ts
2
- /**
3
- * Copyright 2026 The MOQtail Authors
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- declare enum LogLevel {
18
- DEBUG = 0,
19
- LOG = 1,
20
- WARN = 2,
21
- ERROR = 3,
22
- NONE = 4
23
- }
24
- declare function setLogLevel(level: LogLevel): void;
25
- declare function setLogEnabledModules(modules: string[] | null): void;
26
- declare class Logger {
27
- private isEnabled;
28
- debug(module: string, ...args: unknown[]): void;
29
- log(module: string, ...args: unknown[]): void;
30
- warn(module: string, ...args: unknown[]): void;
31
- error(module: string, ...args: unknown[]): void;
32
- }
33
- declare const logger: Logger;
34
- //#endregion
35
- export { setLogLevel as a, setLogEnabledModules as i, Logger as n, logger as r, LogLevel as t };