@microsoft/fast-element 2.0.0-beta.8 → 2.0.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.
- package/.eslintrc.json +1 -1
- package/CHANGELOG.json +512 -0
- package/CHANGELOG.md +180 -1
- package/README.md +1 -9
- package/api-extractor.context.json +14 -0
- package/api-extractor.di.json +14 -0
- package/dist/context/context.api.json +1068 -0
- package/dist/di/di.api.json +4929 -0
- package/dist/dts/binding/binding.d.ts +49 -0
- package/dist/dts/binding/normalize.d.ts +9 -0
- package/dist/dts/binding/one-time.d.ts +11 -0
- package/dist/dts/binding/one-way.d.ts +20 -0
- package/dist/dts/{templating/binding-signal.d.ts → binding/signal.d.ts} +19 -4
- package/dist/dts/{templating/binding-two-way.d.ts → binding/two-way.d.ts} +9 -5
- package/dist/dts/components/attributes.d.ts +6 -0
- package/dist/dts/components/element-controller.d.ts +104 -8
- package/dist/dts/components/element-hydration.d.ts +2 -0
- package/dist/dts/components/fast-definitions.d.ts +6 -0
- package/dist/dts/components/hydration.d.ts +56 -0
- package/dist/dts/components/install-hydration.d.ts +1 -0
- package/dist/dts/context.d.ts +29 -15
- package/dist/dts/di/di.d.ts +0 -5
- package/dist/dts/dom-policy.d.ts +83 -0
- package/dist/dts/dom.d.ts +100 -0
- package/dist/dts/hydration/target-builder.d.ts +63 -0
- package/dist/dts/index.d.ts +33 -26
- package/dist/dts/index.rollup.d.ts +0 -1
- package/dist/dts/index.rollup.debug.d.ts +0 -1
- package/dist/dts/interfaces.d.ts +32 -82
- package/dist/dts/metadata.d.ts +6 -5
- package/dist/dts/observation/arrays.d.ts +1 -1
- package/dist/dts/observation/observable.bench.d.ts +18 -0
- package/dist/dts/observation/observable.d.ts +5 -5
- package/dist/dts/pending-task.d.ts +19 -7
- package/dist/dts/platform.d.ts +11 -2
- package/dist/dts/polyfills.d.ts +0 -8
- package/dist/dts/styles/css-binding-directive.d.ts +60 -0
- package/dist/dts/styles/css.d.ts +9 -7
- package/dist/dts/styles/element-styles.d.ts +1 -14
- package/dist/dts/styles/host.d.ts +2 -5
- package/dist/dts/styles/style-strategy.d.ts +42 -0
- package/dist/dts/templating/compiler.d.ts +11 -13
- package/dist/dts/templating/{binding.d.ts → html-binding-directive.d.ts} +22 -42
- package/dist/dts/templating/html-directive.d.ts +44 -140
- package/dist/dts/templating/install-hydratable-view-templates.d.ts +1 -0
- package/dist/dts/templating/node-observation.d.ts +11 -1
- package/dist/dts/templating/ref.d.ts +4 -0
- package/dist/dts/templating/render.bench.d.ts +3 -0
- package/dist/dts/templating/render.d.ts +49 -9
- package/dist/dts/templating/repeat-basic-reverse.bench.d.ts +3 -0
- package/dist/dts/templating/repeat-basic-shift.bench.d.ts +3 -0
- package/dist/dts/templating/repeat.d.ts +31 -9
- package/dist/dts/templating/template.d.ts +97 -12
- package/dist/dts/templating/view.d.ts +149 -26
- package/dist/dts/templating/when-basic.bench.d.ts +3 -0
- package/dist/dts/templating/when-conditional.bench.d.ts +3 -0
- package/dist/dts/templating/when-switch.bench.d.ts +3 -0
- package/dist/dts/templating/when.d.ts +3 -1
- package/dist/dts/testing/fakes.d.ts +12 -1
- package/dist/dts/tsdoc-metadata.json +1 -1
- package/dist/dts/utilities.d.ts +55 -1
- package/dist/esm/binding/binding.js +18 -0
- package/dist/esm/binding/normalize.js +17 -0
- package/dist/esm/binding/one-time.js +21 -0
- package/dist/esm/binding/one-way.js +30 -0
- package/dist/esm/{templating/binding-signal.js → binding/signal.js} +22 -6
- package/dist/esm/{templating/binding-two-way.js → binding/two-way.js} +18 -12
- package/dist/esm/components/attributes.js +16 -1
- package/dist/esm/components/element-controller.js +319 -49
- package/dist/esm/components/element-hydration.js +2 -0
- package/dist/esm/components/fast-definitions.js +12 -4
- package/dist/esm/components/fast-element.js +3 -1
- package/dist/esm/components/hydration.js +104 -0
- package/dist/esm/components/install-hydration.js +3 -0
- package/dist/esm/context.js +26 -4
- package/dist/esm/debug.js +8 -2
- package/dist/esm/di/di.js +9 -12
- package/dist/esm/dom-policy.js +345 -0
- package/dist/esm/dom.js +101 -0
- package/dist/esm/hydration/target-builder.js +175 -0
- package/dist/esm/index.js +34 -25
- package/dist/esm/index.rollup.debug.js +3 -1
- package/dist/esm/index.rollup.js +3 -1
- package/dist/esm/interfaces.js +51 -3
- package/dist/esm/metadata.js +11 -8
- package/dist/esm/observation/arrays.js +1 -1
- package/dist/esm/observation/observable.bench.js +79 -0
- package/dist/esm/observation/observable.js +20 -15
- package/dist/esm/observation/update-queue.js +2 -2
- package/dist/esm/pending-task.js +13 -1
- package/dist/esm/platform.js +12 -2
- package/dist/esm/polyfills.js +3 -61
- package/dist/esm/styles/css-binding-directive.js +76 -0
- package/dist/esm/styles/css.js +14 -7
- package/dist/esm/styles/element-styles.js +0 -33
- package/dist/esm/styles/style-strategy.js +1 -0
- package/dist/esm/templating/children.js +8 -4
- package/dist/esm/templating/compiler.js +37 -44
- package/dist/esm/templating/html-binding-directive.js +218 -0
- package/dist/esm/templating/html-directive.js +25 -152
- package/dist/esm/templating/install-hydratable-view-templates.js +17 -0
- package/dist/esm/templating/node-observation.js +14 -8
- package/dist/esm/templating/ref.js +1 -1
- package/dist/esm/templating/render.bench.js +56 -0
- package/dist/esm/templating/render.js +74 -30
- package/dist/esm/templating/repeat-basic-reverse.bench.js +43 -0
- package/dist/esm/templating/repeat-basic-shift.bench.js +43 -0
- package/dist/esm/templating/repeat.js +116 -17
- package/dist/esm/templating/template.js +135 -60
- package/dist/esm/templating/view.js +259 -32
- package/dist/esm/templating/when-basic.bench.js +36 -0
- package/dist/esm/templating/when-conditional.bench.js +39 -0
- package/dist/esm/templating/when-switch.bench.js +68 -0
- package/dist/esm/templating/when.js +12 -5
- package/dist/esm/testing/fakes.js +32 -1
- package/dist/esm/testing/fixture.js +1 -1
- package/dist/esm/utilities.js +97 -1
- package/dist/fast-element.api.json +9804 -5622
- package/dist/fast-element.d.ts +813 -2386
- package/dist/fast-element.debug.js +2797 -974
- package/dist/fast-element.debug.min.js +3 -1
- package/dist/fast-element.js +2642 -825
- package/dist/fast-element.min.js +3 -1
- package/dist/fast-element.untrimmed.d.ts +669 -315
- package/docs/{api-report.md → api-report.api.md} +243 -158
- package/docs/context/api-report.api.md +69 -0
- package/docs/di/api-report.api.md +315 -0
- package/karma.conf.cjs +2 -1
- package/package.json +59 -47
- package/scripts/run-api-extractor.js +51 -0
- package/scripts/run-benchmarks.js +46 -0
- package/tensile.config.js +12 -0
- package/dist/dts/templating/dom.d.ts +0 -41
- package/dist/esm/templating/binding.js +0 -282
- package/dist/esm/templating/dom.js +0 -49
- package/docs/guide/declaring-templates.md +0 -230
- package/docs/guide/defining-elements.md +0 -214
- package/docs/guide/leveraging-css.md +0 -253
- package/docs/guide/next-steps.md +0 -13
- package/docs/guide/observables-and-state.md +0 -213
- package/docs/guide/using-directives.md +0 -576
- package/docs/guide/working-with-shadow-dom.md +0 -296
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,188 @@
|
|
|
1
1
|
# Change Log - @microsoft/fast-element
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Mon, 19 Aug 2024 22:04:19 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 2.0.0
|
|
8
|
+
|
|
9
|
+
Mon, 19 Aug 2024 22:04:19 GMT
|
|
10
|
+
|
|
11
|
+
### Major changes
|
|
12
|
+
|
|
13
|
+
- Update @microsoft/fast-element to major version (13071055+chrisdholt@users.noreply.github.com)
|
|
14
|
+
|
|
15
|
+
### Changes
|
|
16
|
+
|
|
17
|
+
- Fix CodeQL issues (7559015+janechu@users.noreply.github.com)
|
|
18
|
+
- Adds support for FASTElement hydration (171390049+prabhujayapal@users.noreply.github.com)
|
|
19
|
+
|
|
20
|
+
## 2.0.0-beta.26
|
|
21
|
+
|
|
22
|
+
Fri, 18 Aug 2023 00:04:40 GMT
|
|
23
|
+
|
|
24
|
+
### Changes
|
|
25
|
+
|
|
26
|
+
- BREAKING: update fast-element export paths to include extensions (chhol@microsoft.com)
|
|
27
|
+
- update fast-element exports to be explicit (chhol@microsoft.com)
|
|
28
|
+
|
|
29
|
+
## 2.0.0-beta.25
|
|
30
|
+
|
|
31
|
+
Sat, 12 Aug 2023 00:26:36 GMT
|
|
32
|
+
|
|
33
|
+
### Changes
|
|
34
|
+
|
|
35
|
+
- Prevent notification of array splices when operation does not mutate array values (nicholasrice@users.noreply.github.com)
|
|
36
|
+
- Adds volatile binding support for JavaScript optional chaining syntax (nicholasrice@users.noreply.github.com)
|
|
37
|
+
|
|
38
|
+
## 2.0.0-beta.24
|
|
39
|
+
|
|
40
|
+
Fri, 16 Jun 2023 18:17:12 GMT
|
|
41
|
+
|
|
42
|
+
### Changes
|
|
43
|
+
|
|
44
|
+
- fix: update compiler to ensure first and last child references are defined (chhol@microsoft.com)
|
|
45
|
+
- Adds 'else' template option to the when directive (nicholasrice@users.noreply.github.com)
|
|
46
|
+
- fixed a bug where re-binding a ChildrenDirective instance would throw a runtime exception from the mutation handler (nicholasrice@users.noreply.github.com)
|
|
47
|
+
- Update adoptedStyleSheets strategy to use push/splice when available to fix Safari 16.4 bug (nicholasrice@users.noreply.github.com)
|
|
48
|
+
- fixes a bug where ChildrenDirective could not be used multiple times for the same element (nicholasrice@users.noreply.github.com)
|
|
49
|
+
- fixed bug causing behaviors attached to stylesheets not to be removed when the stylesheet was removed (nicholasrice@users.noreply.github.com)
|
|
50
|
+
|
|
51
|
+
## 2.0.0-beta.23
|
|
52
|
+
|
|
53
|
+
Tue, 28 Mar 2023 22:14:10 GMT
|
|
54
|
+
|
|
55
|
+
### Changes
|
|
56
|
+
|
|
57
|
+
- docs: add missing API docs (rob@bluespire.com)
|
|
58
|
+
- fix: correct types for a break in TypeScript 5 legacy decorators (rob@bluespire.com)
|
|
59
|
+
|
|
60
|
+
## 2.0.0-beta.22
|
|
61
|
+
|
|
62
|
+
Sat, 11 Mar 2023 00:09:48 GMT
|
|
63
|
+
|
|
64
|
+
### Changes
|
|
65
|
+
|
|
66
|
+
- feat: add Context.for (rob@bluespire.com)
|
|
67
|
+
- feat: enable data binding in CSS (rob@bluespire.com)
|
|
68
|
+
- add directives support for createElementTemplate (32497422+KingOfTac@users.noreply.github.com)
|
|
69
|
+
- fix: clean up toJSON noop on core fast-element types (rob@bluespire.com)
|
|
70
|
+
|
|
71
|
+
## 2.0.0-beta.21
|
|
72
|
+
|
|
73
|
+
Tue, 14 Feb 2023 04:02:35 GMT
|
|
74
|
+
|
|
75
|
+
### Changes
|
|
76
|
+
|
|
77
|
+
- fix: cleanup types, docs, etc. in root source files of fast-element in preparation for release (rob@bluespire.com)
|
|
78
|
+
- Remove un-necessary expression from StyleElementStrategy (nicholasrice@users.noreply.github.com)
|
|
79
|
+
|
|
80
|
+
## 2.0.0-beta.20
|
|
81
|
+
|
|
82
|
+
Wed, 11 Jan 2023 22:07:47 GMT
|
|
83
|
+
|
|
84
|
+
### Changes
|
|
85
|
+
|
|
86
|
+
- add nullableBooleanConverter for attributes (863023+radium-v@users.noreply.github.com)
|
|
87
|
+
- update return type for dangerousHTML to DangerousHTMLDirective (chhol@microsoft.com)
|
|
88
|
+
- chore: remove deprecated APIs from fast-element (rob@bluespire.com)
|
|
89
|
+
- chore: cleanup fast-element interfaces (roeisenb@microsoft.com)
|
|
90
|
+
- refactor(fast-element): replace dangerousHTML with html.partial (roeisenb@microsoft.com)
|
|
91
|
+
- feat: add ability to inline templates (roeisenb@microsoft.com)
|
|
92
|
+
|
|
93
|
+
## 2.0.0-beta.19
|
|
94
|
+
|
|
95
|
+
Fri, 02 Dec 2022 01:18:22 GMT
|
|
96
|
+
|
|
97
|
+
### Changes
|
|
98
|
+
|
|
99
|
+
- feat: add kernel mode with isolation by default (roeisenb@microsoft.com)
|
|
100
|
+
|
|
101
|
+
## 2.0.0-beta.18
|
|
102
|
+
|
|
103
|
+
Tue, 15 Nov 2022 02:40:34 GMT
|
|
104
|
+
|
|
105
|
+
### Changes
|
|
106
|
+
|
|
107
|
+
- chore: move ViewBehaviorOrchestrator to utilities (roeisenb@microsoft.com)
|
|
108
|
+
- feat: add new DOM Policy protection throughout (roeisenb@microsoft.com)
|
|
109
|
+
|
|
110
|
+
## 2.0.0-beta.17
|
|
111
|
+
|
|
112
|
+
Tue, 01 Nov 2022 23:26:26 GMT
|
|
113
|
+
|
|
114
|
+
### Changes
|
|
115
|
+
|
|
116
|
+
- fix: prevent circular reference errors when stringifying DOM nodes controlled by FAST's rendering engine (roeisenb@microsoft.com)
|
|
117
|
+
|
|
118
|
+
## 2.0.0-beta.16
|
|
119
|
+
|
|
120
|
+
Fri, 28 Oct 2022 20:44:44 GMT
|
|
121
|
+
|
|
122
|
+
### Changes
|
|
123
|
+
|
|
124
|
+
- Fixed bug preventing main component stylesheet behaviors from being connected during connectedCallback (nicholasrice@users.noreply.github.com)
|
|
125
|
+
|
|
126
|
+
## 2.0.0-beta.15
|
|
127
|
+
|
|
128
|
+
Tue, 25 Oct 2022 20:24:32 GMT
|
|
129
|
+
|
|
130
|
+
### Changes
|
|
131
|
+
|
|
132
|
+
- Updated the ElementController to connect behaviors prior to rendering element templates (nicholasrice@users.noreply.github.com)
|
|
133
|
+
- Added support to fast-element to support element hydration and the `defer-hydration` attribute (nicholasrice@users.noreply.github.com)
|
|
134
|
+
|
|
135
|
+
## 2.0.0-beta.14
|
|
136
|
+
|
|
137
|
+
Fri, 14 Oct 2022 18:26:11 GMT
|
|
138
|
+
|
|
139
|
+
### Changes
|
|
140
|
+
|
|
141
|
+
- fix: tokenList bindings track adds and removes from multiple sources (roeisenb@microsoft.com)
|
|
142
|
+
- refactor: remove duplication and re-organize binding behavior logic (roeisenb@microsoft.com)
|
|
143
|
+
|
|
144
|
+
## 2.0.0-beta.13
|
|
145
|
+
|
|
146
|
+
Mon, 10 Oct 2022 20:28:02 GMT
|
|
147
|
+
|
|
148
|
+
### Changes
|
|
149
|
+
|
|
150
|
+
- fix: prevent event callbacks when controller is not bound (roeisenb@microsoft.com)
|
|
151
|
+
|
|
152
|
+
## 2.0.0-beta.12
|
|
153
|
+
|
|
154
|
+
Thu, 06 Oct 2022 23:21:20 GMT
|
|
155
|
+
|
|
156
|
+
### Changes
|
|
157
|
+
|
|
158
|
+
- fix: repeat update view context positioning (roeisenb@microsoft.com)
|
|
159
|
+
|
|
160
|
+
## 2.0.0-beta.11
|
|
161
|
+
|
|
162
|
+
Wed, 05 Oct 2022 23:26:01 GMT
|
|
163
|
+
|
|
164
|
+
### Changes
|
|
165
|
+
|
|
166
|
+
- fix: removed a shadowRoot leak from ElementController (nicholasrice@users.noreply.github.com)
|
|
167
|
+
|
|
168
|
+
## 2.0.0-beta.10
|
|
169
|
+
|
|
170
|
+
Mon, 03 Oct 2022 23:44:38 GMT
|
|
171
|
+
|
|
172
|
+
### Changes
|
|
173
|
+
|
|
174
|
+
- fix: observation kernel missing binding observer disconnect method (roeisenb@microsoft.com)
|
|
175
|
+
- feat: less surprising class bindings w/ more flexibility for developers (roeisenb@microsoft.com)
|
|
176
|
+
- fix: don't allow registering FASTElement itself as a web component (roeisenb@microsoft.com)
|
|
177
|
+
|
|
178
|
+
## 2.0.0-beta.9
|
|
179
|
+
|
|
180
|
+
Wed, 28 Sep 2022 20:45:51 GMT
|
|
181
|
+
|
|
182
|
+
### Changes
|
|
183
|
+
|
|
184
|
+
- fix: ensure composed templates receive the existing execution context (roeisenb@microsoft.com)
|
|
185
|
+
|
|
7
186
|
## 2.0.0-beta.8
|
|
8
187
|
|
|
9
188
|
Tue, 27 Sep 2022 22:31:52 GMT
|
package/README.md
CHANGED
|
@@ -9,26 +9,18 @@ The `fast-element` library is a lightweight means to easily build performant, me
|
|
|
9
9
|
|
|
10
10
|
### From NPM
|
|
11
11
|
|
|
12
|
-
To install the `fast-element` library
|
|
12
|
+
To install the latest `fast-element` library using `npm`:
|
|
13
13
|
|
|
14
14
|
```shell
|
|
15
15
|
npm install --save @microsoft/fast-element
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
```shell
|
|
19
|
-
yarn add @microsoft/fast-element
|
|
20
|
-
```
|
|
21
|
-
|
|
22
18
|
Within your JavaScript or TypeScript code, you can then import library APIs like this:
|
|
23
19
|
|
|
24
20
|
```ts
|
|
25
21
|
import { FASTElement } from '@microsoft/fast-element';
|
|
26
22
|
```
|
|
27
23
|
|
|
28
|
-
:::tip
|
|
29
|
-
Looking for a setup that integrates with a particular front-end framework or bundler? Check out [our integration docs](../integrations/introduction.md).
|
|
30
|
-
:::
|
|
31
|
-
|
|
32
24
|
### From CDN
|
|
33
25
|
|
|
34
26
|
A pre-bundled script that contains all APIs needed to build web components with FAST Element is available on CDN. You can use this script by adding [`type="module"`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) to the script element and then importing from the CDN.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
+
"extends": "../../../api-extractor.json",
|
|
4
|
+
"mainEntryPointFilePath": "./dist/dts/context.d.ts",
|
|
5
|
+
"apiReport": {
|
|
6
|
+
"enabled": true,
|
|
7
|
+
"reportFolder": "<projectFolder>/docs/context",
|
|
8
|
+
"reportFileName": "api-report"
|
|
9
|
+
},
|
|
10
|
+
"docModel": {
|
|
11
|
+
"enabled": true,
|
|
12
|
+
"apiJsonFilePath": "<projectFolder>/dist/context/context.api.json"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
+
"extends": "../../../api-extractor.json",
|
|
4
|
+
"mainEntryPointFilePath": "./dist/dts/di/di.d.ts",
|
|
5
|
+
"apiReport": {
|
|
6
|
+
"enabled": true,
|
|
7
|
+
"reportFolder": "<projectFolder>/docs/di",
|
|
8
|
+
"reportFileName": "api-report"
|
|
9
|
+
},
|
|
10
|
+
"docModel": {
|
|
11
|
+
"enabled": true,
|
|
12
|
+
"apiJsonFilePath": "<projectFolder>/dist/di/di.api.json"
|
|
13
|
+
}
|
|
14
|
+
}
|