jssm 5.148.2 → 5.149.1
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/README.md +7 -7
- package/custom-elements.json +272 -0
- package/dist/cdn/instance.js +1 -1
- package/dist/cdn/viz.js +1 -1
- package/dist/cli/fsl-export-system-prompt.cjs +1 -1
- package/dist/cli/fsl-render.cjs +1 -1
- package/dist/cli/fsl.cjs +1 -1
- package/dist/cli/lib.cjs +1 -1
- package/dist/cli/lib.mjs +1 -1
- package/dist/deno/README.md +7 -7
- package/dist/deno/jssm.js +1 -1
- package/dist/jssm.es5.cjs +1 -1
- package/dist/jssm.es5.iife.js +1 -1
- package/dist/jssm.es6.mjs +1 -1
- package/dist/jssm_viz.cjs +1 -1
- package/dist/jssm_viz.iife.cjs +1 -1
- package/dist/jssm_viz.mjs +1 -1
- package/dist/wc/docs.define.js +52 -0
- package/dist/wc/docs.js +1131 -0
- package/package.json +15 -3
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { FslDocs } from './docs.js';
|
|
2
|
+
export { FslDocs } from './docs.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Shared helpers for the dual-prefix (`fsl-` canonical, `jssm-` synonym)
|
|
6
|
+
* web-component naming convention. Centralizes the "match either prefix"
|
|
7
|
+
* rule so it lives in exactly one place.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Returns true when `tag_name` is exactly `fsl-<suffix>` or `jssm-<suffix>`
|
|
11
|
+
* (case-insensitive).
|
|
12
|
+
*
|
|
13
|
+
* @param tag_name - The element tag name to test (e.g. `"FSL-VIZ"`, `"jssm-viz"`).
|
|
14
|
+
* @param suffix - The suffix to match after the prefix (e.g. `"viz"`).
|
|
15
|
+
* @returns `true` when `tag_name` is `fsl-<suffix>` or `jssm-<suffix>`.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* wc_suffix_matches('FSL-VIZ', 'viz'); // true
|
|
19
|
+
* wc_suffix_matches('jssm-viz', 'viz'); // true
|
|
20
|
+
* wc_suffix_matches('div', 'viz'); // false
|
|
21
|
+
* wc_suffix_matches('fsl-vizard', 'viz'); // false — suffix must match exactly
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* Registers a single canonical `fsl-*` custom-element tag, with no `jssm-*`
|
|
25
|
+
* synonym.
|
|
26
|
+
*
|
|
27
|
+
* This is the registration path for **new** web components. The `jssm-*`
|
|
28
|
+
* prefix is a deprecated backward-compatibility alias retained only for the
|
|
29
|
+
* components that shipped under that name (`<jssm-viz>`, `<jssm-instance>`,
|
|
30
|
+
* `<jssm-bind>`); new components are `fsl-*`-only for fsl.tools brand
|
|
31
|
+
* alignment, and the legacy synonyms are slated for removal in v6. Use
|
|
32
|
+
* {@link define_with_synonym} only when maintaining one of those pre-existing
|
|
33
|
+
* dual-named components.
|
|
34
|
+
*
|
|
35
|
+
* Idempotent: skips the `define` call when the tag is already registered.
|
|
36
|
+
*
|
|
37
|
+
* @param canonical_tag - The `fsl-*` tag name (e.g. `"fsl-info-panel"`).
|
|
38
|
+
* @param CanonicalClass - Constructor to register under `canonical_tag`.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* class FslInfoPanel extends HTMLElement {}
|
|
42
|
+
* define_canonical('fsl-info-panel', FslInfoPanel);
|
|
43
|
+
*
|
|
44
|
+
* @see define_with_synonym
|
|
45
|
+
*/
|
|
46
|
+
function define_canonical(canonical_tag, CanonicalClass) {
|
|
47
|
+
if (!customElements.get(canonical_tag))
|
|
48
|
+
customElements.define(canonical_tag, CanonicalClass);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// New component: canonical `fsl-*` only, no deprecated `jssm-*` synonym.
|
|
52
|
+
define_canonical('fsl-docs', FslDocs);
|