twd-js 1.3.2 → 1.3.4
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/README.md +19 -15
- package/dist/bundled.es.js +2 -2
- package/dist/bundled.umd.js +2 -2
- package/dist/index.cjs.js +28 -28
- package/dist/index.d.ts +31 -0
- package/dist/index.es.js +1920 -1919
- package/dist/{jsx-runtime-DqUUEvWR.mjs → jsx-runtime-BGWd3k7q.mjs} +2 -2
- package/dist/mock-sw.js +1 -1
- package/dist/ui.es.js +1 -1
- package/dist/vite-plugin.cjs.js +1 -1
- package/dist/vite-plugin.d.ts +46 -0
- package/dist/vite-plugin.es.js +21 -5
- package/package.json +9 -9
package/dist/index.d.ts
CHANGED
|
@@ -106,8 +106,39 @@ declare type Rule = {
|
|
|
106
106
|
|
|
107
107
|
declare type ScreenDom = typeof screen_2;
|
|
108
108
|
|
|
109
|
+
/**
|
|
110
|
+
* screenDom - Scoped queries that exclude the TWD sidebar
|
|
111
|
+
*
|
|
112
|
+
* Searches only within the main app container (typically #root).
|
|
113
|
+
* Use this for most queries to avoid matching elements in the sidebar.
|
|
114
|
+
*
|
|
115
|
+
* Note: This will NOT find portal-rendered elements (modals, dialogs) that are
|
|
116
|
+
* rendered outside the root container. For portals, use `screenDomGlobal` instead.
|
|
117
|
+
*/
|
|
109
118
|
export declare const screenDom: ScreenDom;
|
|
110
119
|
|
|
120
|
+
/**
|
|
121
|
+
* screenDomGlobal - Global queries that search the entire document.body
|
|
122
|
+
*
|
|
123
|
+
* Searches all elements in document.body, including portal-rendered elements
|
|
124
|
+
* (modals, dialogs, tooltips, etc.).
|
|
125
|
+
*
|
|
126
|
+
* ⚠️ WARNING: This may also match elements inside the TWD sidebar if your selectors
|
|
127
|
+
* are not specific enough. Use more specific queries (e.g., getByRole with name)
|
|
128
|
+
* to avoid matching sidebar elements.
|
|
129
|
+
*
|
|
130
|
+
* Use this when:
|
|
131
|
+
* - Querying portal-rendered elements (modals, dialogs)
|
|
132
|
+
* - You need to search outside the root container
|
|
133
|
+
*
|
|
134
|
+
* Example:
|
|
135
|
+
* ```ts
|
|
136
|
+
* // For a modal rendered via portal
|
|
137
|
+
* const modal = screenDomGlobal.getByRole('dialog', { name: 'Confirm' });
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
export declare const screenDomGlobal: ScreenDom;
|
|
141
|
+
|
|
111
142
|
/**
|
|
112
143
|
* Overloads for the `should` function, for best IntelliSense.
|
|
113
144
|
*
|