@microsoft/fast-element 2.0.0-beta.2 → 2.0.0-beta.20

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 (113) hide show
  1. package/CHANGELOG.json +488 -0
  2. package/CHANGELOG.md +180 -1
  3. package/dist/dts/components/attributes.d.ts +15 -0
  4. package/dist/dts/components/{controller.d.ts → element-controller.d.ts} +74 -28
  5. package/dist/dts/components/fast-definitions.d.ts +41 -9
  6. package/dist/dts/components/fast-element.d.ts +14 -26
  7. package/dist/dts/components/hydration.d.ts +14 -0
  8. package/dist/{esm/observation/behavior.js → dts/components/install-hydration.d.ts} +0 -0
  9. package/dist/dts/context.d.ts +1 -1
  10. package/dist/dts/di/di.d.ts +894 -0
  11. package/dist/dts/dom-policy.d.ts +68 -0
  12. package/dist/dts/dom.d.ts +100 -0
  13. package/dist/dts/index.d.ts +5 -4
  14. package/dist/dts/index.rollup.d.ts +0 -1
  15. package/dist/dts/index.rollup.debug.d.ts +0 -1
  16. package/dist/dts/interfaces.d.ts +60 -79
  17. package/dist/dts/observation/observable.d.ts +99 -54
  18. package/dist/dts/pending-task.d.ts +20 -0
  19. package/dist/dts/platform.d.ts +7 -0
  20. package/dist/dts/polyfills.d.ts +0 -8
  21. package/dist/dts/state/exports.d.ts +3 -0
  22. package/dist/dts/state/reactive.d.ts +8 -0
  23. package/dist/dts/state/state.d.ts +141 -0
  24. package/dist/dts/state/visitor.d.ts +6 -0
  25. package/dist/dts/state/watch.d.ts +10 -0
  26. package/dist/dts/styles/css-directive.d.ts +2 -2
  27. package/dist/dts/styles/css.d.ts +0 -5
  28. package/dist/dts/styles/element-styles.d.ts +10 -17
  29. package/dist/dts/styles/host.d.ts +68 -0
  30. package/dist/dts/styles/style-strategy.d.ts +42 -0
  31. package/dist/dts/templating/binding-signal.d.ts +12 -27
  32. package/dist/dts/templating/binding-two-way.d.ts +22 -37
  33. package/dist/dts/templating/binding.d.ts +76 -208
  34. package/dist/dts/templating/children.d.ts +1 -1
  35. package/dist/dts/templating/compiler.d.ts +11 -13
  36. package/dist/dts/templating/html-directive.d.ts +91 -97
  37. package/dist/dts/templating/node-observation.d.ts +15 -6
  38. package/dist/dts/templating/ref.d.ts +7 -11
  39. package/dist/dts/templating/render.d.ts +296 -0
  40. package/dist/dts/templating/repeat.d.ts +23 -34
  41. package/dist/dts/templating/slotted.d.ts +1 -1
  42. package/dist/dts/templating/template.d.ts +92 -14
  43. package/dist/dts/templating/view.d.ts +81 -11
  44. package/dist/dts/templating/when.d.ts +3 -3
  45. package/dist/dts/testing/exports.d.ts +3 -0
  46. package/dist/dts/testing/fakes.d.ts +14 -0
  47. package/dist/dts/testing/fixture.d.ts +84 -0
  48. package/dist/dts/testing/timeout.d.ts +7 -0
  49. package/dist/dts/utilities.d.ts +53 -18
  50. package/dist/esm/components/attributes.js +28 -5
  51. package/dist/esm/components/{controller.js → element-controller.js} +239 -137
  52. package/dist/esm/components/fast-definitions.js +38 -30
  53. package/dist/esm/components/fast-element.js +27 -16
  54. package/dist/esm/components/hydration.js +35 -0
  55. package/dist/esm/components/install-hydration.js +2 -0
  56. package/dist/esm/context.js +5 -1
  57. package/dist/esm/debug.js +40 -5
  58. package/dist/esm/di/di.js +1430 -0
  59. package/dist/esm/dom-policy.js +337 -0
  60. package/dist/esm/dom.js +101 -0
  61. package/dist/esm/index.js +4 -2
  62. package/dist/esm/index.rollup.debug.js +3 -1
  63. package/dist/esm/index.rollup.js +3 -1
  64. package/dist/esm/interfaces.js +52 -0
  65. package/dist/esm/observation/arrays.js +303 -2
  66. package/dist/esm/observation/observable.js +88 -142
  67. package/dist/esm/observation/update-queue.js +2 -2
  68. package/dist/esm/pending-task.js +16 -0
  69. package/dist/esm/platform.js +27 -2
  70. package/dist/esm/polyfills.js +3 -61
  71. package/dist/esm/state/exports.js +3 -0
  72. package/dist/esm/state/reactive.js +34 -0
  73. package/dist/esm/state/state.js +148 -0
  74. package/dist/esm/state/visitor.js +28 -0
  75. package/dist/esm/state/watch.js +36 -0
  76. package/dist/esm/styles/css.js +4 -9
  77. package/dist/esm/styles/element-styles.js +14 -33
  78. package/dist/esm/styles/host.js +1 -0
  79. package/dist/esm/styles/style-strategy.js +1 -0
  80. package/dist/esm/templating/binding-signal.js +67 -62
  81. package/dist/esm/templating/binding-two-way.js +72 -39
  82. package/dist/esm/templating/binding.js +142 -286
  83. package/dist/esm/templating/children.js +8 -4
  84. package/dist/esm/templating/compiler.js +59 -43
  85. package/dist/esm/templating/html-directive.js +56 -75
  86. package/dist/esm/templating/node-observation.js +20 -13
  87. package/dist/esm/templating/ref.js +4 -12
  88. package/dist/esm/templating/render.js +402 -0
  89. package/dist/esm/templating/repeat.js +88 -75
  90. package/dist/esm/templating/template.js +132 -60
  91. package/dist/esm/templating/view.js +113 -29
  92. package/dist/esm/templating/when.js +5 -4
  93. package/dist/esm/testing/exports.js +3 -0
  94. package/dist/esm/testing/fakes.js +107 -0
  95. package/dist/esm/testing/fixture.js +86 -0
  96. package/dist/esm/testing/timeout.js +24 -0
  97. package/dist/esm/utilities.js +95 -95
  98. package/dist/fast-element.api.json +9487 -8326
  99. package/dist/fast-element.d.ts +847 -644
  100. package/dist/fast-element.debug.js +1993 -1166
  101. package/dist/fast-element.debug.min.js +1 -1
  102. package/dist/fast-element.js +1903 -1111
  103. package/dist/fast-element.min.js +1 -1
  104. package/dist/fast-element.untrimmed.d.ts +911 -701
  105. package/docs/api-report.md +329 -252
  106. package/package.json +38 -16
  107. package/dist/dts/hooks.d.ts +0 -20
  108. package/dist/dts/observation/behavior.d.ts +0 -19
  109. package/dist/dts/observation/splice-strategies.d.ts +0 -13
  110. package/dist/dts/templating/dom.d.ts +0 -41
  111. package/dist/esm/hooks.js +0 -32
  112. package/dist/esm/observation/splice-strategies.js +0 -400
  113. package/dist/esm/templating/dom.js +0 -49
