@symbiotejs/symbiote 3.5.0 → 3.5.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/CHANGELOG.md CHANGED
@@ -1,12 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.5.2
4
+
5
+ ### Fixed
6
+
7
+ - **`devMode` flag is now cross-module safe.** Moved to `globalThis.__SYMBIOTE_DEV_MODE` so it works correctly across CDN/importmap module scopes (same pattern as `PubSub.globalStore`).
8
+
9
+ ### Improved
10
+
11
+ - **`warn.js` — minimal core dispatcher.** Stripped to just `devState`, `warnMsg`, and `errMsg`. All formatting, messages, and styling logic moved to `devMessages.js` via `globalThis.__SYMBIOTE_DEV_LOG` handler. No messages map or `Array.isArray` in core.
12
+
13
+ - **Colored console output.** `devMessages.js` now renders styled badges in browser consoles: purple `Symbiote` badge, amber/red code badge, violet `<component-name>`, and dimmed doc links. Falls back to plain text in Node.js.
14
+
15
+ - **Doc references in all warnings.** Every message now includes a `→` link to the relevant GitHub docs page.
16
+
17
+ - **`devMessages.js` auto-enables `devMode`.** Importing the module sets `globalThis.__SYMBIOTE_DEV_MODE = true` — one import for the full dev experience.
18
+
3
19
  ## 3.5.0
4
20
 
5
21
  ### Added
6
22
 
7
23
  - **External dev messages module (`core/devMessages.js`).** All warning and error message strings have been extracted from core files into an optional module. Core files now emit short numeric codes (e.g. `[Symbiote W5]`). Import `@symbiotejs/symbiote/core/devMessages.js` once to get full human-readable messages. This reduces the core bundle size by removing all formatting strings from `PubSub.js`, `Symbiote.js`, `tpl-processors.js`, `AppRouter.js`, `html.js`, and both itemize processors.
8
24
 
9
- - **`core/warn.js` — lightweight message dispatcher.** Exports `warnMsg(code, ...args)`, `errMsg(code, ...args)`, and `registerMessages(map)`. All core files now use this dispatcher instead of inline `console.warn`/`console.error` calls.
25
+ - **`core/warn.js` — lightweight message dispatcher.** Exports `warnMsg(code, ...args)` and `errMsg(code, ...args)`. All core files now use this dispatcher instead of inline `console.warn`/`console.error` calls.
10
26
 
11
27
  - **AppRouter: `title` accepts functions.** Route descriptors and `setDefaultTitle()` now accept `() => String` in addition to plain strings. The function is called at navigation time, enabling dynamic or localized page titles:
