@breakside/jskit 2023.12.2 → 2023.14.0
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/Frameworks/DOM.jsframework/Info.json +2 -2
- package/Frameworks/DOM.jsframework/JS/DOM+HTML.js +14 -11
- package/Frameworks/DOM.jsframework/JS/DOMDocument.js +11 -0
- package/Frameworks/DOM.jsframework/io.breakside.JSKit.DOM-bundle.js +2 -2
- package/Frameworks/DOM.jsframework/sources.json +3 -1
- package/Frameworks/FontKit.jsframework/Info.json +2 -2
- package/Frameworks/FontKit.jsframework/io.breakside.JSKit.FontKit-bundle.js +2 -2
- package/Frameworks/Foundation.jsframework/Info.json +2 -2
- package/Frameworks/Foundation.jsframework/JS/JSGradient.js +55 -0
- package/Frameworks/Foundation.jsframework/io.breakside.JSKit.Foundation-bundle.js +2 -2
- package/Frameworks/SecurityKit.jsframework/Info.json +2 -2
- package/Frameworks/SecurityKit.jsframework/io.breakside.JSKit.SecurityKit-bundle.js +2 -2
- package/Info.json +2 -2
- package/Node/HTMLBuilder.js +45 -1
- package/Node/io.breakside.jskit-bundle.js +2 -2
- package/Root/Frameworks/APIKit/Info.yaml +1 -1
- package/Root/Frameworks/APIKitTesting/Info.yaml +1 -1
- package/Root/Frameworks/AuthKit/Info.yaml +1 -1
- package/Root/Frameworks/CSSOM/Info.yaml +1 -1
- package/Root/Frameworks/ChartKit/Info.yaml +1 -1
- package/Root/Frameworks/ConferenceKit/Info.yaml +1 -1
- package/Root/Frameworks/DBKit/Info.yaml +1 -1
- package/Root/Frameworks/DOM/DOM+HTML.js +14 -11
- package/Root/Frameworks/DOM/DOMDocument.js +11 -0
- package/Root/Frameworks/DOM/Info.yaml +1 -1
- package/Root/Frameworks/Dispatch/Info.yaml +1 -1
- package/Root/Frameworks/FontKit/Info.yaml +1 -1
- package/Root/Frameworks/Foundation/Info.yaml +1 -1
- package/Root/Frameworks/Foundation/JSGradient.js +55 -0
- package/Root/Frameworks/ImageKit/Info.yaml +1 -1
- package/Root/Frameworks/MediaKit/Info.yaml +1 -1
- package/Root/Frameworks/MediaKitUI/Info.yaml +1 -1
- package/Root/Frameworks/NotificationKit/Info.yaml +1 -1
- package/Root/Frameworks/PDFKit/Info.yaml +1 -1
- package/Root/Frameworks/QRKit/Info.yaml +1 -1
- package/Root/Frameworks/SearchKit/Info.yaml +1 -1
- package/Root/Frameworks/SecurityKit/Info.yaml +1 -1
- package/Root/Frameworks/ServerKit/Info.yaml +1 -1
- package/Root/Frameworks/ServerKitTesting/Info.yaml +1 -1
- package/Root/Frameworks/TestKit/Info.yaml +1 -1
- package/Root/Frameworks/UIKit/Info.yaml +1 -1
- package/Root/Frameworks/UIKit/UIHTMLContentEditableTextInputManager.js +164 -151
- package/Root/Frameworks/UIKit/UIHTMLTextLine.js +45 -25
- package/Root/Frameworks/UIKit/UIHTMLTextRun.js +7 -2
- package/Root/Frameworks/UIKit/UIHTMLTextTypesetter.js +9 -3
- package/Root/Frameworks/UIKit/UIHTMLWindowServer.js +1 -0
- package/Root/Frameworks/UIKit/UIWindow.js +9 -1
- package/Root/Frameworks/UIKit/UIWindowServer.js +2 -2
- package/Root/Frameworks/UIKitTesting/Info.yaml +1 -1
- package/Root/Templates/html/${PROJECT_NAME}/conf/debug/nginx.conf +4 -0
- package/Root/Templates/html/${PROJECT_NAME}/conf/release/nginx.conf +4 -0
- package/package.json +1 -1
|
@@ -247,9 +247,14 @@ JSClass("UIHTMLTextRun", JSTextRun, {
|
|
|
247
247
|
|
|
248
248
|
recalculateRange: function(offset){
|
|
249
249
|
var diff = 0;
|
|
250
|
+
var length = 0;
|
|
250
251
|
if (this.textNode){
|
|
251
|
-
|
|
252
|
-
|
|
252
|
+
length = this.textNode.nodeValue.length;
|
|
253
|
+
if (length > 0 && this.textNode.nodeValue[length - 1] === 0x200B){
|
|
254
|
+
length -= 1;
|
|
255
|
+
}
|
|
256
|
+
diff = length - this._range.length;
|
|
257
|
+
this._range = JSRange(this._range.location + offset, length);
|
|
253
258
|
}else{
|
|
254
259
|
this._range = JSRange(this._range.location + offset, this._range.length);
|
|
255
260
|
}
|
|
@@ -125,8 +125,12 @@ JSClass("UIHTMLTextTypesetter", JSTextTypesetter, {
|
|
|
125
125
|
var attributes = this._attributedString.attributesAtIndex(range.location);
|
|
126
126
|
attributes = this.resolveAttributes(attributes);
|
|
127
127
|
var font = attributes.font || null;
|
|
128
|
-
var
|
|
129
|
-
|
|
128
|
+
var span = this._createRunElement();
|
|
129
|
+
span.appendChild(span.ownerDocument.createTextNode("\u200B"));
|
|
130
|
+
this._styleTextElementWithAttributes(span, attributes, font);
|
|
131
|
+
var div = this._createLineElement();
|
|
132
|
+
var emptyRun = UIHTMLTextRun.initWithElement(span, font, attributes, range);
|
|
133
|
+
return UIHTMLTextLine.initWithElement(div, [emptyRun], 0, [], this.canvasContext);
|
|
130
134
|
},
|
|
131
135
|
|
|
132
136
|
_createLineFromHTMLLayout: function(layout){
|
|
@@ -136,6 +140,7 @@ JSClass("UIHTMLTextTypesetter", JSTextTypesetter, {
|
|
|
136
140
|
var runDescriptor;
|
|
137
141
|
var span;
|
|
138
142
|
var attachmentRuns = [];
|
|
143
|
+
var endsWithMandatoryLineBreak = false;
|
|
139
144
|
for (var i = 0, l = layout.runDescriptors.length; i < l; ++i){
|
|
140
145
|
runDescriptor = layout.runDescriptors[i];
|
|
141
146
|
span = this._createRunElement();
|
|
@@ -150,6 +155,7 @@ JSClass("UIHTMLTextTypesetter", JSTextTypesetter, {
|
|
|
150
155
|
}else{
|
|
151
156
|
span.appendChild(span.ownerDocument.createTextNode(utf16));
|
|
152
157
|
}
|
|
158
|
+
endsWithMandatoryLineBreak = utf16.userPerceivedCharacterIterator(utf16.length - 1).isMandatoryLineBreak;
|
|
153
159
|
}else{
|
|
154
160
|
this._styleAttachmentElementWithAttributes(span, runDescriptor.attributes, runDescriptor.attachment);
|
|
155
161
|
if (span.childNodes.length > 0){
|
|
@@ -169,7 +175,7 @@ JSClass("UIHTMLTextTypesetter", JSTextTypesetter, {
|
|
|
169
175
|
return this._createEmptyHTMLLine(layout.range);
|
|
170
176
|
}
|
|
171
177
|
var div = this._createLineElement();
|
|
172
|
-
return UIHTMLTextLine.initWithElement(div, runs, layout.trailingWhitespaceWidth, attachmentRuns, this.canvasContext);
|
|
178
|
+
return UIHTMLTextLine.initWithElement(div, runs, layout.trailingWhitespaceWidth, attachmentRuns, this.canvasContext, endsWithMandatoryLineBreak);
|
|
173
179
|
},
|
|
174
180
|
|
|
175
181
|
_styleTextElementWithAttributes: function(span, attributes, font){
|
|
@@ -600,6 +600,7 @@ JSClass("UIHTMLWindowServer", UIWindowServer, {
|
|
|
600
600
|
touchend: function(e){
|
|
601
601
|
e.preventDefault();
|
|
602
602
|
this._createTouchEventFromDOMEvent(e, UIEvent.Type.touchesEnded);
|
|
603
|
+
this.textInputManager._ensureCorrectFocus();
|
|
603
604
|
},
|
|
604
605
|
|
|
605
606
|
touchcancel: function(e){
|
|
@@ -795,6 +795,9 @@ JSClass('UIWindow', UIView, {
|
|
|
795
795
|
if (this.mouseTrackingViews === null || this.mouseTrackingViews.length === 0){
|
|
796
796
|
return;
|
|
797
797
|
}
|
|
798
|
+
if (this._modal !== null){
|
|
799
|
+
return;
|
|
800
|
+
}
|
|
798
801
|
var view;
|
|
799
802
|
var area;
|
|
800
803
|
var viewIndex, viewCount;
|
|
@@ -901,6 +904,9 @@ JSClass('UIWindow', UIView, {
|
|
|
901
904
|
while (modal !== null && modal._modal !== null){
|
|
902
905
|
modal = modal._modal;
|
|
903
906
|
}
|
|
907
|
+
if (this.mouseEventView !== null && this.mouseEventView.window !== this){
|
|
908
|
+
this.mouseEventView = null;
|
|
909
|
+
}
|
|
904
910
|
if (modal !== null){
|
|
905
911
|
this.mouseEventView = null;
|
|
906
912
|
if (event.type == UIEvent.Type.mouseEntered || event.type == UIEvent.Type.mouseExited || event.type == UIEvent.mouseMoved){
|
|
@@ -925,7 +931,9 @@ JSClass('UIWindow', UIView, {
|
|
|
925
931
|
}
|
|
926
932
|
switch (event.type){
|
|
927
933
|
case UIEvent.Type.leftMouseDown:
|
|
928
|
-
this.
|
|
934
|
+
if (this._isOpen){
|
|
935
|
+
this.makeKeyAndOrderFront();
|
|
936
|
+
}
|
|
929
937
|
eventTarget.mouseDown(event);
|
|
930
938
|
this._validateToolbar();
|
|
931
939
|
break;
|
|
@@ -422,7 +422,7 @@ JSClass("UIWindowServer", JSObject, {
|
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
424
|
if (shouldHideTooltip){
|
|
425
|
-
if (view !== null && view.tooltip !== null){
|
|
425
|
+
if (view !== null && view.tooltip !== null && view.tooltip !== ""){
|
|
426
426
|
this.showTooltipForView(view, this.mouseLocation);
|
|
427
427
|
}else{
|
|
428
428
|
this._scheduleHideTooltip();
|
|
@@ -726,7 +726,7 @@ JSClass("UIWindowServer", JSObject, {
|
|
|
726
726
|
var event;
|
|
727
727
|
for (windowIndex = this.windowStack.length - 1; windowIndex >= 0 && window === null; --windowIndex){
|
|
728
728
|
location = this.windowStack[windowIndex].convertPointFromScreen(this.mouseLocation);
|
|
729
|
-
if (this.windowStack[windowIndex].userInteractionEnabled && this.windowStack[windowIndex].containsPoint(location)){
|
|
729
|
+
if (this.windowStack[windowIndex].userInteractionEnabled && (this.windowStack[windowIndex].containsPoint(location) || this.windowStack[windowIndex].receivesAllEvents)){
|
|
730
730
|
window = this.windowStack[windowIndex];
|
|
731
731
|
}
|
|
732
732
|
}
|
|
@@ -36,6 +36,8 @@ http {
|
|
|
36
36
|
gzip on;
|
|
37
37
|
gzip_types text/css application/javascript application/json text/xml text/plain image/svg+xml text/cache-manifest application/x-font-ttf;
|
|
38
38
|
|
|
39
|
+
absolute_redirect off;
|
|
40
|
+
|
|
39
41
|
server {
|
|
40
42
|
listen *:{{HTTP_PORT}}{{SSL_LISTEN}};
|
|
41
43
|
{{SSL_CERT}}
|
|
@@ -76,6 +78,8 @@ http {
|
|
|
76
78
|
return 200;
|
|
77
79
|
}
|
|
78
80
|
|
|
81
|
+
{{STATE_PATH_REDIRECTS}}
|
|
82
|
+
|
|
79
83
|
location /Resources {
|
|
80
84
|
expires max;
|
|
81
85
|
}
|
|
@@ -36,6 +36,8 @@ http {
|
|
|
36
36
|
gzip on;
|
|
37
37
|
gzip_types text/css application/javascript application/json text/xml text/plain image/svg+xml text/cache-manifest application/x-font-ttf;
|
|
38
38
|
|
|
39
|
+
absolute_redirect off;
|
|
40
|
+
|
|
39
41
|
server {
|
|
40
42
|
listen *:{{HTTP_PORT}};
|
|
41
43
|
server_name "";
|
|
@@ -77,6 +79,8 @@ http {
|
|
|
77
79
|
return 200;
|
|
78
80
|
}
|
|
79
81
|
|
|
82
|
+
{{STATE_PATH_REDIRECTS}}
|
|
83
|
+
|
|
80
84
|
location / {
|
|
81
85
|
# REQUIRED to eliminate extra requests for everything else
|
|
82
86
|
expires max;
|