tutuca 0.9.19 → 0.9.21

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.
@@ -1701,9 +1701,14 @@ class ComponentStack {
1701
1701
  comp.scope = this.enter();
1702
1702
  this.comps.registerComponent(comp);
1703
1703
  this.byName[comp.name] = comp;
1704
- const alias = aliases[comp.name];
1705
- if (alias)
1704
+ }
1705
+ for (const alias in aliases) {
1706
+ const comp = this.byName[aliases[alias]];
1707
+ console.assert(this.byName[alias] === undefined, "alias overrides component", alias);
1708
+ if (comp !== undefined)
1706
1709
  this.byName[alias] = comp;
1710
+ else
1711
+ console.warn("alias", alias, "to inexistent component", aliases[alias]);
1707
1712
  }
1708
1713
  }
1709
1714
  registerMacros(macros) {
@@ -2038,9 +2043,10 @@ class Transactor {
2038
2043
  }
2039
2044
  }
2040
2045
  function mkReq404(name) {
2041
- return () => {
2046
+ const fn = () => {
2042
2047
  throw new Error(`Request not found: ${name}`);
2043
2048
  };
2049
+ return { fn };
2044
2050
  }
2045
2051
  function nullHandler() {
2046
2052
  return this;
@@ -2681,15 +2687,13 @@ class App {
2681
2687
  _dispatchEvent(e) {
2682
2688
  const { type } = e;
2683
2689
  const isDrag = type === "dragover" || type === "dragstart" || type === "dragend";
2684
- const { rootNode: root, maxEventNodeDepth: maxDepth, comps } = this;
2690
+ const { rootNode: root, maxEventNodeDepth: maxDepth, comps, transactor } = this;
2685
2691
  const [path, handlers] = Path.fromEvent(e, root, maxDepth, comps, !isDrag);
2686
2692
  if (isDrag)
2687
2693
  this._handleDragEvent(e, type, path);
2688
- if (path !== null && handlers !== null) {
2689
- for (const handler of handlers) {
2690
- this.transactor.transactInputNow(path, e, handler, this.dragInfo);
2691
- }
2692
- }
2694
+ if (path !== null && handlers !== null)
2695
+ for (const handler of handlers)
2696
+ transactor.transactInputNow(path, e, handler, this.dragInfo);
2693
2697
  }
2694
2698
  _handleTouchEvent(e) {
2695
2699
  const { type } = e;
@@ -7932,34 +7936,43 @@ async function compileClassesToStyleText(app, compileClasses, extraCSSClasses, C
7932
7936
  }
7933
7937
  return await compileClasses(Array.from(classes));
7934
7938
  }
7935
- // src/lint/index.js
7939
+ // tools/core/lint-check.js
7936
7940
  var ALT_HANDLER_NOT_DEFINED = "ALT_HANDLER_NOT_DEFINED";
7941
+ var ALT_HANDLER_NOT_REFERENCED = "ALT_HANDLER_NOT_REFERENCED";
7937
7942
  var RENDER_IT_OUTSIDE_OF_LOOP = "RENDER_IT_OUTSIDE_OF_LOOP";
7938
7943
  var UNKNOWN_EVENT_MODIFIER = "UNKNOWN_EVENT_MODIFIER";
7939
7944
  var UNKNOWN_HANDLER_ARG_NAME = "UNKNOWN_HANDLER_ARG_NAME";
7940
7945
  var INPUT_HANDLER_NOT_IMPLEMENTED = "INPUT_HANDLER_NOT_IMPLEMENTED";
7946
+ var INPUT_HANDLER_NOT_REFERENCED = "INPUT_HANDLER_NOT_REFERENCED";
7941
7947
  var INPUT_HANDLER_METHOD_NOT_IMPLEMENTED = "INPUT_HANDLER_METHOD_NOT_IMPLEMENTED";
7942
7948
  var INPUT_HANDLER_FOR_INPUT_HANDLER_METHOD = "INPUT_HANDLER_FOR_INPUT_HANDLER_METHOD";
7943
7949
  var INPUT_HANDLER_METHOD_FOR_INPUT_HANDLER = "INPUT_HANDLER_METHOD_FOR_INPUT_HANDLER";
7944
7950
  var FIELD_VAL_NOT_DEFINED = "FIELD_VAL_NOT_DEFINED";
7945
7951
  var COMPUTED_VAL_NOT_DEFINED = "COMPUTED_VAL_NOT_DEFINED";
7952
+ var COMPUTED_NOT_REFERENCED = "COMPUTED_NOT_REFERENCED";
7946
7953
  var UNKNOWN_REQUEST_NAME = "UNKNOWN_REQUEST_NAME";
7947
7954
  var UNKNOWN_COMPONENT_NAME = "UNKNOWN_COMPONENT_NAME";
7948
7955
  var LEVEL_WARN = "warn";
7949
7956
  var LEVEL_ERROR = "error";
7950
7957
  var LEVEL_HINT = "hint";
7951
7958
  function checkComponent(Comp, lx = new LintContext) {
7952
- checkEventHandlersHaveImpls(lx, Comp);
7953
- checkConsistentAttrs(lx, Comp);
7959
+ const referencedAlters = new Set;
7960
+ const referencedInputs = new Set;
7961
+ const referencedComputed = new Set;
7962
+ checkEventHandlersHaveImpls(lx, Comp, referencedInputs);
7963
+ checkConsistentAttrs(lx, Comp, referencedAlters, referencedComputed);
7954
7964
  for (const name in Comp.views) {
7955
- checkView(lx, Comp.views[name], Comp);
7965
+ checkView(lx, Comp.views[name], Comp, referencedAlters, referencedComputed);
7956
7966
  }
7967
+ checkUnreferencedAlterHandlers(lx, Comp, referencedAlters);
7968
+ checkUnreferencedInputHandlers(lx, Comp, referencedInputs);
7969
+ checkUnreferencedComputed(lx, Comp, referencedComputed);
7957
7970
  return lx;
7958
7971
  }
7959
- function checkView(lx, view, Comp) {
7972
+ function checkView(lx, view, Comp, referencedAlters, referencedComputed) {
7960
7973
  checkRenderItInLoop(lx, view);
7961
7974
  checkEventModifiers(lx, view);
7962
- checkKnownHandlerNames(lx, view, Comp);
7975
+ checkKnownHandlerNames(lx, view, Comp, referencedAlters, referencedComputed);
7963
7976
  }
7964
7977
  function checkRenderItInLoop(lx, view) {
7965
7978
  const { nodes } = view.ctx;
@@ -8011,7 +8024,7 @@ var KNOWN_HANDLER_NAMES = new Set([
8011
8024
  function isKnownHandlerName(name) {
8012
8025
  return KNOWN_HANDLER_NAMES.has(name);
8013
8026
  }
8014
- function checkKnownHandlerNames(lx, view, Comp) {
8027
+ function checkKnownHandlerNames(lx, view, Comp, referencedAlters, referencedComputed) {
8015
8028
  const { computed, scope, alter, Class } = Comp;
8016
8029
  const { prototype: proto } = Class;
8017
8030
  const { fields } = Class.getMetaClass();
@@ -8020,12 +8033,12 @@ function checkKnownHandlerNames(lx, view, Comp) {
8020
8033
  const { args } = handler.handlerCall;
8021
8034
  for (let i = 0;i < args.length; i++) {
8022
8035
  const arg = args[i];
8023
- checkConsistentAttrVal(lx, arg, fields, proto, computed, scope, alter);
8036
+ checkConsistentAttrVal(lx, arg, fields, proto, computed, scope, alter, referencedAlters, referencedComputed);
8024
8037
  }
8025
8038
  }
8026
8039
  }
8027
8040
  }
8028
- function checkEventHandlersHaveImpls(lx, Comp) {
8041
+ function checkEventHandlersHaveImpls(lx, Comp, referencedInputs) {
8029
8042
  const { input, views, Class } = Comp;
8030
8043
  const { prototype: proto } = Class;
8031
8044
  for (const viewName in views) {
@@ -8035,6 +8048,7 @@ function checkEventHandlersHaveImpls(lx, Comp) {
8035
8048
  const { handlerVal } = handler.handlerCall;
8036
8049
  const hvName = handlerVal?.constructor.name;
8037
8050
  if (hvName === "InputHandlerNameVal") {
8051
+ referencedInputs?.add(handlerVal.name);
8038
8052
  if (input[handlerVal.name] === undefined) {
8039
8053
  lx.warn(INPUT_HANDLER_NOT_IMPLEMENTED, {
8040
8054
  name: handlerVal.name,
@@ -8050,6 +8064,7 @@ function checkEventHandlersHaveImpls(lx, Comp) {
8050
8064
  }
8051
8065
  }
8052
8066
  } else if (hvName === "RawFieldVal") {
8067
+ referencedInputs?.add(handlerVal.name);
8053
8068
  if (proto[handlerVal.name] === undefined) {
8054
8069
  lx.warn(INPUT_HANDLER_METHOD_NOT_IMPLEMENTED, {
8055
8070
  name: handlerVal.name,
@@ -8069,7 +8084,7 @@ function checkEventHandlersHaveImpls(lx, Comp) {
8069
8084
  }
8070
8085
  }
8071
8086
  }
8072
- function checkConsistentAttrVal(lx, val, fields, proto, computed, scope, alter) {
8087
+ function checkConsistentAttrVal(lx, val, fields, proto, computed, scope, alter, referencedAlters, referencedComputed) {
8073
8088
  const valName = val?.constructor.name;
8074
8089
  if (valName === "FieldVal" || valName === "RawFieldVal") {
8075
8090
  const { name } = val;
@@ -8078,12 +8093,13 @@ function checkConsistentAttrVal(lx, val, fields, proto, computed, scope, alter)
8078
8093
  }
8079
8094
  } else if (valName === "ComputedVal") {
8080
8095
  const { name } = val;
8096
+ referencedComputed?.add(name);
8081
8097
  if (computed[name] === undefined) {
8082
8098
  lx.error(COMPUTED_VAL_NOT_DEFINED, { val, name });
8083
8099
  }
8084
8100
  } else if (valName === "SeqAccessVal") {
8085
- checkConsistentAttrVal(lx, val.seqVal, fields, proto, computed, scope, alter);
8086
- checkConsistentAttrVal(lx, val.keyVal, fields, proto, computed, scope, alter);
8101
+ checkConsistentAttrVal(lx, val.seqVal, fields, proto, computed, scope, alter, referencedAlters, referencedComputed);
8102
+ checkConsistentAttrVal(lx, val.keyVal, fields, proto, computed, scope, alter, referencedAlters, referencedComputed);
8087
8103
  } else if (valName === "RequestVal") {
8088
8104
  if (scope.lookupRequest(val.name) === null) {
8089
8105
  lx.warn(UNKNOWN_REQUEST_NAME, { name: val.name });
@@ -8098,9 +8114,10 @@ function checkConsistentAttrVal(lx, val, fields, proto, computed, scope, alter)
8098
8114
  }
8099
8115
  } else if (valName === "StrTplVal") {
8100
8116
  for (const subVal of val.vals) {
8101
- checkConsistentAttrVal(lx, subVal, fields, proto, computed, scope, alter);
8117
+ checkConsistentAttrVal(lx, subVal, fields, proto, computed, scope, alter, referencedAlters, referencedComputed);
8102
8118
  }
8103
8119
  } else if (valName === "AlterHandlerNameVal") {
8120
+ referencedAlters?.add(val.name);
8104
8121
  if (alter[val.name] === undefined) {
8105
8122
  lx.warn(ALT_HANDLER_NOT_DEFINED, { name: val.name });
8106
8123
  }
@@ -8108,7 +8125,7 @@ function checkConsistentAttrVal(lx, val, fields, proto, computed, scope, alter)
8108
8125
  console.log(val);
8109
8126
  }
8110
8127
  }
8111
- function checkConsistentAttrs(lx, Comp) {
8128
+ function checkConsistentAttrs(lx, Comp, referencedAlters, referencedComputed) {
8112
8129
  const { computed, scope, views, alter, Class } = Comp;
8113
8130
  const { prototype: proto } = Class;
8114
8131
  const { fields } = Class.getMetaClass();
@@ -8119,7 +8136,7 @@ function checkConsistentAttrs(lx, Comp) {
8119
8136
  if (attrs?.constructor.name === "DynAttrs") {
8120
8137
  for (const attr2 of attrs.items) {
8121
8138
  if (attr2?.constructor.name === "Attr") {
8122
- checkConsistentAttrVal(lx, attr2.val, fields, proto, computed, scope, alter);
8139
+ checkConsistentAttrVal(lx, attr2.val, fields, proto, computed, scope, alter, referencedAlters, referencedComputed);
8123
8140
  }
8124
8141
  }
8125
8142
  }
@@ -8127,27 +8144,48 @@ function checkConsistentAttrs(lx, Comp) {
8127
8144
  for (const w of wrapperAttrs) {
8128
8145
  if (w.name === "each") {
8129
8146
  if (w.whenVal)
8130
- checkConsistentAttrVal(lx, w.whenVal, fields, proto, computed, scope, alter);
8147
+ checkConsistentAttrVal(lx, w.whenVal, fields, proto, computed, scope, alter, referencedAlters, referencedComputed);
8131
8148
  if (w.enrichWithVal)
8132
- checkConsistentAttrVal(lx, w.enrichWithVal, fields, proto, computed, scope, alter);
8149
+ checkConsistentAttrVal(lx, w.enrichWithVal, fields, proto, computed, scope, alter, referencedAlters, referencedComputed);
8133
8150
  if (w.loopWithVal)
8134
- checkConsistentAttrVal(lx, w.loopWithVal, fields, proto, computed, scope, alter);
8151
+ checkConsistentAttrVal(lx, w.loopWithVal, fields, proto, computed, scope, alter, referencedAlters, referencedComputed);
8135
8152
  } else if (w.name !== "scope") {
8136
- checkConsistentAttrVal(lx, w.val, fields, proto, computed, scope, alter);
8153
+ checkConsistentAttrVal(lx, w.val, fields, proto, computed, scope, alter, referencedAlters, referencedComputed);
8137
8154
  }
8138
8155
  }
8139
8156
  }
8140
8157
  if (textChild) {
8141
- checkConsistentAttrVal(lx, textChild, fields, proto, computed, scope, alter);
8158
+ checkConsistentAttrVal(lx, textChild, fields, proto, computed, scope, alter, referencedAlters, referencedComputed);
8142
8159
  }
8143
8160
  }
8144
8161
  for (const node of view.ctx.nodes) {
8145
8162
  if (node.val) {
8146
- checkConsistentAttrVal(lx, node.val, fields, proto, computed, scope, alter);
8163
+ checkConsistentAttrVal(lx, node.val, fields, proto, computed, scope, alter, referencedAlters, referencedComputed);
8147
8164
  }
8148
8165
  }
8149
8166
  }
8150
8167
  }
8168
+ function checkUnreferencedAlterHandlers(lx, Comp, referencedAlters) {
8169
+ for (const name in Comp.alter) {
8170
+ if (!referencedAlters.has(name)) {
8171
+ lx.hint(ALT_HANDLER_NOT_REFERENCED, { name });
8172
+ }
8173
+ }
8174
+ }
8175
+ function checkUnreferencedInputHandlers(lx, Comp, referencedInputs) {
8176
+ for (const name in Comp.input) {
8177
+ if (!referencedInputs.has(name)) {
8178
+ lx.hint(INPUT_HANDLER_NOT_REFERENCED, { name });
8179
+ }
8180
+ }
8181
+ }
8182
+ function checkUnreferencedComputed(lx, Comp, referencedComputed) {
8183
+ for (const name in Comp.computed) {
8184
+ if (!referencedComputed.has(name)) {
8185
+ lx.hint(COMPUTED_NOT_REFERENCED, { name });
8186
+ }
8187
+ }
8188
+ }
8151
8189
 
8152
8190
  class LintContext {
8153
8191
  constructor() {
@@ -8176,6 +8214,238 @@ class LintParseContext extends ParseContext {
8176
8214
  this.attrs.push({ attrs, wrapperAttrs, textChild });
8177
8215
  }
8178
8216
  }
8217
+ // tools/core/results.js
8218
+ class ComponentDocs {
8219
+ constructor({ items }) {
8220
+ this.items = items;
8221
+ }
8222
+ }
8223
+
8224
+ // tools/core/docs.js
8225
+ function getSignature(name, fn) {
8226
+ const s = fn.toString();
8227
+ const m = s.match(/^(?:\w+|function\s*\w*)\s*\(([^)]*)\)/);
8228
+ const params = m ? m[1].trim() : "";
8229
+ return `${name}(${params})`;
8230
+ }
8231
+ function getFieldMethods(field) {
8232
+ const { name, type } = field;
8233
+ const uname = name[0].toUpperCase() + name.slice(1);
8234
+ const methods = [
8235
+ { name: `set${uname}`, sig: `set${uname}(v)`, desc: "Set value" },
8236
+ {
8237
+ name: `update${uname}`,
8238
+ sig: `update${uname}(fn)`,
8239
+ desc: "Update value with function"
8240
+ },
8241
+ {
8242
+ name: `reset${uname}`,
8243
+ sig: `reset${uname}()`,
8244
+ desc: "Reset to default value"
8245
+ },
8246
+ {
8247
+ name: `is${uname}NotSet`,
8248
+ sig: `is${uname}NotSet()`,
8249
+ desc: "Check if null/undefined"
8250
+ },
8251
+ {
8252
+ name: `is${uname}Set`,
8253
+ sig: `is${uname}Set()`,
8254
+ desc: "Check if not null/undefined"
8255
+ }
8256
+ ];
8257
+ switch (type) {
8258
+ case "bool":
8259
+ methods[0].desc = "Set value (coerces to boolean)";
8260
+ methods.push({
8261
+ name: `toggle${uname}`,
8262
+ sig: `toggle${uname}()`,
8263
+ desc: "Toggle boolean value"
8264
+ });
8265
+ break;
8266
+ case "text":
8267
+ methods.push({
8268
+ name: `is${uname}Empty`,
8269
+ sig: `is${uname}Empty()`,
8270
+ desc: "Check if string is empty"
8271
+ }, { name: `${name}Len`, sig: `${name}Len()`, desc: "Get string length" });
8272
+ break;
8273
+ case "list":
8274
+ methods.push({
8275
+ name: `is${uname}Empty`,
8276
+ sig: `is${uname}Empty()`,
8277
+ desc: "Check if list is empty"
8278
+ }, { name: `${name}Len`, sig: `${name}Len()`, desc: "Get list size" }, {
8279
+ name: `setIn${uname}At`,
8280
+ sig: `setIn${uname}At(i, v)`,
8281
+ desc: "Set item at index"
8282
+ }, {
8283
+ name: `getIn${uname}At`,
8284
+ sig: `getIn${uname}At(i, defaultValue)`,
8285
+ desc: "Get item at index"
8286
+ }, {
8287
+ name: `updateIn${uname}At`,
8288
+ sig: `updateIn${uname}At(i, fn)`,
8289
+ desc: "Update item at index with function"
8290
+ }, {
8291
+ name: `deleteIn${uname}At`,
8292
+ sig: `deleteIn${uname}At(i)`,
8293
+ desc: "Delete item at index"
8294
+ }, {
8295
+ name: `removeIn${uname}At`,
8296
+ sig: `removeIn${uname}At(i)`,
8297
+ desc: "Delete item at index (alias)"
8298
+ }, {
8299
+ name: `pushIn${uname}`,
8300
+ sig: `pushIn${uname}(v)`,
8301
+ desc: "Push item to end"
8302
+ }, {
8303
+ name: `insertIn${uname}At`,
8304
+ sig: `insertIn${uname}At(i, v)`,
8305
+ desc: "Insert item at index"
8306
+ });
8307
+ break;
8308
+ case "map":
8309
+ case "omap": {
8310
+ const label = type === "omap" ? "ordered map" : "map";
8311
+ methods.push({
8312
+ name: `is${uname}Empty`,
8313
+ sig: `is${uname}Empty()`,
8314
+ desc: `Check if ${label} is empty`
8315
+ }, {
8316
+ name: `${name}Len`,
8317
+ sig: `${name}Len()`,
8318
+ desc: `Get ${label} size`
8319
+ }, {
8320
+ name: `setIn${uname}At`,
8321
+ sig: `setIn${uname}At(key, v)`,
8322
+ desc: "Set value at key"
8323
+ }, {
8324
+ name: `getIn${uname}At`,
8325
+ sig: `getIn${uname}At(key, defaultValue)`,
8326
+ desc: "Get value at key"
8327
+ }, {
8328
+ name: `updateIn${uname}At`,
8329
+ sig: `updateIn${uname}At(key, fn)`,
8330
+ desc: "Update value at key with function"
8331
+ }, {
8332
+ name: `deleteIn${uname}At`,
8333
+ sig: `deleteIn${uname}At(key)`,
8334
+ desc: "Delete entry at key"
8335
+ }, {
8336
+ name: `removeIn${uname}At`,
8337
+ sig: `removeIn${uname}At(key)`,
8338
+ desc: "Delete entry at key (alias)"
8339
+ });
8340
+ break;
8341
+ }
8342
+ case "set":
8343
+ methods.push({
8344
+ name: `is${uname}Empty`,
8345
+ sig: `is${uname}Empty()`,
8346
+ desc: "Check if set is empty"
8347
+ }, { name: `${name}Len`, sig: `${name}Len()`, desc: "Get set size" }, {
8348
+ name: `addIn${uname}`,
8349
+ sig: `addIn${uname}(v)`,
8350
+ desc: "Add value to set"
8351
+ }, {
8352
+ name: `deleteIn${uname}`,
8353
+ sig: `deleteIn${uname}(v)`,
8354
+ desc: "Remove value from set"
8355
+ }, {
8356
+ name: `removeIn${uname}`,
8357
+ sig: `removeIn${uname}(v)`,
8358
+ desc: "Remove value from set (alias)"
8359
+ }, {
8360
+ name: `hasIn${uname}`,
8361
+ sig: `hasIn${uname}(v)`,
8362
+ desc: "Check if value is in set"
8363
+ }, {
8364
+ name: `toggleIn${uname}`,
8365
+ sig: `toggleIn${uname}(v)`,
8366
+ desc: "Toggle value in set"
8367
+ });
8368
+ break;
8369
+ }
8370
+ return methods;
8371
+ }
8372
+ function serializeDefault(v) {
8373
+ if (v === null || v === undefined)
8374
+ return v;
8375
+ if (v?.toJS)
8376
+ return v.toJS();
8377
+ return v;
8378
+ }
8379
+ function getComponentDoc(comp) {
8380
+ const meta = comp.Class.getMetaClass();
8381
+ const { fields, name, methods } = meta;
8382
+ const userMethods = Object.keys(methods).map((k) => ({
8383
+ name: k,
8384
+ sig: getSignature(k, methods[k])
8385
+ }));
8386
+ const inputHandlers = Object.keys(comp.input).map((k) => ({
8387
+ name: k,
8388
+ sig: getSignature(k, comp.input[k])
8389
+ }));
8390
+ const fieldDocs = [];
8391
+ for (const fieldName in fields) {
8392
+ const field = fields[fieldName];
8393
+ fieldDocs.push({
8394
+ name: fieldName,
8395
+ type: field.type,
8396
+ default: serializeDefault(field.defaultValue),
8397
+ methods: getFieldMethods(field)
8398
+ });
8399
+ }
8400
+ return { name, methods: userMethods, input: inputHandlers, fields: fieldDocs };
8401
+ }
8402
+ function getComponentsDocs(components) {
8403
+ return components.map((comp) => getComponentDoc(comp));
8404
+ }
8405
+ function docComponents(normalized, { name = null } = {}) {
8406
+ const comps = normalized.components;
8407
+ const picked = name === null ? comps : comps.filter((c) => c.name === name);
8408
+ return new ComponentDocs({ items: getComponentsDocs(picked) });
8409
+ }
8410
+ // tools/format/lint.js
8411
+ function lintIdToMessage(id, info) {
8412
+ switch (id) {
8413
+ case "RENDER_IT_OUTSIDE_OF_LOOP":
8414
+ return "render-it used outside of a loop";
8415
+ case "UNKNOWN_EVENT_MODIFIER":
8416
+ return `Unknown modifier '${info.modifier}' on '${info.name}' event`;
8417
+ case "UNKNOWN_HANDLER_ARG_NAME":
8418
+ return `Unknown handler argument '${info.name}'`;
8419
+ case "INPUT_HANDLER_NOT_IMPLEMENTED":
8420
+ return `Input handler '${info.name}' is not implemented`;
8421
+ case "INPUT_HANDLER_NOT_REFERENCED":
8422
+ return `Input handler '${info.name}' is defined but not referenced`;
8423
+ case "INPUT_HANDLER_METHOD_NOT_IMPLEMENTED":
8424
+ return `Method '.${info.name}' is not implemented`;
8425
+ case "INPUT_HANDLER_FOR_INPUT_HANDLER_METHOD":
8426
+ return `'${info.name}' exists as input handler — use without '.' prefix`;
8427
+ case "INPUT_HANDLER_METHOD_FOR_INPUT_HANDLER":
8428
+ return `'${info.name}' exists as method — use with '.' prefix`;
8429
+ case "FIELD_VAL_NOT_DEFINED":
8430
+ return `Field '.${info.name}' is not defined`;
8431
+ case "COMPUTED_VAL_NOT_DEFINED":
8432
+ return `Computed property '$${info.name}' is not defined`;
8433
+ case "COMPUTED_NOT_REFERENCED":
8434
+ return `Computed property '$${info.name}' is defined but not referenced`;
8435
+ case "UNKNOWN_REQUEST_NAME":
8436
+ return `Unknown request '!${info.name}'`;
8437
+ case "UNKNOWN_COMPONENT_NAME":
8438
+ return `Unknown component '${info.name}'`;
8439
+ case "ALT_HANDLER_NOT_DEFINED":
8440
+ return `Alter handler '${info.name}' is not defined`;
8441
+ case "ALT_HANDLER_NOT_REFERENCED":
8442
+ return `Alter handler '${info.name}' is defined but not referenced`;
8443
+ case "LINT_ERROR":
8444
+ return info.message;
8445
+ default:
8446
+ return id;
8447
+ }
8448
+ }
8179
8449
 
8180
8450
  // dev.js
8181
8451
  class LintClassCollectorCtx extends ParseCtxClassSetCollector {
@@ -8211,6 +8481,7 @@ export {
8211
8481
  mergeDeep$1 as mergeDeep,
8212
8482
  merge$1 as merge,
8213
8483
  macro,
8484
+ lintIdToMessage,
8214
8485
  isValueObject,
8215
8486
  isStack,
8216
8487
  isSet,
@@ -8236,9 +8507,11 @@ export {
8236
8507
  hasIn$1 as hasIn,
8237
8508
  has,
8238
8509
  getIn$1 as getIn,
8510
+ getComponentsDocs,
8239
8511
  get,
8240
8512
  fromJS,
8241
8513
  fieldsByClass,
8514
+ docComponents,
8242
8515
  css,
8243
8516
  component,
8244
8517
  compileClassesToStyleText,
@@ -8271,6 +8544,7 @@ export {
8271
8544
  LEVEL_ERROR,
8272
8545
  KList,
8273
8546
  Set2 as ISet,
8547
+ INPUT_HANDLER_NOT_REFERENCED,
8274
8548
  INPUT_HANDLER_NOT_IMPLEMENTED,
8275
8549
  INPUT_HANDLER_METHOD_NOT_IMPLEMENTED,
8276
8550
  INPUT_HANDLER_METHOD_FOR_INPUT_HANDLER,
@@ -8279,5 +8553,7 @@ export {
8279
8553
  FIELD_VAL_NOT_DEFINED,
8280
8554
  Collection,
8281
8555
  COMPUTED_VAL_NOT_DEFINED,
8556
+ COMPUTED_NOT_REFERENCED,
8557
+ ALT_HANDLER_NOT_REFERENCED,
8282
8558
  ALT_HANDLER_NOT_DEFINED
8283
8559
  };