12
28
  ```js
package/core/PubSub.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { DICT } from './dictionary.js';
2
- import { warnMsg } from './warn.js';
2
+ import { warnMsg, devState } from './warn.js';
3
3
 
4
4
  // structuredClone() is limited by supported types, so we use custom cloning:
5
5
  function cloneObj(obj) {
@@ -269,7 +269,7 @@ export class PubSub {
269
269
  PubSub.#warn('publish computed (value must be a Function)', prop, this);
270
270
  return;
271
271
  }
272
- if (PubSub.devMode && !(this.store[prop] === null || val === null) && typeof this.store[prop] !== typeof val) {
272
+ if (devState.devMode && !(this.store[prop] === null || val === null) && typeof this.store[prop] !== typeof val) {
273
273
  warnMsg(2, String(this.uid || 'local'), String(prop), typeof this.store[prop], typeof val, JSON.stringify(this.store[prop]), JSON.stringify(val));
274
274
  }
275
275
  this.store[prop] = val;
@@ -410,7 +410,4 @@ PubSub.globalStore = globalThis.__SYMBIOTE_PUBSUB_STORE || (globalThis.__SYMBIOT
410
410
  /** @type {Map<String | Symbol, Array<Function>>} */
411
411
  PubSub.pendingDeps = new Map();
412
412
 
413
- /** @type {Boolean} */
414
- PubSub.devMode = false;
415
-
416
413
  export default PubSub;
package/core/Symbiote.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import PubSub from './PubSub.js';
2
- import { warnMsg } from './warn.js';
2
+ import { warnMsg, devState } from './warn.js';
3
3
  import { DICT } from './dictionary.js';
4
4
  import { animateOut } from './animateOut.js';
5
5
  import { setNestedProp } from '../utils/setNestedProp.js';
@@ -42,16 +42,12 @@ export class Symbiote extends HTMLElement {
42
42
  /** @type {HTMLTemplateElement} */
43
43
  static __tpl;
44
44
 
45
- /** @type {Boolean} */
46
- static #devMode = false;
47
-
48
45
  static set devMode(val) {
49
- Symbiote.#devMode = val;
50
- PubSub.devMode = val;
46
+ devState.devMode = val;
51
47
  }
52
48
 
53
49
  static get devMode() {
54
- return Symbiote.#devMode;
50
+ return devState.devMode;
55
51
  }
56
52
 
57
53
  get Symbiote() {
@@ -434,7 +430,7 @@ export class Symbiote extends HTMLElement {
434
430
  if (Symbiote.devMode && this.sharedCtx.has(sharedName)) {
435
431
  let existing = this.sharedCtx.read(sharedName);
436
432
  if (existing !== sharedVal && typeof sharedVal !== 'function') {
437
- warnMsg(7, sharedName);
433
+ warnMsg(7, this.localName, sharedName);
438
434
  }
439
435
  }
440
436
  this.sharedCtx.add(sharedName, sharedVal);
@@ -664,7 +660,7 @@ export class Symbiote extends HTMLElement {
664
660
  * @param {any} [initValue] Uses empty string by default to make value useful in template
665
661
  */
666
662
  bindCssData(propName, initValue = '') {
667
- if (Symbiote.#devMode && (this.ssrMode || this.isoMode)) {
663
+ if (devState.devMode && (this.ssrMode || this.isoMode)) {
668
664
  warnMsg(10, this.localName, propName);
669
665
  }
670
666
  if (!this.#boundCssProps) {
@@ -1,59 +1,102 @@
1
- import { registerMessages } from './warn.js';
2
- import Symbiote from './Symbiote.js';
1
+ globalThis.__SYMBIOTE_DEV_MODE = true;
3
2
 
4
- Symbiote.devMode = true;
3
+ let isBrowser = !globalThis.process;
5
4
 
6
- registerMessages(new Map([
5
+ // CSS styles for browser console
6
+ let S = {
7
+ badge: 'background:#7c3aed;color:#fff;border-radius:3px;padding:1px 4px;font-weight:bold',
8
+ code: 'background:#f59e0b;color:#000;border-radius:3px;padding:1px 4px;font-weight:bold',
9
+ errCode: 'background:#ef4444;color:#fff;border-radius:3px;padding:1px 4px;font-weight:bold',
10
+ tag: 'color:#7c3aed;font-weight:bold',
11
+ dim: 'color:#888',
12
+ reset: 'color:inherit',
13
+ };
14
+
15
+ let DOCS = 'https://github.com/symbiotejs/symbiote.js/blob/main/docs/';
16
+
17
+ /**
18
+ * @param {string} code - e.g. 'W1' or 'E15'
19
+ * @param {string} body - message body
20
+ * @param {string} doc - doc page name
21
+ * @param {string} [tag] - component tag name
22
+ */
23
+ function fmt(code, body, doc, tag) {
24
+ if (!isBrowser) {
25
+ return `[Symbiote ${code}]${tag ? ` <${tag}>:` : ''} ${body}\n→ ${DOCS}${doc}.md`;
26
+ }
27
+ let isErr = code.startsWith('E');
28
+ let parts = `%cSymbiote%c${code}%c`;
29
+ let styles = [S.badge, isErr ? S.errCode : S.code, S.reset];
30
+ if (tag) {
31
+ parts += ` %c<${tag}>%c`;
32
+ styles.push(S.tag, S.reset);
33
+ }
34
+ parts += ` ${body} %c→ ${doc}`;
35
+ styles.push(S.dim);
36
+ return [parts, ...styles];
37
+ }
38
+
39
+ /** @type {Map<number, (...args: any[]) => (string | any[])>} */
40
+ let messages = new Map([
7
41
  // PubSub
8
42
  [1, (uid, action, prop) =>
9
- `[Symbiote] PubSub (${uid}): cannot ${action}. Property: "${prop}"`],
43
+ fmt('W1', `PubSub (${uid}): cannot ${action}. Property: "${prop}"`, 'pubsub')],
10
44
  [2, (uid, prop, prevType, newType, prev, next) =>
11
- `[Symbiote] PubSub (${uid}): type change for "${prop}" [${prevType} → ${newType}].\n`
12
- + `Previous: ${prev}\nNew: ${next}`],
45
+ fmt('W2', `PubSub (${uid}): type change for "${prop}" [${prevType} → ${newType}]. Previous: ${prev} | New: ${next}`, 'pubsub')],
13
46
  [3, (uid) =>
14
- `[Symbiote] PubSub: context "${uid}" is already registered. Returning existing instance.`],
47
+ fmt('W3', `PubSub: context "${uid}" is already registered. Returning existing instance.`, 'context')],
15
48
  [4, (uid, keys) =>
16
- `[Symbiote] PubSub: context "${uid}" not found.\n`
17
- + `Available contexts: [${keys}]`],
49
+ fmt('W4', `PubSub: context "${uid}" not found. Available: [${keys}]`, 'context')],
18
50
 
19
51
  // Symbiote
20
52
  [5, (localName, selector) =>
21
- `[Symbiote] <${localName}>: custom template "${selector}" not found.`],
53
+ fmt('W5', `custom template "${selector}" not found.`, 'templates', localName)],
22
54
  [6, (localName, sharedName) =>
23
- `[Symbiote] "${localName}" uses *${sharedName} without ctx attribute or --ctx CSS variable. `
24
- + 'Set ctx="name" or --ctx to share state.'],
25
- [7, (sharedName) =>
26
- `[Symbiote] Shared prop "${sharedName}" already has value. Keeping existing.`],
55
+ fmt('W6', `uses *${sharedName} without ctx attribute or --ctx CSS variable. Set ctx="name" or --ctx to share state.`, 'context', localName)],
56
+ [7, (localName, sharedName) =>
57
+ fmt('W7', `shared prop "${sharedName}" already has value. Keeping existing.`, 'context', localName)],
27
58
  [8, (tagName, existingClass, newClass) =>
28
- `[Symbiote] <${tagName}> is already registered (class: ${existingClass}).\n`
29
- + `Attempted re-registration with class "${newClass}" — skipped.`],
59
+ fmt('W8', `already registered (class: ${existingClass}). Re-registration with "${newClass}" — skipped.`, 'get-started', tagName)],
30
60
  [9, (localName, propName) =>
31
- `[Symbiote] <${localName}>: CSS data parse error for "${propName}". Check that the CSS custom property is defined.`],
61
+ fmt('W9', `CSS data parse error for "${propName}". Check that the CSS custom property is defined.`, 'css-data', localName)],
32
62
  [10, (localName, propName) =>
33
- `[Symbiote dev] <${localName}>: CSS data binding "${propName}" will not read computed styles during SSR. `
34
- + 'The init value will be used instead.'],
63
+ fmt('W10', `CSS data binding "${propName}" will not read computed styles during SSR. The init value will be used instead.`, 'css-data', localName)],
35
64
 
36
65
  // tpl-processors
37
66
  [11, (localName, valKey, knownKeys) =>
38
- `[Symbiote dev] <${localName}>: binding key "${valKey}" not found in init$ (auto-initialized to null).\n`
39
- + `Known keys: [${knownKeys}]`],
67
+ fmt('W11', `binding key "${valKey}" not found in init$ (auto-initialized to null). Known keys: [${knownKeys}]`, 'properties', localName)],
40
68
  [12, (localName, prop) =>
41
- `[Symbiote dev] <${localName}>: text-node binding "{{${prop}}}" has no hydration attribute. `
42
- + 'In ssrMode/isoMode it will be rendered by the server but won\'t update on the client. '
43
- + 'Use property binding (${{textContent: \'' + prop + '\'}}) for hydratable text.'],
69
+ fmt('W12', `text-node binding "{{${prop}}}" has no hydration attribute. `
70
+ + 'In ssrMode/isoMode it will be rendered by the server but won\'t update on the client. '
71
+ + 'Use property binding (${{textContent: \'' + prop + '\'}}) for hydratable text.', 'ssr', localName)],
44
72
 
45
73
  // AppRouter
46
74
  [13, (msg) =>
47
- `[Symbiote > AppRouter] ${msg}`],
75
+ fmt('W13', msg, 'routing')],
48
76
  [14, () =>
49
- '[Symbiote > AppRouter] History API is not available.'],
77
+ fmt('W14', 'History API is not available.', 'routing')],
50
78
 
51
79
  // html
52
80
  [15, (val) =>
53
- `[Symbiote > html] \`this\` used in template interpolation (value: ${val}).\n`
54
- + 'Templates are context-free — use ${{ prop: \'stateKey\' }} binding syntax instead.'],
81
+ fmt('E15', `\`this\` used in template interpolation (value: ${val}). `
82
+ + 'Templates are context-free — use ${{ prop: \'stateKey\' }} binding syntax instead.', 'templates')],
55
83
 
