@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.
Files changed (87) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +42 -0
  3. package/custom-elements.json +2418 -1316
  4. package/dist/ace-editor/OscdAceEditor.d.ts +46 -4
  5. package/dist/ace-editor/OscdAceEditor.js +250 -4
  6. package/dist/ace-editor/OscdAceEditor.js.map +1 -1
  7. package/dist/ace-editor/OscdAceEditor.spec.js +208 -2
  8. package/dist/ace-editor/OscdAceEditor.spec.js.map +1 -1
  9. package/dist/ace-editor/OscdAceEditor.stories.d.ts +10 -28
  10. package/dist/ace-editor/OscdAceEditor.stories.js +87 -20
  11. package/dist/ace-editor/OscdAceEditor.stories.js.map +1 -1
  12. package/dist/ace-editor/internal/AceEditor.d.ts +5 -3
  13. package/dist/ace-editor/internal/AceEditor.js +22 -15
  14. package/dist/ace-editor/internal/AceEditor.js.map +1 -1
  15. package/dist/ace-editor/internal/ace-editor-base/AceEditorBase.js +10 -4
  16. package/dist/ace-editor/internal/ace-editor-base/AceEditorBase.js.map +1 -1
  17. package/dist/ace-editor/internal/ace-editor-base/AceEditorBase.spec.d.ts +1 -0
  18. package/dist/ace-editor/internal/ace-editor-base/AceEditorBase.spec.js +33 -0
  19. package/dist/ace-editor/internal/ace-editor-base/AceEditorBase.spec.js.map +1 -0
  20. package/dist/ace-editor/sample-scl.d.ts +9 -0
  21. package/dist/ace-editor/sample-scl.js +297 -0
  22. package/dist/ace-editor/sample-scl.js.map +1 -0
  23. package/dist/action-pane/oscd-action-pane.stories.d.ts +1 -1
  24. package/dist/action-tree/oscd-action-tree.stories.d.ts +1 -1
  25. package/dist/button/OscdElevatedButton.stories.d.ts +1 -1
  26. package/dist/button/OscdFilledButton.stories.d.ts +1 -1
  27. package/dist/button/OscdFilledTonalButton.stories.d.ts +1 -1
  28. package/dist/button/OscdOutlinedButton.stories.d.ts +1 -1
  29. package/dist/button/OscdTextButton.stories.d.ts +1 -1
  30. package/dist/checkbox/OscdCheckbox.stories.d.ts +1 -1
  31. package/dist/chips/OscdAssistChip.stories.d.ts +1 -1
  32. package/dist/chips/OscdChipSet.stories.d.ts +1 -1
  33. package/dist/chips/OscdFilterChip.stories.d.ts +1 -1
  34. package/dist/chips/OscdInputChip.stories.d.ts +1 -1
  35. package/dist/chips/OscdSuggestionChip.stories.d.ts +1 -1
  36. package/dist/dialog/OscdDialog.stories.d.ts +1 -1
  37. package/dist/divider/OscdDivider.stories.d.ts +1 -1
  38. package/dist/elevation/OscdElevation.stories.d.ts +1 -1
  39. package/dist/fab/OscdBrandedFab.stories.d.ts +1 -1
  40. package/dist/fab/OscdFab.stories.d.ts +1 -1
  41. package/dist/field/OscdFilledField.stories.d.ts +1 -1
  42. package/dist/field/OscdOutlinedField.stories.d.ts +1 -1
  43. package/dist/focus/OscdFocusRing.stories.d.ts +1 -1
  44. package/dist/icon/OscdIcon.stories.d.ts +1 -1
  45. package/dist/iconbutton/OscdFilledIconButton.stories.d.ts +1 -1
  46. package/dist/iconbutton/OscdFilledTonalIconButton.stories.d.ts +1 -1
  47. package/dist/iconbutton/OscdIconButton.stories.d.ts +1 -1
  48. package/dist/iconbutton/OscdOutlinedIconButton.stories.d.ts +1 -1
  49. package/dist/labs/badge/OscdBadge.stories.d.ts +1 -1
  50. package/dist/labs/card/OscdElevatedCard.stories.d.ts +1 -1
  51. package/dist/labs/card/OscdFilledCard.stories.d.ts +1 -1
  52. package/dist/labs/card/OscdOutlinedCard.stories.d.ts +1 -1
  53. package/dist/labs/item/OscdItem.stories.d.ts +1 -1
  54. package/dist/labs/navigationbar/OscdNavigationBar.stories.d.ts +1 -1
  55. package/dist/labs/navigationtab/OscdNavigationTab.stories.d.ts +1 -1
  56. package/dist/list/OscdList.stories.d.ts +1 -1
  57. package/dist/list/OscdListItem.stories.d.ts +1 -1
  58. package/dist/menu/OscdMenuItem.stories.d.ts +1 -1
  59. package/dist/progress/OscdLinearProgress.stories.d.ts +1 -1
  60. package/dist/ripple/OscdRipple.stories.d.ts +1 -1
  61. package/dist/scl-editor/OscdSclEditor.d.ts +22 -0
  62. package/dist/scl-editor/OscdSclEditor.js +62 -0
  63. package/dist/scl-editor/OscdSclEditor.js.map +1 -0
  64. package/dist/scl-editor/OscdSclEditor.spec.d.ts +1 -0
  65. package/dist/scl-editor/OscdSclEditor.spec.js +81 -0
  66. package/dist/scl-editor/OscdSclEditor.spec.js.map +1 -0
  67. package/dist/scl-editor/OscdSclEditor.stories.d.ts +13 -0
  68. package/dist/scl-editor/OscdSclEditor.stories.js +87 -0
  69. package/dist/scl-editor/OscdSclEditor.stories.js.map +1 -0
  70. package/dist/scl-editor/internal/namespace-utils.d.ts +13 -0
  71. package/dist/scl-editor/internal/namespace-utils.js +84 -0
  72. package/dist/scl-editor/internal/namespace-utils.js.map +1 -0
  73. package/dist/scl-editor/internal/namespace-utils.spec.d.ts +1 -0
  74. package/dist/scl-editor/internal/namespace-utils.spec.js +67 -0
  75. package/dist/scl-editor/internal/namespace-utils.spec.js.map +1 -0
  76. package/dist/scl-editor/oscd-scl-editor.d.ts +2 -0
  77. package/dist/scl-editor/oscd-scl-editor.js +4 -0
  78. package/dist/scl-editor/oscd-scl-editor.js.map +1 -0
  79. package/dist/scl-textfield/oscd-scl-text-field.stories.d.ts +1 -1
  80. package/dist/search-field/oscd-outlined-search-field.stories.d.ts +1 -1
  81. package/dist/selection-list/oscd-selection-list.stories.d.ts +1 -1
  82. package/dist/slider/OscdSlider.stories.d.ts +1 -1
  83. package/dist/switch/OscdSwitch.stories.d.ts +1 -1
  84. package/dist/tabs/OscdTabs.stories.d.ts +1 -1
  85. package/dist/textfield/OscdFilledTextField.stories.d.ts +1 -1
  86. package/dist/textfield/OscdOutlinedTextField.stories.d.ts +1 -1
  87. 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/)