typecomposer 0.1.43 → 0.1.45
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/components/AlertPanel.d.ts +7 -6
- package/core/components/AlertPanel.js +3 -2
- package/core/components/AlertPanel.js.map +1 -1
- package/core/components/AvatarPanel.d.ts +3 -2
- package/core/components/AvatarPanel.js +2 -2
- package/core/components/AvatarPanel.js.map +1 -1
- package/core/components/BorderPanel.d.ts +3 -2
- package/core/components/BorderPanel.js +2 -1
- package/core/components/BorderPanel.js.map +1 -1
- package/core/components/CardPanel.d.ts +3 -2
- package/core/components/CardPanel.js +2 -1
- package/core/components/CardPanel.js.map +1 -1
- package/core/components/CheckBox.d.ts +4 -2
- package/core/components/CheckBox.js +7 -5
- package/core/components/CheckBox.js.map +1 -1
- package/core/components/ColorPicker.d.ts +3 -2
- package/core/components/ColorPicker.js +11 -8
- package/core/components/ColorPicker.js.map +1 -1
- package/core/components/ContextMenu.d.ts +5 -3
- package/core/components/ContextMenu.js +5 -3
- package/core/components/ContextMenu.js.map +1 -1
- package/core/components/DialogPanel.d.ts +5 -4
- package/core/components/DialogPanel.js +8 -8
- package/core/components/DialogPanel.js.map +1 -1
- package/core/components/DropDown.d.ts +5 -3
- package/core/components/DropDown.js +5 -3
- package/core/components/DropDown.js.map +1 -1
- package/core/components/FlowPanel.d.ts +3 -2
- package/core/components/FlowPanel.js +3 -2
- package/core/components/FlowPanel.js.map +1 -1
- package/core/components/ForEach.d.ts +3 -2
- package/core/components/ForEach.js +2 -1
- package/core/components/ForEach.js.map +1 -1
- package/core/components/GridPanel.d.ts +3 -2
- package/core/components/GridPanel.js +2 -1
- package/core/components/GridPanel.js.map +1 -1
- package/core/components/HBox.d.ts +3 -2
- package/core/components/HBox.js +2 -1
- package/core/components/HBox.js.map +1 -1
- package/core/components/LazyLoading.d.ts +3 -2
- package/core/components/LazyLoading.js +3 -2
- package/core/components/LazyLoading.js.map +1 -1
- package/core/components/ListPanel.d.ts +3 -2
- package/core/components/ListPanel.js +2 -1
- package/core/components/ListPanel.js.map +1 -1
- package/core/components/PopUpButton.d.ts +3 -2
- package/core/components/PopUpButton.js +6 -3
- package/core/components/PopUpButton.js.map +1 -1
- package/core/components/ScrollPanel.d.ts +3 -2
- package/core/components/ScrollPanel.js +2 -1
- package/core/components/ScrollPanel.js.map +1 -1
- package/core/components/SliderPanel.d.ts +3 -2
- package/core/components/SliderPanel.js +4 -5
- package/core/components/SliderPanel.js.map +1 -1
- package/core/components/StackPanel.d.ts +3 -2
- package/core/components/StackPanel.js +2 -1
- package/core/components/StackPanel.js.map +1 -1
- package/core/components/TabItem.d.ts +1 -0
- package/core/components/TabItem.js +7 -4
- package/core/components/TabItem.js.map +1 -1
- package/core/components/TabPanel.d.ts +3 -2
- package/core/components/TabPanel.js +2 -1
- package/core/components/TabPanel.js.map +1 -1
- package/core/components/TablePanel.d.ts +6 -4
- package/core/components/TablePanel.js +4 -2
- package/core/components/TablePanel.js.map +1 -1
- package/core/components/TextEdit.d.ts +1 -0
- package/core/components/TextEdit.js +4 -2
- package/core/components/TextEdit.js.map +1 -1
- package/core/components/TextField.d.ts +1 -0
- package/core/components/TextField.js +3 -2
- package/core/components/TextField.js.map +1 -1
- package/core/components/ToggleButton.d.ts +3 -2
- package/core/components/ToggleButton.js +2 -1
- package/core/components/ToggleButton.js.map +1 -1
- package/core/components/Tooltip.d.ts +3 -2
- package/core/components/Tooltip.js +2 -1
- package/core/components/Tooltip.js.map +1 -1
- package/core/components/VBox.d.ts +3 -2
- package/core/components/VBox.js +2 -1
- package/core/components/VBox.js.map +1 -1
- package/core/components/VirtualScroll copy 2.d.ts +2 -2
- package/core/components/VirtualScroll copy 2.js +2 -8
- package/core/components/VirtualScroll copy 2.js.map +1 -1
- package/core/components/VirtualScroll.d.ts +3 -2
- package/core/components/VirtualScroll.js +3 -2
- package/core/components/VirtualScroll.js.map +1 -1
- package/core/element/AbbreviationElement.d.ts +3 -2
- package/core/element/AbbreviationElement.js +2 -3
- package/core/element/AbbreviationElement.js.map +1 -1
- package/core/element/AnchorElement.d.ts +4 -3
- package/core/element/AnchorElement.js +2 -1
- package/core/element/AnchorElement.js.map +1 -1
- package/core/element/AreaElement.d.ts +3 -2
- package/core/element/AreaElement.js +2 -1
- package/core/element/AreaElement.js.map +1 -1
- package/core/element/ArticleElement.d.ts +3 -2
- package/core/element/ArticleElement.js +2 -1
- package/core/element/ArticleElement.js.map +1 -1
- package/core/element/AudioElement.d.ts +3 -2
- package/core/element/AudioElement.js +2 -1
- package/core/element/AudioElement.js.map +1 -1
- package/core/element/BaseElement.d.ts +3 -2
- package/core/element/BaseElement.js +2 -1
- package/core/element/BaseElement.js.map +1 -1
- package/core/element/BodyElement.d.ts +3 -2
- package/core/element/BodyElement.js +2 -1
- package/core/element/BodyElement.js.map +1 -1
- package/core/element/BoldElement.d.ts +3 -2
- package/core/element/BoldElement.js +2 -1
- package/core/element/BoldElement.js.map +1 -1
- package/core/element/BreakElement.d.ts +3 -2
- package/core/element/BreakElement.js +2 -1
- package/core/element/BreakElement.js.map +1 -1
- package/core/element/ButtonElement.d.ts +3 -2
- package/core/element/ButtonElement.js +2 -1
- package/core/element/ButtonElement.js.map +1 -1
- package/core/element/CanvasElement.d.ts +3 -2
- package/core/element/CanvasElement.js +2 -1
- package/core/element/CanvasElement.js.map +1 -1
- package/core/element/CaptionElement.d.ts +3 -2
- package/core/element/CaptionElement.js +2 -1
- package/core/element/CaptionElement.js.map +1 -1
- package/core/element/CiteElement.d.ts +3 -2
- package/core/element/CiteElement.js +2 -1
- package/core/element/CiteElement.js.map +1 -1
- package/core/element/CodeElement.d.ts +3 -2
- package/core/element/CodeElement.js +2 -1
- package/core/element/CodeElement.js.map +1 -1
- package/core/element/DataListElement.d.ts +3 -2
- package/core/element/DataListElement.js +2 -1
- package/core/element/DataListElement.js.map +1 -1
- package/core/element/DefinitionDescriptionElement.d.ts +3 -2
- package/core/element/DefinitionDescriptionElement.js +2 -1
- package/core/element/DefinitionDescriptionElement.js.map +1 -1
- package/core/element/DefinitionElement.d.ts +3 -2
- package/core/element/DefinitionElement.js +2 -1
- package/core/element/DefinitionElement.js.map +1 -1
- package/core/element/DeletedTextElement.d.ts +3 -2
- package/core/element/DeletedTextElement.js +2 -1
- package/core/element/DeletedTextElement.js.map +1 -1
- package/core/element/DetailsElement.d.ts +3 -2
- package/core/element/DetailsElement.js +2 -1
- package/core/element/DetailsElement.js.map +1 -1
- package/core/element/DialogElement.d.ts +3 -2
- package/core/element/DialogElement.js +2 -1
- package/core/element/DialogElement.js.map +1 -1
- package/core/element/DivElement.d.ts +3 -2
- package/core/element/DivElement.js +2 -1
- package/core/element/DivElement.js.map +1 -1
- package/core/element/EmElement.d.ts +3 -2
- package/core/element/EmElement.js +2 -1
- package/core/element/EmElement.js.map +1 -1
- package/core/element/EmbedElement.d.ts +3 -2
- package/core/element/EmbedElement.js +2 -1
- package/core/element/EmbedElement.js.map +1 -1
- package/core/element/FieldSetElement.d.ts +3 -2
- package/core/element/FieldSetElement.js +2 -1
- package/core/element/FieldSetElement.js.map +1 -1
- package/core/element/FooterElement.d.ts +3 -2
- package/core/element/FooterElement.js +2 -1
- package/core/element/FooterElement.js.map +1 -1
- package/core/element/FormElement.d.ts +3 -2
- package/core/element/FormElement.js +2 -1
- package/core/element/FormElement.js.map +1 -1
- package/core/element/Fragment.d.ts +0 -1
- package/core/element/Fragment.js +6 -50
- package/core/element/Fragment.js.map +1 -1
- package/core/element/H1Element.d.ts +3 -2
- package/core/element/H1Element.js +2 -1
- package/core/element/H1Element.js.map +1 -1
- package/core/element/H2Element.d.ts +3 -2
- package/core/element/H2Element.js +2 -1
- package/core/element/H2Element.js.map +1 -1
- package/core/element/H3Element.d.ts +3 -2
- package/core/element/H3Element.js +2 -1
- package/core/element/H3Element.js.map +1 -1
- package/core/element/H4Element.d.ts +3 -2
- package/core/element/H4Element.js +2 -1
- package/core/element/H4Element.js.map +1 -1
- package/core/element/H5Element.d.ts +3 -2
- package/core/element/H5Element.js +2 -1
- package/core/element/H5Element.js.map +1 -1
- package/core/element/H6Element.d.ts +3 -2
- package/core/element/H6Element.js +2 -1
- package/core/element/H6Element.js.map +1 -1
- package/core/element/HeadElement.d.ts +3 -2
- package/core/element/HeadElement.js +2 -1
- package/core/element/HeadElement.js.map +1 -1
- package/core/element/HeaderElement.d.ts +3 -2
- package/core/element/HeaderElement.js +2 -1
- package/core/element/HeaderElement.js.map +1 -1
- package/core/element/HorizontalRuleElement.d.ts +3 -2
- package/core/element/HorizontalRuleElement.js +2 -1
- package/core/element/HorizontalRuleElement.js.map +1 -1
- package/core/element/HtmlElement.d.ts +3 -2
- package/core/element/HtmlElement.js +2 -1
- package/core/element/HtmlElement.js.map +1 -1
- package/core/element/IFrameElement.d.ts +3 -2
- package/core/element/IFrameElement.js +2 -1
- package/core/element/IFrameElement.js.map +1 -1
- package/core/element/ILayout.d.ts +3 -2
- package/core/element/ILayout.js +2 -1
- package/core/element/ILayout.js.map +1 -1
- package/core/element/IconElement.d.ts +3 -2
- package/core/element/IconElement.js +2 -1
- package/core/element/IconElement.js.map +1 -1
- package/core/element/IdiomaticElement.d.ts +1 -0
- package/core/element/IdiomaticElement.js +2 -1
- package/core/element/IdiomaticElement.js.map +1 -1
- package/core/element/ImageElement.d.ts +3 -2
- package/core/element/ImageElement.js +2 -1
- package/core/element/ImageElement.js.map +1 -1
- package/core/element/InputElement.d.ts +3 -2
- package/core/element/InputElement.js +2 -1
- package/core/element/InputElement.js.map +1 -1
- package/core/element/LabelElement.d.ts +3 -2
- package/core/element/LabelElement.js +2 -1
- package/core/element/LabelElement.js.map +1 -1
- package/core/element/LegendElement.d.ts +3 -2
- package/core/element/LegendElement.js +2 -1
- package/core/element/LegendElement.js.map +1 -1
- package/core/element/ListItemElement.d.ts +3 -2
- package/core/element/ListItemElement.js +2 -1
- package/core/element/ListItemElement.js.map +1 -1
- package/core/element/MainElement.d.ts +3 -2
- package/core/element/MainElement.js +2 -1
- package/core/element/MainElement.js.map +1 -1
- package/core/element/NavElement.d.ts +3 -2
- package/core/element/NavElement.js +2 -1
- package/core/element/NavElement.js.map +1 -1
- package/core/element/OrderedListElement.d.ts +3 -2
- package/core/element/OrderedListElement.js +2 -1
- package/core/element/OrderedListElement.js.map +1 -1
- package/core/element/ParagraphElement.d.ts +3 -2
- package/core/element/ParagraphElement.js +2 -1
- package/core/element/ParagraphElement.js.map +1 -1
- package/core/element/PreElement.d.ts +3 -2
- package/core/element/PreElement.js +2 -1
- package/core/element/PreElement.js.map +1 -1
- package/core/element/SectionElement.d.ts +3 -2
- package/core/element/SectionElement.js +2 -1
- package/core/element/SectionElement.js.map +1 -1
- package/core/element/SelectElement.d.ts +3 -2
- package/core/element/SelectElement.js +2 -1
- package/core/element/SelectElement.js.map +1 -1
- package/core/element/SourceElement.d.ts +3 -2
- package/core/element/SourceElement.js +2 -1
- package/core/element/SourceElement.js.map +1 -1
- package/core/element/SpanElement.d.ts +3 -2
- package/core/element/SpanElement.js +2 -1
- package/core/element/SpanElement.js.map +1 -1
- package/core/element/StrongElement.d.ts +3 -2
- package/core/element/StrongElement.js +2 -1
- package/core/element/StrongElement.js.map +1 -1
- package/core/element/StyleElement.d.ts +3 -2
- package/core/element/StyleElement.js +2 -1
- package/core/element/StyleElement.js.map +1 -1
- package/core/element/SummaryElement.d.ts +3 -2
- package/core/element/SummaryElement.js +2 -1
- package/core/element/SummaryElement.js.map +1 -1
- package/core/element/SvgElement.d.ts +4 -3
- package/core/element/SvgElement.js +1 -0
- package/core/element/SvgElement.js.map +1 -1
- package/core/element/TableBodyElement.d.ts +3 -2
- package/core/element/TableBodyElement.js +2 -1
- package/core/element/TableBodyElement.js.map +1 -1
- package/core/element/TableCellElement.d.ts +3 -2
- package/core/element/TableCellElement.js +2 -1
- package/core/element/TableCellElement.js.map +1 -1
- package/core/element/TableColElement.d.ts +3 -2
- package/core/element/TableColElement.js +2 -1
- package/core/element/TableColElement.js.map +1 -1
- package/core/element/TableColGroupElement.d.ts +3 -2
- package/core/element/TableColGroupElement.js +2 -1
- package/core/element/TableColGroupElement.js.map +1 -1
- package/core/element/TableElement.d.ts +3 -2
- package/core/element/TableElement.js +2 -1
- package/core/element/TableElement.js.map +1 -1
- package/core/element/TableFootElement.d.ts +3 -2
- package/core/element/TableFootElement.js +2 -1
- package/core/element/TableFootElement.js.map +1 -1
- package/core/element/TableFootRowElement.d.ts +3 -2
- package/core/element/TableFootRowElement.js +2 -1
- package/core/element/TableFootRowElement.js.map +1 -1
- package/core/element/TableHeadCellElement.d.ts +3 -2
- package/core/element/TableHeadCellElement.js +2 -1
- package/core/element/TableHeadCellElement.js.map +1 -1
- package/core/element/TableHeadElement.d.ts +3 -2
- package/core/element/TableHeadElement.js +2 -1
- package/core/element/TableHeadElement.js.map +1 -1
- package/core/element/TableHeadRowElement.d.ts +3 -2
- package/core/element/TableHeadRowElement.js +2 -1
- package/core/element/TableHeadRowElement.js.map +1 -1
- package/core/element/TableRowElement.d.ts +3 -2
- package/core/element/TableRowElement.js +2 -1
- package/core/element/TableRowElement.js.map +1 -1
- package/core/element/TextAreaElement.d.ts +3 -2
- package/core/element/TextAreaElement.js +2 -1
- package/core/element/TextAreaElement.js.map +1 -1
- package/core/element/UListElement.d.ts +3 -2
- package/core/element/UListElement.js +2 -1
- package/core/element/UListElement.js.map +1 -1
- package/core/element/VideoElement.d.ts +3 -2
- package/core/element/VideoElement.js +2 -1
- package/core/element/VideoElement.js.map +1 -1
- package/core/ref/Computed.d.ts +3 -0
- package/core/ref/Computed.js +75 -0
- package/core/ref/Computed.js.map +1 -0
- package/core/ref/RefBoolean.d.ts +72 -7
- package/core/ref/RefBoolean.js +68 -7
- package/core/ref/RefBoolean.js.map +1 -1
- package/core/ref/RefContainer.d.ts +5 -2
- package/core/ref/RefContainer.js +14 -6
- package/core/ref/RefContainer.js.map +1 -1
- package/core/ref/RefList.d.ts +84 -16
- package/core/ref/RefList.js +112 -32
- package/core/ref/RefList.js.map +1 -1
- package/core/ref/RefMap.d.ts +82 -7
- package/core/ref/RefMap.js +88 -10
- package/core/ref/RefMap.js.map +1 -1
- package/core/ref/RefNumber.d.ts +103 -15
- package/core/ref/RefNumber.js +117 -29
- package/core/ref/RefNumber.js.map +1 -1
- package/core/ref/RefObject copy.d.ts +124 -0
- package/core/ref/RefObject copy.js +271 -0
- package/core/ref/RefObject copy.js.map +1 -0
- package/core/ref/RefObject.d.ts +94 -8
- package/core/ref/RefObject.js +56 -51
- package/core/ref/RefObject.js.map +1 -1
- package/core/ref/RefSet.d.ts +78 -4
- package/core/ref/RefSet.js +86 -10
- package/core/ref/RefSet.js.map +1 -1
- package/core/ref/RefState.d.ts +1 -0
- package/core/ref/RefState.js +3 -0
- package/core/ref/RefState.js.map +1 -1
- package/core/ref/RefString.d.ts +114 -41
- package/core/ref/RefString.js +141 -164
- package/core/ref/RefString.js.map +1 -1
- package/core/ref/index.d.ts +1 -1
- package/core/ref/index.js +1 -2
- package/core/ref/index.js.map +1 -1
- package/core/router/RouteView.d.ts +3 -2
- package/core/router/RouteView.js +2 -1
- package/core/router/RouteView.js.map +1 -1
- package/core/styles/index.d.ts +2 -2
- package/core/styles/index.js.map +1 -1
- package/global/index.d.ts +5 -4
- package/global/index.js +395 -225
- package/global/index.js.map +1 -1
- package/package.json +3 -3
- package/typings/index.d.ts +11 -2
package/core/ref/RefString.d.ts
CHANGED
|
@@ -1,36 +1,137 @@
|
|
|
1
1
|
import { ref } from ".";
|
|
2
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
|
+
*/
|
|
3
9
|
export declare function refString(value: string): RefString;
|
|
10
|
+
/**
|
|
11
|
+
* A union type representing either a primitive string or a RefString.
|
|
12
|
+
*/
|
|
4
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
|
+
*/
|
|
5
18
|
export declare class RefString implements ref<string> {
|
|
19
|
+
readonly id: string;
|
|
20
|
+
/**
|
|
21
|
+
* Internal container for value management and subscriptions.
|
|
22
|
+
*/
|
|
6
23
|
readonly container: RefContainer;
|
|
24
|
+
/**
|
|
25
|
+
* String index access (e.g., refStr[0]) — readonly.
|
|
26
|
+
*/
|
|
7
27
|
readonly [index: number]: string;
|
|
8
|
-
|
|
9
|
-
|
|
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 **/
|
|
10
102
|
charAt(pos: number): string;
|
|
11
103
|
charCodeAt(index: number): number;
|
|
104
|
+
codePointAt(pos: number): number | undefined;
|
|
12
105
|
concat(...strings: string[]): string;
|
|
13
106
|
indexOf(searchString: string, position?: number): number;
|
|
14
107
|
lastIndexOf(searchString: string, position?: number): number;
|
|
15
|
-
|
|
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;
|
|
16
114
|
match(regexp: string | RegExp): RegExpMatchArray | null;
|
|
115
|
+
matchAll(regexp: RegExp): RegExpStringIterator<RegExpExecArray>;
|
|
17
116
|
replace(searchValue: string | RegExp, replacer: string): string;
|
|
117
|
+
replaceAll(searchValue: string, replacer: string | ((substring: string, ...args: any[]) => string)): string;
|
|
18
118
|
search(searcher: string | RegExp): number;
|
|
19
|
-
slice(start?: number, end?: number): string;
|
|
20
119
|
split(separator: string | RegExp, limit?: number): string[];
|
|
21
|
-
|
|
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;
|
|
22
128
|
toLowerCase(): string;
|
|
23
|
-
toLocaleLowerCase(locales?: string): string;
|
|
24
129
|
toUpperCase(): string;
|
|
130
|
+
toLocaleLowerCase(locales?: string): string;
|
|
25
131
|
toLocaleUpperCase(locales?: string): string;
|
|
26
|
-
trim(): string;
|
|
27
|
-
substr(from: number, length?: number): string;
|
|
28
|
-
codePointAt(pos: number): number | undefined;
|
|
29
|
-
includes(searchString: string, position?: number): boolean;
|
|
30
|
-
endsWith(searchString: string, endPosition?: number): boolean;
|
|
31
132
|
normalize(form?: string): string;
|
|
32
|
-
|
|
33
|
-
|
|
133
|
+
localeCompare(that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions): number;
|
|
134
|
+
/** Deprecated HTML string methods (still supported in JS) **/
|
|
34
135
|
anchor(name: string): string;
|
|
35
136
|
big(): string;
|
|
36
137
|
blink(): string;
|
|
@@ -44,32 +145,4 @@ export declare class RefString implements ref<string> {
|
|
|
44
145
|
strike(): string;
|
|
45
146
|
sub(): string;
|
|
46
147
|
sup(): string;
|
|
47
|
-
padStart(maxLength: number, fillString?: string): string;
|
|
48
|
-
padEnd(maxLength: number, fillString?: string): string;
|
|
49
|
-
trimEnd(): string;
|
|
50
|
-
trimStart(): string;
|
|
51
|
-
trimLeft(): string;
|
|
52
|
-
trimRight(): string;
|
|
53
|
-
matchAll(regexp: RegExp): RegExpStringIterator<RegExpExecArray>;
|
|
54
|
-
replaceAll(searchValue: string, replacer: string | ((substring: string, ...args: any[]) => string)): string;
|
|
55
|
-
[Symbol.iterator](): StringIterator<string>;
|
|
56
|
-
equals(value: string): boolean;
|
|
57
|
-
valueOf(): string;
|
|
58
|
-
get length(): number;
|
|
59
|
-
protected emit(propertyName: string | symbol, value: any): void;
|
|
60
|
-
subscribe(target: (arg: string) => void): boolean;
|
|
61
|
-
subscribe(target: (arg: string) => void, onUnsubscribe: Function): boolean;
|
|
62
|
-
subscribe(target: object, propertyName: string | symbol): boolean;
|
|
63
|
-
subscribe(target: object, propertyName: string | symbol, onUnsubscribe: Function): boolean;
|
|
64
|
-
subscribe(target: object | ((arg: string) => void), propertyName: string | symbol | Function, onUnsubscribe?: Function): boolean;
|
|
65
|
-
unsubscribe(target: (arg: string) => void): boolean;
|
|
66
|
-
unsubscribe(targe: object, propertyName: string | symbol): boolean;
|
|
67
|
-
[Symbol.toPrimitive](_hint: string): string;
|
|
68
|
-
static get [Symbol.species](): StringConstructor;
|
|
69
|
-
get value(): string;
|
|
70
|
-
set value(value: string);
|
|
71
|
-
toJSON(): string | {
|
|
72
|
-
value: string;
|
|
73
|
-
};
|
|
74
|
-
toString(): string;
|
|
75
148
|
}
|
package/core/ref/RefString.js
CHANGED
|
@@ -1,202 +1,179 @@
|
|
|
1
1
|
import { Ref } from ".";
|
|
2
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
|
+
*/
|
|
3
9
|
export function refString(value) {
|
|
4
10
|
return new RefString(value);
|
|
5
11
|
}
|
|
12
|
+
// Allows `instanceof refString` to work properly
|
|
6
13
|
Object.defineProperty(refString, Symbol.hasInstance, {
|
|
7
14
|
value: function (instance) {
|
|
8
15
|
return !!instance && instance instanceof RefString;
|
|
9
16
|
},
|
|
10
17
|
});
|
|
18
|
+
/**
|
|
19
|
+
* A reactive string wrapper that mimics the String API,
|
|
20
|
+
* supports subscriptions to changes, and acts like a primitive.
|
|
21
|
+
*/
|
|
11
22
|
export class RefString {
|
|
23
|
+
id;
|
|
24
|
+
/**
|
|
25
|
+
* Internal container for value management and subscriptions.
|
|
26
|
+
*/
|
|
12
27
|
container;
|
|
13
|
-
|
|
14
|
-
|
|
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) {
|
|
15
35
|
this.container = new RefContainer(value);
|
|
16
|
-
this.
|
|
17
|
-
|
|
36
|
+
this.id = this.container.id;
|
|
37
|
+
Ref.set(this.id, this);
|
|
18
38
|
}
|
|
19
|
-
|
|
20
|
-
return this.container.value.
|
|
21
|
-
}
|
|
22
|
-
charCodeAt(index) {
|
|
23
|
-
return this.container.value.charCodeAt(index);
|
|
24
|
-
}
|
|
25
|
-
concat(...strings) {
|
|
26
|
-
return this.container.value.concat(...strings);
|
|
27
|
-
}
|
|
28
|
-
indexOf(searchString, position) {
|
|
29
|
-
return this.container.value.indexOf(searchString, position);
|
|
30
|
-
}
|
|
31
|
-
lastIndexOf(searchString, position) {
|
|
32
|
-
return this.container.value.lastIndexOf(searchString, position);
|
|
33
|
-
}
|
|
34
|
-
localeCompare(that, locales, options) {
|
|
35
|
-
return this.container.value.localeCompare(that, locales, options);
|
|
36
|
-
}
|
|
37
|
-
// @ts-ignore
|
|
38
|
-
match(regexp) {
|
|
39
|
-
return this.container.value.match(regexp);
|
|
40
|
-
}
|
|
41
|
-
// @ts-ignore
|
|
42
|
-
replace(searchValue, replacer) {
|
|
43
|
-
return this.container.value.replace(searchValue, replacer);
|
|
44
|
-
}
|
|
45
|
-
// @ts-ignore
|
|
46
|
-
search(searcher) {
|
|
47
|
-
return this.container.value.search(searcher);
|
|
48
|
-
}
|
|
49
|
-
slice(start, end) {
|
|
50
|
-
return this.container.value.slice(start, end);
|
|
51
|
-
}
|
|
52
|
-
// @ts-ignore
|
|
53
|
-
split(separator, limit) {
|
|
54
|
-
return this.container.value.split(separator, limit);
|
|
55
|
-
}
|
|
56
|
-
substring(start, end) {
|
|
57
|
-
return this.container.value.substring(start, end);
|
|
58
|
-
}
|
|
59
|
-
toLowerCase() {
|
|
60
|
-
return this.container.value.toLowerCase();
|
|
61
|
-
}
|
|
62
|
-
toLocaleLowerCase(locales) {
|
|
63
|
-
return this.container.value.toLocaleLowerCase(locales);
|
|
64
|
-
}
|
|
65
|
-
toUpperCase() {
|
|
66
|
-
return this.container.value.toUpperCase();
|
|
67
|
-
}
|
|
68
|
-
toLocaleUpperCase(locales) {
|
|
69
|
-
return this.container.value.toLocaleUpperCase(locales);
|
|
70
|
-
}
|
|
71
|
-
trim() {
|
|
72
|
-
return this.container.value.trim();
|
|
73
|
-
}
|
|
74
|
-
substr(from, length) {
|
|
75
|
-
return this.container.value.substr(from, length);
|
|
76
|
-
}
|
|
77
|
-
codePointAt(pos) {
|
|
78
|
-
return this.container.value.codePointAt(pos);
|
|
79
|
-
}
|
|
80
|
-
includes(searchString, position) {
|
|
81
|
-
return this.container.value.includes(searchString, position);
|
|
82
|
-
}
|
|
83
|
-
endsWith(searchString, endPosition) {
|
|
84
|
-
return this.container.value.endsWith(searchString, endPosition);
|
|
85
|
-
}
|
|
86
|
-
normalize(form) {
|
|
87
|
-
return this.container.value.normalize(form);
|
|
88
|
-
}
|
|
89
|
-
repeat(count) {
|
|
90
|
-
return this.container.value.repeat(count);
|
|
91
|
-
}
|
|
92
|
-
startsWith(searchString, position) {
|
|
93
|
-
return this.container.value.startsWith(searchString, position);
|
|
94
|
-
}
|
|
95
|
-
anchor(name) {
|
|
96
|
-
return this.container.value.anchor(name);
|
|
97
|
-
}
|
|
98
|
-
big() {
|
|
99
|
-
return this.container.value.big();
|
|
100
|
-
}
|
|
101
|
-
blink() {
|
|
102
|
-
return this.container.value.blink();
|
|
103
|
-
}
|
|
104
|
-
bold() {
|
|
105
|
-
return this.container.value.bold();
|
|
106
|
-
}
|
|
107
|
-
fixed() {
|
|
108
|
-
return this.container.value.fixed();
|
|
109
|
-
}
|
|
110
|
-
fontcolor(color) {
|
|
111
|
-
return this.container.value.fontcolor(color);
|
|
112
|
-
}
|
|
113
|
-
fontsize(size) {
|
|
114
|
-
return this.container.value.fontsize(size.toString());
|
|
115
|
-
}
|
|
116
|
-
italics() {
|
|
117
|
-
return this.container.value.italics();
|
|
118
|
-
}
|
|
119
|
-
link(url) {
|
|
120
|
-
return this.container.value.link(url);
|
|
121
|
-
}
|
|
122
|
-
small() {
|
|
123
|
-
return this.container.value.small();
|
|
124
|
-
}
|
|
125
|
-
strike() {
|
|
126
|
-
return this.container.value.strike();
|
|
127
|
-
}
|
|
128
|
-
sub() {
|
|
129
|
-
return this.container.value.sub();
|
|
130
|
-
}
|
|
131
|
-
sup() {
|
|
132
|
-
return this.container.value.sup();
|
|
133
|
-
}
|
|
134
|
-
padStart(maxLength, fillString) {
|
|
135
|
-
return this.container.value.padStart(maxLength, fillString);
|
|
136
|
-
}
|
|
137
|
-
padEnd(maxLength, fillString) {
|
|
138
|
-
return this.container.value.padEnd(maxLength, fillString);
|
|
139
|
-
}
|
|
140
|
-
trimEnd() {
|
|
141
|
-
return this.container.value.trimEnd();
|
|
142
|
-
}
|
|
143
|
-
trimStart() {
|
|
144
|
-
return this.container.value.trimStart();
|
|
145
|
-
}
|
|
146
|
-
trimLeft() {
|
|
147
|
-
return this.container.value.trimLeft();
|
|
148
|
-
}
|
|
149
|
-
trimRight() {
|
|
150
|
-
return this.container.value.trimRight();
|
|
151
|
-
}
|
|
152
|
-
matchAll(regexp) {
|
|
153
|
-
return this.container.value.matchAll(regexp);
|
|
154
|
-
}
|
|
155
|
-
replaceAll(searchValue, replacer) {
|
|
156
|
-
// @ts-ignore
|
|
157
|
-
return this.container.value.replaceAll(searchValue, replacer);
|
|
39
|
+
subscribe(target, propertyName, onUnsubscribe) {
|
|
40
|
+
return this.container.emit(this.container.subscribe(target, propertyName, onUnsubscribe), this.value, this.valueOf());
|
|
158
41
|
}
|
|
159
|
-
|
|
160
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Subscribes to future changes without emitting the current value.
|
|
44
|
+
*/
|
|
45
|
+
listen(target, onUnsubscribe) {
|
|
46
|
+
return this.container.subscribe(target, onUnsubscribe) !== undefined;
|
|
161
47
|
}
|
|
162
|
-
|
|
163
|
-
return this.container.
|
|
48
|
+
unsubscribe(targe, propertyName = "") {
|
|
49
|
+
return this.container.unsubscribe(targe, propertyName);
|
|
164
50
|
}
|
|
165
|
-
|
|
166
|
-
|
|
51
|
+
/** Reactive value access **/
|
|
52
|
+
/**
|
|
53
|
+
* Gets the current string value.
|
|
54
|
+
*/
|
|
55
|
+
get value() {
|
|
56
|
+
return this.container.value.valueOf();
|
|
167
57
|
}
|
|
168
|
-
|
|
169
|
-
|
|
58
|
+
/**
|
|
59
|
+
* Sets a new value and notifies subscribers if it changed.
|
|
60
|
+
*
|
|
61
|
+
* @param value - The new string value.
|
|
62
|
+
*/
|
|
63
|
+
set value(value) {
|
|
64
|
+
this.emit("value", value);
|
|
170
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Emits a change notification if the value changed.
|
|
68
|
+
*/
|
|
171
69
|
// @ts-ignore
|
|
172
70
|
emit(propertyName, value) {
|
|
173
71
|
if (this.container.value === value.valueOf())
|
|
174
72
|
return;
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
subscribe(target, propertyName, onUnsubscribe) {
|
|
178
|
-
return this.container.emit(this.container.subscribe(target, propertyName, onUnsubscribe), this.value);
|
|
179
|
-
}
|
|
180
|
-
unsubscribe(targe, propertyName = "") {
|
|
181
|
-
return this.container.unsubscribe(targe, propertyName);
|
|
73
|
+
const oldValue = this.container.valueOf();
|
|
74
|
+
this.container.emitAll(propertyName, (this.container.value = value.valueOf()), oldValue);
|
|
182
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* Returns the string value as a primitive.
|
|
78
|
+
*/
|
|
183
79
|
[Symbol.toPrimitive](_hint) {
|
|
184
80
|
return this.container.toString();
|
|
185
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* Ensures String is returned for string operations like concat/slice.
|
|
84
|
+
*/
|
|
186
85
|
static get [Symbol.species]() {
|
|
187
86
|
return String;
|
|
188
87
|
}
|
|
189
|
-
|
|
190
|
-
|
|
88
|
+
/**
|
|
89
|
+
* Returns the primitive string value.
|
|
90
|
+
*/
|
|
91
|
+
valueOf() {
|
|
92
|
+
return this.container.value.toString();
|
|
191
93
|
}
|
|
192
|
-
|
|
193
|
-
|
|
94
|
+
/**
|
|
95
|
+
* Returns the string representation of the value.
|
|
96
|
+
*/
|
|
97
|
+
toString() {
|
|
98
|
+
return this.container.toString();
|
|
194
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* Returns a JSON-serializable representation of the string.
|
|
102
|
+
*/
|
|
195
103
|
toJSON() {
|
|
196
104
|
return this.container.root ? this.value : { value: this.value };
|
|
197
105
|
}
|
|
198
|
-
|
|
199
|
-
|
|
106
|
+
/**
|
|
107
|
+
* Returns the length of the string.
|
|
108
|
+
*/
|
|
109
|
+
get length() {
|
|
110
|
+
return this.container.value.length;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Compares this string to another string.
|
|
114
|
+
*
|
|
115
|
+
* @param value - The value to compare with.
|
|
116
|
+
*/
|
|
117
|
+
equals(value) {
|
|
118
|
+
return this.container.valueOf() === value.valueOf();
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Allows iteration over each character in the string.
|
|
122
|
+
*/
|
|
123
|
+
[Symbol.iterator]() {
|
|
124
|
+
return this.container.value[Symbol.iterator]();
|
|
125
|
+
}
|
|
126
|
+
/** String method wrappers **/
|
|
127
|
+
charAt(pos) { return this.container.value.charAt(pos); }
|
|
128
|
+
charCodeAt(index) { return this.container.value.charCodeAt(index); }
|
|
129
|
+
codePointAt(pos) { return this.container.value.codePointAt(pos); }
|
|
130
|
+
concat(...strings) { return this.container.value.concat(...strings); }
|
|
131
|
+
indexOf(searchString, position) { return this.container.value.indexOf(searchString, position); }
|
|
132
|
+
lastIndexOf(searchString, position) { return this.container.value.lastIndexOf(searchString, position); }
|
|
133
|
+
includes(searchString, position) { return this.container.value.includes(searchString, position); }
|
|
134
|
+
startsWith(searchString, position) { return this.container.value.startsWith(searchString, position); }
|
|
135
|
+
endsWith(searchString, endPosition) { return this.container.value.endsWith(searchString, endPosition); }
|
|
136
|
+
slice(start, end) { return this.container.value.slice(start, end); }
|
|
137
|
+
substring(start, end) { return this.container.value.substring(start, end); }
|
|
138
|
+
substr(from, length) { return this.container.value.substr(from, length); }
|
|
139
|
+
match(regexp) { return this.container.value.match(regexp); }
|
|
140
|
+
matchAll(regexp) { return this.container.value.matchAll(regexp); }
|
|
141
|
+
replace(searchValue, replacer) { return this.container.value.replace(searchValue, replacer); }
|
|
142
|
+
replaceAll(searchValue, replacer) {
|
|
143
|
+
// @ts-ignore
|
|
144
|
+
return this.container.value.replaceAll(searchValue, replacer);
|
|
145
|
+
}
|
|
146
|
+
search(searcher) { return this.container.value.search(searcher); }
|
|
147
|
+
split(separator, limit) { return this.container.value.split(separator, limit); }
|
|
148
|
+
repeat(count) { return this.container.value.repeat(count); }
|
|
149
|
+
padStart(maxLength, fillString) { return this.container.value.padStart(maxLength, fillString); }
|
|
150
|
+
padEnd(maxLength, fillString) { return this.container.value.padEnd(maxLength, fillString); }
|
|
151
|
+
trim() { return this.container.value.trim(); }
|
|
152
|
+
trimStart() { return this.container.value.trimStart(); }
|
|
153
|
+
trimEnd() { return this.container.value.trimEnd(); }
|
|
154
|
+
trimLeft() { return this.container.value.trimLeft(); }
|
|
155
|
+
trimRight() { return this.container.value.trimRight(); }
|
|
156
|
+
toLowerCase() { return this.container.value.toLowerCase(); }
|
|
157
|
+
toUpperCase() { return this.container.value.toUpperCase(); }
|
|
158
|
+
toLocaleLowerCase(locales) { return this.container.value.toLocaleLowerCase(locales); }
|
|
159
|
+
toLocaleUpperCase(locales) { return this.container.value.toLocaleUpperCase(locales); }
|
|
160
|
+
normalize(form) { return this.container.value.normalize(form); }
|
|
161
|
+
localeCompare(that, locales, options) {
|
|
162
|
+
return this.container.value.localeCompare(that, locales, options);
|
|
200
163
|
}
|
|
164
|
+
/** Deprecated HTML string methods (still supported in JS) **/
|
|
165
|
+
anchor(name) { return this.container.value.anchor(name); }
|
|
166
|
+
big() { return this.container.value.big(); }
|
|
167
|
+
blink() { return this.container.value.blink(); }
|
|
168
|
+
bold() { return this.container.value.bold(); }
|
|
169
|
+
fixed() { return this.container.value.fixed(); }
|
|
170
|
+
fontcolor(color) { return this.container.value.fontcolor(color); }
|
|
171
|
+
fontsize(size) { return this.container.value.fontsize(size.toString()); }
|
|
172
|
+
italics() { return this.container.value.italics(); }
|
|
173
|
+
link(url) { return this.container.value.link(url); }
|
|
174
|
+
small() { return this.container.value.small(); }
|
|
175
|
+
strike() { return this.container.value.strike(); }
|
|
176
|
+
sub() { return this.container.value.sub(); }
|
|
177
|
+
sup() { return this.container.value.sup(); }
|
|
201
178
|
}
|
|
202
179
|
//# sourceMappingURL=RefString.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RefString.js","sourceRoot":"","sources":["../../../src/core/ref/RefString.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAO,MAA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6 +8,7 @@ export * from "./RefSet";
|
|
|
8
8
|
export * from "./RefObject";
|
|
9
9
|
export * from "./RefProperty";
|
|
10
10
|
export * from "./RefState";
|
|
11
|
+
export * from "./Computed";
|
|
11
12
|
export declare class Ref {
|
|
12
13
|
private static refs;
|
|
13
14
|
private static onCreatedCallbacks;
|
|
@@ -19,5 +20,4 @@ export declare class Ref {
|
|
|
19
20
|
static unsubscribe(target: object, propertyName: string | symbol): void;
|
|
20
21
|
static unsubscribeAll(target: object): void;
|
|
21
22
|
private static subscribe;
|
|
22
|
-
static computed(v: () => any): void;
|
|
23
23
|
}
|
package/core/ref/index.js
CHANGED
|
@@ -8,6 +8,7 @@ export * from "./RefSet";
|
|
|
8
8
|
export * from "./RefObject";
|
|
9
9
|
export * from "./RefProperty";
|
|
10
10
|
export * from "./RefState";
|
|
11
|
+
export * from "./Computed";
|
|
11
12
|
const subscribers = new WeakMap();
|
|
12
13
|
export class Ref {
|
|
13
14
|
static refs = new Map();
|
|
@@ -65,8 +66,6 @@ export class Ref {
|
|
|
65
66
|
}
|
|
66
67
|
propertyMap.set(propertyName, new WeakRef(container));
|
|
67
68
|
}
|
|
68
|
-
static computed(v) {
|
|
69
|
-
}
|
|
70
69
|
}
|
|
71
70
|
globalThis.Ref = Ref;
|
|
72
71
|
//# sourceMappingURL=index.js.map
|
package/core/ref/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/ref/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAG3B,MAAM,WAA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AC;IAEM,MAAM,CAAC,cAAc,CAAC,MAAc;QACzC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC;YAAE,OAAO;QACrC,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,CAAC,MAAM,CAAE,CAAC;QAC7C,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC3B,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,WAAW,EAAE,CAAC;YACvC,KAAK,CAAC,KAAK,EAAE,EAAE,WAAW,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC1C,CAAC;IACH,CAAC;IAED,SAAS;IACD,MAAM,CAAC,SAAS,CAAC,MAAc,EAAE,YAA6B,EAAE,SAAuB;QAC7F,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC;YAAE,WAAW,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;QACjE,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,CAAC,MAAM,CAAE,CAAC;QAC7C,IAAI,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC;YAClC,MAAM,YAAY,GAAG,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;YACnD,IAAI,YAAY;gBAAE,YAAY,CAAC,KAAK,EAAE,EAAE,WAAW,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;QAC5E,CAAC;QACD,WAAW,CAAC,GAAG,CAAC,YAAY,EAAE,IAAI,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;IACxD,CAAC;;AAKF,UAAkB,CAAC,GAAG,GAAG,GAAG,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { Component,
|
|
1
|
+
import { Component, ElementProps } from "../..";
|
|
2
2
|
export declare class RouteView extends Component {
|
|
3
3
|
#private;
|
|
4
|
+
static readonly TAG: string;
|
|
4
5
|
private _view;
|
|
5
6
|
private _url;
|
|
6
7
|
private routePage;
|
|
7
|
-
constructor(props?:
|
|
8
|
+
constructor(props?: ElementProps & {
|
|
8
9
|
defaultView?: ComponentType;
|
|
9
10
|
onUpdateView?: (view?: IComponent) => void;
|
|
10
11
|
});
|
package/core/router/RouteView.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Component, Router } from "../..";
|
|
2
2
|
export class RouteView extends Component {
|
|
3
|
+
static TAG = "tc-route-view";
|
|
3
4
|
_view = undefined;
|
|
4
5
|
_url = "";
|
|
5
6
|
routePage = undefined;
|
|
@@ -79,5 +80,5 @@ export class RouteView extends Component {
|
|
|
79
80
|
super.append(value);
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
|
-
TypeComposer.defineElement(
|
|
83
|
+
TypeComposer.defineElement(RouteView.TAG, RouteView);
|
|
83
84
|
//# sourceMappingURL=RouteView.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RouteView.js","sourceRoot":"","sources":["../../../src/core/router/RouteView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"RouteView.js","sourceRoot":"","sources":["../../../src/core/router/RouteView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAgB,MAAM,OAAO,CAAC;AAUxD,MAAM,OAAO,SAAU,SAAQ,SAAS;IACtC,MAAM,CAAU,GAAG,GAAW,eAAe,CAAC;IACtC,KAAK,GAA2B,SAAS,CAAC;IAC1C,IAAI,GAAW,EAAE,CAAC;IAClB,SAAS,GAA+B,SAAS,CAAC;IAC1D,YAAY,GAA8B,SAAS,CAAC;IACpD,iBAAiB,GAA2B,SAAS,CAAC;IAGtD,YACE,KAGC;QAED,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,YAAY,GAAG,KAAK,EAAE,WAAW,CAAC;QACvC,OAAO,KAAK,EAAE,WAAW,CAAC;QAC1B,OAAO,KAAK,EAAE,QAAQ,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