@omicronenergy/oscd-ui 0.1.2 → 0.1.4
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/CHANGELOG.md +14 -0
- package/README.md +42 -0
- package/custom-elements.json +2418 -1316
- package/dist/ace-editor/OscdAceEditor.d.ts +46 -4
- package/dist/ace-editor/OscdAceEditor.js +250 -4
- package/dist/ace-editor/OscdAceEditor.js.map +1 -1
- package/dist/ace-editor/OscdAceEditor.spec.js +208 -2
- package/dist/ace-editor/OscdAceEditor.spec.js.map +1 -1
- package/dist/ace-editor/OscdAceEditor.stories.d.ts +10 -28
- package/dist/ace-editor/OscdAceEditor.stories.js +87 -20
- package/dist/ace-editor/OscdAceEditor.stories.js.map +1 -1
- package/dist/ace-editor/internal/AceEditor.d.ts +5 -3
- package/dist/ace-editor/internal/AceEditor.js +22 -15
- package/dist/ace-editor/internal/AceEditor.js.map +1 -1
- package/dist/ace-editor/internal/ace-editor-base/AceEditorBase.js +10 -4
- package/dist/ace-editor/internal/ace-editor-base/AceEditorBase.js.map +1 -1
- package/dist/ace-editor/internal/ace-editor-base/AceEditorBase.spec.d.ts +1 -0
- package/dist/ace-editor/internal/ace-editor-base/AceEditorBase.spec.js +33 -0
- package/dist/ace-editor/internal/ace-editor-base/AceEditorBase.spec.js.map +1 -0
- package/dist/ace-editor/sample-scl.d.ts +9 -0
- package/dist/ace-editor/sample-scl.js +297 -0
- package/dist/ace-editor/sample-scl.js.map +1 -0
- package/dist/action-pane/oscd-action-pane.stories.d.ts +1 -1
- package/dist/action-tree/oscd-action-tree.stories.d.ts +1 -1
- package/dist/button/OscdElevatedButton.stories.d.ts +1 -1
- package/dist/button/OscdFilledButton.stories.d.ts +1 -1
- package/dist/button/OscdFilledTonalButton.stories.d.ts +1 -1
- package/dist/button/OscdOutlinedButton.stories.d.ts +1 -1
- package/dist/button/OscdTextButton.stories.d.ts +1 -1
- package/dist/checkbox/OscdCheckbox.stories.d.ts +1 -1
- package/dist/chips/OscdAssistChip.stories.d.ts +1 -1
- package/dist/chips/OscdChipSet.stories.d.ts +1 -1
- package/dist/chips/OscdFilterChip.stories.d.ts +1 -1
- package/dist/chips/OscdInputChip.stories.d.ts +1 -1
- package/dist/chips/OscdSuggestionChip.stories.d.ts +1 -1
- package/dist/dialog/OscdDialog.stories.d.ts +1 -1
- package/dist/divider/OscdDivider.stories.d.ts +1 -1
- package/dist/elevation/OscdElevation.stories.d.ts +1 -1
- package/dist/fab/OscdBrandedFab.stories.d.ts +1 -1
- package/dist/fab/OscdFab.stories.d.ts +1 -1
- package/dist/field/OscdFilledField.stories.d.ts +1 -1
- package/dist/field/OscdOutlinedField.stories.d.ts +1 -1
- package/dist/focus/OscdFocusRing.stories.d.ts +1 -1
- package/dist/icon/OscdIcon.stories.d.ts +1 -1
- package/dist/iconbutton/OscdFilledIconButton.stories.d.ts +1 -1
- package/dist/iconbutton/OscdFilledTonalIconButton.stories.d.ts +1 -1
- package/dist/iconbutton/OscdIconButton.stories.d.ts +1 -1
- package/dist/iconbutton/OscdOutlinedIconButton.stories.d.ts +1 -1
- package/dist/labs/badge/OscdBadge.stories.d.ts +1 -1
- package/dist/labs/card/OscdElevatedCard.stories.d.ts +1 -1
- package/dist/labs/card/OscdFilledCard.stories.d.ts +1 -1
- package/dist/labs/card/OscdOutlinedCard.stories.d.ts +1 -1
- package/dist/labs/item/OscdItem.stories.d.ts +1 -1
- package/dist/labs/navigationbar/OscdNavigationBar.stories.d.ts +1 -1
- package/dist/labs/navigationtab/OscdNavigationTab.stories.d.ts +1 -1
- package/dist/list/OscdList.stories.d.ts +1 -1
- package/dist/list/OscdListItem.stories.d.ts +1 -1
- package/dist/menu/OscdMenuItem.stories.d.ts +1 -1
- package/dist/progress/OscdLinearProgress.stories.d.ts +1 -1
- package/dist/ripple/OscdRipple.stories.d.ts +1 -1
- package/dist/scl-editor/OscdSclEditor.d.ts +22 -0
- package/dist/scl-editor/OscdSclEditor.js +62 -0
- package/dist/scl-editor/OscdSclEditor.js.map +1 -0
- package/dist/scl-editor/OscdSclEditor.spec.d.ts +1 -0
- package/dist/scl-editor/OscdSclEditor.spec.js +81 -0
- package/dist/scl-editor/OscdSclEditor.spec.js.map +1 -0
- package/dist/scl-editor/OscdSclEditor.stories.d.ts +13 -0
- package/dist/scl-editor/OscdSclEditor.stories.js +87 -0
- package/dist/scl-editor/OscdSclEditor.stories.js.map +1 -0
- package/dist/scl-editor/internal/namespace-utils.d.ts +13 -0
- package/dist/scl-editor/internal/namespace-utils.js +84 -0
- package/dist/scl-editor/internal/namespace-utils.js.map +1 -0
- package/dist/scl-editor/internal/namespace-utils.spec.d.ts +1 -0
- package/dist/scl-editor/internal/namespace-utils.spec.js +67 -0
- package/dist/scl-editor/internal/namespace-utils.spec.js.map +1 -0
- package/dist/scl-editor/oscd-scl-editor.d.ts +2 -0
- package/dist/scl-editor/oscd-scl-editor.js +4 -0
- package/dist/scl-editor/oscd-scl-editor.js.map +1 -0
- package/dist/scl-textfield/oscd-scl-text-field.stories.d.ts +1 -1
- package/dist/search-field/oscd-outlined-search-field.stories.d.ts +1 -1
- package/dist/selection-list/oscd-selection-list.stories.d.ts +1 -1
- package/dist/slider/OscdSlider.stories.d.ts +1 -1
- package/dist/switch/OscdSwitch.stories.d.ts +1 -1
- package/dist/tabs/OscdTabs.stories.d.ts +1 -1
- package/dist/textfield/OscdFilledTextField.stories.d.ts +1 -1
- package/dist/textfield/OscdOutlinedTextField.stories.d.ts +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,20 @@
|
|
|
3
3
|
For the planned `0.1.0` breaking theming changes, see the
|
|
4
4
|
[migration guide](./MIGRATION-0.1.0.md).
|
|
5
5
|
|
|
6
|
+
## [0.1.4](https://github.com/OMICRONEnergyOSS/oscd-ui/compare/oscd-ui-v0.1.3...oscd-ui-v0.1.4) (2026-11-24)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* oscd-ace-editor - switch to conventional toolbar layout ([3d07c89](https://github.com/OMICRONEnergyOSS/oscd-ui/commit/3d07c891c12bd25aef8b8b53ca88d59218244d97))
|
|
12
|
+
|
|
13
|
+
## [0.1.3](https://github.com/OMICRONEnergyOSS/oscd-ui/compare/oscd-ui-v0.1.2...oscd-ui-v0.1.3) (2026-11-12)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* **editors:** reconcile Ace and SCL editors without input resets ([bea55b6](https://github.com/OMICRONEnergyOSS/oscd-ui/commit/bea55b646e0976ab0ee1a733ee5d5e9ae36a8364))
|
|
19
|
+
|
|
6
20
|
## [0.1.2](https://github.com/OMICRONEnergyOSS/oscd-ui/compare/oscd-ui-v0.1.1...oscd-ui-v0.1.2) (2026-10-16)
|
|
7
21
|
|
|
8
22
|
|
package/README.md
CHANGED
|
@@ -40,6 +40,48 @@ The **Icons / Icon** Storybook story exposes the size in pixels with a number
|
|
|
40
40
|
control and foreground/background dropdowns for all public palette color slots.
|
|
41
41
|
The selected slots follow the active Storybook palette.
|
|
42
42
|
|
|
43
|
+
## Text and SCL element editors
|
|
44
|
+
|
|
45
|
+
Use `ace-editor/OscdAceEditor.js` for string `.value` input and live text output.
|
|
46
|
+
Use `scl-editor/OscdSclEditor.js` for `.element` input/output: it preserves the
|
|
47
|
+
element's in-scope namespaces and parses a new element without modifying the
|
|
48
|
+
original document. Its inherited `.value` exposes the editable text.
|
|
49
|
+
`element` returns `null` for empty or malformed text; validation checks exactly
|
|
50
|
+
one well-formed element, **not SCL schema conformance**. Empty input is allowed.
|
|
51
|
+
The obsolete `xml-editor` export paths did not contain shipped modules; use
|
|
52
|
+
`scl-editor` instead.
|
|
53
|
+
|
|
54
|
+
Both components share Ace, persisted settings, an optional `.toolbar`, and native
|
|
55
|
+
form association. The toolbar appears above the editor when enabled; use the
|
|
56
|
+
`toolbar-actions` slot for additional actions at its right end. Set
|
|
57
|
+
`--oscd-ace-editor-toolbar-padding` and
|
|
58
|
+
`--oscd-ace-editor-toolbar-background-color` to style its container. Its
|
|
59
|
+
controls retain an internal inset for touch targets and focus rings. Its
|
|
60
|
+
outlined icon buttons inherit Material tokens such as
|
|
61
|
+
`--md-outlined-icon-button-icon-color`, `--md-outlined-icon-button-outline-color`
|
|
62
|
+
and the corresponding hover, focus and pressed tokens. These inherited values
|
|
63
|
+
may also affect other outlined icon buttons in the same scope. The unselected
|
|
64
|
+
button background is transparent.
|
|
65
|
+
|
|
66
|
+
Ace accepts an optional `.validator` callback returning `null`
|
|
67
|
+
or an error message; SCL supplies namespace-aware XML validation by default.
|
|
68
|
+
`setCustomValidity()` errors persist until explicitly cleared.
|
|
69
|
+
User edits emit `input` plus a bubbling/composed `CustomEvent<string>('change')`
|
|
70
|
+
whose `detail` is the current text. The existing text-bearing `change` contract
|
|
71
|
+
is retained; it is **not** a blur event. Programmatic writes emit neither.
|
|
72
|
+
Both preserve the cursor on unchanged value echoes and start at the beginning
|
|
73
|
+
on actual text replacements.
|
|
74
|
+
|
|
75
|
+
The **Editors / Ace Editor** stories show a shared publisher-demo document
|
|
76
|
+
with five IEDs, communication and data templates, plus toolbar and custom
|
|
77
|
+
validation examples in **SCL Doc as text**. **Editors / SCL Editor** shows
|
|
78
|
+
**Full SCL Document** using the parsed document's `.documentElement` and
|
|
79
|
+
**SCL Element** using its `PUB_A` IED with inherited SCL namespaces, plus
|
|
80
|
+
toolbar, invalid text and empty-input examples. Both SCL examples pass an
|
|
81
|
+
Element through `.element`, not an XMLDocument object.
|
|
82
|
+
The fixture comes from `OMICRONEnergyOSS/oscd-editor-publisher/demo/sample.scd`;
|
|
83
|
+
it is demonstration data, not a schema-conformance assertion.
|
|
84
|
+
|
|
43
85
|
## Scoped Web Components
|
|
44
86
|
|
|
45
87
|
All OSCD UI components are scoped web components, which means its possible to use plugins can use multiple different versions of @omicronenergy/oscd-ui without risk of conflict. More details on how to use these components in a scoped manor are below. General details on scoping web components can be found [here](https://open-wc.org/docs/development/scoped-elements/)
|