typecomposer 0.1.46 → 0.1.49
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/{core → dist/core}/index.d.ts +0 -3
- package/{core → dist/core}/index.js +0 -3
- package/dist/core/index.js.map +1 -0
- package/{core → dist/core}/styles/index.d.ts +3 -3
- package/{core → dist/core}/styles/index.js +0 -8
- package/{core → dist/core}/styles/index.js.map +1 -1
- package/{global → dist/global}/index.d.ts +10 -4
- package/{global → dist/global}/index.js +387 -322
- package/dist/global/index.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/{index.d.ts → dist/index.js} +1 -0
- package/dist/index.js.map +1 -0
- package/package.json +35 -10
- package/styles/style.scss +2 -23
- package/typings/index.d.ts +58 -66
- package/core/app/Validate.d.ts +0 -61
- package/core/app/Validate.js +0 -2
- package/core/app/Validate.js.map +0 -1
- package/core/app/index.d.ts +0 -40
- package/core/app/index.js +0 -181
- package/core/app/index.js.map +0 -1
- package/core/components/AlertPanel.d.ts +0 -32
- package/core/components/AlertPanel.js +0 -75
- package/core/components/AlertPanel.js.map +0 -1
- package/core/components/AvatarPanel.d.ts +0 -21
- package/core/components/AvatarPanel.js +0 -62
- package/core/components/AvatarPanel.js.map +0 -1
- package/core/components/BorderPanel.d.ts +0 -28
- package/core/components/BorderPanel.js +0 -90
- package/core/components/BorderPanel.js.map +0 -1
- package/core/components/CardPanel.d.ts +0 -5
- package/core/components/CardPanel.js +0 -11
- package/core/components/CardPanel.js.map +0 -1
- package/core/components/CheckBox.d.ts +0 -36
- package/core/components/CheckBox.js +0 -109
- package/core/components/CheckBox.js.map +0 -1
- package/core/components/ColorPicker.d.ts +0 -10
- package/core/components/ColorPicker.js +0 -36
- package/core/components/ColorPicker.js.map +0 -1
- package/core/components/ContextMenu.d.ts +0 -16
- package/core/components/ContextMenu.js +0 -64
- package/core/components/ContextMenu.js.map +0 -1
- package/core/components/DialogPanel.d.ts +0 -15
- package/core/components/DialogPanel.js +0 -62
- package/core/components/DialogPanel.js.map +0 -1
- package/core/components/DropDown.d.ts +0 -54
- package/core/components/DropDown.js +0 -231
- package/core/components/DropDown.js.map +0 -1
- package/core/components/FlowPanel.d.ts +0 -11
- package/core/components/FlowPanel.js +0 -40
- package/core/components/FlowPanel.js.map +0 -1
- package/core/components/ForEach.d.ts +0 -11
- package/core/components/ForEach.js +0 -88
- package/core/components/ForEach.js.map +0 -1
- package/core/components/GridPanel.d.ts +0 -10
- package/core/components/GridPanel.js +0 -30
- package/core/components/GridPanel.js.map +0 -1
- package/core/components/HBox.d.ts +0 -5
- package/core/components/HBox.js +0 -10
- package/core/components/HBox.js.map +0 -1
- package/core/components/LazyLoading.d.ts +0 -19
- package/core/components/LazyLoading.js +0 -36
- package/core/components/LazyLoading.js.map +0 -1
- package/core/components/ListPanel.d.ts +0 -27
- package/core/components/ListPanel.js +0 -153
- package/core/components/ListPanel.js.map +0 -1
- package/core/components/PopUpButton.d.ts +0 -18
- package/core/components/PopUpButton.js +0 -57
- package/core/components/PopUpButton.js.map +0 -1
- package/core/components/ScrollPanel.d.ts +0 -14
- package/core/components/ScrollPanel.js +0 -35
- package/core/components/ScrollPanel.js.map +0 -1
- package/core/components/SliderPanel.d.ts +0 -7
- package/core/components/SliderPanel.js +0 -135
- package/core/components/SliderPanel.js.map +0 -1
- package/core/components/StackPanel.d.ts +0 -5
- package/core/components/StackPanel.js +0 -10
- package/core/components/StackPanel.js.map +0 -1
- package/core/components/TabItem.d.ts +0 -19
- package/core/components/TabItem.js +0 -84
- package/core/components/TabItem.js.map +0 -1
- package/core/components/TabPanel.d.ts +0 -25
- package/core/components/TabPanel.js +0 -96
- package/core/components/TabPanel.js.map +0 -1
- package/core/components/TablePanel.d.ts +0 -34
- package/core/components/TablePanel.js +0 -127
- package/core/components/TablePanel.js.map +0 -1
- package/core/components/TextEdit.d.ts +0 -32
- package/core/components/TextEdit.js +0 -174
- package/core/components/TextEdit.js.map +0 -1
- package/core/components/TextField.d.ts +0 -34
- package/core/components/TextField.js +0 -140
- package/core/components/TextField.js.map +0 -1
- package/core/components/ToggleButton.d.ts +0 -7
- package/core/components/ToggleButton.js +0 -20
- package/core/components/ToggleButton.js.map +0 -1
- package/core/components/Tooltip.d.ts +0 -10
- package/core/components/Tooltip.js +0 -14
- package/core/components/Tooltip.js.map +0 -1
- package/core/components/VBox.d.ts +0 -5
- package/core/components/VBox.js +0 -10
- package/core/components/VBox.js.map +0 -1
- package/core/components/VirtualScroll copy 2.d.ts +0 -24
- package/core/components/VirtualScroll copy 2.js +0 -92
- package/core/components/VirtualScroll copy 2.js.map +0 -1
- package/core/components/VirtualScroll.d.ts +0 -20
- package/core/components/VirtualScroll.js +0 -47
- package/core/components/VirtualScroll.js.map +0 -1
- package/core/components/index.d.ts +0 -28
- package/core/components/index.js +0 -30
- package/core/components/index.js.map +0 -1
- package/core/decorators/RegisterComponent.d.ts +0 -8
- package/core/decorators/RegisterComponent.js +0 -20
- package/core/decorators/RegisterComponent.js.map +0 -1
- package/core/decorators/StyleLink.d.ts +0 -1
- package/core/decorators/StyleLink.js +0 -13
- package/core/decorators/StyleLink.js.map +0 -1
- package/core/decorators/index.d.ts +0 -4
- package/core/decorators/index.js +0 -6
- package/core/decorators/index.js.map +0 -1
- package/core/element/AbbreviationElement.d.ts +0 -7
- package/core/element/AbbreviationElement.js +0 -10
- package/core/element/AbbreviationElement.js.map +0 -1
- package/core/element/AnchorElement.d.ts +0 -24
- package/core/element/AnchorElement.js +0 -31
- package/core/element/AnchorElement.js.map +0 -1
- package/core/element/AreaElement.d.ts +0 -18
- package/core/element/AreaElement.js +0 -11
- package/core/element/AreaElement.js.map +0 -1
- package/core/element/ArticleElement.d.ts +0 -5
- package/core/element/ArticleElement.js +0 -12
- package/core/element/ArticleElement.js.map +0 -1
- package/core/element/AudioElement.d.ts +0 -12
- package/core/element/AudioElement.js +0 -10
- package/core/element/AudioElement.js.map +0 -1
- package/core/element/BaseElement.d.ts +0 -8
- package/core/element/BaseElement.js +0 -11
- package/core/element/BaseElement.js.map +0 -1
- package/core/element/BodyElement.d.ts +0 -5
- package/core/element/BodyElement.js +0 -11
- package/core/element/BodyElement.js.map +0 -1
- package/core/element/BoldElement.d.ts +0 -5
- package/core/element/BoldElement.js +0 -10
- package/core/element/BoldElement.js.map +0 -1
- package/core/element/BreakElement.d.ts +0 -5
- package/core/element/BreakElement.js +0 -10
- package/core/element/BreakElement.js.map +0 -1
- package/core/element/ButtonElement.d.ts +0 -26
- package/core/element/ButtonElement.js +0 -47
- package/core/element/ButtonElement.js.map +0 -1
- package/core/element/CanvasElement.d.ts +0 -5
- package/core/element/CanvasElement.js +0 -14
- package/core/element/CanvasElement.js.map +0 -1
- package/core/element/CaptionElement.d.ts +0 -5
- package/core/element/CaptionElement.js +0 -13
- package/core/element/CaptionElement.js.map +0 -1
- package/core/element/CiteElement.d.ts +0 -5
- package/core/element/CiteElement.js +0 -11
- package/core/element/CiteElement.js.map +0 -1
- package/core/element/CodeElement.d.ts +0 -7
- package/core/element/CodeElement.js +0 -13
- package/core/element/CodeElement.js.map +0 -1
- package/core/element/DataListElement.d.ts +0 -5
- package/core/element/DataListElement.js +0 -13
- package/core/element/DataListElement.js.map +0 -1
- package/core/element/DefinitionDescriptionElement.d.ts +0 -5
- package/core/element/DefinitionDescriptionElement.js +0 -13
- package/core/element/DefinitionDescriptionElement.js.map +0 -1
- package/core/element/DefinitionElement.d.ts +0 -5
- package/core/element/DefinitionElement.js +0 -13
- package/core/element/DefinitionElement.js.map +0 -1
- package/core/element/DeletedTextElement.d.ts +0 -7
- package/core/element/DeletedTextElement.js +0 -15
- package/core/element/DeletedTextElement.js.map +0 -1
- package/core/element/DetailsElement.d.ts +0 -9
- package/core/element/DetailsElement.js +0 -28
- package/core/element/DetailsElement.js.map +0 -1
- package/core/element/DialogElement.d.ts +0 -7
- package/core/element/DialogElement.js +0 -14
- package/core/element/DialogElement.js.map +0 -1
- package/core/element/DivElement.d.ts +0 -5
- package/core/element/DivElement.js +0 -10
- package/core/element/DivElement.js.map +0 -1
- package/core/element/EmElement.d.ts +0 -5
- package/core/element/EmElement.js +0 -10
- package/core/element/EmElement.js.map +0 -1
- package/core/element/EmbedElement.d.ts +0 -10
- package/core/element/EmbedElement.js +0 -19
- package/core/element/EmbedElement.js.map +0 -1
- package/core/element/FieldSetElement.d.ts +0 -9
- package/core/element/FieldSetElement.js +0 -34
- package/core/element/FieldSetElement.js.map +0 -1
- package/core/element/FooterElement.d.ts +0 -5
- package/core/element/FooterElement.js +0 -13
- package/core/element/FooterElement.js.map +0 -1
- package/core/element/FormElement.d.ts +0 -20
- package/core/element/FormElement.js +0 -36
- package/core/element/FormElement.js.map +0 -1
- package/core/element/Fragment.d.ts +0 -32
- package/core/element/Fragment.js +0 -103
- package/core/element/Fragment.js.map +0 -1
- package/core/element/H1Element.d.ts +0 -5
- package/core/element/H1Element.js +0 -10
- package/core/element/H1Element.js.map +0 -1
- package/core/element/H2Element.d.ts +0 -5
- package/core/element/H2Element.js +0 -10
- package/core/element/H2Element.js.map +0 -1
- package/core/element/H3Element.d.ts +0 -5
- package/core/element/H3Element.js +0 -10
- package/core/element/H3Element.js.map +0 -1
- package/core/element/H4Element.d.ts +0 -5
- package/core/element/H4Element.js +0 -10
- package/core/element/H4Element.js.map +0 -1
- package/core/element/H5Element.d.ts +0 -5
- package/core/element/H5Element.js +0 -10
- package/core/element/H5Element.js.map +0 -1
- package/core/element/H6Element.d.ts +0 -5
- package/core/element/H6Element.js +0 -10
- package/core/element/H6Element.js.map +0 -1
- package/core/element/HeadElement.d.ts +0 -5
- package/core/element/HeadElement.js +0 -11
- package/core/element/HeadElement.js.map +0 -1
- package/core/element/HeaderElement.d.ts +0 -5
- package/core/element/HeaderElement.js +0 -13
- package/core/element/HeaderElement.js.map +0 -1
- package/core/element/HorizontalRuleElement.d.ts +0 -5
- package/core/element/HorizontalRuleElement.js +0 -13
- package/core/element/HorizontalRuleElement.js.map +0 -1
- package/core/element/HtmlElement.d.ts +0 -9
- package/core/element/HtmlElement.js +0 -19
- package/core/element/HtmlElement.js.map +0 -1
- package/core/element/IFrameElement.d.ts +0 -28
- package/core/element/IFrameElement.js +0 -67
- package/core/element/IFrameElement.js.map +0 -1
- package/core/element/ILayout.d.ts +0 -5
- package/core/element/ILayout.js +0 -9
- package/core/element/ILayout.js.map +0 -1
- package/core/element/IconElement.d.ts +0 -14
- package/core/element/IconElement.js +0 -32
- package/core/element/IconElement.js.map +0 -1
- package/core/element/IdiomaticElement.d.ts +0 -4
- package/core/element/IdiomaticElement.js +0 -6
- package/core/element/IdiomaticElement.js.map +0 -1
- package/core/element/ImageElement.d.ts +0 -19
- package/core/element/ImageElement.js +0 -17
- package/core/element/ImageElement.js.map +0 -1
- package/core/element/InputElement.d.ts +0 -19
- package/core/element/InputElement.js +0 -81
- package/core/element/InputElement.js.map +0 -1
- package/core/element/LabelElement.d.ts +0 -8
- package/core/element/LabelElement.js +0 -10
- package/core/element/LabelElement.js.map +0 -1
- package/core/element/LegendElement.d.ts +0 -7
- package/core/element/LegendElement.js +0 -15
- package/core/element/LegendElement.js.map +0 -1
- package/core/element/ListItemElement.d.ts +0 -12
- package/core/element/ListItemElement.js +0 -28
- package/core/element/ListItemElement.js.map +0 -1
- package/core/element/MainElement.d.ts +0 -5
- package/core/element/MainElement.js +0 -10
- package/core/element/MainElement.js.map +0 -1
- package/core/element/NavElement.d.ts +0 -5
- package/core/element/NavElement.js +0 -10
- package/core/element/NavElement.js.map +0 -1
- package/core/element/OrderedListElement.d.ts +0 -5
- package/core/element/OrderedListElement.js +0 -10
- package/core/element/OrderedListElement.js.map +0 -1
- package/core/element/ParagraphElement.d.ts +0 -5
- package/core/element/ParagraphElement.js +0 -10
- package/core/element/ParagraphElement.js.map +0 -1
- package/core/element/PreElement.d.ts +0 -5
- package/core/element/PreElement.js +0 -10
- package/core/element/PreElement.js.map +0 -1
- package/core/element/SectionElement.d.ts +0 -5
- package/core/element/SectionElement.js +0 -12
- package/core/element/SectionElement.js.map +0 -1
- package/core/element/SelectElement.d.ts +0 -5
- package/core/element/SelectElement.js +0 -12
- package/core/element/SelectElement.js.map +0 -1
- package/core/element/SourceElement.d.ts +0 -8
- package/core/element/SourceElement.js +0 -14
- package/core/element/SourceElement.js.map +0 -1
- package/core/element/SpanElement.d.ts +0 -5
- package/core/element/SpanElement.js +0 -10
- package/core/element/SpanElement.js.map +0 -1
- package/core/element/StrongElement.d.ts +0 -5
- package/core/element/StrongElement.js +0 -12
- package/core/element/StrongElement.js.map +0 -1
- package/core/element/StyleElement.d.ts +0 -5
- package/core/element/StyleElement.js +0 -10
- package/core/element/StyleElement.js.map +0 -1
- package/core/element/SummaryElement.d.ts +0 -5
- package/core/element/SummaryElement.js +0 -12
- package/core/element/SummaryElement.js.map +0 -1
- package/core/element/SvgElement.d.ts +0 -18
- package/core/element/SvgElement.js +0 -151
- package/core/element/SvgElement.js.map +0 -1
- package/core/element/TableBodyElement.d.ts +0 -5
- package/core/element/TableBodyElement.js +0 -10
- package/core/element/TableBodyElement.js.map +0 -1
- package/core/element/TableCellElement.d.ts +0 -10
- package/core/element/TableCellElement.js +0 -25
- package/core/element/TableCellElement.js.map +0 -1
- package/core/element/TableColElement.d.ts +0 -7
- package/core/element/TableColElement.js +0 -13
- package/core/element/TableColElement.js.map +0 -1
- package/core/element/TableColGroupElement.d.ts +0 -7
- package/core/element/TableColGroupElement.js +0 -15
- package/core/element/TableColGroupElement.js.map +0 -1
- package/core/element/TableElement.d.ts +0 -45
- package/core/element/TableElement.js +0 -228
- package/core/element/TableElement.js.map +0 -1
- package/core/element/TableFootElement.d.ts +0 -5
- package/core/element/TableFootElement.js +0 -10
- package/core/element/TableFootElement.js.map +0 -1
- package/core/element/TableFootRowElement.d.ts +0 -9
- package/core/element/TableFootRowElement.js +0 -23
- package/core/element/TableFootRowElement.js.map +0 -1
- package/core/element/TableHeadCellElement.d.ts +0 -10
- package/core/element/TableHeadCellElement.js +0 -24
- package/core/element/TableHeadCellElement.js.map +0 -1
- package/core/element/TableHeadElement.d.ts +0 -5
- package/core/element/TableHeadElement.js +0 -10
- package/core/element/TableHeadElement.js.map +0 -1
- package/core/element/TableHeadRowElement.d.ts +0 -11
- package/core/element/TableHeadRowElement.js +0 -29
- package/core/element/TableHeadRowElement.js.map +0 -1
- package/core/element/TableRowElement.d.ts +0 -11
- package/core/element/TableRowElement.js +0 -29
- package/core/element/TableRowElement.js.map +0 -1
- package/core/element/TextAreaElement.d.ts +0 -7
- package/core/element/TextAreaElement.js +0 -10
- package/core/element/TextAreaElement.js.map +0 -1
- package/core/element/UListElement.d.ts +0 -5
- package/core/element/UListElement.js +0 -10
- package/core/element/UListElement.js.map +0 -1
- package/core/element/VideoElement.d.ts +0 -13
- package/core/element/VideoElement.js +0 -16
- package/core/element/VideoElement.js.map +0 -1
- package/core/element/index.d.ts +0 -72
- package/core/element/index.js +0 -73
- package/core/element/index.js.map +0 -1
- package/core/event/index.d.ts +0 -16
- package/core/event/index.js +0 -75
- package/core/event/index.js.map +0 -1
- package/core/index.js.map +0 -1
- package/core/ref/Computed.d.ts +0 -3
- package/core/ref/Computed.js +0 -75
- package/core/ref/Computed.js.map +0 -1
- package/core/ref/RefBoolean.d.ts +0 -91
- package/core/ref/RefBoolean.js +0 -119
- package/core/ref/RefBoolean.js.map +0 -1
- package/core/ref/RefContainer.d.ts +0 -28
- package/core/ref/RefContainer.js +0 -114
- package/core/ref/RefContainer.js.map +0 -1
- package/core/ref/RefList.d.ts +0 -120
- package/core/ref/RefList.js +0 -240
- package/core/ref/RefList.js.map +0 -1
- package/core/ref/RefMap.d.ts +0 -100
- package/core/ref/RefMap.js +0 -149
- package/core/ref/RefMap.js.map +0 -1
- package/core/ref/RefNumber.d.ts +0 -118
- package/core/ref/RefNumber.js +0 -157
- package/core/ref/RefNumber.js.map +0 -1
- package/core/ref/RefObject copy.d.ts +0 -124
- package/core/ref/RefObject copy.js +0 -271
- package/core/ref/RefObject copy.js.map +0 -1
- package/core/ref/RefObject.d.ts +0 -120
- package/core/ref/RefObject.js +0 -265
- package/core/ref/RefObject.js.map +0 -1
- package/core/ref/RefProperty.d.ts +0 -3
- package/core/ref/RefProperty.js +0 -46
- package/core/ref/RefProperty.js.map +0 -1
- package/core/ref/RefSet.d.ts +0 -99
- package/core/ref/RefSet.js +0 -148
- package/core/ref/RefSet.js.map +0 -1
- package/core/ref/RefState.d.ts +0 -25
- package/core/ref/RefState.js +0 -89
- package/core/ref/RefState.js.map +0 -1
- package/core/ref/RefString.d.ts +0 -148
- package/core/ref/RefString.js +0 -179
- package/core/ref/RefString.js.map +0 -1
- package/core/ref/index.d.ts +0 -23
- package/core/ref/index.js +0 -71
- package/core/ref/index.js.map +0 -1
- package/core/router/RouteView.d.ts +0 -20
- package/core/router/RouteView.js +0 -84
- package/core/router/RouteView.js.map +0 -1
- package/core/router/Router.d.ts +0 -78
- package/core/router/Router.js +0 -307
- package/core/router/Router.js.map +0 -1
- package/core/router/RouterEvent.d.ts +0 -36
- package/core/router/RouterEvent.js +0 -43
- package/core/router/RouterEvent.js.map +0 -1
- package/core/router/RouterGuard.d.ts +0 -12
- package/core/router/RouterGuard.js +0 -3
- package/core/router/RouterGuard.js.map +0 -1
- package/core/router/index.d.ts +0 -4
- package/core/router/index.js +0 -5
- package/core/router/index.js.map +0 -1
- package/global/index.js.map +0 -1
- package/global/safari-polyfill.d.ts +0 -0
- package/global/safari-polyfill.js +0 -234
- package/global/safari-polyfill.js.map +0 -1
- package/index.js +0 -4
- package/index.js.map +0 -1
- package/translation/index.d.ts +0 -0
- /package/{assets → dist/assets}/index.d.ts +0 -0
- /package/{assets → dist/assets}/index.js +0 -0
- /package/{assets → dist/assets}/index.js.map +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RefObject.js","sourceRoot":"","sources":["../../../src/core/ref/RefObject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,SAAS,EAAwB,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAmB,GAAG,EA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|
package/core/ref/RefProperty.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { RefString } from ".";
|
|
2
|
-
export function refProperty(value, propertyName, target) {
|
|
3
|
-
if (!target)
|
|
4
|
-
throw new Error("refProperty: needs to be inside a component");
|
|
5
|
-
const ref = new RefString(value || target?.getAttribute(propertyName) || "");
|
|
6
|
-
// @ts-ignore
|
|
7
|
-
ref.propertyName = propertyName;
|
|
8
|
-
ref.subscribe((value) => {
|
|
9
|
-
// @ts-ignore
|
|
10
|
-
if (target?.getAttribute(ref.propertyName) === value)
|
|
11
|
-
return;
|
|
12
|
-
// @ts-ignore
|
|
13
|
-
target.setAttribute(ref.propertyName, value || "");
|
|
14
|
-
});
|
|
15
|
-
createObserver(target, ref);
|
|
16
|
-
return ref;
|
|
17
|
-
}
|
|
18
|
-
Object.defineProperty(refProperty, Symbol.hasInstance, {
|
|
19
|
-
value: function (instance) {
|
|
20
|
-
return !!instance && (instance instanceof RefString);
|
|
21
|
-
},
|
|
22
|
-
});
|
|
23
|
-
function createObserver(target, ref) {
|
|
24
|
-
if (target["___observer___"]) {
|
|
25
|
-
const ___refs___ = target["___observer___"]["___refs___"];
|
|
26
|
-
___refs___.push(ref);
|
|
27
|
-
return target["___observer___"];
|
|
28
|
-
}
|
|
29
|
-
const observer = new MutationObserver((mutations) => {
|
|
30
|
-
mutations.forEach((mutation) => {
|
|
31
|
-
const items = observer["___refs___"];
|
|
32
|
-
if (mutation.attributeName) {
|
|
33
|
-
for (const ref of items) {
|
|
34
|
-
if (mutation.attributeName === ref.propertyName) {
|
|
35
|
-
ref.value = target.getAttribute(ref.propertyName) || "";
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
observer["___refs___"] = [ref];
|
|
42
|
-
observer.observe(target, { attributes: true });
|
|
43
|
-
target["___observer___"] = observer;
|
|
44
|
-
return observer;
|
|
45
|
-
}
|
|
46
|
-
//# sourceMapping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AC,GAAG,CAAC,CAAC;QACrB,OAAO,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAClC,CAAC;IACD,MAAM,QAAQ,GAAG,IAAI,gBAAgB,CAAC,CAAC,SAAS,EAAE,EAAE;QAClD,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;YAC7B,MAAM,KAAK,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC;YACrC,IAAI,QAAQ,CAAC,aAAa,EAAE,CAAC;gBAC3B,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE,CAAC;oBACxB,IAAI,QAAQ,CAAC,aAAa,KAAK,GAAG,CAAC,YAAY,EAAE,CAAC;wBAChD,GAAG,CAAC,KAAK,GAAG,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;oBAC1D,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC/B,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;IAC/C,MAAM,CAAC,gBAAgB,CAAC,GAAG,QAAQ,CAAC;IACpC,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
package/core/ref/RefSet.d.ts
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { ref } from ".";
|
|
2
|
-
/**
|
|
3
|
-
* Creates a reactive wrapper for a Set of values.
|
|
4
|
-
*
|
|
5
|
-
* @param values - Optional array of initial values for the Set.
|
|
6
|
-
* @returns A new instance of RefSet.
|
|
7
|
-
*/
|
|
8
|
-
export declare function refSet<U>(values?: readonly U[] | null): RefSet<U>;
|
|
9
|
-
/**
|
|
10
|
-
* A type alias representing either a native Set or a reactive RefSet.
|
|
11
|
-
*/
|
|
12
|
-
export type refSet<U> = Set<U> | RefSet<U>;
|
|
13
|
-
/**
|
|
14
|
-
* A reactive wrapper around the native Set object.
|
|
15
|
-
* Notifies subscribers when the contents of the Set are mutated.
|
|
16
|
-
*/
|
|
17
|
-
export declare class RefSet<U> extends Set<U> implements ref<Set<U>> {
|
|
18
|
-
/**
|
|
19
|
-
* Internal container that manages the reactive value and subscribers.
|
|
20
|
-
*/
|
|
21
|
-
private readonly container;
|
|
22
|
-
readonly id: string;
|
|
23
|
-
/**
|
|
24
|
-
* Constructs a new reactive Set instance.
|
|
25
|
-
*
|
|
26
|
-
* @param values - Optional array of initial values.
|
|
27
|
-
* @param refKey - Optional identifier to register in the global Ref registry.
|
|
28
|
-
*/
|
|
29
|
-
constructor(values?: readonly U[] | null);
|
|
30
|
-
/**
|
|
31
|
-
* Emits a change event to all subscribers for a given mutation.
|
|
32
|
-
*
|
|
33
|
-
* @param propertyName - The mutation name (e.g., "add", "delete", "clear").
|
|
34
|
-
* @param value - The current state of the Set.
|
|
35
|
-
*/
|
|
36
|
-
private emit;
|
|
37
|
-
/** Reactive subscription methods **/
|
|
38
|
-
subscribe(target: (arg: Set<U>) => void): boolean;
|
|
39
|
-
subscribe(target: (arg: Set<U>) => void, onUnsubscribe: Function): boolean;
|
|
40
|
-
subscribe(target: object, propertyName: string | symbol): boolean;
|
|
41
|
-
subscribe(target: object, propertyName: string | symbol, onUnsubscribe: Function): boolean;
|
|
42
|
-
subscribe(target: object | ((arg: Set<U>) => void), propertyName: string | symbol | Function, onUnsubscribe?: Function): boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Subscribes to future changes without emitting the current value.
|
|
45
|
-
*
|
|
46
|
-
* @param target - A callback function to be called on update.
|
|
47
|
-
* @param onUnsubscribe - Optional callback for when unsubscribed.
|
|
48
|
-
* @returns true if subscription was successful.
|
|
49
|
-
*/
|
|
50
|
-
listen(target: (arg: Set<U>) => void, onUnsubscribe?: Function): boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Unsubscribes a function or object-property pair from receiving updates.
|
|
53
|
-
*/
|
|
54
|
-
unsubscribe(target: (arg: Set<U>) => void): boolean;
|
|
55
|
-
unsubscribe(targe: object, propertyName: string | symbol): boolean;
|
|
56
|
-
/** Reactive mutation overrides **/
|
|
57
|
-
/**
|
|
58
|
-
* Adds a new value to the Set and notifies subscribers.
|
|
59
|
-
*
|
|
60
|
-
* @param value - The value to add.
|
|
61
|
-
* @returns The Set instance.
|
|
62
|
-
*/
|
|
63
|
-
add(value: U): this;
|
|
64
|
-
/**
|
|
65
|
-
* Removes a value from the Set and notifies subscribers.
|
|
66
|
-
*
|
|
67
|
-
* @param value - The value to remove.
|
|
68
|
-
* @returns True if the value was present and removed.
|
|
69
|
-
*/
|
|
70
|
-
delete(value: U): boolean;
|
|
71
|
-
/**
|
|
72
|
-
* Removes all values from the Set and notifies subscribers.
|
|
73
|
-
*/
|
|
74
|
-
clear(): void;
|
|
75
|
-
/**
|
|
76
|
-
* Returns a shallow copy of the current Set state.
|
|
77
|
-
*/
|
|
78
|
-
valueOf(): Set<U>;
|
|
79
|
-
/**
|
|
80
|
-
* Ensures native Set is used in methods like `slice`, `filter`, etc.
|
|
81
|
-
*/
|
|
82
|
-
static get [Symbol.species](): SetConstructor;
|
|
83
|
-
/** Value access and serialization **/
|
|
84
|
-
/**
|
|
85
|
-
* Gets the current Set value.
|
|
86
|
-
*/
|
|
87
|
-
get value(): Set<U>;
|
|
88
|
-
/**
|
|
89
|
-
* Replaces the entire Set with a new Set and notifies subscribers.
|
|
90
|
-
* If the same Set reference is passed, no update is triggered.
|
|
91
|
-
*
|
|
92
|
-
* @param value - A new Set instance to replace the current content.
|
|
93
|
-
*/
|
|
94
|
-
set value(value: Set<U>);
|
|
95
|
-
/**
|
|
96
|
-
* Serializes the Set to an object with numeric keys for JSON output.
|
|
97
|
-
*/
|
|
98
|
-
toJSON(): any;
|
|
99
|
-
}
|
package/core/ref/RefSet.js
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { Ref } from ".";
|
|
2
|
-
import { RefContainer } from "./RefContainer";
|
|
3
|
-
/**
|
|
4
|
-
* Creates a reactive wrapper for a Set of values.
|
|
5
|
-
*
|
|
6
|
-
* @param values - Optional array of initial values for the Set.
|
|
7
|
-
* @returns A new instance of RefSet.
|
|
8
|
-
*/
|
|
9
|
-
export function refSet(values) {
|
|
10
|
-
return new RefSet(values);
|
|
11
|
-
}
|
|
12
|
-
// Enables `instanceof refSet` to work with RefSet instances
|
|
13
|
-
Object.defineProperty(refSet, Symbol.hasInstance, {
|
|
14
|
-
value: function (instance) {
|
|
15
|
-
return !!instance && instance instanceof RefSet;
|
|
16
|
-
},
|
|
17
|
-
});
|
|
18
|
-
/**
|
|
19
|
-
* A reactive wrapper around the native Set object.
|
|
20
|
-
* Notifies subscribers when the contents of the Set are mutated.
|
|
21
|
-
*/
|
|
22
|
-
export class RefSet extends Set {
|
|
23
|
-
/**
|
|
24
|
-
* Internal container that manages the reactive value and subscribers.
|
|
25
|
-
*/
|
|
26
|
-
container = new RefContainer(this);
|
|
27
|
-
id;
|
|
28
|
-
/**
|
|
29
|
-
* Constructs a new reactive Set instance.
|
|
30
|
-
*
|
|
31
|
-
* @param values - Optional array of initial values.
|
|
32
|
-
* @param refKey - Optional identifier to register in the global Ref registry.
|
|
33
|
-
*/
|
|
34
|
-
constructor(values) {
|
|
35
|
-
super();
|
|
36
|
-
this.id = this.container.id;
|
|
37
|
-
this.value = new Set(values);
|
|
38
|
-
Ref.set(this.id, this);
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Emits a change event to all subscribers for a given mutation.
|
|
42
|
-
*
|
|
43
|
-
* @param propertyName - The mutation name (e.g., "add", "delete", "clear").
|
|
44
|
-
* @param value - The current state of the Set.
|
|
45
|
-
*/
|
|
46
|
-
// @ts-ignore
|
|
47
|
-
emit(propertyName, value) {
|
|
48
|
-
this.container.emitAll(propertyName, value, this.valueOf());
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Subscribes to changes and immediately emits the current Set.
|
|
52
|
-
*/
|
|
53
|
-
subscribe(target, propertyName, onUnsubscribe) {
|
|
54
|
-
return this.container.emit(this.container.subscribe(target, propertyName, onUnsubscribe), this, this.valueOf());
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Subscribes to future changes without emitting the current value.
|
|
58
|
-
*
|
|
59
|
-
* @param target - A callback function to be called on update.
|
|
60
|
-
* @param onUnsubscribe - Optional callback for when unsubscribed.
|
|
61
|
-
* @returns true if subscription was successful.
|
|
62
|
-
*/
|
|
63
|
-
listen(target, onUnsubscribe) {
|
|
64
|
-
return this.container.subscribe(target, onUnsubscribe) !== undefined;
|
|
65
|
-
}
|
|
66
|
-
unsubscribe(targe, propertyName = "") {
|
|
67
|
-
return this.container.unsubscribe(targe, propertyName);
|
|
68
|
-
}
|
|
69
|
-
/** Reactive mutation overrides **/
|
|
70
|
-
/**
|
|
71
|
-
* Adds a new value to the Set and notifies subscribers.
|
|
72
|
-
*
|
|
73
|
-
* @param value - The value to add.
|
|
74
|
-
* @returns The Set instance.
|
|
75
|
-
*/
|
|
76
|
-
add(value) {
|
|
77
|
-
const oldValue = this.valueOf();
|
|
78
|
-
const result = super.add(value);
|
|
79
|
-
this.container.emitAll("add", this, oldValue);
|
|
80
|
-
return result;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Removes a value from the Set and notifies subscribers.
|
|
84
|
-
*
|
|
85
|
-
* @param value - The value to remove.
|
|
86
|
-
* @returns True if the value was present and removed.
|
|
87
|
-
*/
|
|
88
|
-
delete(value) {
|
|
89
|
-
const oldValue = this.valueOf();
|
|
90
|
-
const result = super.delete(value);
|
|
91
|
-
this.container.emitAll("delete", this, oldValue);
|
|
92
|
-
return result;
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Removes all values from the Set and notifies subscribers.
|
|
96
|
-
*/
|
|
97
|
-
clear() {
|
|
98
|
-
const oldValue = this.valueOf();
|
|
99
|
-
super.clear();
|
|
100
|
-
this.container.emitAll("clear", this, oldValue);
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Returns a shallow copy of the current Set state.
|
|
104
|
-
*/
|
|
105
|
-
valueOf() {
|
|
106
|
-
return new Set(Array.from(this));
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Ensures native Set is used in methods like `slice`, `filter`, etc.
|
|
110
|
-
*/
|
|
111
|
-
static get [Symbol.species]() {
|
|
112
|
-
return Set;
|
|
113
|
-
}
|
|
114
|
-
/** Value access and serialization **/
|
|
115
|
-
/**
|
|
116
|
-
* Gets the current Set value.
|
|
117
|
-
*/
|
|
118
|
-
get value() {
|
|
119
|
-
return this.container.value.valueOf();
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Replaces the entire Set with a new Set and notifies subscribers.
|
|
123
|
-
* If the same Set reference is passed, no update is triggered.
|
|
124
|
-
*
|
|
125
|
-
* @param value - A new Set instance to replace the current content.
|
|
126
|
-
*/
|
|
127
|
-
set value(value) {
|
|
128
|
-
if (this === value)
|
|
129
|
-
return;
|
|
130
|
-
super.clear();
|
|
131
|
-
for (const val of value) {
|
|
132
|
-
super.add(val);
|
|
133
|
-
}
|
|
134
|
-
this.emit("value", value);
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Serializes the Set to an object with numeric keys for JSON output.
|
|
138
|
-
*/
|
|
139
|
-
toJSON() {
|
|
140
|
-
const obj = {};
|
|
141
|
-
let i = 0;
|
|
142
|
-
for (const v of this.value) {
|
|
143
|
-
obj[i++] = v;
|
|
144
|
-
}
|
|
145
|
-
return obj;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
//# sourceMappingURL=RefSet.js.map
|
package/core/ref/RefSet.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RefSet.js","sourceRoot":"","sources":["../../../src/core/ref/RefSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAO,MAAM,GAAG,CAAC;AA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B,OAAO,GAAG,CAAC;IACb,CAAC;IAED,sCAAsC;IAEtC;;OAEG;IACH,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;IACxC,CAAC;IAED;;;;;OAKG;IACH,IAAI,KAAK,CAAC,KAAa;QACrB,IAAI,IAAI,KAAK,KAAK;YAAE,OAAO;QAC3B,KAAK,CAAC,KAAK,EAAE,CAAC;QACd,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE,CAAC;YACxB,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACjB,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,MAAM;QACJ,MAAM,GAAG,GAAQ,EAAE,CAAC;QACpB,IAAI,CAAC,GAAG,CAAC,CAAC;QACV,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAC3B,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;QACf,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC;CACF"}
|
package/core/ref/RefState.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ref } from ".";
|
|
2
|
-
export declare function refState<T>(refKey: string): RefState<T>;
|
|
3
|
-
export type refState<T> = RefState<T>;
|
|
4
|
-
export declare class RefState<T> implements ref<T> {
|
|
5
|
-
#private;
|
|
6
|
-
readonly refKey: string;
|
|
7
|
-
constructor(refKey: string);
|
|
8
|
-
get status(): ref<string>;
|
|
9
|
-
get active(): boolean;
|
|
10
|
-
get ref(): ref<T>;
|
|
11
|
-
private emit;
|
|
12
|
-
subscribe(target: (arg: T) => void): boolean;
|
|
13
|
-
subscribe(target: (arg: T) => void, onUnsubscribe: Function): boolean;
|
|
14
|
-
subscribe(target: object, propertyName: string | symbol): boolean;
|
|
15
|
-
subscribe(target: object, propertyName: string | symbol, onUnsubscribe: Function): boolean;
|
|
16
|
-
subscribe(target: object | ((arg: boolean) => void), propertyName: string | symbol | Function, onUnsubscribe?: Function): boolean;
|
|
17
|
-
listen(target: (arg: T) => void, onUnsubscribe?: Function): boolean;
|
|
18
|
-
unsubscribe(target: (arg: T) => void): boolean;
|
|
19
|
-
unsubscribe(target: object, propertyName: string | symbol): boolean;
|
|
20
|
-
get value(): T;
|
|
21
|
-
set value(value: T);
|
|
22
|
-
valueOf(): T;
|
|
23
|
-
toJSON(): any;
|
|
24
|
-
toString(): string;
|
|
25
|
-
}
|
package/core/ref/RefState.js
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { Ref } from ".";
|
|
2
|
-
export function refState(refKey) {
|
|
3
|
-
return new RefState(refKey);
|
|
4
|
-
}
|
|
5
|
-
Object.defineProperty(refState, Symbol.hasInstance, {
|
|
6
|
-
value: function (instance) {
|
|
7
|
-
return !!instance && instance instanceof RefState;
|
|
8
|
-
},
|
|
9
|
-
});
|
|
10
|
-
// @ts-ignore
|
|
11
|
-
export class RefState {
|
|
12
|
-
refKey;
|
|
13
|
-
#ref;
|
|
14
|
-
#subscribers = [];
|
|
15
|
-
constructor(refKey) {
|
|
16
|
-
this.refKey = refKey;
|
|
17
|
-
this.#ref = Ref.get(refKey);
|
|
18
|
-
if (!this.#ref) {
|
|
19
|
-
Ref.onCreated(refKey, (ref) => {
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
this.#ref = ref;
|
|
22
|
-
for (const subscriber of this.#subscribers) {
|
|
23
|
-
// @ts-ignore
|
|
24
|
-
this.#ref?.subscribe(subscriber.target, subscriber.propertyName, subscriber.onUnsubscribe);
|
|
25
|
-
}
|
|
26
|
-
this.#subscribers = undefined;
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
get status() {
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
return Ref.getStatus(this.refKey);
|
|
33
|
-
}
|
|
34
|
-
get active() {
|
|
35
|
-
return !!this.#ref;
|
|
36
|
-
}
|
|
37
|
-
get ref() {
|
|
38
|
-
return this.#ref;
|
|
39
|
-
}
|
|
40
|
-
// @ts-ignore
|
|
41
|
-
emit(propertyName, value) {
|
|
42
|
-
if (this.ref) {
|
|
43
|
-
this.ref.value = value;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
subscribe(target, propertyName, onUnsubscribe) {
|
|
47
|
-
if (this.ref) {
|
|
48
|
-
// @ts-ignore
|
|
49
|
-
return this.ref.subscribe(target, propertyName, onUnsubscribe);
|
|
50
|
-
}
|
|
51
|
-
this.#subscribers.push({ target, propertyName, onUnsubscribe });
|
|
52
|
-
return true;
|
|
53
|
-
}
|
|
54
|
-
listen(target, onUnsubscribe) {
|
|
55
|
-
return this.subscribe(target, onUnsubscribe);
|
|
56
|
-
}
|
|
57
|
-
unsubscribe(targe, propertyName = "") {
|
|
58
|
-
if (this.ref) {
|
|
59
|
-
// @ts-ignore
|
|
60
|
-
return this.ref.unsubscribe(targe, propertyName);
|
|
61
|
-
}
|
|
62
|
-
this.#subscribers = this.#subscribers.filter(subscriber => subscriber.target !== targe && subscriber.propertyName !== propertyName);
|
|
63
|
-
return true;
|
|
64
|
-
}
|
|
65
|
-
// @ts-ignore
|
|
66
|
-
get value() {
|
|
67
|
-
// @ts-ignore
|
|
68
|
-
return this.ref?.value;
|
|
69
|
-
}
|
|
70
|
-
// @ts-ignore
|
|
71
|
-
set value(value) {
|
|
72
|
-
if (this.ref) {
|
|
73
|
-
// @ts-ignore
|
|
74
|
-
this.ref.value = value;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
valueOf() {
|
|
78
|
-
// @ts-ignore
|
|
79
|
-
return this.ref?.valueOf();
|
|
80
|
-
}
|
|
81
|
-
// @ts-ignore
|
|
82
|
-
toJSON() {
|
|
83
|
-
return this.ref?.toJSON() || {};
|
|
84
|
-
}
|
|
85
|
-
toString() {
|
|
86
|
-
return "this.ref?.toString() || ";
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
//# sourceMappingURL=RefState.js.map
|
package/core/ref/RefState.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RefState.js","sourceRoot":"","sources":["../../../src/core/ref/RefState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAO,MAAM,GAAG,CAAC;AAE7B,MAAM,UAAU,QAAQ,CAAI,MAAc;IACxC,OAAO,IAAI,QAAQ,CAAI,MAAM,CAAC,CAAC;AACjC,CAAC;AAED,MAAM,CAAC,cAAc,CAAC,QAAQ,EAAE,MAAM,CAAC,WAAW,EAAE;IAClD,KAAK,EAAE,UAAU,QAAa;QAC5B,OAAO,CAAC,CAAC,QAAQ,IAAI,QAAQ,YAAY,QAAQ,CAAC;IACpD,CAAC;CACF,CAAC,CAAC;AAGH,aAAa;AACb,MAAM,OAAO,QAAQ;IACV,MAAM,CAAS;IACxB,IAAI,CAAqB;IACzB,YAAY,GAA2E,EAAE,CAAC;IAE1F,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC5B,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YACf,GAAG,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE;gBAC5B,aAAa;gBACb,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;gBAChB,KAAK,MAAM,UAAU,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;oBAC3C,aAAa;oBACb,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,YAAmB,EAAE,UAAU,CAAC,aAAoB,CAAC,CAAC;gBAC3G,CAAC;gBACD,IAAI,CAAC,YAAY,GAAG,SAAgB,CAAC;YACvC,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,I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C;IACd,CAAC;IAGD,aAAa;IACb,IAAI,KAAK;QACP,aAAa;QACb,OAAO,IAAI,CAAC,GAAG,EAAE,KAAK,CAAA;IACxB,CAAC;IACD,aAAa;IAEb,IAAI,KAAK,CAAC,KAAQ;QAChB,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;YACb,aAAa;YACb,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,KAAK,CAAA;QACxB,CAAC;IACH,CAAC;IAED,OAAO;QACL,aAAa;QACb,OAAO,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,CAAC;IAC7B,CAAC;IACD,aAAa;IACb,MAAM;QACJ,OAAO,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;IACjC,CAAC;IAED,QAAQ;QACN,OAAO,0BAA0B,CAAA;IACnC,CAAC;CACF"}
|
package/core/ref/RefString.d.ts
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { ref } from ".";
|
|
2
|
-
import { RefContainer } from "./RefContainer";
|
|
3
|
-
/**
|
|
4
|
-
* Creates a reactive wrapper around a string.
|
|
5
|
-
*
|
|
6
|
-
* @param value - The initial string value.
|
|
7
|
-
* @returns A new instance of RefString.
|
|
8
|
-
*/
|
|
9
|
-
export declare function refString(value: string): RefString;
|
|
10
|
-
/**
|
|
11
|
-
* A union type representing either a primitive string or a RefString.
|
|
12
|
-
*/
|
|
13
|
-
export type refString = string | RefString;
|
|
14
|
-
/**
|
|
15
|
-
* A reactive string wrapper that mimics the String API,
|
|
16
|
-
* supports subscriptions to changes, and acts like a primitive.
|
|
17
|
-
*/
|
|
18
|
-
export declare class RefString implements ref<string> {
|
|
19
|
-
readonly id: string;
|
|
20
|
-
/**
|
|
21
|
-
* Internal container for value management and subscriptions.
|
|
22
|
-
*/
|
|
23
|
-
readonly container: RefContainer;
|
|
24
|
-
/**
|
|
25
|
-
* String index access (e.g., refStr[0]) — readonly.
|
|
26
|
-
*/
|
|
27
|
-
readonly [index: number]: string;
|
|
28
|
-
/**
|
|
29
|
-
* Constructs a new RefString instance.
|
|
30
|
-
*
|
|
31
|
-
* @param value - Initial string value.
|
|
32
|
-
* @param refKey - Optional reference key for global registry.
|
|
33
|
-
*/
|
|
34
|
-
constructor(value: string);
|
|
35
|
-
/** Reactive subscription methods **/
|
|
36
|
-
subscribe(target: (value: string, oldValue: string) => void): boolean;
|
|
37
|
-
subscribe(target: (value: string, oldValue: string) => void, onUnsubscribe?: Function): boolean;
|
|
38
|
-
subscribe(target: object, propertyName: string | symbol): boolean;
|
|
39
|
-
subscribe(target: object, propertyName: string | symbol, onUnsubscribe?: Function): boolean;
|
|
40
|
-
subscribe(target: object | ((value: string, oldValue: string) => void), propertyName: string | symbol | Function, onUnsubscribe?: Function): boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Subscribes to future changes without emitting the current value.
|
|
43
|
-
*/
|
|
44
|
-
listen(target: (value: string, oldValue: string) => void, onUnsubscribe?: Function): boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Unsubscribes a function or object-property pair from updates.
|
|
47
|
-
*/
|
|
48
|
-
unsubscribe(target: (arg: string) => void): boolean;
|
|
49
|
-
unsubscribe(targe: object, propertyName: string | symbol): boolean;
|
|
50
|
-
/** Reactive value access **/
|
|
51
|
-
/**
|
|
52
|
-
* Gets the current string value.
|
|
53
|
-
*/
|
|
54
|
-
get value(): string;
|
|
55
|
-
/**
|
|
56
|
-
* Sets a new value and notifies subscribers if it changed.
|
|
57
|
-
*
|
|
58
|
-
* @param value - The new string value.
|
|
59
|
-
*/
|
|
60
|
-
set value(value: string);
|
|
61
|
-
/**
|
|
62
|
-
* Emits a change notification if the value changed.
|
|
63
|
-
*/
|
|
64
|
-
protected emit(propertyName: string | symbol, value: any): void;
|
|
65
|
-
/**
|
|
66
|
-
* Returns the string value as a primitive.
|
|
67
|
-
*/
|
|
68
|
-
[Symbol.toPrimitive](_hint: string): string;
|
|
69
|
-
/**
|
|
70
|
-
* Ensures String is returned for string operations like concat/slice.
|
|
71
|
-
*/
|
|
72
|
-
static get [Symbol.species](): StringConstructor;
|
|
73
|
-
/**
|
|
74
|
-
* Returns the primitive string value.
|
|
75
|
-
*/
|
|
76
|
-
valueOf(): string;
|
|
77
|
-
/**
|
|
78
|
-
* Returns the string representation of the value.
|
|
79
|
-
*/
|
|
80
|
-
toString(): string;
|
|
81
|
-
/**
|
|
82
|
-
* Returns a JSON-serializable representation of the string.
|
|
83
|
-
*/
|
|
84
|
-
toJSON(): string | {
|
|
85
|
-
value: string;
|
|
86
|
-
};
|
|
87
|
-
/**
|
|
88
|
-
* Returns the length of the string.
|
|
89
|
-
*/
|
|
90
|
-
get length(): number;
|
|
91
|
-
/**
|
|
92
|
-
* Compares this string to another string.
|
|
93
|
-
*
|
|
94
|
-
* @param value - The value to compare with.
|
|
95
|
-
*/
|
|
96
|
-
equals(value: string): boolean;
|
|
97
|
-
/**
|
|
98
|
-
* Allows iteration over each character in the string.
|
|
99
|
-
*/
|
|
100
|
-
[Symbol.iterator](): StringIterator<string>;
|
|
101
|
-
/** String method wrappers **/
|
|
102
|
-
charAt(pos: number): string;
|
|
103
|
-
charCodeAt(index: number): number;
|
|
104
|
-
codePointAt(pos: number): number | undefined;
|
|
105
|
-
concat(...strings: string[]): string;
|
|
106
|
-
indexOf(searchString: string, position?: number): number;
|
|
107
|
-
lastIndexOf(searchString: string, position?: number): number;
|
|
108
|
-
includes(searchString: string, position?: number): boolean;
|
|
109
|
-
startsWith(searchString: string, position?: number): boolean;
|
|
110
|
-
endsWith(searchString: string, endPosition?: number): boolean;
|
|
111
|
-
slice(start?: number, end?: number): string;
|
|
112
|
-
substring(start: number, end?: number): string;
|
|
113
|
-
substr(from: number, length?: number): string;
|
|
114
|
-
match(regexp: string | RegExp): RegExpMatchArray | null;
|
|
115
|
-
matchAll(regexp: RegExp): RegExpStringIterator<RegExpExecArray>;
|
|
116
|
-
replace(searchValue: string | RegExp, replacer: string): string;
|
|
117
|
-
replaceAll(searchValue: string, replacer: string | ((substring: string, ...args: any[]) => string)): string;
|
|
118
|
-
search(searcher: string | RegExp): number;
|
|
119
|
-
split(separator: string | RegExp, limit?: number): string[];
|
|
120
|
-
repeat(count: number): string;
|
|
121
|
-
padStart(maxLength: number, fillString?: string): string;
|
|
122
|
-
padEnd(maxLength: number, fillString?: string): string;
|
|
123
|
-
trim(): string;
|
|
124
|
-
trimStart(): string;
|
|
125
|
-
trimEnd(): string;
|
|
126
|
-
trimLeft(): string;
|
|
127
|
-
trimRight(): string;
|
|
128
|
-
toLowerCase(): string;
|
|
129
|
-
toUpperCase(): string;
|
|
130
|
-
toLocaleLowerCase(locales?: string): string;
|
|
131
|
-
toLocaleUpperCase(locales?: string): string;
|
|
132
|
-
normalize(form?: string): string;
|
|
133
|
-
localeCompare(that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions): number;
|
|
134
|
-
/** Deprecated HTML string methods (still supported in JS) **/
|
|
135
|
-
anchor(name: string): string;
|
|
136
|
-
big(): string;
|
|
137
|
-
blink(): string;
|
|
138
|
-
bold(): string;
|
|
139
|
-
fixed(): string;
|
|
140
|
-
fontcolor(color: string): string;
|
|
141
|
-
fontsize(size: number | string): string;
|
|
142
|
-
italics(): string;
|
|
143
|
-
link(url: string): string;
|
|
144
|
-
small(): string;
|
|
145
|
-
strike(): string;
|
|
146
|
-
sub(): string;
|
|
147
|
-
sup(): string;
|
|
148
|
-
}
|