@nstudio/nativescript-compiler 9.2.0-alpha.10 → 9.2.0-alpha.12
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/dist/api/ir.js +7 -1
- package/dist/cli/runtime.cjs +7 -1
- package/dist/css/css.js +30 -6
- package/dist/driver/cli.js +2 -0
- package/dist/driver/compile.js +23 -10
- package/dist/driver/paths.js +7 -0
- package/dist/driver/unimplemented.js +15 -0
- package/dist/kotlin/access.js +23 -5
- package/dist/kotlin/arguments.js +5 -0
- package/dist/kotlin/builtins.js +0 -4
- package/dist/kotlin/calls.js +6 -2
- package/dist/kotlin/class-methods.js +9 -3
- package/dist/kotlin/components.js +13 -8
- package/dist/kotlin/conversion.js +17 -5
- package/dist/kotlin/core-api.js +2 -13
- package/dist/kotlin/declarations.js +2 -0
- package/dist/kotlin/expression-statements.js +5 -4
- package/dist/kotlin/expressions.js +8 -3
- package/dist/kotlin/functions.js +13 -4
- package/dist/kotlin/global-calls.js +11 -0
- package/dist/kotlin/literals.js +58 -14
- package/dist/kotlin/names.js +2 -2
- package/dist/kotlin/native/api.js +9 -1
- package/dist/kotlin/native/calls.js +84 -3
- package/dist/kotlin/native/subclasses.js +4 -3
- package/dist/kotlin/native/types.js +8 -5
- package/dist/kotlin/operators.js +4 -1
- package/dist/kotlin/overrides.js +7 -5
- package/dist/kotlin/placement.js +3 -1
- package/dist/kotlin/prototype-calls.js +5 -0
- package/dist/kotlin/render.js +62 -0
- package/dist/kotlin/statements.js +9 -0
- package/dist/kotlin/static-calls.js +10 -7
- package/dist/kotlin/translator.js +31 -11
- package/dist/kotlin/type-facts.js +10 -2
- package/dist/kotlin/types.js +6 -6
- package/dist/plugins/native-android.js +37 -5
- package/dist/plugins/native-ios.js +2 -0
- package/dist/plugins/source.js +73 -23
- package/dist/program/app-modules.js +91 -16
- package/dist/program/app-paths.js +80 -12
- package/dist/program/class-mixins.js +463 -0
- package/dist/program/core-facts.js +7 -0
- package/dist/program/glob.js +274 -0
- package/dist/program/platform.js +32 -4
- package/dist/program/program.js +239 -38
- package/dist/program/source-lines.js +4 -1
- package/dist/program/vite-plugins.js +144 -0
- package/dist/semantics/apis/globals.js +2 -2
- package/dist/semantics/apis/object.js +1 -0
- package/dist/semantics/apis/statics.js +6 -0
- package/dist/semantics/ast.js +20 -2
- package/dist/semantics/classes.js +36 -1
- package/dist/semantics/facts.js +28 -1
- package/dist/semantics/globals.js +3 -0
- package/dist/semantics/lang.js +13 -1
- package/dist/semantics/nullish.js +29 -11
- package/dist/semantics/refuse-receivers.js +3 -3
- package/dist/semantics/refuse-scope.js +2 -7
- package/dist/semantics/runtime.js +1 -0
- package/dist/semantics/shapes.js +21 -1
- package/dist/semantics/states/value-states.js +1 -1
- package/dist/semantics/throws.js +1 -0
- package/dist/semantics/translator-methods.js +1 -1
- package/dist/semantics/types.js +21 -1
- package/dist/swift/access.js +25 -10
- package/dist/swift/arguments.js +10 -2
- package/dist/swift/assignment.js +12 -1
- package/dist/swift/builtins.js +0 -4
- package/dist/swift/calls.js +6 -2
- package/dist/swift/class-methods.js +3 -3
- package/dist/swift/components.js +28 -8
- package/dist/swift/construction.js +4 -0
- package/dist/swift/conversion.js +1 -1
- package/dist/swift/core-api.js +9 -12
- package/dist/swift/from-any.js +2 -2
- package/dist/swift/functions.js +13 -2
- package/dist/swift/generics.js +5 -1
- package/dist/swift/global-calls.js +2 -0
- package/dist/swift/literals.js +57 -10
- package/dist/swift/modules.js +1 -1
- package/dist/swift/names.js +1 -1
- package/dist/swift/native/sdk-tables.js +52 -4
- package/dist/swift/native/sdk.js +9 -1
- package/dist/swift/operators.js +4 -1
- package/dist/swift/parameters.js +5 -2
- package/dist/swift/placement.js +44 -4
- package/dist/swift/prototype-calls.js +17 -2
- package/dist/swift/render.js +64 -0
- package/dist/swift/results.js +1 -1
- package/dist/swift/statements.js +9 -0
- package/dist/swift/static-calls.js +13 -6
- package/dist/swift/types.js +9 -9
- package/dist/targets/android/build.js +18 -12
- package/dist/targets/ios/build.js +11 -10
- package/dist/targets/ios/dependencies.js +12 -0
- package/dist/targets/resources.js +15 -1
- package/dist/template/plan.js +105 -8
- package/dist/types/adapter-api.d.ts +13 -0
- package/dist/types/ir.d.ts +47 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/__Objects.kt +102 -7485
- package/kit-android/generated/kotlin/org/nativescript/kit/application_application.kt +4 -4
- package/kit-android/generated/kotlin/org/nativescript/kit/image_source_index.kt +1 -1
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_animation_animation_common.kt +7 -3
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_animation_index.kt +3 -1
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_base_index.kt +2 -4
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_index.kt +5 -6
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_view_common.kt +1 -3
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_dialogs_index.kt +11 -6
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_fragment_transitions.kt +1 -1
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_frame_common.kt +1 -1
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_frame_helper_for_android.kt +7 -5
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_index.kt +6 -3
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_gestures_touch_manager.kt +1 -1
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_flexbox_layout_index.kt +1 -1
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_search_bar_index.kt +4 -3
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_segmented_bar_index.kt +2 -2
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_text_base_formatted_string.kt +1 -3
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_text_base_index.kt +1 -1
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_transition_fade_transition.kt +1 -1
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_transition_flip_transition.kt +8 -8
- package/kit-android/generated/kotlin/org/nativescript/kit/utils_index.kt +1 -1
- package/kit-android/generated/source-lines.json +1 -1
- package/kit-android/gradlew.bat +94 -0
- package/kit-android/src/fromcore/kotlin/org/nativescript/kit/CoreBridge.kt +67 -1
- package/kit-android/src/main/kotlin/org/nativescript/kit/Signals.kt +15 -2
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Prototypes.kt +26 -0
- package/kit-apple/Overlays/xml-free/Core/ui.core.bindable.index.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity1.swift +26 -161
- package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity2.swift +9 -284
- package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity3Plus.swift +11 -7
- package/kit-apple/Sources/NativeScriptKit/Core/Object_callback_thisArg_once.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_index_section_view_ios_android.swift +7 -5
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_oldIndex_newIndex.swift +4 -2
- package/kit-apple/Sources/NativeScriptKit/Core/{Object_iterator_prototype_for_keyFor_hasInstance_isConcatSpreadable_and_19_more_91b5f3.swift → Object_iterator_prototype_for_keyFor_hasInstance_isConcatSpreadable_and_19_more_fa18e1.swift} +28 -103
- package/kit-apple/Sources/NativeScriptKit/Core/__Namespace.Utils.swift +17 -15
- package/kit-apple/Sources/NativeScriptKit/Core/application-settings.index.ios.swift +8 -8
- package/kit-apple/Sources/NativeScriptKit/Core/application.application-common.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/color.color-common.swift +7 -7
- package/kit-apple/Sources/NativeScriptKit/Core/data.observable.index.swift +3 -3
- package/kit-apple/Sources/NativeScriptKit/Core/http.http-request-internal.index.ios.swift +2 -1
- package/kit-apple/Sources/NativeScriptKit/Core/image-source.index.ios.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Core/kit-index.json +40 -246
- package/kit-apple/Sources/NativeScriptKit/Core/manifest.json +1 -2
- package/kit-apple/Sources/NativeScriptKit/Core/ui.action-bar.index.ios.swift +3 -3
- package/kit-apple/Sources/NativeScriptKit/Core/ui.button.index.ios.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.content-view.index.swift +8 -8
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.bindable.index.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.index.ios.swift +8 -8
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.view-common.swift +1 -3
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.view-helper.view-helper-common.swift +7 -7
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.weak-event-listener.index.swift +3 -3
- package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.index.ios.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.gestures.index.ios.swift +2 -2
- package/kit-apple/Sources/NativeScriptKit/Core/ui.html-view.index.ios.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.image.image-common.swift +2 -2
- package/kit-apple/Sources/NativeScriptKit/Core/ui.image.index.ios.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.label.index.ios.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.absolute-layout.index.ios.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.dock-layout.index.ios.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.flexbox-layout.index.ios.swift +3 -3
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.grid-layout.index.ios.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.stack-layout.index.ios.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.wrap-layout.index.ios.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.list-view.index.ios.swift +3 -3
- package/kit-apple/Sources/NativeScriptKit/Core/ui.page.index.ios.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.repeater.index.swift +10 -6
- package/kit-apple/Sources/NativeScriptKit/Core/ui.scroll-view.index.ios.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.split-view.index.ios.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.background.ios.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Core/ui.tab-view.index.ios.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.text-base.formatted-string.swift +2 -1
- package/kit-apple/Sources/NativeScriptKit/Core/utils.common.swift +9 -9
- package/kit-apple/Sources/NativeScriptKit/Core/utils.layout-helper.index.ios.swift +10 -10
- package/kit-apple/Sources/NativeScriptKit/CoreBridge.swift +67 -1
- package/kit-apple/Sources/NativeScriptKit/Runtime/Lowering.swift +4 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Prototypes.swift +25 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/RegExp.swift +6 -0
- package/kit-apple/Sources/NativeScriptKit/Signals.swift +20 -2
- package/package.json +2 -1
- package/kit-apple/Sources/NativeScriptKit/Core/Object_toString_charAt_charCodeAt_concat_indexOf_lastIndexOf_and_44_more_fc25df.swift +0 -481
|
@@ -1,481 +0,0 @@
|
|
|
1
|
-
// Generated from @nativescript/core by tools/kit: edit core, not this file.
|
|
2
|
-
|
|
3
|
-
import CFNetwork
|
|
4
|
-
import CoreFoundation
|
|
5
|
-
import CoreGraphics
|
|
6
|
-
import CoreServices
|
|
7
|
-
import CoreText
|
|
8
|
-
import Dispatch
|
|
9
|
-
import Foundation
|
|
10
|
-
import ObjectiveC
|
|
11
|
-
import Photos
|
|
12
|
-
import QuartzCore
|
|
13
|
-
import Symbols
|
|
14
|
-
import SystemConfiguration
|
|
15
|
-
import UIKit
|
|
16
|
-
import WebKit
|
|
17
|
-
|
|
18
|
-
public final class Object_toString_charAt_charCodeAt_concat_indexOf_lastIndexOf_and_44_more_fc25df: JSDynamic,
|
|
19
|
-
JSToPrimitive, JSIterableValue
|
|
20
|
-
{
|
|
21
|
-
nonisolated deinit {}
|
|
22
|
-
public var toString: (() throws -> String)?
|
|
23
|
-
public var charAt: ((Double) throws -> String)?
|
|
24
|
-
public var charCodeAt: ((Double) throws -> Double)?
|
|
25
|
-
public var concat: ((JSRest<String>) throws -> String)?
|
|
26
|
-
public var indexOf: ((String, Double?) throws -> Double)?
|
|
27
|
-
public var lastIndexOf: ((String, Double?) throws -> Double)?
|
|
28
|
-
public var localeCompare: ((String) throws -> Double)?
|
|
29
|
-
public var match: ((Any?) throws -> JSMatch)?
|
|
30
|
-
public var replace: ((Any?, String) throws -> String)?
|
|
31
|
-
public var search: ((Any?) throws -> Double)?
|
|
32
|
-
public var slice: ((Double?, Double?) throws -> String)?
|
|
33
|
-
public var split: ((Any?, Double?) throws -> JSArray<String>)?
|
|
34
|
-
public var substring: ((Double, Double?) throws -> String)?
|
|
35
|
-
public var toLowerCase: (() throws -> String)?
|
|
36
|
-
public var toLocaleLowerCase: ((Any?) throws -> String)?
|
|
37
|
-
public var toUpperCase: (() throws -> String)?
|
|
38
|
-
public var toLocaleUpperCase: ((Any?) throws -> String)?
|
|
39
|
-
public var trim: (() throws -> String)?
|
|
40
|
-
public var length: Double
|
|
41
|
-
public var substr: ((Double, Double?) throws -> String)?
|
|
42
|
-
public var valueOf: (() throws -> String)?
|
|
43
|
-
public var codePointAt: ((Double) throws -> Double)?
|
|
44
|
-
public var includes: ((String, Double?) throws -> Bool)?
|
|
45
|
-
public var endsWith: ((String, Double?) throws -> Bool)?
|
|
46
|
-
public var normalize: ((String) throws -> String)?
|
|
47
|
-
public var `repeat`: ((Double) throws -> String)?
|
|
48
|
-
public var startsWith: ((String, Double?) throws -> Bool)?
|
|
49
|
-
public var anchor: ((String) throws -> String)?
|
|
50
|
-
public var big: (() throws -> String)?
|
|
51
|
-
public var blink: (() throws -> String)?
|
|
52
|
-
public var bold: (() throws -> String)?
|
|
53
|
-
public var fixed: (() throws -> String)?
|
|
54
|
-
public var fontcolor: ((String) throws -> String)?
|
|
55
|
-
public var fontsize: ((Double) throws -> String)?
|
|
56
|
-
public var italics: (() throws -> String)?
|
|
57
|
-
public var link: ((String) throws -> String)?
|
|
58
|
-
public var small: (() throws -> String)?
|
|
59
|
-
public var strike: (() throws -> String)?
|
|
60
|
-
public var sub: (() throws -> String)?
|
|
61
|
-
public var sup: (() throws -> String)?
|
|
62
|
-
public var padStart: ((Double, String?) throws -> String)?
|
|
63
|
-
public var padEnd: ((Double, String?) throws -> String)?
|
|
64
|
-
public var trimEnd: (() throws -> String)?
|
|
65
|
-
public var trimStart: (() throws -> String)?
|
|
66
|
-
public var trimLeft: (() throws -> String)?
|
|
67
|
-
public var trimRight: (() throws -> String)?
|
|
68
|
-
public var matchAll: ((JSRegExp?) throws -> JSArray<JSMatch>)?
|
|
69
|
-
public var replaceAll: ((Any?, String) throws -> String)?
|
|
70
|
-
public var at: ((Double) throws -> String)?
|
|
71
|
-
public var jsSymbolIterator: () throws -> JSIterator<String>
|
|
72
|
-
public func jsToPrimitive(_ hint: String) throws -> Any? {
|
|
73
|
-
try jsOrdinaryToPrimitive(
|
|
74
|
-
hint, valueOf: { try jsCallable(self.valueOf, "valueOf")() },
|
|
75
|
-
toString: { try jsCallable(self.toString, "toString")() })
|
|
76
|
-
}
|
|
77
|
-
public func jsAnyIterator() throws -> JSIteratorProtocol {
|
|
78
|
-
try jsIterated(jsSymbolIterator(), "Result of the Symbol.iterator method is not an object")
|
|
79
|
-
}
|
|
80
|
-
public func jsRawIterator() throws -> Any? { return try jsSymbolIterator() }
|
|
81
|
-
private let jsOrder: [String]?
|
|
82
|
-
public init(
|
|
83
|
-
toString: (() throws -> String)?, charAt: ((Double) throws -> String)?,
|
|
84
|
-
charCodeAt: ((Double) throws -> Double)?, concat: ((JSRest<String>) throws -> String)?,
|
|
85
|
-
indexOf: ((String, Double?) throws -> Double)?, lastIndexOf: ((String, Double?) throws -> Double)?,
|
|
86
|
-
localeCompare: ((String) throws -> Double)?, match: ((Any?) throws -> JSMatch)?,
|
|
87
|
-
replace: ((Any?, String) throws -> String)?, search: ((Any?) throws -> Double)?,
|
|
88
|
-
slice: ((Double?, Double?) throws -> String)?, split: ((Any?, Double?) throws -> JSArray<String>)?,
|
|
89
|
-
substring: ((Double, Double?) throws -> String)?, toLowerCase: (() throws -> String)?,
|
|
90
|
-
toLocaleLowerCase: ((Any?) throws -> String)?, toUpperCase: (() throws -> String)?,
|
|
91
|
-
toLocaleUpperCase: ((Any?) throws -> String)?, trim: (() throws -> String)?, length: Double,
|
|
92
|
-
substr: ((Double, Double?) throws -> String)?, valueOf: (() throws -> String)?,
|
|
93
|
-
codePointAt: ((Double) throws -> Double)?, includes: ((String, Double?) throws -> Bool)?,
|
|
94
|
-
endsWith: ((String, Double?) throws -> Bool)?, normalize: ((String) throws -> String)?,
|
|
95
|
-
`repeat`: ((Double) throws -> String)?, startsWith: ((String, Double?) throws -> Bool)?,
|
|
96
|
-
anchor: ((String) throws -> String)?, big: (() throws -> String)?, blink: (() throws -> String)?,
|
|
97
|
-
bold: (() throws -> String)?, fixed: (() throws -> String)?, fontcolor: ((String) throws -> String)?,
|
|
98
|
-
fontsize: ((Double) throws -> String)?, italics: (() throws -> String)?, link: ((String) throws -> String)?,
|
|
99
|
-
small: (() throws -> String)?, strike: (() throws -> String)?, sub: (() throws -> String)?,
|
|
100
|
-
sup: (() throws -> String)?, padStart: ((Double, String?) throws -> String)?,
|
|
101
|
-
padEnd: ((Double, String?) throws -> String)?, trimEnd: (() throws -> String)?,
|
|
102
|
-
trimStart: (() throws -> String)?, trimLeft: (() throws -> String)?, trimRight: (() throws -> String)?,
|
|
103
|
-
matchAll: ((JSRegExp?) throws -> JSArray<JSMatch>)?, replaceAll: ((Any?, String) throws -> String)?,
|
|
104
|
-
at: ((Double) throws -> String)?, jsSymbolIterator: @escaping () throws -> JSIterator<String>,
|
|
105
|
-
jsOrder: [String]? = nil
|
|
106
|
-
) {
|
|
107
|
-
self.toString = toString
|
|
108
|
-
self.charAt = charAt
|
|
109
|
-
self.charCodeAt = charCodeAt
|
|
110
|
-
self.concat = concat
|
|
111
|
-
self.indexOf = indexOf
|
|
112
|
-
self.lastIndexOf = lastIndexOf
|
|
113
|
-
self.localeCompare = localeCompare
|
|
114
|
-
self.match = match
|
|
115
|
-
self.replace = replace
|
|
116
|
-
self.search = search
|
|
117
|
-
self.slice = slice
|
|
118
|
-
self.split = split
|
|
119
|
-
self.substring = substring
|
|
120
|
-
self.toLowerCase = toLowerCase
|
|
121
|
-
self.toLocaleLowerCase = toLocaleLowerCase
|
|
122
|
-
self.toUpperCase = toUpperCase
|
|
123
|
-
self.toLocaleUpperCase = toLocaleUpperCase
|
|
124
|
-
self.trim = trim
|
|
125
|
-
self.length = length
|
|
126
|
-
self.substr = substr
|
|
127
|
-
self.valueOf = valueOf
|
|
128
|
-
self.codePointAt = codePointAt
|
|
129
|
-
self.includes = includes
|
|
130
|
-
self.endsWith = endsWith
|
|
131
|
-
self.normalize = normalize
|
|
132
|
-
self.`repeat` = `repeat`
|
|
133
|
-
self.startsWith = startsWith
|
|
134
|
-
self.anchor = anchor
|
|
135
|
-
self.big = big
|
|
136
|
-
self.blink = blink
|
|
137
|
-
self.bold = bold
|
|
138
|
-
self.fixed = fixed
|
|
139
|
-
self.fontcolor = fontcolor
|
|
140
|
-
self.fontsize = fontsize
|
|
141
|
-
self.italics = italics
|
|
142
|
-
self.link = link
|
|
143
|
-
self.small = small
|
|
144
|
-
self.strike = strike
|
|
145
|
-
self.sub = sub
|
|
146
|
-
self.sup = sup
|
|
147
|
-
self.padStart = padStart
|
|
148
|
-
self.padEnd = padEnd
|
|
149
|
-
self.trimEnd = trimEnd
|
|
150
|
-
self.trimStart = trimStart
|
|
151
|
-
self.trimLeft = trimLeft
|
|
152
|
-
self.trimRight = trimRight
|
|
153
|
-
self.matchAll = matchAll
|
|
154
|
-
self.replaceAll = replaceAll
|
|
155
|
-
self.at = at
|
|
156
|
-
self.jsSymbolIterator = jsSymbolIterator
|
|
157
|
-
self.jsOrder = jsOrder
|
|
158
|
-
}
|
|
159
|
-
private var jsExtra: JSDynamic?
|
|
160
|
-
public var jsKeys: [String] {
|
|
161
|
-
["toString"] + ["charAt"] + ["charCodeAt"] + ["concat"] + ["indexOf"] + ["lastIndexOf"] + ["localeCompare"] + [
|
|
162
|
-
"match"
|
|
163
|
-
] + ["replace"] + ["search"] + ["slice"] + ["split"] + ["substring"] + ["toLowerCase"] + ["toLocaleLowerCase"]
|
|
164
|
-
+ ["toUpperCase"] + ["toLocaleUpperCase"] + ["trim"] + ["length"] + ["substr"] + ["valueOf"] + [
|
|
165
|
-
"codePointAt"
|
|
166
|
-
] + ["includes"] + ["endsWith"] + ["normalize"] + ["repeat"] + ["startsWith"] + ["anchor"] + ["big"] + [
|
|
167
|
-
"blink"
|
|
168
|
-
] + ["bold"] + ["fixed"] + ["fontcolor"] + ["fontsize"] + ["italics"] + ["link"] + ["small"] + ["strike"]
|
|
169
|
-
+ ["sub"] + ["sup"] + ["padStart"] + ["padEnd"] + ["trimEnd"] + ["trimStart"] + ["trimLeft"] + ["trimRight"]
|
|
170
|
-
+ ["matchAll"] + ["replaceAll"] + ["at"]
|
|
171
|
-
}
|
|
172
|
-
public var jsClassName: String? { nil }
|
|
173
|
-
public subscript(jsKey key: String) -> Any? {
|
|
174
|
-
get {
|
|
175
|
-
switch key.utf8.count {
|
|
176
|
-
case 2:
|
|
177
|
-
switch key {
|
|
178
|
-
case "at": return FunctionCell_Double_to_String.scriptOrNil("", 1, self.at)
|
|
179
|
-
default: break
|
|
180
|
-
}
|
|
181
|
-
case 3:
|
|
182
|
-
switch key {
|
|
183
|
-
case "big": return FunctionCell_none_to_String.scriptOrNil("", 0, self.big)
|
|
184
|
-
case "sub": return FunctionCell_none_to_String.scriptOrNil("", 0, self.sub)
|
|
185
|
-
case "sup": return FunctionCell_none_to_String.scriptOrNil("", 0, self.sup)
|
|
186
|
-
default: break
|
|
187
|
-
}
|
|
188
|
-
case 4:
|
|
189
|
-
switch key {
|
|
190
|
-
case "trim": return FunctionCell_none_to_String.scriptOrNil("", 0, self.trim)
|
|
191
|
-
case "bold": return FunctionCell_none_to_String.scriptOrNil("", 0, self.bold)
|
|
192
|
-
case "link": return FunctionCell_String_to_String.scriptOrNil("", 1, self.link)
|
|
193
|
-
default: break
|
|
194
|
-
}
|
|
195
|
-
case 5:
|
|
196
|
-
switch key {
|
|
197
|
-
case "match": return FunctionCell_AnyOpt_to_JSMatchOpt.scriptOrNil("", 1, self.match)
|
|
198
|
-
case "slice": return FunctionCell_DoubleOpt_DoubleOpt_to_String.scriptOrNil("", 2, self.slice)
|
|
199
|
-
case "split": return FunctionCell_AnyOpt_DoubleOpt_to_JSArray_String_Opt.scriptOrNil("", 2, self.split)
|
|
200
|
-
case "blink": return FunctionCell_none_to_String.scriptOrNil("", 0, self.blink)
|
|
201
|
-
case "fixed": return FunctionCell_none_to_String.scriptOrNil("", 0, self.fixed)
|
|
202
|
-
case "small": return FunctionCell_none_to_String.scriptOrNil("", 0, self.small)
|
|
203
|
-
default: break
|
|
204
|
-
}
|
|
205
|
-
case 6:
|
|
206
|
-
switch key {
|
|
207
|
-
case "charAt": return FunctionCell_Double_to_String.scriptOrNil("", 1, self.charAt)
|
|
208
|
-
case "concat": return FunctionCell_JSArray_String_to_String.scriptOrNil("", 0, self.concat)
|
|
209
|
-
case "search": return FunctionCell_AnyOpt_to_Double.scriptOrNil("", 1, self.search)
|
|
210
|
-
case "length": return self.length
|
|
211
|
-
case "substr": return FunctionCell_Double_DoubleOpt_to_String.scriptOrNil("", 2, self.substr)
|
|
212
|
-
case "repeat": return FunctionCell_Double_to_String.scriptOrNil("", 1, self.`repeat`)
|
|
213
|
-
case "anchor": return FunctionCell_String_to_String.scriptOrNil("", 1, self.anchor)
|
|
214
|
-
case "strike": return FunctionCell_none_to_String.scriptOrNil("", 0, self.strike)
|
|
215
|
-
case "padEnd": return FunctionCell_Double_StringOpt_to_String.scriptOrNil("", 2, self.padEnd)
|
|
216
|
-
default: break
|
|
217
|
-
}
|
|
218
|
-
case 7:
|
|
219
|
-
switch key {
|
|
220
|
-
case "indexOf": return FunctionCell_String_DoubleOpt_to_Double.scriptOrNil("", 2, self.indexOf)
|
|
221
|
-
case "replace": return FunctionCell_AnyOpt_String_to_String.scriptOrNil("", 2, self.replace)
|
|
222
|
-
case "valueOf": return FunctionCell_none_to_String.scriptOrNil("", 0, self.valueOf)
|
|
223
|
-
case "italics": return FunctionCell_none_to_String.scriptOrNil("", 0, self.italics)
|
|
224
|
-
case "trimEnd": return FunctionCell_none_to_String.scriptOrNil("", 0, self.trimEnd)
|
|
225
|
-
default: break
|
|
226
|
-
}
|
|
227
|
-
case 8:
|
|
228
|
-
switch key {
|
|
229
|
-
case "toString": return FunctionCell_none_to_String.scriptOrNil("", 0, self.toString)
|
|
230
|
-
case "includes": return FunctionCell_String_DoubleOpt_to_Bool.scriptOrNil("", 2, self.includes)
|
|
231
|
-
case "endsWith": return FunctionCell_String_DoubleOpt_to_Bool.scriptOrNil("", 2, self.endsWith)
|
|
232
|
-
case "fontsize": return FunctionCell_Double_to_String.scriptOrNil("", 1, self.fontsize)
|
|
233
|
-
case "padStart": return FunctionCell_Double_StringOpt_to_String.scriptOrNil("", 2, self.padStart)
|
|
234
|
-
case "trimLeft": return FunctionCell_none_to_String.scriptOrNil("", 0, self.trimLeft)
|
|
235
|
-
case "matchAll":
|
|
236
|
-
return FunctionCell_JSRegExpOpt_to_JSArray_JSMatch_Opt.scriptOrNil("", 1, self.matchAll)
|
|
237
|
-
default: break
|
|
238
|
-
}
|
|
239
|
-
case 9:
|
|
240
|
-
switch key {
|
|
241
|
-
case "substring": return FunctionCell_Double_DoubleOpt_to_String.scriptOrNil("", 2, self.substring)
|
|
242
|
-
case "normalize": return FunctionCell_String_to_String.scriptOrNil("", 1, self.normalize)
|
|
243
|
-
case "fontcolor": return FunctionCell_String_to_String.scriptOrNil("", 1, self.fontcolor)
|
|
244
|
-
case "trimStart": return FunctionCell_none_to_String.scriptOrNil("", 0, self.trimStart)
|
|
245
|
-
case "trimRight": return FunctionCell_none_to_String.scriptOrNil("", 0, self.trimRight)
|
|
246
|
-
default: break
|
|
247
|
-
}
|
|
248
|
-
case 10:
|
|
249
|
-
switch key {
|
|
250
|
-
case "charCodeAt": return FunctionCell_Double_to_Double.scriptOrNil("", 1, self.charCodeAt)
|
|
251
|
-
case "startsWith": return FunctionCell_String_DoubleOpt_to_Bool.scriptOrNil("", 2, self.startsWith)
|
|
252
|
-
case "replaceAll": return FunctionCell_AnyOpt_String_to_String.scriptOrNil("", 2, self.replaceAll)
|
|
253
|
-
default: break
|
|
254
|
-
}
|
|
255
|
-
case 11:
|
|
256
|
-
switch key {
|
|
257
|
-
case "lastIndexOf": return FunctionCell_String_DoubleOpt_to_Double.scriptOrNil("", 2, self.lastIndexOf)
|
|
258
|
-
case "toLowerCase": return FunctionCell_none_to_String.scriptOrNil("", 0, self.toLowerCase)
|
|
259
|
-
case "toUpperCase": return FunctionCell_none_to_String.scriptOrNil("", 0, self.toUpperCase)
|
|
260
|
-
case "codePointAt": return FunctionCell_Double_to_Double.scriptOrNil("", 1, self.codePointAt)
|
|
261
|
-
default: break
|
|
262
|
-
}
|
|
263
|
-
case 13:
|
|
264
|
-
switch key {
|
|
265
|
-
case "localeCompare": return FunctionCell_String_to_Double.scriptOrNil("", 1, self.localeCompare)
|
|
266
|
-
default: break
|
|
267
|
-
}
|
|
268
|
-
case 17:
|
|
269
|
-
switch key {
|
|
270
|
-
case "toLocaleLowerCase":
|
|
271
|
-
return FunctionCell_AnyOpt_to_String.scriptOrNil("", 1, self.toLocaleLowerCase)
|
|
272
|
-
case "toLocaleUpperCase":
|
|
273
|
-
return FunctionCell_AnyOpt_to_String.scriptOrNil("", 1, self.toLocaleUpperCase)
|
|
274
|
-
default: break
|
|
275
|
-
}
|
|
276
|
-
default: break
|
|
277
|
-
}
|
|
278
|
-
return nil
|
|
279
|
-
}
|
|
280
|
-
set {
|
|
281
|
-
switch key.utf8.count {
|
|
282
|
-
case 2:
|
|
283
|
-
switch key {
|
|
284
|
-
case "at":
|
|
285
|
-
self.at = FunctionCell_Double_to_String.fromScriptOrNil(newValue)
|
|
286
|
-
return
|
|
287
|
-
default: break
|
|
288
|
-
}
|
|
289
|
-
case 3:
|
|
290
|
-
switch key {
|
|
291
|
-
case "big":
|
|
292
|
-
self.big = FunctionCell_none_to_String.fromScriptOrNil(newValue)
|
|
293
|
-
return
|
|
294
|
-
case "sub":
|
|
295
|
-
self.sub = FunctionCell_none_to_String.fromScriptOrNil(newValue)
|
|
296
|
-
return
|
|
297
|
-
case "sup":
|
|
298
|
-
self.sup = FunctionCell_none_to_String.fromScriptOrNil(newValue)
|
|
299
|
-
return
|
|
300
|
-
default: break
|
|
301
|
-
}
|
|
302
|
-
case 4:
|
|
303
|
-
switch key {
|
|
304
|
-
case "trim":
|
|
305
|
-
self.trim = FunctionCell_none_to_String.fromScriptOrNil(newValue)
|
|
306
|
-
return
|
|
307
|
-
case "bold":
|
|
308
|
-
self.bold = FunctionCell_none_to_String.fromScriptOrNil(newValue)
|
|
309
|
-
return
|
|
310
|
-
case "link":
|
|
311
|
-
self.link = FunctionCell_String_to_String.fromScriptOrNil(newValue)
|
|
312
|
-
return
|
|
313
|
-
default: break
|
|
314
|
-
}
|
|
315
|
-
case 5:
|
|
316
|
-
switch key {
|
|
317
|
-
case "match":
|
|
318
|
-
self.match = FunctionCell_AnyOpt_to_JSMatch.fromScriptOrNil(newValue)
|
|
319
|
-
return
|
|
320
|
-
case "slice":
|
|
321
|
-
self.slice = FunctionCell_DoubleOpt_DoubleOpt_to_String.fromScriptOrNil(newValue)
|
|
322
|
-
return
|
|
323
|
-
case "split":
|
|
324
|
-
self.split = FunctionCell_AnyOpt_DoubleOpt_to_JSArray_String.fromScriptOrNil(newValue)
|
|
325
|
-
return
|
|
326
|
-
case "blink":
|
|
327
|
-
self.blink = FunctionCell_none_to_String.fromScriptOrNil(newValue)
|
|
328
|
-
return
|
|
329
|
-
case "fixed":
|
|
330
|
-
self.fixed = FunctionCell_none_to_String.fromScriptOrNil(newValue)
|
|
331
|
-
return
|
|
332
|
-
case "small":
|
|
333
|
-
self.small = FunctionCell_none_to_String.fromScriptOrNil(newValue)
|
|
334
|
-
return
|
|
335
|
-
default: break
|
|
336
|
-
}
|
|
337
|
-
case 6:
|
|
338
|
-
switch key {
|
|
339
|
-
case "charAt":
|
|
340
|
-
self.charAt = FunctionCell_Double_to_String.fromScriptOrNil(newValue)
|
|
341
|
-
return
|
|
342
|
-
case "concat":
|
|
343
|
-
self.concat = FunctionCell_JSArray_String_to_String.fromScriptOrNil(newValue)
|
|
344
|
-
return
|
|
345
|
-
case "search":
|
|
346
|
-
self.search = FunctionCell_AnyOpt_to_Double.fromScriptOrNil(newValue)
|
|
347
|
-
return
|
|
348
|
-
case "length":
|
|
349
|
-
jsStoring { self.length = (try jsConvertedNumber(newValue)) }
|
|
350
|
-
return
|
|
351
|
-
case "substr":
|
|
352
|
-
self.substr = FunctionCell_Double_DoubleOpt_to_String.fromScriptOrNil(newValue)
|
|
353
|
-
return
|
|
354
|
-
case "repeat":
|
|
355
|
-
self.`repeat` = FunctionCell_Double_to_String.fromScriptOrNil(newValue)
|
|
356
|
-
return
|
|
357
|
-
case "anchor":
|
|
358
|
-
self.anchor = FunctionCell_String_to_String.fromScriptOrNil(newValue)
|
|
359
|
-
return
|
|
360
|
-
case "strike":
|
|
361
|
-
self.strike = FunctionCell_none_to_String.fromScriptOrNil(newValue)
|
|
362
|
-
return
|
|
363
|
-
case "padEnd":
|
|
364
|
-
self.padEnd = FunctionCell_Double_StringOpt_to_String.fromScriptOrNil(newValue)
|
|
365
|
-
return
|
|
366
|
-
default: break
|
|
367
|
-
}
|
|
368
|
-
case 7:
|
|
369
|
-
switch key {
|
|
370
|
-
case "indexOf":
|
|
371
|
-
self.indexOf = FunctionCell_String_DoubleOpt_to_Double.fromScriptOrNil(newValue)
|
|
372
|
-
return
|
|
373
|
-
case "replace":
|
|
374
|
-
self.replace = FunctionCell_AnyOpt_String_to_String.fromScriptOrNil(newValue)
|
|
375
|
-
return
|
|
376
|
-
case "valueOf":
|
|
377
|
-
self.valueOf = FunctionCell_none_to_String.fromScriptOrNil(newValue)
|
|
378
|
-
return
|
|
379
|
-
case "italics":
|
|
380
|
-
self.italics = FunctionCell_none_to_String.fromScriptOrNil(newValue)
|
|
381
|
-
return
|
|
382
|
-
case "trimEnd":
|
|
383
|
-
self.trimEnd = FunctionCell_none_to_String.fromScriptOrNil(newValue)
|
|
384
|
-
return
|
|
385
|
-
default: break
|
|
386
|
-
}
|
|
387
|
-
case 8:
|
|
388
|
-
switch key {
|
|
389
|
-
case "toString":
|
|
390
|
-
self.toString = FunctionCell_none_to_String.fromScriptOrNil(newValue)
|
|
391
|
-
return
|
|
392
|
-
case "includes":
|
|
393
|
-
self.includes = FunctionCell_String_DoubleOpt_to_Bool.fromScriptOrNil(newValue)
|
|
394
|
-
return
|
|
395
|
-
case "endsWith":
|
|
396
|
-
self.endsWith = FunctionCell_String_DoubleOpt_to_Bool.fromScriptOrNil(newValue)
|
|
397
|
-
return
|
|
398
|
-
case "fontsize":
|
|
399
|
-
self.fontsize = FunctionCell_Double_to_String.fromScriptOrNil(newValue)
|
|
400
|
-
return
|
|
401
|
-
case "padStart":
|
|
402
|
-
self.padStart = FunctionCell_Double_StringOpt_to_String.fromScriptOrNil(newValue)
|
|
403
|
-
return
|
|
404
|
-
case "trimLeft":
|
|
405
|
-
self.trimLeft = FunctionCell_none_to_String.fromScriptOrNil(newValue)
|
|
406
|
-
return
|
|
407
|
-
case "matchAll":
|
|
408
|
-
self.matchAll = FunctionCell_JSRegExpOpt_to_JSArray_JSMatch.fromScriptOrNil(newValue)
|
|
409
|
-
return
|
|
410
|
-
default: break
|
|
411
|
-
}
|
|
412
|
-
case 9:
|
|
413
|
-
switch key {
|
|
414
|
-
case "substring":
|
|
415
|
-
self.substring = FunctionCell_Double_DoubleOpt_to_String.fromScriptOrNil(newValue)
|
|
416
|
-
return
|
|
417
|
-
case "normalize":
|
|
418
|
-
self.normalize = FunctionCell_String_to_String.fromScriptOrNil(newValue)
|
|
419
|
-
return
|
|
420
|
-
case "fontcolor":
|
|
421
|
-
self.fontcolor = FunctionCell_String_to_String.fromScriptOrNil(newValue)
|
|
422
|
-
return
|
|
423
|
-
case "trimStart":
|
|
424
|
-
self.trimStart = FunctionCell_none_to_String.fromScriptOrNil(newValue)
|
|
425
|
-
return
|
|
426
|
-
case "trimRight":
|
|
427
|
-
self.trimRight = FunctionCell_none_to_String.fromScriptOrNil(newValue)
|
|
428
|
-
return
|
|
429
|
-
default: break
|
|
430
|
-
}
|
|
431
|
-
case 10:
|
|
432
|
-
switch key {
|
|
433
|
-
case "charCodeAt":
|
|
434
|
-
self.charCodeAt = FunctionCell_Double_to_Double.fromScriptOrNil(newValue)
|
|
435
|
-
return
|
|
436
|
-
case "startsWith":
|
|
437
|
-
self.startsWith = FunctionCell_String_DoubleOpt_to_Bool.fromScriptOrNil(newValue)
|
|
438
|
-
return
|
|
439
|
-
case "replaceAll":
|
|
440
|
-
self.replaceAll = FunctionCell_AnyOpt_String_to_String.fromScriptOrNil(newValue)
|
|
441
|
-
return
|
|
442
|
-
default: break
|
|
443
|
-
}
|
|
444
|
-
case 11:
|
|
445
|
-
switch key {
|
|
446
|
-
case "lastIndexOf":
|
|
447
|
-
self.lastIndexOf = FunctionCell_String_DoubleOpt_to_Double.fromScriptOrNil(newValue)
|
|
448
|
-
return
|
|
449
|
-
case "toLowerCase":
|
|
450
|
-
self.toLowerCase = FunctionCell_none_to_String.fromScriptOrNil(newValue)
|
|
451
|
-
return
|
|
452
|
-
case "toUpperCase":
|
|
453
|
-
self.toUpperCase = FunctionCell_none_to_String.fromScriptOrNil(newValue)
|
|
454
|
-
return
|
|
455
|
-
case "codePointAt":
|
|
456
|
-
self.codePointAt = FunctionCell_Double_to_Double.fromScriptOrNil(newValue)
|
|
457
|
-
return
|
|
458
|
-
default: break
|
|
459
|
-
}
|
|
460
|
-
case 13:
|
|
461
|
-
switch key {
|
|
462
|
-
case "localeCompare":
|
|
463
|
-
self.localeCompare = FunctionCell_String_to_Double.fromScriptOrNil(newValue)
|
|
464
|
-
return
|
|
465
|
-
default: break
|
|
466
|
-
}
|
|
467
|
-
case 17:
|
|
468
|
-
switch key {
|
|
469
|
-
case "toLocaleLowerCase":
|
|
470
|
-
self.toLocaleLowerCase = FunctionCell_AnyOpt_to_String.fromScriptOrNil(newValue)
|
|
471
|
-
return
|
|
472
|
-
case "toLocaleUpperCase":
|
|
473
|
-
self.toLocaleUpperCase = FunctionCell_AnyOpt_to_String.fromScriptOrNil(newValue)
|
|
474
|
-
return
|
|
475
|
-
default: break
|
|
476
|
-
}
|
|
477
|
-
default: break
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
}
|