@@ -0,0 +1,337 @@
1
+ import { DOMAspect } from "./dom.js";
2
+ import { isString } from "./interfaces.js";
3
+ function safeURL(tagName, aspect, aspectName, sink) {
4
+ return (target, name, value, ...rest) => {
5
+ if (isString(value)) {
6
+ value = value.replace("javascript:", "");
7
+ }
8
+ sink(target, name, value, ...rest);
9
+ };
10
+ }
11
+ function block(tagName, aspect, aspectName, sink) {
12
+ throw new Error(`${aspectName} on ${tagName !== null && tagName !== void 0 ? tagName : "text"} is blocked by the current DOMPolicy.`);
13
+ }
14
+ const defaultDOMElementGuards = {
15
+ a: {
16
+ [DOMAspect.attribute]: {
17
+ href: safeURL,
18
+ },
19
+ [DOMAspect.property]: {
20
+ href: safeURL,
21
+ },
22
+ },
23
+ area: {
24
+ [DOMAspect.attribute]: {
25
+ href: safeURL,
26
+ },
27
+ [DOMAspect.property]: {
28
+ href: safeURL,
29
+ },
30
+ },
31
+ button: {
32
+ [DOMAspect.attribute]: {
33
+ formaction: safeURL,
34
+ },
35
+ [DOMAspect.property]: {
36
+ formAction: safeURL,
37
+ },
38
+ },
39
+ embed: {
40
+ [DOMAspect.attribute]: {
41
+ src: block,
42
+ },
43
+ [DOMAspect.property]: {
44
+ src: block,
45
+ },
46
+ },
47
+ form: {
48
+ [DOMAspect.attribute]: {
49
+ action: safeURL,
50
+ },
51
+ [DOMAspect.property]: {
52
+ action: safeURL,
53
+ },
54
+ },
55
+ frame: {
56
+ [DOMAspect.attribute]: {
57
+ src: safeURL,
58
+ },
59
+ [DOMAspect.property]: {
60
+ src: safeURL,
61
+ },
62
+ },
63
+ iframe: {
64
+ [DOMAspect.attribute]: {
65
+ src: safeURL,
66
+ },
67
+ [DOMAspect.property]: {
68
+ src: safeURL,
69
+ srcdoc: block,
70
+ },
71
+ },
72
+ input: {
73
+ [DOMAspect.attribute]: {
74
+ formaction: safeURL,
75
+ },
76
+ [DOMAspect.property]: {
77
+ formAction: safeURL,
78
+ },
79
+ },
80
+ link: {
81
+ [DOMAspect.attribute]: {
82
+ href: block,
83
+ },
84
+ [DOMAspect.property]: {
85
+ href: block,
86
+ },
87
+ },
88
+ object: {
89
+ [DOMAspect.attribute]: {
90
+ codebase: block,
91
+ data: block,
92
+ },
93
+ [DOMAspect.property]: {
94
+ codeBase: block,
95
+ data: block,
96
+ },
97
+ },
98
+ script: {
99
+ [DOMAspect.attribute]: {
100
+ src: block,
101
+ text: block,
102
+ },
103
+ [DOMAspect.property]: {
104
+ src: block,
105
+ text: block,
106
+ innerText: block,
107
+ textContent: block,
108
+ },
109
+ },
110
+ style: {
111
+ [DOMAspect.property]: {
112
+ innerText: block,
113
+ textContent: block,
114
+ },
115
+ },
116
+ };
117
+ const blockedEvents = {
118
+ onabort: block,
119
+ onauxclick: block,
120
+ onbeforeinput: block,
121
+ onbeforematch: block,
122
+ onblur: block,
123
+ oncancel: block,
124
+ oncanplay: block,
125
+ oncanplaythrough: block,
126
+ onchange: block,
127
+ onclick: block,
128
+ onclose: block,
129
+ oncontextlost: block,
130
+ oncontextmenu: block,
131
+ oncontextrestored: block,
132
+ oncopy: block,
133
+ oncuechange: block,
134
+ oncut: block,
135
+ ondblclick: block,
136
+ ondrag: block,
137
+ ondragend: block,
138
+ ondragenter: block,
139
+ ondragleave: block,
140
+ ondragover: block,
141
+ ondragstart: block,
142
+ ondrop: block,
143
+ ondurationchange: block,
144
+ onemptied: block,
145
+ onended: block,
146
+ onerror: block,
147
+ onfocus: block,
148
+ onformdata: block,
149
+ oninput: block,
150
+ oninvalid: block,
151
+ onkeydown: block,
152
+ onkeypress: block,
153
+ onkeyup: block,
154
+ onload: block,
155
+ onloadeddata: block,
156
+ onloadedmetadata: block,
157
+ onloadstart: block,
158
+ onmousedown: block,
159
+ onmouseenter: block,
160
+ onmouseleave: block,
161
+ onmousemove: block,
162
+ onmouseout: block,
163
+ onmouseover: block,
164
+ onmouseup: block,
165
+ onpaste: block,
166
+ onpause: block,
167
+ onplay: block,
168
+ onplaying: block,
169
+ onprogress: block,
170
+ onratechange: block,
171
+ onreset: block,
172
+ onresize: block,
173
+ onscroll: block,
174
+ onsecuritypolicyviolation: block,
175
+ onseeked: block,
176
+ onseeking: block,
177
+ onselect: block,
178
+ onslotchange: block,
179
+ onstalled: block,
180
+ onsubmit: block,
181
+ onsuspend: block,
182
+ ontimeupdate: block,
183
+ ontoggle: block,
184
+ onvolumechange: block,
185
+ onwaiting: block,
186
+ onwebkitanimationend: block,
187
+ onwebkitanimationiteration: block,
188
+ onwebkitanimationstart: block,
189
+ onwebkittransitionend: block,
190
+ onwheel: block,
191
+ };
192
+ const defaultDOMGuards = {
193
+ elements: defaultDOMElementGuards,
194
+ aspects: {
195
+ [DOMAspect.attribute]: Object.assign({}, blockedEvents),
196
+ [DOMAspect.property]: Object.assign({ innerHTML: block }, blockedEvents),
197
+ [DOMAspect.event]: Object.assign({}, blockedEvents),
198
+ },
199
+ };
200
+ function createDomSinkGuards(config, defaults) {
201
+ const result = {};
202
+ for (const name in defaults) {
203
+ const overrideValue = config[name];
204
+ const defaultValue = defaults[name];
205
+ switch (overrideValue) {
206
+ case null:
207
+ // remove the default
208
+ break;
209
+ case undefined:
210
+ // keep the default
211
+ result[name] = defaultValue;
212
+ break;
213
+ default:
214
+ // override the default
215
+ result[name] = overrideValue;
216
+ break;
217
+ }
218
+ }
219
+ // add any new sinks that were not overrides
220
+ for (const name in config) {
221
+ if (!(name in result)) {
222
+ result[name] = config[name];
223
+ }
224
+ }
225
+ return Object.freeze(result);
226
+ }
227
+ function createDOMAspectGuards(config, defaults) {
228
+ const result = {};
229
+ for (const aspect in defaults) {
230
+ const overrideValue = config[aspect];
231
+ const defaultValue = defaults[aspect];
232
+ switch (overrideValue) {
233
+ case null:
234
+ // remove the default
235
+ break;
236
+ case undefined:
237
+ // keep the default
238
+ result[aspect] = createDomSinkGuards(defaultValue, {});
239
+ break;
240
+ default:
241
+ // override the default
242
+ result[aspect] = createDomSinkGuards(overrideValue, defaultValue);
243
+ break;
244
+ }
245
+ }
246
+ // add any new aspect guards that were not overrides
247
+ for (const aspect in config) {
248
+ if (!(aspect in result)) {
249
+ result[aspect] = createDomSinkGuards(config[aspect], {});
250
+ }
251
+ }
252
+ return Object.freeze(result);
253
+ }
254
+ function createElementGuards(config, defaults) {
255
+ const result = {};
256
+ for (const tag in defaults) {
257
+ const overrideValue = config[tag];
258
+ const defaultValue = defaults[tag];
259
+ switch (overrideValue) {
260
+ case null:
261
+ // remove the default
262
+ break;
263
+ case undefined:
264
+ // keep the default
265
+ result[tag] = createDOMAspectGuards(overrideValue, {});
266
+ break;
267
+ default:
268
+ // override the default aspects
269
+ result[tag] = createDOMAspectGuards(overrideValue, defaultValue);
270
+ break;
271
+ }
272
+ }
273
+ // Add any new element guards that were not overrides
274
+ for (const tag in config) {
275
+ if (!(tag in result)) {
276
+ result[tag] = createDOMAspectGuards(config[tag], {});
277
+ }
278
+ }
279
+ return Object.freeze(result);
280
+ }
281
+ function createDOMGuards(config, defaults) {
282
+ return Object.freeze({
283
+ elements: config.elements
284
+ ? createElementGuards(config.elements, defaults.elements)
285
+ : defaults.elements,
286
+ aspects: config.aspects
287
+ ? createDOMAspectGuards(config.aspects, defaults.aspects)
288
+ : defaults.aspects,
289
+ });
290
+ }
291
+ function createTrustedType() {
292
+ const createHTML = html => html;
293
+ return globalThis.trustedTypes
294
+ ? globalThis.trustedTypes.createPolicy("fast-html", { createHTML })
295
+ : { createHTML };
296
+ }
297
+ function tryGuard(aspectGuards, tagName, aspect, aspectName, sink) {
298
+ const sinkGuards = aspectGuards[aspect];
299
+ if (sinkGuards) {
300
+ const guard = sinkGuards[aspectName];
301
+ if (guard) {
302
+ return guard(tagName, aspect, aspectName, sink);
303
+ }
304
+ }
305
+ }
306
+ const DOMPolicy = Object.freeze({
307
+ /**
308
+ * Creates a new DOM Policy object.
309
+ * @param options The options to use in creating the policy.
310
+ * @returns The newly created DOMPolicy.
311
+ */
312
+ create(options = {}) {
313
+ var _a, _b;
314
+ const trustedType = (_a = options.trustedType) !== null && _a !== void 0 ? _a : createTrustedType();
315
+ const guards = createDOMGuards((_b = options.guards) !== null && _b !== void 0 ? _b : {}, defaultDOMGuards);
316
+ return Object.freeze({
317
+ createHTML(value) {
318
+ return trustedType.createHTML(value);
319
+ },
320
+ protect(tagName, aspect, aspectName, sink) {
321
+ var _a;
322
+ // Check for element-specific guards.
323
+ const key = (tagName !== null && tagName !== void 0 ? tagName : "").toLowerCase();
324
+ const elementGuards = guards.elements[key];
325
+ if (elementGuards) {
326
+ const guard = tryGuard(elementGuards, tagName, aspect, aspectName, sink);
327
+ if (guard) {
328
+ return guard;
329
+ }
330
+ }
331
+ // Check for guards applicable to all nodes.
332
+ return ((_a = tryGuard(guards.aspects, tagName, aspect, aspectName, sink)) !== null && _a !== void 0 ? _a : sink);
333
+ },
334
+ });
335
+ },
336
+ });
337
+ export { DOMPolicy };
@@ -0,0 +1,101 @@
1
+ import "./interfaces.js";
2
+ import { FAST } from "./platform.js";
3
+ /**
4
+ * The type of HTML aspect to target.
5
+ * @public
6
+ */
7
+ export const DOMAspect = Object.freeze({
8
+ /**
9
+ * Not aspected.
10
+ */
11
+ none: 0,
12
+ /**
13
+ * An attribute.
14
+ */
15
+ attribute: 1,
16
+ /**
17
+ * A boolean attribute.
18
+ */
19
+ booleanAttribute: 2,
20
+ /**
21
+ * A property.
22
+ */
23
+ property: 3,
24
+ /**
25
+ * Content
26
+ */
27
+ content: 4,
28
+ /**
29
+ * A token list.
30
+ */
31
+ tokenList: 5,
32
+ /**
33
+ * An event.
34
+ */
35
+ event: 6,
36
+ });
37
+ const createHTML = html => html;
38
+ const fastTrustedType = globalThis.trustedTypes
39
+ ? globalThis.trustedTypes.createPolicy("fast-html", { createHTML })
40
+ : { createHTML };
41
+ let defaultPolicy = Object.freeze({
42
+ createHTML(value) {
43
+ return fastTrustedType.createHTML(value);
44
+ },
45
+ protect(tagName, aspect, aspectName, sink) {
46
+ return sink;
47
+ },
48
+ });
49
+ const fastPolicy = defaultPolicy;
50
+ /**
51
+ * Common DOM APIs.
52
+ * @public
53
+ */
54
+ export const DOM = Object.freeze({
55
+ /**
56
+ * Gets the dom policy used by the templating system.
57
+ */
58
+ get policy() {
59
+ return defaultPolicy;
60
+ },
61
+ /**
62
+ * Sets the dom policy used by the templating system.
63
+ * @param policy - The policy to set.
64
+ * @remarks
65
+ * This API can only be called once, for security reasons. It should be
66
+ * called by the application developer at the start of their program.
67
+ */
68
+ setPolicy(value) {
69
+ if (defaultPolicy !== fastPolicy) {
70
+ throw FAST.error(1201 /* Message.onlySetDOMPolicyOnce */);
71
+ }
72
+ defaultPolicy = value;
73
+ },
74
+ /**
75
+ * Sets an attribute value on an element.
76
+ * @param element - The element to set the attribute value on.
77
+ * @param attributeName - The attribute name to set.
78
+ * @param value - The value of the attribute to set.
79
+ * @remarks
80
+ * If the value is `null` or `undefined`, the attribute is removed, otherwise
81
+ * it is set to the provided value using the standard `setAttribute` API.
82
+ */
83
+ setAttribute(element, attributeName, value) {
84
+ value === null || value === undefined
85
+ ? element.removeAttribute(attributeName)
86
+ : element.setAttribute(attributeName, value);
87
+ },
88
+ /**
89
+ * Sets a boolean attribute value.
90
+ * @param element - The element to set the boolean attribute value on.
91
+ * @param attributeName - The attribute name to set.
92
+ * @param value - The value of the attribute to set.
93
+ * @remarks
94
+ * If the value is true, the attribute is added; otherwise it is removed.
95
+ */
96
+ setBooleanAttribute(element, attributeName, value) {
97
+ value
98
+ ? element.setAttribute(attributeName, "")
99
+ : element.removeAttribute(attributeName);
100
+ },
101
+ });
package/dist/esm/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from "./platform.js";
2
+ export * from "./dom.js";
2
3
  // Observation
