@lushly-dev/specimen-fast-af 0.0.0-stage → 0.1.0-preview.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/LICENSE +21 -0
- package/README.md +32 -2
- package/package.json +43 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Lushly
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,33 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Specimen FAST-AF plugin
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Preview,** like [Specimen](../../foundations/specimen/README.md).
|
|
4
|
+
|
|
5
|
+
`@lushly-dev/specimen-fast-af` adds FAST-AF's knowledge to a Specimen bench through three of Specimen's plugin points:
|
|
6
|
+
|
|
7
|
+
- **Schema source.** It enables FAST's Definition Schema and merges each FAST element's definition into the schema core reads from the custom elements manifest: properties and their finite values, slots, events, CSS properties and `@command` commands. Where the manifest already states something, the manifest's statement stays.
|
|
8
|
+
- **Command runner `fast-af`.** It calls an element's `@command` method by command id, for explicit command steps: `{ command: { runner: 'fast-af', name: 'editor.save', target: 'control' } }`. A command the element does not declare fails with the commands it does.
|
|
9
|
+
- **Context provider.** It turns a FAST-AF theme module into named themes for native specimens. A module shaped as `@lushly-dev/violet-elements`' theme exports qualifies: its `presets`, its `apply`, and optionally its `install`.
|
|
10
|
+
|
|
11
|
+
It also passes a token map through: FAST-AF's private alias registry, composed and validated with the public maps (`composeTokenMaps`).
|
|
12
|
+
|
|
13
|
+
Wire it from a plugins module the bench configuration names:
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
// specimen.plugins.ts
|
|
17
|
+
import { fastAf } from '@lushly-dev/specimen-fast-af';
|
|
18
|
+
import * as theme from './src/theme/index.js';
|
|
19
|
+
|
|
20
|
+
export default fastAf({
|
|
21
|
+
themes: { presets: theme.violetThemePresets, apply: theme.applyVioletThemePreset, install: theme.installVioletTheme },
|
|
22
|
+
});
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{ "specimens": [], "plugins": ["./specimen.plugins.ts"], "manifest": "./custom-elements.json" }
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The bench installs plugins before any specimen or story module loads. Elements defined later therefore record their Definition Schema.
|
|
30
|
+
|
|
31
|
+
`pnpm -F @lushly-dev/specimen-fast-af test` runs the browser-free schema tests. `test:browser` runs the plugin through Specimen's bench on a FAST element with an `@command`; it needs the native host and Chromium, as Specimen's own Chromium suite does.
|
|
32
|
+
|
|
33
|
+
It is admitted for the npm `preview` prerelease with Specimen, at `0.1.0-preview.0` first, and needs `@lushly-dev/fast-element` `^3.0.1-preview`, which releases in the same prerelease. See the [T05 record](../../docs/features/active/specimens/t05-compatibility.md).
|
package/package.json
CHANGED
|
@@ -1,6 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lushly-dev/specimen-fast-af",
|
|
3
|
-
"version": "0.0.0
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
3
|
+
"version": "0.1.0-preview.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "FAST-AF plugin for Specimen: Definition Schema, @command runner and theme presets",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist",
|
|
8
|
+
"README.md"
|
|
9
|
+
],
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
|
+
},
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": ">=22.12.0"
|
|
19
|
+
},
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"@lushly-dev/fast-element": "^3.0.1-preview",
|
|
23
|
+
"@lushly-dev/specimen": "^2.2.0-preview"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@types/node": "^26.6.6",
|
|
27
|
+
"rimraf": "^6.1.3",
|
|
28
|
+
"typescript": "^5.9.3",
|
|
29
|
+
"vitest": "^4.1.12",
|
|
30
|
+
"@lushly-dev/fast-element": "^3.0.1-preview.0",
|
|
31
|
+
"@lushly-dev/specimen": "^2.2.0-preview.0"
|
|
32
|
+
},
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "https://github.com/lushly-dev/afd.git",
|
|
36
|
+
"directory": "integrations/specimen-fast-af"
|
|
37
|
+
},
|
|
38
|
+
"license": "MIT",
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "tsc",
|
|
41
|
+
"clean": "rimraf dist *.tsbuildinfo",
|
|
42
|
+
"typecheck": "tsc -p tsconfig.typecheck.json",
|
|
43
|
+
"test": "vitest run",
|
|
44
|
+
"test:browser": "vitest run --config vitest.browser.config.ts"
|
|
45
|
+
}
|
|
6
46
|
}
|