56
84
  // itemizeProcessor
57
85
  [16, (localName, dataType, data) =>
58
- `[Symbiote] <${localName}>: itemize data must be Array or Object, got ${dataType}: ${data}`],
59
- ]));
86
+ fmt('W16', `itemize data must be Array or Object, got ${dataType}: ${data}`, 'list-rendering', localName)],
87
+ ]);
88
+
89
+ /**
90
+ * @param {'warn' | 'error'} type
91
+ * @param {number} code
92
+ * @param {any[]} args
93
+ */
94
+ globalThis.__SYMBIOTE_DEV_LOG = (type, code, args) => {
95
+ let formatter = messages.get(code);
96
+ if (formatter) {
97
+ let result = formatter(...args);
98
+ Array.isArray(result) ? console[type](...result) : console[type](result);
99
+ } else {
100
+ console[type](`[Symbiote ${type === 'error' ? 'E' : 'W'}${code}]`);
101
+ }
102
+ };
@@ -1,5 +1,5 @@
1
1
  import { DICT } from './dictionary.js';
2
- import { warnMsg } from './warn.js';
2
+ import { warnMsg, devState } from './warn.js';
3
3
  import { setNestedProp } from '../utils/setNestedProp.js';
4
4
  import { ownElements, isOwnNode } from './ownElements.js';