3
4
  export * from "./observation/observable.js";
4
5
  export * from "./observation/notifier.js";
@@ -8,8 +9,9 @@ export * from "./observation/update-queue.js";
8
9
  export * from "./styles/element-styles.js";
9
10
  export * from "./styles/css.js";
10
11
  export * from "./styles/css-directive.js";
12
+ export * from "./styles/host.js";
13
+ export * from "./styles/style-strategy.js";
11
14
  // Templating
12
- export * from "./templating/dom.js";
13
15
  export * from "./templating/template.js";
14
16
  export * from "./templating/compiler.js";
15
17
  export { Markup, Parser } from "./templating/markup.js";
@@ -26,4 +28,4 @@ export * from "./templating/node-observation.js";
26
28
  export * from "./components/fast-element.js";
27
29
  export * from "./components/fast-definitions.js";
28
30
  export * from "./components/attributes.js";
29
- export * from "./components/controller.js";
31
+ export { ElementController, } from "./components/element-controller.js";
@@ -1,3 +1,5 @@
1
- import "./polyfills.js";
2
1
  import "./debug.js";
2
+ import { DOMPolicy } from "./dom-policy.js";
3
+ import { DOM } from "./dom.js";
3
4
  export * from "./index.js";
5
+ DOM.setPolicy(DOMPolicy.create());
@@ -1,2 +1,4 @@
1
- import "./polyfills.js";
1
+ import { DOMPolicy } from "./dom-policy.js";
2
+ import { DOM } from "./dom.js";
2
3
  export * from "./index.js";
