jaxs 0.2.1 → 0.3.1
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/cypress/jaxs-apps/add-remove-nested-children.jsx +2 -1
- package/cypress/jaxs-apps/add-remove-root-children.jsx +2 -1
- package/cypress/jaxs-apps/dist/add-remove-nested-children.afcab974.js +316 -11
- package/cypress/jaxs-apps/dist/add-remove-nested-children.afcab974.js.map +1 -1
- package/cypress/jaxs-apps/dist/add-remove-root-children.3bb9b3f5.js +51 -104
- package/cypress/jaxs-apps/dist/add-remove-root-children.3bb9b3f5.js.map +1 -1
- package/cypress/jaxs-apps/dist/add-remove-root-children.fbb4ec9b.js +318 -13
- package/cypress/jaxs-apps/dist/add-remove-root-children.fbb4ec9b.js.map +1 -1
- package/cypress/jaxs-apps/dist/svg.04290504.js.map +1 -1
- package/cypress/jaxs-apps/svg.jsx +5 -5
- package/dist/jaxs.js +41 -91
- package/package.json +1 -1
- package/src/debugging.js +3 -3
- package/src/jaxs.ts +0 -1
- package/src/rendering/change/instructions/attributes.ts +4 -1
- package/src/rendering/change/instructions/children.ts +22 -23
- package/src/rendering/change/instructions/element.ts +7 -0
- package/src/rendering/change/instructions/node.ts +19 -2
- package/src/rendering/change.ts +17 -9
- package/src/rendering/dom/svg.ts +5 -3
- package/src/rendering/templates/bound.js +2 -1
- package/src/types.ts +3 -1
|
@@ -585,7 +585,8 @@ parcelHelpers.export(exports, "onInput", ()=>onInput);
|
|
|
585
585
|
parcelHelpers.export(exports, "onFocus", ()=>onFocus);
|
|
586
586
|
parcelHelpers.export(exports, "onBlur", ()=>onBlur);
|
|
587
587
|
var _jaxsJs = require("../../dist/jaxs.js");
|
|
588
|
-
|
|
588
|
+
var _viewsJs = require("../../src/views.js");
|
|
589
|
+
const { If } = (0, _viewsJs.views);
|
|
589
590
|
const app = (0, _jaxsJs.createApp)();
|
|
590
591
|
app.state.create("form", {
|
|
591
592
|
email: "",
|
|
@@ -620,21 +621,21 @@ const FormTemplate = ({ email, emailValidation, emailInvalid })=>{
|
|
|
620
621
|
return /*#__PURE__*/ (0, _jaxsJs.jsx)("form", {
|
|
621
622
|
__source: {
|
|
622
623
|
fileName: "cypress/jaxs-apps/add-remove-nested-children.jsx",
|
|
623
|
-
lineNumber:
|
|
624
|
+
lineNumber: 45,
|
|
624
625
|
columnNumber: 5
|
|
625
626
|
},
|
|
626
627
|
__self: undefined
|
|
627
628
|
}, /*#__PURE__*/ (0, _jaxsJs.jsx)("div", {
|
|
628
629
|
__source: {
|
|
629
630
|
fileName: "cypress/jaxs-apps/add-remove-nested-children.jsx",
|
|
630
|
-
lineNumber:
|
|
631
|
+
lineNumber: 46,
|
|
631
632
|
columnNumber: 7
|
|
632
633
|
},
|
|
633
634
|
__self: undefined
|
|
634
635
|
}, /*#__PURE__*/ (0, _jaxsJs.jsx)("p", {
|
|
635
636
|
__source: {
|
|
636
637
|
fileName: "cypress/jaxs-apps/add-remove-nested-children.jsx",
|
|
637
|
-
lineNumber:
|
|
638
|
+
lineNumber: 47,
|
|
638
639
|
columnNumber: 9
|
|
639
640
|
},
|
|
640
641
|
__self: undefined
|
|
@@ -642,7 +643,7 @@ const FormTemplate = ({ email, emailValidation, emailInvalid })=>{
|
|
|
642
643
|
for: "email",
|
|
643
644
|
__source: {
|
|
644
645
|
fileName: "cypress/jaxs-apps/add-remove-nested-children.jsx",
|
|
645
|
-
lineNumber:
|
|
646
|
+
lineNumber: 48,
|
|
646
647
|
columnNumber: 11
|
|
647
648
|
},
|
|
648
649
|
__self: undefined
|
|
@@ -650,7 +651,7 @@ const FormTemplate = ({ email, emailValidation, emailInvalid })=>{
|
|
|
650
651
|
condition: emailInvalid,
|
|
651
652
|
__source: {
|
|
652
653
|
fileName: "cypress/jaxs-apps/add-remove-nested-children.jsx",
|
|
653
|
-
lineNumber:
|
|
654
|
+
lineNumber: 50,
|
|
654
655
|
columnNumber: 9
|
|
655
656
|
},
|
|
656
657
|
__self: undefined
|
|
@@ -658,7 +659,7 @@ const FormTemplate = ({ email, emailValidation, emailInvalid })=>{
|
|
|
658
659
|
class: "validation-error",
|
|
659
660
|
__source: {
|
|
660
661
|
fileName: "cypress/jaxs-apps/add-remove-nested-children.jsx",
|
|
661
|
-
lineNumber:
|
|
662
|
+
lineNumber: 51,
|
|
662
663
|
columnNumber: 11
|
|
663
664
|
},
|
|
664
665
|
__self: undefined
|
|
@@ -671,7 +672,7 @@ const FormTemplate = ({ email, emailValidation, emailInvalid })=>{
|
|
|
671
672
|
onFocus: "onFocus",
|
|
672
673
|
__source: {
|
|
673
674
|
fileName: "cypress/jaxs-apps/add-remove-nested-children.jsx",
|
|
674
|
-
lineNumber:
|
|
675
|
+
lineNumber: 53,
|
|
675
676
|
columnNumber: 9
|
|
676
677
|
},
|
|
677
678
|
__self: undefined
|
|
@@ -681,7 +682,7 @@ const FormTemplate = ({ email, emailValidation, emailInvalid })=>{
|
|
|
681
682
|
class: "button-primary mt-6",
|
|
682
683
|
__source: {
|
|
683
684
|
fileName: "cypress/jaxs-apps/add-remove-nested-children.jsx",
|
|
684
|
-
lineNumber:
|
|
685
|
+
lineNumber: 63,
|
|
685
686
|
columnNumber: 7
|
|
686
687
|
},
|
|
687
688
|
__self: undefined
|
|
@@ -706,12 +707,316 @@ app.subscribe("onBlur", onBlur);
|
|
|
706
707
|
app.render(/*#__PURE__*/ (0, _jaxsJs.jsx)(Form, {
|
|
707
708
|
__source: {
|
|
708
709
|
fileName: "cypress/jaxs-apps/add-remove-nested-children.jsx",
|
|
709
|
-
lineNumber:
|
|
710
|
+
lineNumber: 85,
|
|
710
711
|
columnNumber: 12
|
|
711
712
|
},
|
|
712
713
|
__self: undefined
|
|
713
714
|
}), "#app");
|
|
714
715
|
|
|
715
|
-
},{"../../dist/jaxs.js":"bAfYR","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"
|
|
716
|
+
},{"../../dist/jaxs.js":"bAfYR","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3","../../src/views.js":"1F1Bq"}],"1F1Bq":[function(require,module,exports) {
|
|
717
|
+
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
|
718
|
+
parcelHelpers.defineInteropFlag(exports);
|
|
719
|
+
parcelHelpers.export(exports, "views", ()=>views);
|
|
720
|
+
var _conditionalsJsx = require("./views/conditionals.jsx");
|
|
721
|
+
var _linkJsx = require("./views/link.jsx");
|
|
722
|
+
const views = {
|
|
723
|
+
..._conditionalsJsx,
|
|
724
|
+
Link: (0, _linkJsx.Link)
|
|
725
|
+
};
|
|
726
|
+
|
|
727
|
+
},{"./views/conditionals.jsx":"7Zl6n","./views/link.jsx":"4T9d8","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}],"7Zl6n":[function(require,module,exports) {
|
|
728
|
+
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
|
729
|
+
parcelHelpers.defineInteropFlag(exports);
|
|
730
|
+
parcelHelpers.export(exports, "If", ()=>If);
|
|
731
|
+
parcelHelpers.export(exports, "Unless", ()=>Unless);
|
|
732
|
+
parcelHelpers.export(exports, "IfElse", ()=>IfElse);
|
|
733
|
+
var _jsx = require("../jsx");
|
|
734
|
+
var _jsxDefault = parcelHelpers.interopDefault(_jsx);
|
|
735
|
+
const If = ({ condition, children })=>{
|
|
736
|
+
if (!condition) return;
|
|
737
|
+
return /*#__PURE__*/ (0, _jsxDefault.default)((0, _jsxDefault.default).fragment, null, children);
|
|
738
|
+
};
|
|
739
|
+
const Unless = ({ condition, children })=>{
|
|
740
|
+
if (condition) return;
|
|
741
|
+
return /*#__PURE__*/ (0, _jsxDefault.default)((0, _jsxDefault.default).fragment, null, children);
|
|
742
|
+
};
|
|
743
|
+
const IfElse = ({ condition, children })=>{
|
|
744
|
+
const [first, ...rest] = children;
|
|
745
|
+
if (condition) return /*#__PURE__*/ (0, _jsxDefault.default)((0, _jsxDefault.default).fragment, null, first);
|
|
746
|
+
return /*#__PURE__*/ (0, _jsxDefault.default)((0, _jsxDefault.default).fragment, null, rest);
|
|
747
|
+
};
|
|
748
|
+
|
|
749
|
+
},{"../jsx":"ec42s","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}],"ec42s":[function(require,module,exports) {
|
|
750
|
+
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
|
751
|
+
parcelHelpers.defineInteropFlag(exports);
|
|
752
|
+
var _tag = require("./rendering/templates/tag");
|
|
753
|
+
var _children = require("./rendering/templates/children");
|
|
754
|
+
const ensureChildrenArray = (maybeChildren, attributes)=>maybeChildren || attributes.children || [];
|
|
755
|
+
const packageAttributes = (maybeAttributes, maybeChildren)=>{
|
|
756
|
+
const attributes = maybeAttributes || {};
|
|
757
|
+
const children = ensureChildrenArray(maybeChildren, attributes);
|
|
758
|
+
attributes.children = attributes.children || children;
|
|
759
|
+
return attributes;
|
|
760
|
+
};
|
|
761
|
+
const jsx = (type, attributes, ...children)=>{
|
|
762
|
+
if (typeof type === "string") return new (0, _tag.Tag)(type, attributes, children);
|
|
763
|
+
return type(packageAttributes(attributes, children));
|
|
764
|
+
};
|
|
765
|
+
jsx.fragment = (attributes, maybeChildren)=>{
|
|
766
|
+
const children = ensureChildrenArray(maybeChildren, attributes);
|
|
767
|
+
return new (0, _children.Children)(children);
|
|
768
|
+
};
|
|
769
|
+
exports.default = jsx;
|
|
770
|
+
|
|
771
|
+
},{"./rendering/templates/tag":"3X63B","./rendering/templates/children":"gKMx0","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}],"3X63B":[function(require,module,exports) {
|
|
772
|
+
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
|
773
|
+
parcelHelpers.defineInteropFlag(exports);
|
|
774
|
+
parcelHelpers.export(exports, "Tag", ()=>Tag);
|
|
775
|
+
var _create = require("../dom/create");
|
|
776
|
+
var _attributesAndEvents = require("../dom/attributesAndEvents");
|
|
777
|
+
var _svg = require("../dom/svg");
|
|
778
|
+
var _children = require("./children");
|
|
779
|
+
class Tag {
|
|
780
|
+
constructor(tagType, combinedAttributes, children, isSvg = false){
|
|
781
|
+
this.type = tagType;
|
|
782
|
+
const { events, attributes } = (0, _attributesAndEvents.separateAttrsAndEvents)(combinedAttributes);
|
|
783
|
+
this.events = events;
|
|
784
|
+
this.attributes = attributes;
|
|
785
|
+
this.isSvg = isSvg || (0, _svg.isSvgTag)(this.type);
|
|
786
|
+
this.children = new (0, _children.Children)(children, this.isSvg);
|
|
787
|
+
}
|
|
788
|
+
render(renderKit) {
|
|
789
|
+
const dom = this.generateDom(renderKit);
|
|
790
|
+
if (!dom) return [];
|
|
791
|
+
this.children.render(renderKit, dom);
|
|
792
|
+
return [
|
|
793
|
+
dom
|
|
794
|
+
];
|
|
795
|
+
}
|
|
796
|
+
generateDom(renderKit) {
|
|
797
|
+
if (this.isSvg) return this.generateSvnDom(renderKit);
|
|
798
|
+
else return this.generateHtmlDom(renderKit);
|
|
799
|
+
}
|
|
800
|
+
generateHtmlDom(renderKit) {
|
|
801
|
+
const node = (0, _create.createDecoratedNode)(this.type, this.attributes, this.events, renderKit);
|
|
802
|
+
node.__jsx = this.key();
|
|
803
|
+
return node;
|
|
804
|
+
}
|
|
805
|
+
generateSvnDom(renderKit) {
|
|
806
|
+
const node = (0, _svg.createSvgNode)(this.type, this.attributes, renderKit);
|
|
807
|
+
node.__jsx = this.key();
|
|
808
|
+
return node;
|
|
809
|
+
}
|
|
810
|
+
key() {
|
|
811
|
+
return this.attributes.key || this.source() || this.createKey();
|
|
812
|
+
}
|
|
813
|
+
source() {
|
|
814
|
+
if (this.attributes.__source) {
|
|
815
|
+
const { fileName, lineNumber, columnNumber } = this.attributes.__source;
|
|
816
|
+
return `${fileName}:${lineNumber}:${columnNumber}`;
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
createKey() {
|
|
820
|
+
const id = this.attributes.id ? `#${this.attributes.id}` : "";
|
|
821
|
+
const type = this.attributes.type ? `[type=${this.attributes.type}]` : "";
|
|
822
|
+
const name = this.attributes.name ? `[name=${this.attributes.name}]` : "";
|
|
823
|
+
return `${this.type}${id}${type}${name}`;
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
},{"../dom/create":"762Da","../dom/attributesAndEvents":"gUSxu","../dom/svg":"ipbm5","./children":"gKMx0","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}],"762Da":[function(require,module,exports) {
|
|
828
|
+
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
|
829
|
+
parcelHelpers.defineInteropFlag(exports);
|
|
830
|
+
parcelHelpers.export(exports, "setAttributesOnElement", ()=>setAttributesOnElement);
|
|
831
|
+
parcelHelpers.export(exports, "setEventsOnElement", ()=>setEventsOnElement);
|
|
832
|
+
parcelHelpers.export(exports, "createNode", ()=>createNode);
|
|
833
|
+
parcelHelpers.export(exports, "createTextNode", ()=>createTextNode);
|
|
834
|
+
parcelHelpers.export(exports, "createDecoratedNode", ()=>createDecoratedNode);
|
|
835
|
+
const setAttributesOnElement = (element, attributes)=>{
|
|
836
|
+
for(const key in attributes){
|
|
837
|
+
if (key === "__self") continue;
|
|
838
|
+
if (key === "value") element.value = attributes[key];
|
|
839
|
+
else element.setAttribute(key, attributes[key]);
|
|
840
|
+
}
|
|
841
|
+
};
|
|
842
|
+
const setEventsOnElement = (element, events, publish)=>{
|
|
843
|
+
const eventMaps = {};
|
|
844
|
+
for(const domEvent in events){
|
|
845
|
+
const eventName = events[domEvent];
|
|
846
|
+
const listener = (event)=>publish(eventName, event);
|
|
847
|
+
element.addEventListener(domEvent, listener);
|
|
848
|
+
eventMaps[domEvent] = {
|
|
849
|
+
domEvent: domEvent,
|
|
850
|
+
busEvent: eventName,
|
|
851
|
+
listener: listener
|
|
852
|
+
};
|
|
853
|
+
}
|
|
854
|
+
element.eventMaps = eventMaps;
|
|
855
|
+
};
|
|
856
|
+
const createNode = (type, document)=>{
|
|
857
|
+
document = document || window.document;
|
|
858
|
+
return document.createElement(type);
|
|
859
|
+
};
|
|
860
|
+
const createTextNode = (value, document)=>{
|
|
861
|
+
document = document || window.document;
|
|
862
|
+
return document.createTextNode(value);
|
|
863
|
+
};
|
|
864
|
+
const createDecoratedNode = (type, attributes, events, renderKit)=>{
|
|
865
|
+
// deno-lint-ignore no-explicit-any
|
|
866
|
+
const dom = createNode(type, renderKit.document);
|
|
867
|
+
setAttributesOnElement(dom, attributes);
|
|
868
|
+
setEventsOnElement(dom, events, renderKit.publish);
|
|
869
|
+
return dom;
|
|
870
|
+
};
|
|
871
|
+
|
|
872
|
+
},{"@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}],"gUSxu":[function(require,module,exports) {
|
|
873
|
+
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
|
874
|
+
parcelHelpers.defineInteropFlag(exports);
|
|
875
|
+
parcelHelpers.export(exports, "separateAttrsAndEvents", ()=>separateAttrsAndEvents);
|
|
876
|
+
const separateAttrsAndEvents = (combined, defaultValue = "")=>{
|
|
877
|
+
const attributes = {};
|
|
878
|
+
const events = {};
|
|
879
|
+
for(const key in combined){
|
|
880
|
+
const value = combined[key];
|
|
881
|
+
if (key.match(/^on.+/i)) {
|
|
882
|
+
const eventKey = key.slice(2).toLowerCase();
|
|
883
|
+
events[eventKey] = value;
|
|
884
|
+
} else attributes[key] = normalizeValueForKey(combined, key, defaultValue);
|
|
885
|
+
}
|
|
886
|
+
return {
|
|
887
|
+
attributes,
|
|
888
|
+
events
|
|
889
|
+
};
|
|
890
|
+
};
|
|
891
|
+
const normalizeValueForKey = (object, key, defaultValue = "")=>{
|
|
892
|
+
if (object[key] === undefined) return defaultValue;
|
|
893
|
+
return object[key];
|
|
894
|
+
};
|
|
895
|
+
|
|
896
|
+
},{"@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}],"ipbm5":[function(require,module,exports) {
|
|
897
|
+
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
|
898
|
+
parcelHelpers.defineInteropFlag(exports);
|
|
899
|
+
parcelHelpers.export(exports, "namespace", ()=>namespace);
|
|
900
|
+
parcelHelpers.export(exports, "isSvgTag", ()=>isSvgTag);
|
|
901
|
+
parcelHelpers.export(exports, "isSvg", ()=>isSvg);
|
|
902
|
+
parcelHelpers.export(exports, "createSvgNode", ()=>createSvgNode);
|
|
903
|
+
const namespace = "http://www.w3.org/2000/svg";
|
|
904
|
+
const isSvgTag = (tagType)=>tagType === "svg";
|
|
905
|
+
const isSvg = (element)=>element.namespaceURI === namespace;
|
|
906
|
+
const createSvgNode = (type, attributes, renderKit)=>{
|
|
907
|
+
const document = renderKit && renderKit.document || window.document;
|
|
908
|
+
const node = document.createElementNS(namespace, type);
|
|
909
|
+
for(const key in attributes){
|
|
910
|
+
if (key === "__self" || key === "xmlns") continue;
|
|
911
|
+
// adding namespace in as first argument makes it not really render!
|
|
912
|
+
node.setAttributeNS(null, key, attributes[key]);
|
|
913
|
+
}
|
|
914
|
+
return node;
|
|
915
|
+
};
|
|
916
|
+
|
|
917
|
+
},{"@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}],"gKMx0":[function(require,module,exports) {
|
|
918
|
+
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
|
919
|
+
parcelHelpers.defineInteropFlag(exports);
|
|
920
|
+
parcelHelpers.export(exports, "ensureArray", ()=>ensureArray);
|
|
921
|
+
parcelHelpers.export(exports, "Children", ()=>Children);
|
|
922
|
+
var _text = require("./text");
|
|
923
|
+
const ensureArray = (children)=>{
|
|
924
|
+
if (Array.isArray(children)) return children.flat();
|
|
925
|
+
if (!children) return [];
|
|
926
|
+
return [
|
|
927
|
+
children
|
|
928
|
+
];
|
|
929
|
+
};
|
|
930
|
+
/* three options for children
|
|
931
|
+
1. there is no view
|
|
932
|
+
2. view is an array, recurse
|
|
933
|
+
3. view is a renderable thing
|
|
934
|
+
*/ const recursiveRender = (children, renderKit, rendered = [])=>children.reduce(renderReducer(renderKit), rendered).flat();
|
|
935
|
+
const renderReducer = (renderKit)=>(aggregate, view)=>{
|
|
936
|
+
if (!view) return aggregate;
|
|
937
|
+
if (Array.isArray(view)) {
|
|
938
|
+
const dom = recursiveRender(view, renderKit, aggregate);
|
|
939
|
+
return dom;
|
|
940
|
+
}
|
|
941
|
+
view.render(renderKit).forEach((template)=>aggregate.push(template));
|
|
942
|
+
return aggregate;
|
|
943
|
+
};
|
|
944
|
+
const replaceTextNodes = (child)=>{
|
|
945
|
+
if (isTextNode(child)) return textNode(child);
|
|
946
|
+
return child;
|
|
947
|
+
};
|
|
948
|
+
const isTextNode = (child)=>{
|
|
949
|
+
return typeof child === "string" || typeof child === "number";
|
|
950
|
+
};
|
|
951
|
+
const textNode = (content)=>{
|
|
952
|
+
return new (0, _text.TextTemplate)(content);
|
|
953
|
+
};
|
|
954
|
+
const withSvgFlag = (isSvg)=>(template)=>{
|
|
955
|
+
template && (template.isSvg = template.isSvg || isSvg);
|
|
956
|
+
return template;
|
|
957
|
+
};
|
|
958
|
+
class Children {
|
|
959
|
+
constructor(jsxChildren, isSvg = false){
|
|
960
|
+
this.collection = ensureArray(jsxChildren);
|
|
961
|
+
this.collection = this.collection.map(replaceTextNodes);
|
|
962
|
+
this.collection = this.collection.flat();
|
|
963
|
+
this.collection = this.collection.map(withSvgFlag(isSvg));
|
|
964
|
+
this.isSvg = isSvg;
|
|
965
|
+
}
|
|
966
|
+
render(renderKit, parentElement) {
|
|
967
|
+
this.parentElement = parentElement;
|
|
968
|
+
const dom = this.generateDom(renderKit);
|
|
969
|
+
this.attachToParent(dom);
|
|
970
|
+
return dom;
|
|
971
|
+
}
|
|
972
|
+
generateDom(renderKit) {
|
|
973
|
+
return recursiveRender(this.collection, renderKit);
|
|
974
|
+
}
|
|
975
|
+
attachToParent(dom) {
|
|
976
|
+
if (this.parentElement === undefined) return;
|
|
977
|
+
const parent = this.parentElement;
|
|
978
|
+
dom.forEach((node)=>parent.appendChild(node));
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
},{"./text":"iqXAF","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}],"iqXAF":[function(require,module,exports) {
|
|
983
|
+
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
|
984
|
+
parcelHelpers.defineInteropFlag(exports);
|
|
985
|
+
parcelHelpers.export(exports, "TextTemplate", ()=>TextTemplate);
|
|
986
|
+
var _create = require("../dom/create");
|
|
987
|
+
class TextTemplate {
|
|
988
|
+
constructor(content){
|
|
989
|
+
this.value = content.toString();
|
|
990
|
+
}
|
|
991
|
+
render(renderKit) {
|
|
992
|
+
const textNode = (0, _create.createTextNode)(this.value, renderKit.document);
|
|
993
|
+
if (!textNode) return [];
|
|
994
|
+
textNode.__jsx = "TextNode";
|
|
995
|
+
return [
|
|
996
|
+
textNode
|
|
997
|
+
];
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
},{"../dom/create":"762Da","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}],"4T9d8":[function(require,module,exports) {
|
|
1002
|
+
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
|
1003
|
+
parcelHelpers.defineInteropFlag(exports);
|
|
1004
|
+
parcelHelpers.export(exports, "Link", ()=>Link);
|
|
1005
|
+
var _jsx = require("../jsx");
|
|
1006
|
+
var _jsxDefault = parcelHelpers.interopDefault(_jsx);
|
|
1007
|
+
const Link = ({ children, ...props })=>{
|
|
1008
|
+
return /*#__PURE__*/ (0, _jsxDefault.default)("a", {
|
|
1009
|
+
...props,
|
|
1010
|
+
onClick: "goToHref",
|
|
1011
|
+
__source: {
|
|
1012
|
+
fileName: "src/views/link.jsx",
|
|
1013
|
+
lineNumber: 4,
|
|
1014
|
+
columnNumber: 10
|
|
1015
|
+
},
|
|
1016
|
+
__self: undefined
|
|
1017
|
+
}, children);
|
|
1018
|
+
};
|
|
1019
|
+
|
|
1020
|
+
},{"../jsx":"ec42s","@parcel/transformer-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EAAE;IACzB,OAAO;QACL,GAAG,IAAI;QACP,cAAc,CAAC,CAAC,KAAK,eAAe;IACtC;AACF;AAEA,MAAM,OAAO,CAAA,GAAA,YAAI,AAAD,EAAE;IAChB,UAAU;IACV;IACA,eAAe;QAAC;KAAO;AACzB;AAEA,IAAI,SAAS,CAAC,WAAW;AACzB,IAAI,SAAS,CAAC,WAAW;AACzB,IAAI,SAAS,CAAC,UAAU;AAExB,IAAI,MAAM,eAAC,iBAAC;;;;;;;IAAS","sources":["node_modules/@parcel/runtime-browser-hmr/lib/runtime-887b4f60d3919308.js","cypress/jaxs-apps/add-remove-nested-children.jsx"],"sourcesContent":["var HMR_HOST = null;var HMR_PORT = null;var HMR_SECURE = false;var HMR_ENV_HASH = \"d6ea1d42532a7575\";module.bundle.HMR_BUNDLE_ID = \"f56b80e3afcab974\";\"use strict\";\n\n/* global HMR_HOST, HMR_PORT, HMR_ENV_HASH, HMR_SECURE, chrome, browser, __parcel__import__, __parcel__importScripts__, ServiceWorkerGlobalScope */\n/*::\nimport type {\n HMRAsset,\n HMRMessage,\n} from '@parcel/reporter-dev-server/src/HMRServer.js';\ninterface ParcelRequire {\n (string): mixed;\n cache: {|[string]: ParcelModule|};\n hotData: {|[string]: mixed|};\n Module: any;\n parent: ?ParcelRequire;\n isParcelRequire: true;\n modules: {|[string]: [Function, {|[string]: string|}]|};\n HMR_BUNDLE_ID: string;\n root: ParcelRequire;\n}\ninterface ParcelModule {\n hot: {|\n data: mixed,\n accept(cb: (Function) => void): void,\n dispose(cb: (mixed) => void): void,\n // accept(deps: Array<string> | string, cb: (Function) => void): void,\n // decline(): void,\n _acceptCallbacks: Array<(Function) => void>,\n _disposeCallbacks: Array<(mixed) => void>,\n |};\n}\ninterface ExtensionContext {\n runtime: {|\n reload(): void,\n getURL(url: string): string;\n getManifest(): {manifest_version: number, ...};\n |};\n}\ndeclare var module: {bundle: ParcelRequire, ...};\ndeclare var HMR_HOST: string;\ndeclare var HMR_PORT: string;\ndeclare var HMR_ENV_HASH: string;\ndeclare var HMR_SECURE: boolean;\ndeclare var chrome: ExtensionContext;\ndeclare var browser: ExtensionContext;\ndeclare var __parcel__import__: (string) => Promise<void>;\ndeclare var __parcel__importScripts__: (string) => Promise<void>;\ndeclare var globalThis: typeof self;\ndeclare var ServiceWorkerGlobalScope: Object;\n*/\nvar OVERLAY_ID = '__parcel__error__overlay__';\nvar OldModule = module.bundle.Module;\nfunction Module(moduleName) {\n OldModule.call(this, moduleName);\n this.hot = {\n data: module.bundle.hotData[moduleName],\n _acceptCallbacks: [],\n _disposeCallbacks: [],\n accept: function (fn) {\n this._acceptCallbacks.push(fn || function () {});\n },\n dispose: function (fn) {\n this._disposeCallbacks.push(fn);\n }\n };\n module.bundle.hotData[moduleName] = undefined;\n}\nmodule.bundle.Module = Module;\nmodule.bundle.hotData = {};\nvar checkedAssets /*: {|[string]: boolean|} */, assetsToDispose /*: Array<[ParcelRequire, string]> */, assetsToAccept /*: Array<[ParcelRequire, string]> */;\n\nfunction getHostname() {\n return HMR_HOST || (location.protocol.indexOf('http') === 0 ? location.hostname : 'localhost');\n}\nfunction getPort() {\n return HMR_PORT || location.port;\n}\n\n// eslint-disable-next-line no-redeclare\nvar parent = module.bundle.parent;\nif ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {\n var hostname = getHostname();\n var port = getPort();\n var protocol = HMR_SECURE || location.protocol == 'https:' && !['localhost', '127.0.0.1', '0.0.0.0'].includes(hostname) ? 'wss' : 'ws';\n var ws;\n try {\n ws = new WebSocket(protocol + '://' + hostname + (port ? ':' + port : '') + '/');\n } catch (err) {\n if (err.message) {\n console.error(err.message);\n }\n ws = {};\n }\n\n // Web extension context\n var extCtx = typeof browser === 'undefined' ? typeof chrome === 'undefined' ? null : chrome : browser;\n\n // Safari doesn't support sourceURL in error stacks.\n // eval may also be disabled via CSP, so do a quick check.\n var supportsSourceURL = false;\n try {\n (0, eval)('throw new Error(\"test\"); //# sourceURL=test.js');\n } catch (err) {\n supportsSourceURL = err.stack.includes('test.js');\n }\n\n // $FlowFixMe\n ws.onmessage = async function (event /*: {data: string, ...} */) {\n checkedAssets = {} /*: {|[string]: boolean|} */;\n assetsToAccept = [];\n assetsToDispose = [];\n var data /*: HMRMessage */ = JSON.parse(event.data);\n if (data.type === 'update') {\n // Remove error overlay if there is one\n if (typeof document !== 'undefined') {\n removeErrorOverlay();\n }\n let assets = data.assets.filter(asset => asset.envHash === HMR_ENV_HASH);\n\n // Handle HMR Update\n let handled = assets.every(asset => {\n return asset.type === 'css' || asset.type === 'js' && hmrAcceptCheck(module.bundle.root, asset.id, asset.depsByBundle);\n });\n if (handled) {\n console.clear();\n\n // Dispatch custom event so other runtimes (e.g React Refresh) are aware.\n if (typeof window !== 'undefined' && typeof CustomEvent !== 'undefined') {\n window.dispatchEvent(new CustomEvent('parcelhmraccept'));\n }\n await hmrApplyUpdates(assets);\n\n // Dispose all old assets.\n let processedAssets = {} /*: {|[string]: boolean|} */;\n for (let i = 0; i < assetsToDispose.length; i++) {\n let id = assetsToDispose[i][1];\n if (!processedAssets[id]) {\n hmrDispose(assetsToDispose[i][0], id);\n processedAssets[id] = true;\n }\n }\n\n // Run accept callbacks. This will also re-execute other disposed assets in topological order.\n processedAssets = {};\n for (let i = 0; i < assetsToAccept.length; i++) {\n let id = assetsToAccept[i][1];\n if (!processedAssets[id]) {\n hmrAccept(assetsToAccept[i][0], id);\n processedAssets[id] = true;\n }\n }\n } else fullReload();\n }\n if (data.type === 'error') {\n // Log parcel errors to console\n for (let ansiDiagnostic of data.diagnostics.ansi) {\n let stack = ansiDiagnostic.codeframe ? ansiDiagnostic.codeframe : ansiDiagnostic.stack;\n console.error('🚨 [parcel]: ' + ansiDiagnostic.message + '\\n' + stack + '\\n\\n' + ansiDiagnostic.hints.join('\\n'));\n }\n if (typeof document !== 'undefined') {\n // Render the fancy html overlay\n removeErrorOverlay();\n var overlay = createErrorOverlay(data.diagnostics.html);\n // $FlowFixMe\n document.body.appendChild(overlay);\n }\n }\n };\n ws.onerror = function (e) {\n if (e.message) {\n console.error(e.message);\n }\n };\n ws.onclose = function () {\n console.warn('[parcel] 🚨 Connection to the HMR server was lost');\n };\n}\nfunction removeErrorOverlay() {\n var overlay = document.getElementById(OVERLAY_ID);\n if (overlay) {\n overlay.remove();\n console.log('[parcel] ✨ Error resolved');\n }\n}\nfunction createErrorOverlay(diagnostics) {\n var overlay = document.createElement('div');\n overlay.id = OVERLAY_ID;\n let errorHTML = '<div style=\"background: black; opacity: 0.85; font-size: 16px; color: white; position: fixed; height: 100%; width: 100%; top: 0px; left: 0px; padding: 30px; font-family: Menlo, Consolas, monospace; z-index: 9999;\">';\n for (let diagnostic of diagnostics) {\n let stack = diagnostic.frames.length ? diagnostic.frames.reduce((p, frame) => {\n return `${p}\n<a href=\"/__parcel_launch_editor?file=${encodeURIComponent(frame.location)}\" style=\"text-decoration: underline; color: #888\" onclick=\"fetch(this.href); return false\">${frame.location}</a>\n${frame.code}`;\n }, '') : diagnostic.stack;\n errorHTML += `\n <div>\n <div style=\"font-size: 18px; font-weight: bold; margin-top: 20px;\">\n 🚨 ${diagnostic.message}\n </div>\n <pre>${stack}</pre>\n <div>\n ${diagnostic.hints.map(hint => '<div>💡 ' + hint + '</div>').join('')}\n </div>\n ${diagnostic.documentation ? `<div>📝 <a style=\"color: violet\" href=\"${diagnostic.documentation}\" target=\"_blank\">Learn more</a></div>` : ''}\n </div>\n `;\n }\n errorHTML += '</div>';\n overlay.innerHTML = errorHTML;\n return overlay;\n}\nfunction fullReload() {\n if ('reload' in location) {\n location.reload();\n } else if (extCtx && extCtx.runtime && extCtx.runtime.reload) {\n extCtx.runtime.reload();\n }\n}\nfunction getParents(bundle, id) /*: Array<[ParcelRequire, string]> */{\n var modules = bundle.modules;\n if (!modules) {\n return [];\n }\n var parents = [];\n var k, d, dep;\n for (k in modules) {\n for (d in modules[k][1]) {\n dep = modules[k][1][d];\n if (dep === id || Array.isArray(dep) && dep[dep.length - 1] === id) {\n parents.push([bundle, k]);\n }\n }\n }\n if (bundle.parent) {\n parents = parents.concat(getParents(bundle.parent, id));\n }\n return parents;\n}\nfunction updateLink(link) {\n var href = link.getAttribute('href');\n if (!href) {\n return;\n }\n var newLink = link.cloneNode();\n newLink.onload = function () {\n if (link.parentNode !== null) {\n // $FlowFixMe\n link.parentNode.removeChild(link);\n }\n };\n newLink.setAttribute('href',\n // $FlowFixMe\n href.split('?')[0] + '?' + Date.now());\n // $FlowFixMe\n link.parentNode.insertBefore(newLink, link.nextSibling);\n}\nvar cssTimeout = null;\nfunction reloadCSS() {\n if (cssTimeout) {\n return;\n }\n cssTimeout = setTimeout(function () {\n var links = document.querySelectorAll('link[rel=\"stylesheet\"]');\n for (var i = 0; i < links.length; i++) {\n // $FlowFixMe[incompatible-type]\n var href /*: string */ = links[i].getAttribute('href');\n var hostname = getHostname();\n var servedFromHMRServer = hostname === 'localhost' ? new RegExp('^(https?:\\\\/\\\\/(0.0.0.0|127.0.0.1)|localhost):' + getPort()).test(href) : href.indexOf(hostname + ':' + getPort());\n var absolute = /^https?:\\/\\//i.test(href) && href.indexOf(location.origin) !== 0 && !servedFromHMRServer;\n if (!absolute) {\n updateLink(links[i]);\n }\n }\n cssTimeout = null;\n }, 50);\n}\nfunction hmrDownload(asset) {\n if (asset.type === 'js') {\n if (typeof document !== 'undefined') {\n let script = document.createElement('script');\n script.src = asset.url + '?t=' + Date.now();\n if (asset.outputFormat === 'esmodule') {\n script.type = 'module';\n }\n return new Promise((resolve, reject) => {\n var _document$head;\n script.onload = () => resolve(script);\n script.onerror = reject;\n (_document$head = document.head) === null || _document$head === void 0 || _document$head.appendChild(script);\n });\n } else if (typeof importScripts === 'function') {\n // Worker scripts\n if (asset.outputFormat === 'esmodule') {\n return __parcel__import__(asset.url + '?t=' + Date.now());\n } else {\n return new Promise((resolve, reject) => {\n try {\n __parcel__importScripts__(asset.url + '?t=' + Date.now());\n resolve();\n } catch (err) {\n reject(err);\n }\n });\n }\n }\n }\n}\nasync function hmrApplyUpdates(assets) {\n global.parcelHotUpdate = Object.create(null);\n let scriptsToRemove;\n try {\n // If sourceURL comments aren't supported in eval, we need to load\n // the update from the dev server over HTTP so that stack traces\n // are correct in errors/logs. This is much slower than eval, so\n // we only do it if needed (currently just Safari).\n // https://bugs.webkit.org/show_bug.cgi?id=137297\n // This path is also taken if a CSP disallows eval.\n if (!supportsSourceURL) {\n let promises = assets.map(asset => {\n var _hmrDownload;\n return (_hmrDownload = hmrDownload(asset)) === null || _hmrDownload === void 0 ? void 0 : _hmrDownload.catch(err => {\n // Web extension fix\n if (extCtx && extCtx.runtime && extCtx.runtime.getManifest().manifest_version == 3 && typeof ServiceWorkerGlobalScope != 'undefined' && global instanceof ServiceWorkerGlobalScope) {\n extCtx.runtime.reload();\n return;\n }\n throw err;\n });\n });\n scriptsToRemove = await Promise.all(promises);\n }\n assets.forEach(function (asset) {\n hmrApply(module.bundle.root, asset);\n });\n } finally {\n delete global.parcelHotUpdate;\n if (scriptsToRemove) {\n scriptsToRemove.forEach(script => {\n if (script) {\n var _document$head2;\n (_document$head2 = document.head) === null || _document$head2 === void 0 || _document$head2.removeChild(script);\n }\n });\n }\n }\n}\nfunction hmrApply(bundle /*: ParcelRequire */, asset /*: HMRAsset */) {\n var modules = bundle.modules;\n if (!modules) {\n return;\n }\n if (asset.type === 'css') {\n reloadCSS();\n } else if (asset.type === 'js') {\n let deps = asset.depsByBundle[bundle.HMR_BUNDLE_ID];\n if (deps) {\n if (modules[asset.id]) {\n // Remove dependencies that are removed and will become orphaned.\n // This is necessary so that if the asset is added back again, the cache is gone, and we prevent a full page reload.\n let oldDeps = modules[asset.id][1];\n for (let dep in oldDeps) {\n if (!deps[dep] || deps[dep] !== oldDeps[dep]) {\n let id = oldDeps[dep];\n let parents = getParents(module.bundle.root, id);\n if (parents.length === 1) {\n hmrDelete(module.bundle.root, id);\n }\n }\n }\n }\n if (supportsSourceURL) {\n // Global eval. We would use `new Function` here but browser\n // support for source maps is better with eval.\n (0, eval)(asset.output);\n }\n\n // $FlowFixMe\n let fn = global.parcelHotUpdate[asset.id];\n modules[asset.id] = [fn, deps];\n } else if (bundle.parent) {\n hmrApply(bundle.parent, asset);\n }\n }\n}\nfunction hmrDelete(bundle, id) {\n let modules = bundle.modules;\n if (!modules) {\n return;\n }\n if (modules[id]) {\n // Collect dependencies that will become orphaned when this module is deleted.\n let deps = modules[id][1];\n let orphans = [];\n for (let dep in deps) {\n let parents = getParents(module.bundle.root, deps[dep]);\n if (parents.length === 1) {\n orphans.push(deps[dep]);\n }\n }\n\n // Delete the module. This must be done before deleting dependencies in case of circular dependencies.\n delete modules[id];\n delete bundle.cache[id];\n\n // Now delete the orphans.\n orphans.forEach(id => {\n hmrDelete(module.bundle.root, id);\n });\n } else if (bundle.parent) {\n hmrDelete(bundle.parent, id);\n }\n}\nfunction hmrAcceptCheck(bundle /*: ParcelRequire */, id /*: string */, depsByBundle /*: ?{ [string]: { [string]: string } }*/) {\n if (hmrAcceptCheckOne(bundle, id, depsByBundle)) {\n return true;\n }\n\n // Traverse parents breadth first. All possible ancestries must accept the HMR update, or we'll reload.\n let parents = getParents(module.bundle.root, id);\n let accepted = false;\n while (parents.length > 0) {\n let v = parents.shift();\n let a = hmrAcceptCheckOne(v[0], v[1], null);\n if (a) {\n // If this parent accepts, stop traversing upward, but still consider siblings.\n accepted = true;\n } else {\n // Otherwise, queue the parents in the next level upward.\n let p = getParents(module.bundle.root, v[1]);\n if (p.length === 0) {\n // If there are no parents, then we've reached an entry without accepting. Reload.\n accepted = false;\n break;\n }\n parents.push(...p);\n }\n }\n return accepted;\n}\nfunction hmrAcceptCheckOne(bundle /*: ParcelRequire */, id /*: string */, depsByBundle /*: ?{ [string]: { [string]: string } }*/) {\n var modules = bundle.modules;\n if (!modules) {\n return;\n }\n if (depsByBundle && !depsByBundle[bundle.HMR_BUNDLE_ID]) {\n // If we reached the root bundle without finding where the asset should go,\n // there's nothing to do. Mark as \"accepted\" so we don't reload the page.\n if (!bundle.parent) {\n return true;\n }\n return hmrAcceptCheck(bundle.parent, id, depsByBundle);\n }\n if (checkedAssets[id]) {\n return true;\n }\n checkedAssets[id] = true;\n var cached = bundle.cache[id];\n assetsToDispose.push([bundle, id]);\n if (!cached || cached.hot && cached.hot._acceptCallbacks.length) {\n assetsToAccept.push([bundle, id]);\n return true;\n }\n}\nfunction hmrDispose(bundle /*: ParcelRequire */, id /*: string */) {\n var cached = bundle.cache[id];\n bundle.hotData[id] = {};\n if (cached && cached.hot) {\n cached.hot.data = bundle.hotData[id];\n }\n if (cached && cached.hot && cached.hot._disposeCallbacks.length) {\n cached.hot._disposeCallbacks.forEach(function (cb) {\n cb(bundle.hotData[id]);\n });\n }\n delete bundle.cache[id];\n}\nfunction hmrAccept(bundle /*: ParcelRequire */, id /*: string */) {\n // Execute the module.\n bundle(id);\n\n // Run the accept callbacks in the new version of the module.\n var cached = bundle.cache[id];\n if (cached && cached.hot && cached.hot._acceptCallbacks.length) {\n cached.hot._acceptCallbacks.forEach(function (cb) {\n var assetsToAlsoAccept = cb(function () {\n return getParents(module.bundle.root, id);\n });\n if (assetsToAlsoAccept && assetsToAccept.length) {\n assetsToAlsoAccept.forEach(function (a) {\n hmrDispose(a[0], a[1]);\n });\n\n // $FlowFixMe[method-unbinding]\n assetsToAccept.push.apply(assetsToAccept, assetsToAlsoAccept);\n }\n });\n }\n}","import { bind, createApp, jsx, views } from '../../dist/jaxs.js'\nconst { If } = views\n\nconst app = createApp()\n\napp.state.create('form', {\n email: '',\n emailValidation: '',\n emailInvalid: false\n})\n\nexport const onInput = (event, { state }) => {\n const { form } = state\n const { name, value } = event.target\n state.form.update({\n ...form,\n [name]: value\n })\n}\n\nexport const onFocus = (event, { state }) => {\n const { form } = state\n const { name } = event.target\n state.form.update({\n ...form,\n [`${name}Validation`]: ''\n })\n}\n\nexport const onBlur = (event, { state }) => {\n const { form } = state\n const { name, value } = event.target\n\n if (value !== 'kane@example.com') {\n state.form.update({\n ...form,\n [`${name}Validation`]: 'Email unknown'\n })\n }\n}\n\nconst FormTemplate = ({ email, emailValidation, emailInvalid }) => {\n return (\n <form>\n <div>\n <p>\n <label for='email'>Email</label>\n </p>\n <If condition={emailInvalid}>\n <p class='validation-error'>{emailValidation}</p>\n </If>\n <input\n id='email'\n name='email'\n value={email}\n onInput='onInput'\n onBlur='onBlur'\n onFocus='onFocus'\n />\n </div>\n\n <input type='submit' value=\"Let's go!\" class='button-primary mt-6' />\n </form>\n )\n}\n\nconst viewModel = ({ form }) => {\n return {\n ...form,\n emailInvalid: !!form.emailValidation\n }\n}\n\nconst Form = bind({\n Template: FormTemplate,\n viewModel,\n subscriptions: ['form']\n})\n\napp.subscribe('onInput', onInput)\napp.subscribe('onFocus', onFocus)\napp.subscribe('onBlur', onBlur)\n\napp.render(<Form />, '#app')\n"],"names":[],"version":3,"file":"add-remove-nested-children.afcab974.js.map","sourceRoot":"/__parcel_source_root/"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAI,WAAW;AAAK,IAAI,WAAW;AAAK,IAAI,aAAa;AAAM,IAAI,eAAe;AAAmB,OAAO,MAAM,CAAC,aAAa,GAAG;AAAmB;AAEtJ,iJAAiJ,GACjJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,GACA,IAAI,aAAa;AACjB,IAAI,YAAY,OAAO,MAAM,CAAC,MAAM;AACpC,SAAS,OAAO,UAAU;IACxB,UAAU,IAAI,CAAC,IAAI,EAAE;IACrB,IAAI,CAAC,GAAG,GAAG;QACT,MAAM,OAAO,MAAM,CAAC,OAAO,CAAC,WAAW;QACvC,kBAAkB,EAAE;QACpB,mBAAmB,EAAE;QACrB,QAAQ,SAAU,EAAE;YAClB,IAAI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AAY,OAAkB,CAAE;QAC9B,IAAI,CAAC,KAAK,GAAG,QAAQ,QAAQ;IAC/B;IAEA,OAAO,SAAoB,EAAE;QAC3B,MAAM,WAAW,CAAA,GAAA,sBAAc,AAAD,EAAE,IAAI,CAAC,KAAK,EAAE,UAAU,QAAQ;QAC9D,IAAI,CAAC,UAAU,OAAO,EAAE;QACvB,SAA8B,KAAK,GAAG;QACvC,OAAO;YAAC;SAAS;IACnB;AACF;;;;;0CCda;AAFb;;AAEO,MAAM,OAAO,CAAC,EAAE,QAAQ,EAAE,GAAG,OAAO;IACzC,qBAAO,yBAAC;QAAG,GAAG,KAAK;QAAE,SAAQ;;;;;;;OAAY;AAC3C","sources":["node_modules/@parcel/runtime-browser-hmr/lib/runtime-887b4f60d3919308.js","cypress/jaxs-apps/add-remove-nested-children.jsx","src/views.js","src/views/conditionals.jsx","src/jsx.js","src/rendering/templates/tag.ts","src/rendering/dom/create.ts","src/rendering/dom/attributesAndEvents.ts","src/rendering/dom/svg.ts","src/rendering/templates/children.ts","src/rendering/templates/text.ts","src/views/link.jsx"],"sourcesContent":["var HMR_HOST = null;var HMR_PORT = null;var HMR_SECURE = false;var HMR_ENV_HASH = \"d6ea1d42532a7575\";module.bundle.HMR_BUNDLE_ID = \"f56b80e3afcab974\";\"use strict\";\n\n/* global HMR_HOST, HMR_PORT, HMR_ENV_HASH, HMR_SECURE, chrome, browser, __parcel__import__, __parcel__importScripts__, ServiceWorkerGlobalScope */\n/*::\nimport type {\n HMRAsset,\n HMRMessage,\n} from '@parcel/reporter-dev-server/src/HMRServer.js';\ninterface ParcelRequire {\n (string): mixed;\n cache: {|[string]: ParcelModule|};\n hotData: {|[string]: mixed|};\n Module: any;\n parent: ?ParcelRequire;\n isParcelRequire: true;\n modules: {|[string]: [Function, {|[string]: string|}]|};\n HMR_BUNDLE_ID: string;\n root: ParcelRequire;\n}\ninterface ParcelModule {\n hot: {|\n data: mixed,\n accept(cb: (Function) => void): void,\n dispose(cb: (mixed) => void): void,\n // accept(deps: Array<string> | string, cb: (Function) => void): void,\n // decline(): void,\n _acceptCallbacks: Array<(Function) => void>,\n _disposeCallbacks: Array<(mixed) => void>,\n |};\n}\ninterface ExtensionContext {\n runtime: {|\n reload(): void,\n getURL(url: string): string;\n getManifest(): {manifest_version: number, ...};\n |};\n}\ndeclare var module: {bundle: ParcelRequire, ...};\ndeclare var HMR_HOST: string;\ndeclare var HMR_PORT: string;\ndeclare var HMR_ENV_HASH: string;\ndeclare var HMR_SECURE: boolean;\ndeclare var chrome: ExtensionContext;\ndeclare var browser: ExtensionContext;\ndeclare var __parcel__import__: (string) => Promise<void>;\ndeclare var __parcel__importScripts__: (string) => Promise<void>;\ndeclare var globalThis: typeof self;\ndeclare var ServiceWorkerGlobalScope: Object;\n*/\nvar OVERLAY_ID = '__parcel__error__overlay__';\nvar OldModule = module.bundle.Module;\nfunction Module(moduleName) {\n OldModule.call(this, moduleName);\n this.hot = {\n data: module.bundle.hotData[moduleName],\n _acceptCallbacks: [],\n _disposeCallbacks: [],\n accept: function (fn) {\n this._acceptCallbacks.push(fn || function () {});\n },\n dispose: function (fn) {\n this._disposeCallbacks.push(fn);\n }\n };\n module.bundle.hotData[moduleName] = undefined;\n}\nmodule.bundle.Module = Module;\nmodule.bundle.hotData = {};\nvar checkedAssets /*: {|[string]: boolean|} */, assetsToDispose /*: Array<[ParcelRequire, string]> */, assetsToAccept /*: Array<[ParcelRequire, string]> */;\n\nfunction getHostname() {\n return HMR_HOST || (location.protocol.indexOf('http') === 0 ? location.hostname : 'localhost');\n}\nfunction getPort() {\n return HMR_PORT || location.port;\n}\n\n// eslint-disable-next-line no-redeclare\nvar parent = module.bundle.parent;\nif ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {\n var hostname = getHostname();\n var port = getPort();\n var protocol = HMR_SECURE || location.protocol == 'https:' && !['localhost', '127.0.0.1', '0.0.0.0'].includes(hostname) ? 'wss' : 'ws';\n var ws;\n try {\n ws = new WebSocket(protocol + '://' + hostname + (port ? ':' + port : '') + '/');\n } catch (err) {\n if (err.message) {\n console.error(err.message);\n }\n ws = {};\n }\n\n // Web extension context\n var extCtx = typeof browser === 'undefined' ? typeof chrome === 'undefined' ? null : chrome : browser;\n\n // Safari doesn't support sourceURL in error stacks.\n // eval may also be disabled via CSP, so do a quick check.\n var supportsSourceURL = false;\n try {\n (0, eval)('throw new Error(\"test\"); //# sourceURL=test.js');\n } catch (err) {\n supportsSourceURL = err.stack.includes('test.js');\n }\n\n // $FlowFixMe\n ws.onmessage = async function (event /*: {data: string, ...} */) {\n checkedAssets = {} /*: {|[string]: boolean|} */;\n assetsToAccept = [];\n assetsToDispose = [];\n var data /*: HMRMessage */ = JSON.parse(event.data);\n if (data.type === 'update') {\n // Remove error overlay if there is one\n if (typeof document !== 'undefined') {\n removeErrorOverlay();\n }\n let assets = data.assets.filter(asset => asset.envHash === HMR_ENV_HASH);\n\n // Handle HMR Update\n let handled = assets.every(asset => {\n return asset.type === 'css' || asset.type === 'js' && hmrAcceptCheck(module.bundle.root, asset.id, asset.depsByBundle);\n });\n if (handled) {\n console.clear();\n\n // Dispatch custom event so other runtimes (e.g React Refresh) are aware.\n if (typeof window !== 'undefined' && typeof CustomEvent !== 'undefined') {\n window.dispatchEvent(new CustomEvent('parcelhmraccept'));\n }\n await hmrApplyUpdates(assets);\n\n // Dispose all old assets.\n let processedAssets = {} /*: {|[string]: boolean|} */;\n for (let i = 0; i < assetsToDispose.length; i++) {\n let id = assetsToDispose[i][1];\n if (!processedAssets[id]) {\n hmrDispose(assetsToDispose[i][0], id);\n processedAssets[id] = true;\n }\n }\n\n // Run accept callbacks. This will also re-execute other disposed assets in topological order.\n processedAssets = {};\n for (let i = 0; i < assetsToAccept.length; i++) {\n let id = assetsToAccept[i][1];\n if (!processedAssets[id]) {\n hmrAccept(assetsToAccept[i][0], id);\n processedAssets[id] = true;\n }\n }\n } else fullReload();\n }\n if (data.type === 'error') {\n // Log parcel errors to console\n for (let ansiDiagnostic of data.diagnostics.ansi) {\n let stack = ansiDiagnostic.codeframe ? ansiDiagnostic.codeframe : ansiDiagnostic.stack;\n console.error('🚨 [parcel]: ' + ansiDiagnostic.message + '\\n' + stack + '\\n\\n' + ansiDiagnostic.hints.join('\\n'));\n }\n if (typeof document !== 'undefined') {\n // Render the fancy html overlay\n removeErrorOverlay();\n var overlay = createErrorOverlay(data.diagnostics.html);\n // $FlowFixMe\n document.body.appendChild(overlay);\n }\n }\n };\n ws.onerror = function (e) {\n if (e.message) {\n console.error(e.message);\n }\n };\n ws.onclose = function () {\n console.warn('[parcel] 🚨 Connection to the HMR server was lost');\n };\n}\nfunction removeErrorOverlay() {\n var overlay = document.getElementById(OVERLAY_ID);\n if (overlay) {\n overlay.remove();\n console.log('[parcel] ✨ Error resolved');\n }\n}\nfunction createErrorOverlay(diagnostics) {\n var overlay = document.createElement('div');\n overlay.id = OVERLAY_ID;\n let errorHTML = '<div style=\"background: black; opacity: 0.85; font-size: 16px; color: white; position: fixed; height: 100%; width: 100%; top: 0px; left: 0px; padding: 30px; font-family: Menlo, Consolas, monospace; z-index: 9999;\">';\n for (let diagnostic of diagnostics) {\n let stack = diagnostic.frames.length ? diagnostic.frames.reduce((p, frame) => {\n return `${p}\n<a href=\"/__parcel_launch_editor?file=${encodeURIComponent(frame.location)}\" style=\"text-decoration: underline; color: #888\" onclick=\"fetch(this.href); return false\">${frame.location}</a>\n${frame.code}`;\n }, '') : diagnostic.stack;\n errorHTML += `\n <div>\n <div style=\"font-size: 18px; font-weight: bold; margin-top: 20px;\">\n 🚨 ${diagnostic.message}\n </div>\n <pre>${stack}</pre>\n <div>\n ${diagnostic.hints.map(hint => '<div>💡 ' + hint + '</div>').join('')}\n </div>\n ${diagnostic.documentation ? `<div>📝 <a style=\"color: violet\" href=\"${diagnostic.documentation}\" target=\"_blank\">Learn more</a></div>` : ''}\n </div>\n `;\n }\n errorHTML += '</div>';\n overlay.innerHTML = errorHTML;\n return overlay;\n}\nfunction fullReload() {\n if ('reload' in location) {\n location.reload();\n } else if (extCtx && extCtx.runtime && extCtx.runtime.reload) {\n extCtx.runtime.reload();\n }\n}\nfunction getParents(bundle, id) /*: Array<[ParcelRequire, string]> */{\n var modules = bundle.modules;\n if (!modules) {\n return [];\n }\n var parents = [];\n var k, d, dep;\n for (k in modules) {\n for (d in modules[k][1]) {\n dep = modules[k][1][d];\n if (dep === id || Array.isArray(dep) && dep[dep.length - 1] === id) {\n parents.push([bundle, k]);\n }\n }\n }\n if (bundle.parent) {\n parents = parents.concat(getParents(bundle.parent, id));\n }\n return parents;\n}\nfunction updateLink(link) {\n var href = link.getAttribute('href');\n if (!href) {\n return;\n }\n var newLink = link.cloneNode();\n newLink.onload = function () {\n if (link.parentNode !== null) {\n // $FlowFixMe\n link.parentNode.removeChild(link);\n }\n };\n newLink.setAttribute('href',\n // $FlowFixMe\n href.split('?')[0] + '?' + Date.now());\n // $FlowFixMe\n link.parentNode.insertBefore(newLink, link.nextSibling);\n}\nvar cssTimeout = null;\nfunction reloadCSS() {\n if (cssTimeout) {\n return;\n }\n cssTimeout = setTimeout(function () {\n var links = document.querySelectorAll('link[rel=\"stylesheet\"]');\n for (var i = 0; i < links.length; i++) {\n // $FlowFixMe[incompatible-type]\n var href /*: string */ = links[i].getAttribute('href');\n var hostname = getHostname();\n var servedFromHMRServer = hostname === 'localhost' ? new RegExp('^(https?:\\\\/\\\\/(0.0.0.0|127.0.0.1)|localhost):' + getPort()).test(href) : href.indexOf(hostname + ':' + getPort());\n var absolute = /^https?:\\/\\//i.test(href) && href.indexOf(location.origin) !== 0 && !servedFromHMRServer;\n if (!absolute) {\n updateLink(links[i]);\n }\n }\n cssTimeout = null;\n }, 50);\n}\nfunction hmrDownload(asset) {\n if (asset.type === 'js') {\n if (typeof document !== 'undefined') {\n let script = document.createElement('script');\n script.src = asset.url + '?t=' + Date.now();\n if (asset.outputFormat === 'esmodule') {\n script.type = 'module';\n }\n return new Promise((resolve, reject) => {\n var _document$head;\n script.onload = () => resolve(script);\n script.onerror = reject;\n (_document$head = document.head) === null || _document$head === void 0 || _document$head.appendChild(script);\n });\n } else if (typeof importScripts === 'function') {\n // Worker scripts\n if (asset.outputFormat === 'esmodule') {\n return __parcel__import__(asset.url + '?t=' + Date.now());\n } else {\n return new Promise((resolve, reject) => {\n try {\n __parcel__importScripts__(asset.url + '?t=' + Date.now());\n resolve();\n } catch (err) {\n reject(err);\n }\n });\n }\n }\n }\n}\nasync function hmrApplyUpdates(assets) {\n global.parcelHotUpdate = Object.create(null);\n let scriptsToRemove;\n try {\n // If sourceURL comments aren't supported in eval, we need to load\n // the update from the dev server over HTTP so that stack traces\n // are correct in errors/logs. This is much slower than eval, so\n // we only do it if needed (currently just Safari).\n // https://bugs.webkit.org/show_bug.cgi?id=137297\n // This path is also taken if a CSP disallows eval.\n if (!supportsSourceURL) {\n let promises = assets.map(asset => {\n var _hmrDownload;\n return (_hmrDownload = hmrDownload(asset)) === null || _hmrDownload === void 0 ? void 0 : _hmrDownload.catch(err => {\n // Web extension fix\n if (extCtx && extCtx.runtime && extCtx.runtime.getManifest().manifest_version == 3 && typeof ServiceWorkerGlobalScope != 'undefined' && global instanceof ServiceWorkerGlobalScope) {\n extCtx.runtime.reload();\n return;\n }\n throw err;\n });\n });\n scriptsToRemove = await Promise.all(promises);\n }\n assets.forEach(function (asset) {\n hmrApply(module.bundle.root, asset);\n });\n } finally {\n delete global.parcelHotUpdate;\n if (scriptsToRemove) {\n scriptsToRemove.forEach(script => {\n if (script) {\n var _document$head2;\n (_document$head2 = document.head) === null || _document$head2 === void 0 || _document$head2.removeChild(script);\n }\n });\n }\n }\n}\nfunction hmrApply(bundle /*: ParcelRequire */, asset /*: HMRAsset */) {\n var modules = bundle.modules;\n if (!modules) {\n return;\n }\n if (asset.type === 'css') {\n reloadCSS();\n } else if (asset.type === 'js') {\n let deps = asset.depsByBundle[bundle.HMR_BUNDLE_ID];\n if (deps) {\n if (modules[asset.id]) {\n // Remove dependencies that are removed and will become orphaned.\n // This is necessary so that if the asset is added back again, the cache is gone, and we prevent a full page reload.\n let oldDeps = modules[asset.id][1];\n for (let dep in oldDeps) {\n if (!deps[dep] || deps[dep] !== oldDeps[dep]) {\n let id = oldDeps[dep];\n let parents = getParents(module.bundle.root, id);\n if (parents.length === 1) {\n hmrDelete(module.bundle.root, id);\n }\n }\n }\n }\n if (supportsSourceURL) {\n // Global eval. We would use `new Function` here but browser\n // support for source maps is better with eval.\n (0, eval)(asset.output);\n }\n\n // $FlowFixMe\n let fn = global.parcelHotUpdate[asset.id];\n modules[asset.id] = [fn, deps];\n } else if (bundle.parent) {\n hmrApply(bundle.parent, asset);\n }\n }\n}\nfunction hmrDelete(bundle, id) {\n let modules = bundle.modules;\n if (!modules) {\n return;\n }\n if (modules[id]) {\n // Collect dependencies that will become orphaned when this module is deleted.\n let deps = modules[id][1];\n let orphans = [];\n for (let dep in deps) {\n let parents = getParents(module.bundle.root, deps[dep]);\n if (parents.length === 1) {\n orphans.push(deps[dep]);\n }\n }\n\n // Delete the module. This must be done before deleting dependencies in case of circular dependencies.\n delete modules[id];\n delete bundle.cache[id];\n\n // Now delete the orphans.\n orphans.forEach(id => {\n hmrDelete(module.bundle.root, id);\n });\n } else if (bundle.parent) {\n hmrDelete(bundle.parent, id);\n }\n}\nfunction hmrAcceptCheck(bundle /*: ParcelRequire */, id /*: string */, depsByBundle /*: ?{ [string]: { [string]: string } }*/) {\n if (hmrAcceptCheckOne(bundle, id, depsByBundle)) {\n return true;\n }\n\n // Traverse parents breadth first. All possible ancestries must accept the HMR update, or we'll reload.\n let parents = getParents(module.bundle.root, id);\n let accepted = false;\n while (parents.length > 0) {\n let v = parents.shift();\n let a = hmrAcceptCheckOne(v[0], v[1], null);\n if (a) {\n // If this parent accepts, stop traversing upward, but still consider siblings.\n accepted = true;\n } else {\n // Otherwise, queue the parents in the next level upward.\n let p = getParents(module.bundle.root, v[1]);\n if (p.length === 0) {\n // If there are no parents, then we've reached an entry without accepting. Reload.\n accepted = false;\n break;\n }\n parents.push(...p);\n }\n }\n return accepted;\n}\nfunction hmrAcceptCheckOne(bundle /*: ParcelRequire */, id /*: string */, depsByBundle /*: ?{ [string]: { [string]: string } }*/) {\n var modules = bundle.modules;\n if (!modules) {\n return;\n }\n if (depsByBundle && !depsByBundle[bundle.HMR_BUNDLE_ID]) {\n // If we reached the root bundle without finding where the asset should go,\n // there's nothing to do. Mark as \"accepted\" so we don't reload the page.\n if (!bundle.parent) {\n return true;\n }\n return hmrAcceptCheck(bundle.parent, id, depsByBundle);\n }\n if (checkedAssets[id]) {\n return true;\n }\n checkedAssets[id] = true;\n var cached = bundle.cache[id];\n assetsToDispose.push([bundle, id]);\n if (!cached || cached.hot && cached.hot._acceptCallbacks.length) {\n assetsToAccept.push([bundle, id]);\n return true;\n }\n}\nfunction hmrDispose(bundle /*: ParcelRequire */, id /*: string */) {\n var cached = bundle.cache[id];\n bundle.hotData[id] = {};\n if (cached && cached.hot) {\n cached.hot.data = bundle.hotData[id];\n }\n if (cached && cached.hot && cached.hot._disposeCallbacks.length) {\n cached.hot._disposeCallbacks.forEach(function (cb) {\n cb(bundle.hotData[id]);\n });\n }\n delete bundle.cache[id];\n}\nfunction hmrAccept(bundle /*: ParcelRequire */, id /*: string */) {\n // Execute the module.\n bundle(id);\n\n // Run the accept callbacks in the new version of the module.\n var cached = bundle.cache[id];\n if (cached && cached.hot && cached.hot._acceptCallbacks.length) {\n cached.hot._acceptCallbacks.forEach(function (cb) {\n var assetsToAlsoAccept = cb(function () {\n return getParents(module.bundle.root, id);\n });\n if (assetsToAlsoAccept && assetsToAccept.length) {\n assetsToAlsoAccept.forEach(function (a) {\n hmrDispose(a[0], a[1]);\n });\n\n // $FlowFixMe[method-unbinding]\n assetsToAccept.push.apply(assetsToAccept, assetsToAlsoAccept);\n }\n });\n }\n}","import { bind, createApp, jsx } from '../../dist/jaxs.js'\nimport { views } from '../../src/views.js'\nconst { If } = views\n\nconst app = createApp()\n\napp.state.create('form', {\n email: '',\n emailValidation: '',\n emailInvalid: false\n})\n\nexport const onInput = (event, { state }) => {\n const { form } = state\n const { name, value } = event.target\n state.form.update({\n ...form,\n [name]: value\n })\n}\n\nexport const onFocus = (event, { state }) => {\n const { form } = state\n const { name } = event.target\n state.form.update({\n ...form,\n [`${name}Validation`]: ''\n })\n}\n\nexport const onBlur = (event, { state }) => {\n const { form } = state\n const { name, value } = event.target\n\n if (value !== 'kane@example.com') {\n state.form.update({\n ...form,\n [`${name}Validation`]: 'Email unknown'\n })\n }\n}\n\nconst FormTemplate = ({ email, emailValidation, emailInvalid }) => {\n return (\n <form>\n <div>\n <p>\n <label for='email'>Email</label>\n </p>\n <If condition={emailInvalid}>\n <p class='validation-error'>{emailValidation}</p>\n </If>\n <input\n id='email'\n name='email'\n value={email}\n onInput='onInput'\n onBlur='onBlur'\n onFocus='onFocus'\n />\n </div>\n\n <input type='submit' value=\"Let's go!\" class='button-primary mt-6' />\n </form>\n )\n}\n\nconst viewModel = ({ form }) => {\n return {\n ...form,\n emailInvalid: !!form.emailValidation\n }\n}\n\nconst Form = bind({\n Template: FormTemplate,\n viewModel,\n subscriptions: ['form']\n})\n\napp.subscribe('onInput', onInput)\napp.subscribe('onFocus', onFocus)\napp.subscribe('onBlur', onBlur)\n\napp.render(<Form />, '#app')\n","import * as conditionals from './views/conditionals.jsx'\nimport { Link } from './views/link.jsx'\n\nexport const views = {\n ...conditionals,\n Link\n}\n","import jsx from '../jsx'\n\nexport const If = ({ condition, children }) => {\n if (!condition) return\n return <>{children}</>\n}\n\nexport const Unless = ({ condition, children }) => {\n if (condition) return\n return <>{children}</>\n}\n\nexport const IfElse = ({ condition, children }) => {\n const [first, ...rest] = children\n\n if (condition) return <>{first}</>\n return <>{rest}</>\n}\n","import { Tag } from './rendering/templates/tag'\nimport { Children } from './rendering/templates/children'\n\nconst ensureChildrenArray = (maybeChildren, attributes) =>\n maybeChildren || attributes.children || []\n\nconst packageAttributes = (maybeAttributes, maybeChildren) => {\n const attributes = maybeAttributes || {}\n const children = ensureChildrenArray(maybeChildren, attributes)\n attributes.children = attributes.children || children\n return attributes\n}\n\nconst jsx = (type, attributes, ...children) => {\n if (typeof type === 'string') {\n return new Tag(type, attributes, children)\n }\n\n return type(packageAttributes(attributes, children))\n}\n\njsx.fragment = (attributes, maybeChildren) => {\n const children = ensureChildrenArray(maybeChildren, attributes)\n return new Children(children)\n}\n\nexport default jsx\n","import type {\n Attributes,\n DomCollection,\n EventAttributes,\n RenderKit,\n Template,\n} from '../../types';\n\nimport { createDecoratedNode } from '../dom/create';\nimport { separateAttrsAndEvents } from '../dom/attributesAndEvents';\nimport { isSvgTag, createSvgNode } from '../dom/svg'\nimport { Children } from './children';\n\nexport class Tag implements Template {\n type: string;\n events: EventAttributes;\n attributes: Attributes;\n children: Children;\n isSvg: boolean;\n\n constructor(\n tagType: string,\n combinedAttributes: Attributes,\n children: Template[],\n isSvg = false\n ) {\n this.type = tagType;\n\n const { events, attributes } = separateAttrsAndEvents(combinedAttributes);\n this.events = events;\n this.attributes = attributes;\n\n this.isSvg = isSvg || isSvgTag(this.type);\n this.children = new Children(children, this.isSvg);\n }\n\n render(renderKit: RenderKit): DomCollection {\n const dom = this.generateDom(renderKit);\n if (!dom) return [];\n\n this.children.render(renderKit, dom);\n return [dom];\n }\n\n generateDom(renderKit: RenderKit) {\n if (this.isSvg) {\n return this.generateSvnDom(renderKit)\n } else {\n return this.generateHtmlDom(renderKit)\n }\n }\n\n generateHtmlDom(renderKit: RenderKit) {\n const node = createDecoratedNode(\n this.type,\n this.attributes,\n this.events,\n renderKit,\n );\n node.__jsx = this.key();\n return node;\n }\n\n generateSvnDom(renderKit: RenderKit) {\n const node = createSvgNode(\n this.type,\n this.attributes,\n renderKit,\n );\n node.__jsx = this.key();\n return node;\n }\n\n key() {\n return this.attributes.key || this.source() || this.createKey();\n }\n\n source() {\n if (this.attributes.__source) {\n const { fileName, lineNumber, columnNumber } = this.attributes.__source;\n return `${fileName}:${lineNumber}:${columnNumber}`;\n }\n }\n\n createKey() {\n const id = this.attributes.id ? `#${this.attributes.id}` : '';\n const type = this.attributes.type ? `[type=${this.attributes.type}]` : '';\n const name = this.attributes.name ? `[name=${this.attributes.name}]` : '';\n\n return `${this.type}${id}${type}${name}`;\n }\n}\n","import type {\n Attributes,\n DomEventPublisher,\n EventAttributes,\n EventMaps,\n ExpandedElement,\n InputElement,\n RenderKit,\n} from '../../types';\n\nexport const setAttributesOnElement = (\n element: Element,\n attributes: Attributes,\n) => {\n for (const key in attributes) {\n if (key === '__self') continue;\n if (key === 'value') {\n (element as InputElement).value = attributes[key];\n } else {\n element.setAttribute(key, attributes[key]);\n }\n }\n};\n\nexport const setEventsOnElement = (\n element: ExpandedElement,\n events: EventAttributes,\n publish: DomEventPublisher,\n) => {\n const eventMaps = {} as EventMaps;\n\n for (const domEvent in events) {\n const eventName = events[domEvent];\n const listener = (event: Event) => publish(eventName, event);\n element.addEventListener(domEvent, listener);\n\n eventMaps[domEvent] = {\n domEvent: domEvent,\n busEvent: eventName,\n listener: listener,\n };\n }\n\n element.eventMaps = eventMaps;\n};\n\nexport const createNode = (type: string, document: Document) => {\n document = document || window.document;\n return document.createElement(type);\n};\n\nexport const createTextNode = (value: string, document: Document) => {\n document = document || window.document;\n return document.createTextNode(value);\n};\n\nexport const createDecoratedNode = (\n type: string,\n attributes: Attributes,\n events: EventAttributes,\n renderKit: RenderKit,\n) => {\n // deno-lint-ignore no-explicit-any\n const dom = createNode(type, renderKit.document) as any as ExpandedElement;\n setAttributesOnElement(dom, attributes);\n setEventsOnElement(dom, events, renderKit.publish);\n return dom;\n};\n","import type { Attributes, AttributesAndEvents } from '../../types';\n\nexport const separateAttrsAndEvents = (\n combined: Attributes,\n defaultValue = '',\n): AttributesAndEvents => {\n const attributes: Attributes = {};\n const events: Attributes = {};\n\n for (const key in combined) {\n const value = combined[key];\n if (key.match(/^on.+/i)) {\n const eventKey = key.slice(2).toLowerCase();\n events[eventKey] = value;\n } else {\n attributes[key] = normalizeValueForKey(combined, key, defaultValue);\n }\n }\n\n return {\n attributes,\n events,\n };\n};\n\nconst normalizeValueForKey = (\n object: Attributes,\n key: string,\n defaultValue = '',\n) => {\n if (object[key] === undefined) return defaultValue;\n return object[key];\n};\n","import type { RenderKit, Attributes, ExpandedElement } from \"../../types\"\n\nexport const namespace = 'http://www.w3.org/2000/svg'\nexport const isSvgTag = (tagType: string) => tagType === 'svg'\nexport const isSvg = (element: SVGElement) => element.namespaceURI === namespace\n\nexport const createSvgNode = (type: string, attributes: Attributes, renderKit: RenderKit) => {\n const document = renderKit && renderKit.document || window.document;\n const node = document.createElementNS(namespace, type)\n\n for (const key in attributes) {\n if (key === '__self' || key === 'xmlns') continue;\n // adding namespace in as first argument makes it not really render!\n node.setAttributeNS(null, key, attributes[key]);\n }\n\n return node as unknown as ExpandedElement\n}\n","import type {\n Dom,\n DomCollection,\n RenderKit,\n Template,\n TextValue,\n} from '../../types';\nimport { TextTemplate } from './text';\n\nexport const ensureArray = (children: Template | Template[]): Template[] => {\n if (Array.isArray(children)) {\n return children.flat();\n }\n\n if (!children) {\n return [];\n }\n\n return [children];\n};\n\n/* three options for children\n 1. there is no view\n 2. view is an array, recurse\n 3. view is a renderable thing\n*/\nconst recursiveRender = (\n children: Template[],\n renderKit: RenderKit,\n rendered = [] as DomCollection,\n): DomCollection => children.reduce(renderReducer(renderKit), rendered).flat();\n\nconst renderReducer =\n (renderKit: RenderKit) =>\n (aggregate: DomCollection, view: Template): DomCollection => {\n if (!view) return aggregate;\n\n if (Array.isArray(view)) {\n const dom = recursiveRender(view, renderKit, aggregate) as DomCollection;\n return dom;\n }\n\n view.render(renderKit).forEach((template) => aggregate.push(template));\n\n return aggregate;\n };\n\nconst replaceTextNodes = (child: TextValue | Template) => {\n if (isTextNode(child)) {\n return textNode(child as TextValue);\n }\n\n return child;\n};\n\nconst isTextNode = (child: TextValue | Template) => {\n return typeof child === 'string' || typeof child === 'number';\n};\n\nconst textNode = (content: TextValue) => {\n return new TextTemplate(content);\n};\n\nconst withSvgFlag = (isSvg: boolean) => (template: Template) => {\n template && (template.isSvg = template.isSvg || isSvg)\n return template\n}\n\nexport class Children implements Template {\n collection: Template[];\n parentElement: Element | undefined;\n isSvg: boolean;\n\n constructor(jsxChildren: Template[], isSvg = false) {\n this.collection = ensureArray(jsxChildren)\n this.collection = this.collection.map(replaceTextNodes) as Template[];\n this.collection = this.collection.flat() as Template[];\n this.collection = this.collection.map(withSvgFlag(isSvg))\n this.isSvg = isSvg;\n }\n\n render(renderKit: RenderKit, parentElement: Element | undefined) {\n this.parentElement = parentElement;\n const dom = this.generateDom(renderKit);\n this.attachToParent(dom);\n return dom;\n }\n\n generateDom(renderKit: RenderKit) {\n return recursiveRender(this.collection, renderKit);\n }\n\n attachToParent(dom: DomCollection) {\n if (this.parentElement === undefined) return;\n\n const parent = this.parentElement as Element;\n dom.forEach((node: Dom) => parent.appendChild(node));\n }\n}\n","import type { JsxId, RenderKit, Template, TextValue } from '../../types';\nimport { createTextNode } from '../dom/create';\n\nexport class TextTemplate implements Template {\n value: string;\n\n constructor(content: TextValue) {\n this.value = content.toString();\n }\n\n render(renderKit: RenderKit) {\n const textNode = createTextNode(this.value, renderKit.document);\n if (!textNode) return [];\n (textNode as unknown as JsxId).__jsx = 'TextNode';\n return [textNode];\n }\n}\n","import jsx from '../jsx'\n\nexport const Link = ({ children, ...props }) => {\n return <a {...props} onClick='goToHref'>{children}</a>\n}\n"],"names":[],"version":3,"file":"add-remove-nested-children.afcab974.js.map","sourceRoot":"/__parcel_source_root/"}
|