5
5
  import { initPropFallback } from './initPropFallback.js';
@@ -63,7 +63,7 @@ function domBindProcessor(fr, fnCtx) {
63
63
  if (!fnCtx.has(valKey) && fnCtx.allowTemplateInits) {
64
64
  initPropFallback(fnCtx, valKey);
65
65
  // Dev-only: warn about bindings that aren't in init$ (likely typos)
66
- if (fnCtx.localCtx.read(valKey) === null && fnCtx.Symbiote?.devMode) {
66
+ if (fnCtx.localCtx.read(valKey) === null && devState.devMode) {
67
67
  let known = Object.keys(fnCtx.init$).filter((k) => !k.startsWith('+'));
68
68
  warnMsg(11, fnCtx.localName, valKey, known.join(', '));
69
69
  }
@@ -153,7 +153,7 @@ const txtNodesProcessor = function (fr, fnCtx) {
153
153
  if (!fnCtx.has(prop) && fnCtx.allowTemplateInits) {
154
154
  initPropFallback(fnCtx, prop);
155
155
  }
156
- if (fnCtx.Symbiote?.devMode && (fnCtx.ssrMode || fnCtx.isoMode)) {
156
+ if (devState.devMode && (fnCtx.ssrMode || fnCtx.isoMode)) {
157
157
  warnMsg(12, fnCtx.localName, prop);
158
158
  }
159
159
  fnCtx.sub(prop, (val) => {
package/core/warn.js CHANGED
@@ -1,13 +1,24 @@
1
- /** @type {Map<number, (...args: any[]) => string>} */
2
- let messages = globalThis.__SYMBIOTE_DEV_MESSAGES || (globalThis.__SYMBIOTE_DEV_MESSAGES = new Map());
1
+ /** @type {{ devMode: boolean }} */
2
+ export let devState = {
3
+ get devMode() {
4
+ return !!globalThis.__SYMBIOTE_DEV_MODE;
5
+ },
6
+ set devMode(val) {
7
+ globalThis.__SYMBIOTE_DEV_MODE = val;
8
+ },
9
+ };
10
+
11
+ /** @param {string} type @param {number} code */
12
+ function _log(type, code) {
13
+ console[type](`[Symbiote ${type === 'error' ? 'E' : 'W'}${code}]`);
14
+ }
3
15
 
4
16
  /**
5
17
  * @param {number} code
6
18
  * @param {...any} args
7
19
  */
8
20
  export function warnMsg(code, ...args) {
9
- let fmt = messages.get(code);
10
- console.warn(fmt ? fmt(...args) : `[Symbiote W${code}]`);
21
+ (globalThis.__SYMBIOTE_DEV_LOG || _log)('warn', code, args);
11
22
  }
12
23
 
13
24
  /**
@@ -15,13 +26,5 @@ export function warnMsg(code, ...args) {
15
26
  * @param {...any} args
16
27
  */
17
28
  export function errMsg(code, ...args) {
18
- let fmt = messages.get(code);
19
- console.error(fmt ? fmt(...args) : `[Symbiote E${code}]`);
20
- }
21
-
22
- /** @param {Map<number, (...args: any[]) => string>} map */
23
- export function registerMessages(map) {
24
- for (let [code, fmt] of map) {
25
- messages.set(code, fmt);
26
- }
29
+ (globalThis.__SYMBIOTE_DEV_LOG || _log)('error', code, args);
27
30
  }
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@symbiotejs/symbiote",
4
- "version": "3.5.0",
4
+ "version": "3.5.2",
5
5
  "description": "Symbiote.js - zero-dependency close-to-platform frontend library to build super-powered web components",
6
6
  "author": "team@rnd-pro.com",
7
7
  "license": "MIT",
8
8
  "scripts": {
9
9
  "prepare": "git config core.hooksPath .git-hooks",
10
- "types": "rm -rf types && tsc -p dts.cfg.json && node scripts/clean-dts.js",
10
+ "types": "rm -rf types && tsc -p dts.cfg.json && node scripts/clean-dts.js && node scripts/update-exports.js",
11
11
  "prepublishOnly": "npm test",
12
- "pub": "npm run types && node scripts/update-exports.js && npm publish",
12
+ "pub": "npm run types && npm publish",
13
13
  "postinstall": "node scripts/postinstall.js",
14
14
  "test": "node --test test/node/*.test.js && npx playwright test",
15
15
  "test:unit": "node --test test/node/*.test.js",
@@ -158,6 +158,7 @@
158
158
  "keywords": [
159
159
  "web components",
160
160
  "SSR",
161
+ "SSG",
161
162
  "server side rendering for web components",
162
163
  "ui library",
163
164
  "data flow",
@@ -182,7 +183,8 @@
182
183
  "https imports",
183
184
  "reactive html attributes",
184
185
  "MIT",
185
- "JSDA"
186
+ "JSDA",
187
+ "jsda-kit"
186
188
  ],
187
189
  "devDependencies": {
188
190
  "@playwright/test": "^1.58.2",
@@ -24,7 +24,6 @@ export class PubSub<T extends Record<string, unknown>> {
24
24
  export namespace PubSub {
25
25
  let globalStore: Map<string | Symbol, PubSub<any>>;
26
26
  let pendingDeps: Map<string | Symbol, Array<Function>>;
27
- let devMode: boolean;
28
27
  }
29
28
  export default PubSub;
30
29
  //# sourceMappingURL=PubSub.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Symbiote.d.ts","sourceRoot":"","sources":["../../core/Symbiote.js"],"names":[],"mappings":";;AAoBA,sBADc,CAAC;IAuBb,cADW,mBAAmB,CACjB;IAGb,sCAAwB;IAExB,iCAGC;IAED,8BAEC;IAkBD,wBAAgB;IA0JhB,+BAJwB,CAAC,SAAZ,aAAU,uBAEZ,CAAC;;;MA0CX;IAuQD,qCAA+B;IAoC/B,iDAFa,OAAO,QAAQ,CAkB3B;IAED,wBAKC;IAGD;;aAOC;IAmHD,6BADY,SAAS,aAAa,QAOjC;IAGD,+BADY,SAAS,aAAa,QAOjC;IAGD,8BADY,SAAS,aAAa,EAIjC;IAGD,gCADY,SAAS,aAAa,EAIjC;IApkBD,cA6BC;IArID,gCAEC;IAED,qBAAiB;IACjB,uBAAmB;IAiBnB,kBAHW,SAAS,gBAAgB,0BAmFnC;IApDG,aAAiD;IAyDnD,OADW,CAAC,CACoB;IAEhC;;MAAmC;IAEnC,oBADW,GAAG,CAAC,CAAC,EAAE,EAAE,gBAAgB,gBAAW,EAAE,KAAK,eAAU,KAAK,IAAI,CAAC,CACvC;IAEnC;;MAA8B;IAC9B,kBAAwB;IAExB,qBAAwB;IAExB,sBAAyB;IAEzB,wBAA0B;IAE1B,0BAA6B;IAI7B,iBAAoB;IAEpB,6BAAgC;IAEhC,mBAAsB;IAEtB,4BAA8B;IAIhC,yBAEC;IAGD,sBASC;IAGD,4BAKC;IAGD,6BAEC;IAuDD,IALuB,CAAC,SAAX,MAAO,CAAE,QACX,CAAC,WACD,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,wBAuC/B;IAGD,2BAIC;IAGD,uBAIC;IAQD,IALuB,CAAC,SAAX,MAAO,CAAE,qBAEX,CAAC,CAAC,CAAC,CAAC,2BAOd;IAMD,UAHW,OAAO,CAAC,CAAC,CAAC,2BAOpB;IAGD,SADc,CAAC,CA6Bd;IAMD,YAHW,OAAO,CAAC,CAAC,CAAC,mCAcpB;IAED,8BAgBC;IAdG,4CASE;IAmFF,0BAAwC;IAwB1C,uBAAyB;IAG3B,0BAEC;IAED,wBAAoB;IAUpB,yBAAuB;IACvB,6BA0BC;IA0CD,oEAeC;IAMD,yDAoBC;IAYD,0BAME;IAMF,0CAFW,GAAG,QAgBb;IAED,yBAGC;IAOD,8EAmBC;;CA+BF;;mBAruBkB,aAAa;qBAEX,iBAAiB;2BACX,iBAAiB"}
1
+ {"version":3,"file":"Symbiote.d.ts","sourceRoot":"","sources":["../../core/Symbiote.js"],"names":[],"mappings":";;AAoBA,sBADc,CAAC;IAuBb,cADW,mBAAmB,CACjB;IAEb,iCAEC;IAED,8BAEC;IAkBD,wBAAgB;IA0JhB,+BAJwB,CAAC,SAAZ,aAAU,uBAEZ,CAAC;;;MA0CX;IAuQD,qCAA+B;IAoC/B,iDAFa,OAAO,QAAQ,CAkB3B;IAED,wBAKC;IAGD;;aAOC;IAmHD,6BADY,SAAS,aAAa,QAOjC;IAGD,+BADY,SAAS,aAAa,QAOjC;IAGD,8BADY,SAAS,aAAa,EAIjC;IAGD,gCADY,SAAS,aAAa,EAIjC;IApkBD,cA6BC;IArID,gCAEC;IAED,qBAAiB;IACjB,uBAAmB;IAiBnB,kBAHW,SAAS,gBAAgB,0BAmFnC;IApDG,aAAiD;IAyDnD,OADW,CAAC,CACoB;IAEhC;;MAAmC;IAEnC,oBADW,GAAG,CAAC,CAAC,EAAE,EAAE,gBAAgB,gBAAW,EAAE,KAAK,eAAU,KAAK,IAAI,CAAC,CACvC;IAEnC;;MAA8B;IAC9B,kBAAwB;IAExB,qBAAwB;IAExB,sBAAyB;IAEzB,wBAA0B;IAE1B,0BAA6B;IAI7B,iBAAoB;IAEpB,6BAAgC;IAEhC,mBAAsB;IAEtB,4BAA8B;IAIhC,yBAEC;IAGD,sBASC;IAGD,4BAKC;IAGD,6BAEC;IAuDD,IALuB,CAAC,SAAX,MAAO,CAAE,QACX,CAAC,WACD,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,wBAuC/B;IAGD,2BAIC;IAGD,uBAIC;IAQD,IALuB,CAAC,SAAX,MAAO,CAAE,qBAEX,CAAC,CAAC,CAAC,CAAC,2BAOd;IAMD,UAHW,OAAO,CAAC,CAAC,CAAC,2BAOpB;IAGD,SADc,CAAC,CA6Bd;IAMD,YAHW,OAAO,CAAC,CAAC,CAAC,mCAcpB;IAED,8BAgBC;IAdG,4CASE;IAmFF,0BAAwC;IAwB1C,uBAAyB;IAG3B,0BAEC;IAED,wBAAoB;IAUpB,yBAAuB;IACvB,6BA0BC;IA0CD,oEAeC;IAMD,yDAoBC;IAYD,0BAME;IAMF,0CAFW,GAAG,QAgBb;IAED,yBAGC;IAOD,8EAmBC;;CA+BF;;mBAjuBkB,aAAa;qBAEX,iBAAiB;2BACX,iBAAiB"}
@@ -1,2 +1,13 @@
1
- export {};
1
+ declare function fmt(code: string, body: string, doc: string, tag?: string): string | string[];
2
+ declare let isBrowser: boolean;
3
+ declare namespace S {
4
+ let badge: string;
5
+ let code: string;
6
+ let errCode: string;
7
+ let tag: string;
8
+ let dim: string;
9
+ let reset: string;
10
+ }
11
+ declare let DOCS: string;
12
+ declare let messages: Map<number, (...args: any[]) => (string | any[])>;
2
13
  //# sourceMappingURL=devMessages.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"devMessages.d.ts","sourceRoot":"","sources":["../../core/devMessages.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"devMessages.d.ts","sourceRoot":"","sources":["../../core/devMessages.js"],"names":[],"mappings":"AAsBA,2BALW,MAAM,QACN,MAAM,OACN,MAAM,QACN,MAAM,qBAgBhB;AAlCD,+BAAoC;;;;;;;;;AAYpC,yBAAuE;AAyBvE,sBADW,GAAG,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC,CAAC,CAgDzD"}
@@ -1,4 +1,6 @@
1
1
  export function warnMsg(code: number, ...args: any[]): void;
2
2
  export function errMsg(code: number, ...args: any[]): void;
3
- export function registerMessages(map: Map<number, (...args: any[]) => string>): void;
3
+ export let devState: {
4
+ devMode: boolean;
5
+ };
4
6
  //# sourceMappingURL=warn.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"warn.d.ts","sourceRoot":"","sources":["../../core/warn.js"],"names":[],"mappings":"AAOA,8BAHW,MAAM,WACF,GAAG,EAAA,QAKjB;AAMD,6BAHW,MAAM,WACF,GAAG,EAAA,QAKjB;AAGD,sCADY,GAAG,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,MAAM,CAAC,QAKlD"}
1
+ {"version":3,"file":"warn.d.ts","sourceRoot":"","sources":["../../core/warn.js"],"names":[],"mappings":"AAmBA,8BAHW,MAAM,WACF,GAAG,EAAA,QAIjB;AAMD,6BAHW,MAAM,WACF,GAAG,EAAA,QAIjB;AA5BD,qBADW;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAQ7B"}