4
+ DOM.setPolicy(DOMPolicy.create());
@@ -1,8 +1,60 @@
1
+ let kernelMode;
2
+ const kernelAttr = "fast-kernel";
3
+ try {
4
+ if (document.currentScript) {
5
+ kernelMode = document.currentScript.getAttribute(kernelAttr);
6
+ }
7
+ else {
8
+ const scripts = document.getElementsByTagName("script");
9
+ const currentScript = scripts[scripts.length - 1];
10
+ kernelMode = currentScript.getAttribute(kernelAttr);
11
+ }
12
+ }
13
+ catch (e) {
14
+ kernelMode = "isolate";
15
+ }
16
+ let KernelServiceId;
17
+ switch (kernelMode) {
18
+ case "share": // share the kernel across major versions
19
+ KernelServiceId = Object.freeze({
20
+ updateQueue: 1,
21
+ observable: 2,
22
+ contextEvent: 3,
23
+ elementRegistry: 4,
24
+ });
25
+ break;
26
+ case "share-v2": // only share the kernel with other v2 instances
27
+ KernelServiceId = Object.freeze({
28
+ updateQueue: 1.2,
29
+ observable: 2.2,
30
+ contextEvent: 3.2,
31
+ elementRegistry: 4.2,
32
+ });
33
+ break;
34
+ default:
35
+ // fully isolate the kernel from all other FAST instances
36
+ const postfix = `-${Math.random().toString(36).substring(2, 8)}`;
37
+ KernelServiceId = Object.freeze({
38
+ updateQueue: `1.2${postfix}`,
39
+ observable: `2.2${postfix}`,
40
+ contextEvent: `3.2${postfix}`,
41
+ elementRegistry: `4.2${postfix}`,
42
+ });
43
+ break;
44
+ }
45
+ export { KernelServiceId };
1
46
  /**
47
+ * Determines whether or not an object is a function.
2
48
  * @internal
3
49
  */
4
50
  export const isFunction = (object) => typeof object === "function";
5
51
  /**
52
+ * Determines whether or not an object is a string.
6
53
  * @internal
7
54
  */
8
55
  export const isString = (object) => typeof object === "string";
56
+ /**
57
+ * A function which does nothing.
58
+ * @internal
59
+ */
60
+ export const noop = () => void 0;