dom-top-layer 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mark McCann
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # dom-top-layer
2
+
3
+ `dom-top-layer` is a framework-agnostic TypeScript library for tracking which elements are currently active in the browser's top layer and for reacting to changes over time.
4
+
5
+ The package is being set up to support two core goals:
6
+
7
+ - inspect the current top-layer stack and its order
8
+ - subscribe to top-layer changes without binding the API to a specific framework
9
+
10
+ ## Status
11
+
12
+ This repository currently contains the package infrastructure and a minimal public entrypoint so the project can be built, tested, and published while the runtime API is designed.
13
+
14
+ ## Why This Package?
15
+
16
+ Modern browsers expose several features that participate in the top layer, such as dialogs, popovers, and fullscreen elements. What browsers do not currently provide is a first-class, framework-agnostic way to inspect the active top-layer stack or subscribe to changes in that stack.
17
+
18
+ `dom-top-layer` is intended to fill that gap with a small, focused browser utility that can later power framework adapters, hooks, or application-specific integrations without making those choices part of the core package.
19
+
20
+ ## Installation
21
+
22
+ ```bash
23
+ npm install dom-top-layer
24
+ ```
25
+
26
+ ## Development
27
+
28
+ ```bash
29
+ npm install
30
+ npm run build
31
+ npm test
32
+ ```
33
+
34
+ ## Planned Direction
35
+
36
+ - framework-agnostic top-layer inspection primitives
37
+ - subscription APIs for top-layer changes
38
+ - browser-focused behavior with TypeScript-first ergonomics
39
+
40
+ ## License
41
+
42
+ MIT
package/dist/index.cjs ADDED
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/index.ts
17
+ var index_exports = {};
18
+ module.exports = __toCommonJS(index_exports);
19
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {};\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,2 @@
1
+
2
+ export { }
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/llms.txt ADDED
@@ -0,0 +1,17 @@
1
+ Project: dom-top-layer
2
+
3
+ Summary:
4
+ - Framework-agnostic TypeScript library for tracking browser top-layer state.
5
+ - Intended to expose top-layer inspection and subscription primitives.
6
+ - Current repository state focuses on package infrastructure, build tooling, and test scaffolding.
7
+
8
+ Guidance:
9
+ - Prefer `README.md` for package-level positioning and setup commands.
10
+ - Treat `src/index.ts` as the source of truth for the public export surface.
11
+ - Keep the core package framework-agnostic and browser-focused.
12
+ - Avoid introducing framework-specific hooks or adapters into the root package unless explicitly requested.
13
+
14
+ Key Docs:
15
+ - README: `README.md`
16
+ - Public exports: `src/index.ts`
17
+ - Project guidance: `AGENTS.md`
package/package.json ADDED
@@ -0,0 +1,125 @@
1
+ {
2
+ "name": "dom-top-layer",
3
+ "version": "0.1.0",
4
+ "description": "A framework-agnostic TypeScript library for tracking browser top-layer state and subscribing to top-layer changes.",
5
+ "keywords": [
6
+ "top-layer",
7
+ "browser",
8
+ "dom",
9
+ "dialog",
10
+ "popover",
11
+ "fullscreen",
12
+ "typescript"
13
+ ],
14
+ "homepage": "https://github.com/marksmccann/dom-top-layer#readme",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/marksmccann/dom-top-layer.git"
18
+ },
19
+ "bugs": {
20
+ "url": "https://github.com/marksmccann/dom-top-layer/issues"
21
+ },
22
+ "license": "MIT",
23
+ "author": "Mark McCann",
24
+ "type": "module",
25
+ "main": "./dist/index.cjs",
26
+ "module": "./dist/index.js",
27
+ "types": "./dist/index.d.ts",
28
+ "exports": {
29
+ ".": {
30
+ "types": "./dist/index.d.ts",
31
+ "import": "./dist/index.js",
32
+ "require": "./dist/index.cjs"
33
+ },
34
+ "./*": null
35
+ },
36
+ "files": [
37
+ "dist",
38
+ "README.md",
39
+ "LICENSE",
40
+ "llms.txt"
41
+ ],
42
+ "sideEffects": false,
43
+ "engines": {
44
+ "node": ">=18"
45
+ },
46
+ "scripts": {
47
+ "build": "tsup",
48
+ "commit": "cz",
49
+ "dev": "tsup --watch",
50
+ "format": "prettier --write .",
51
+ "lint": "eslint .",
52
+ "prepublishOnly": "npm run build",
53
+ "release": "release-it",
54
+ "typecheck": "tsc --project tsconfig.json --noEmit",
55
+ "test": "vitest run",
56
+ "test:watch": "vitest",
57
+ "prepare": "node ./scripts/prepare.mjs"
58
+ },
59
+ "config": {
60
+ "commitizen": {
61
+ "path": "cz-conventional-changelog"
62
+ }
63
+ },
64
+ "release-it": {
65
+ "git": {
66
+ "commitMessage": "chore(release): v${version}",
67
+ "tagName": "v${version}",
68
+ "requireCleanWorkingDir": true,
69
+ "requireUpstream": true,
70
+ "requireBranch": "main"
71
+ },
72
+ "npm": {
73
+ "publish": true
74
+ },
75
+ "github": {
76
+ "release": false
77
+ },
78
+ "plugins": {
79
+ "@release-it/conventional-changelog": {
80
+ "infile": "CHANGELOG.md",
81
+ "header": "# Changelog",
82
+ "preset": {
83
+ "name": "conventionalcommits"
84
+ }
85
+ }
86
+ },
87
+ "hooks": {
88
+ "before:init": [
89
+ "npm run lint",
90
+ "npm run typecheck",
91
+ "npm test"
92
+ ]
93
+ }
94
+ },
95
+ "lint-staged": {
96
+ "*.{ts,js,cjs,mjs,md}": [
97
+ "prettier --write"
98
+ ],
99
+ "*.{ts,js}": [
100
+ "eslint --fix"
101
+ ]
102
+ },
103
+ "devDependencies": {
104
+ "@commitlint/cli": "^20.4.2",
105
+ "@commitlint/config-conventional": "^20.4.2",
106
+ "@eslint/js": "^10.0.1",
107
+ "@release-it/conventional-changelog": "^10.0.5",
108
+ "@types/node": "^24.10.1",
109
+ "@vitest/coverage-v8": "^4.0.18",
110
+ "commitizen": "^4.3.1",
111
+ "cz-conventional-changelog": "^3.3.0",
112
+ "eslint": "^10.0.1",
113
+ "eslint-config-prettier": "^10.1.8",
114
+ "globals": "^16.5.0",
115
+ "husky": "^9.1.7",
116
+ "jsdom": "^27.2.0",
117
+ "lint-staged": "^16.2.7",
118
+ "prettier": "^3.8.1",
119
+ "release-it": "^19.2.4",
120
+ "tsup": "^8.5.1",
121
+ "typescript": "^5.9.3",
122
+ "typescript-eslint": "^8.46.3",
123
+ "vitest": "^4.0.18"
124
+ }
125
+ }