From a962a9e13035f513315b1bf8c53b047bb97d7f10 Mon Sep 17 00:00:00 2001 From: Josh Vlk Date: Mon, 3 Aug 2026 17:03:18 -0400 Subject: [PATCH 1/2] refactor: establish Window folder feature --- rescript.json | 32 ++++++++----------- src/{DOM => window}/CustomElementRegistry.res | 0 src/{DOM => window}/Document.res | 0 src/{DOM => window}/DomGlobal.res | 0 src/{History => window}/History.res | 0 src/{History => window}/HistoryTypes.res | 0 src/{DOM => window}/IdleDeadline.res | 0 src/{DOM => window}/Location.res | 0 .../VisualViewport.res | 0 .../VisualViewportTypes.res | 0 src/{DOM => window}/Window.res | 0 src/{DOM => window}/XPathExpression.res | 0 src/{DOM => window}/XPathResult.res | 0 13 files changed, 14 insertions(+), 18 deletions(-) rename src/{DOM => window}/CustomElementRegistry.res (100%) rename src/{DOM => window}/Document.res (100%) rename src/{DOM => window}/DomGlobal.res (100%) rename src/{History => window}/History.res (100%) rename src/{History => window}/HistoryTypes.res (100%) rename src/{DOM => window}/IdleDeadline.res (100%) rename src/{DOM => window}/Location.res (100%) rename src/{VisualViewport => window}/VisualViewport.res (100%) rename src/{VisualViewport => window}/VisualViewportTypes.res (100%) rename src/{DOM => window}/Window.res (100%) rename src/{DOM => window}/XPathExpression.res (100%) rename src/{DOM => window}/XPathResult.res (100%) diff --git a/rescript.json b/rescript.json index 61666a78..907f7889 100644 --- a/rescript.json +++ b/rescript.json @@ -16,6 +16,16 @@ "DOMNodes" ], "WebAPI.HTML": ["WebAPI.DOMNodes", "WebAPI.File", "HTML"], + "WebAPI.Window": [ + "WebAPI.HTML", + "WebAPI.Media", + "WebAPI.Storage", + "WebAPI.Messaging", + "WebAPI.Crypto", + "WebAPI.Performance", + "WebAPI.ViewTransitions", + "Window" + ], "WebAPI.Media": ["WebAPI.HTML", "Media"], "WebAPI.WebAudio": ["WebAPI.Media", "WebAPI.Messaging", "WebAudio"], "WebAPI.SVG": ["WebAPI.DOMNodes", "WebAPI.Geometry", "SVG"], @@ -281,14 +291,16 @@ ] }, { - "dir": "src/DOM", + "dir": "src/window", "subdirs": true, - "feature": "WebAPI.DOM", + "feature": "Window", "public": [ "CustomElementRegistry", "Document", + "History", "IdleDeadline", "Location", + "VisualViewport", "Window", "XPathExpression", "XPathResult" @@ -357,14 +369,6 @@ "WebMIDI" ] }, - { - "dir": "src/History", - "subdirs": true, - "feature": "WebAPI.History", - "public": [ - "History" - ] - }, { "dir": "src/storage", "subdirs": true, @@ -491,14 +495,6 @@ "ViewTransition" ] }, - { - "dir": "src/VisualViewport", - "subdirs": true, - "feature": "WebAPI.VisualViewport", - "public": [ - "VisualViewport" - ] - }, { "dir": "src/web-audio", "subdirs": true, diff --git a/src/DOM/CustomElementRegistry.res b/src/window/CustomElementRegistry.res similarity index 100% rename from src/DOM/CustomElementRegistry.res rename to src/window/CustomElementRegistry.res diff --git a/src/DOM/Document.res b/src/window/Document.res similarity index 100% rename from src/DOM/Document.res rename to src/window/Document.res diff --git a/src/DOM/DomGlobal.res b/src/window/DomGlobal.res similarity index 100% rename from src/DOM/DomGlobal.res rename to src/window/DomGlobal.res diff --git a/src/History/History.res b/src/window/History.res similarity index 100% rename from src/History/History.res rename to src/window/History.res diff --git a/src/History/HistoryTypes.res b/src/window/HistoryTypes.res similarity index 100% rename from src/History/HistoryTypes.res rename to src/window/HistoryTypes.res diff --git a/src/DOM/IdleDeadline.res b/src/window/IdleDeadline.res similarity index 100% rename from src/DOM/IdleDeadline.res rename to src/window/IdleDeadline.res diff --git a/src/DOM/Location.res b/src/window/Location.res similarity index 100% rename from src/DOM/Location.res rename to src/window/Location.res diff --git a/src/VisualViewport/VisualViewport.res b/src/window/VisualViewport.res similarity index 100% rename from src/VisualViewport/VisualViewport.res rename to src/window/VisualViewport.res diff --git a/src/VisualViewport/VisualViewportTypes.res b/src/window/VisualViewportTypes.res similarity index 100% rename from src/VisualViewport/VisualViewportTypes.res rename to src/window/VisualViewportTypes.res diff --git a/src/DOM/Window.res b/src/window/Window.res similarity index 100% rename from src/DOM/Window.res rename to src/window/Window.res diff --git a/src/DOM/XPathExpression.res b/src/window/XPathExpression.res similarity index 100% rename from src/DOM/XPathExpression.res rename to src/window/XPathExpression.res diff --git a/src/DOM/XPathResult.res b/src/window/XPathResult.res similarity index 100% rename from src/DOM/XPathResult.res rename to src/window/XPathResult.res From bb678e00543c701007f264582d6f27d351ce4b09 Mon Sep 17 00:00:00 2001 From: Josh Vlk Date: Tue, 4 Aug 2026 14:46:14 -0400 Subject: [PATCH 2/2] fix: isolate final DOM feature closure --- rescript.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rescript.json b/rescript.json index 907f7889..ce2f933b 100644 --- a/rescript.json +++ b/rescript.json @@ -2,7 +2,7 @@ "name": "@rescript/webapi", "namespace": "WebAPI", "features": { - "WebAPI.DOM": ["DOM", "Event"], + "WebAPI.DOM": ["DOM"], "WebAPI.Event": ["WebAPI.DOM", "Event"], "WebAPI.DOMPlatform": ["WebAPI.Event", "DOMPlatform"], "WebAPI.Animation": ["WebAPI.Event", "Animation"],