@qoretechnologies/reqore 0.78.5-pr.708.gfe16b52 → 0.78.5
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/.claude/CLAUDE.md +12 -4
- package/dist/components/Breadcrumbs/index.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/index.js +262 -75
- package/dist/components/Breadcrumbs/index.js.map +1 -1
- package/dist/components/Breadcrumbs/item.d.ts +0 -10
- package/dist/components/Breadcrumbs/item.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/item.js +3 -24
- package/dist/components/Breadcrumbs/item.js.map +1 -1
- package/dist/components/ControlGroup/index.d.ts.map +1 -1
- package/dist/components/ControlGroup/index.js +5 -1
- package/dist/components/ControlGroup/index.js.map +1 -1
- package/dist/components/DataView/index.d.ts.map +1 -1
- package/dist/components/DataView/index.js +5 -6
- package/dist/components/DataView/index.js.map +1 -1
- package/dist/components/Drawer/index.d.ts.map +1 -1
- package/dist/components/Drawer/index.js +34 -7
- package/dist/components/Drawer/index.js.map +1 -1
- package/dist/components/Dropdown/index.d.ts.map +1 -1
- package/dist/components/Dropdown/index.js +3 -1
- package/dist/components/Dropdown/index.js.map +1 -1
- package/dist/components/Dropdown/list.d.ts.map +1 -1
- package/dist/components/Dropdown/list.js +71 -5
- package/dist/components/Dropdown/list.js.map +1 -1
- package/dist/components/EntityRow/index.d.ts.map +1 -1
- package/dist/components/EntityRow/index.js +10 -4
- package/dist/components/EntityRow/index.js.map +1 -1
- package/dist/components/InternalPopover/index.d.ts.map +1 -1
- package/dist/components/InternalPopover/index.js +32 -5
- package/dist/components/InternalPopover/index.js.map +1 -1
- package/dist/components/Menu/index.d.ts.map +1 -1
- package/dist/components/Menu/index.js +14 -8
- package/dist/components/Menu/index.js.map +1 -1
- package/dist/components/Menu/item.d.ts.map +1 -1
- package/dist/components/Menu/item.js +3 -2
- package/dist/components/Menu/item.js.map +1 -1
- package/dist/components/Menu/section.d.ts.map +1 -1
- package/dist/components/Menu/section.js +11 -6
- package/dist/components/Menu/section.js.map +1 -1
- package/dist/components/NavRail/index.d.ts.map +1 -1
- package/dist/components/NavRail/index.js +10 -0
- package/dist/components/NavRail/index.js.map +1 -1
- package/dist/components/Notifications/notification.d.ts.map +1 -1
- package/dist/components/Notifications/notification.js +11 -4
- package/dist/components/Notifications/notification.js.map +1 -1
- package/dist/components/Paging/index.d.ts.map +1 -1
- package/dist/components/Paging/index.js +17 -17
- package/dist/components/Paging/index.js.map +1 -1
- package/dist/components/Panel/index.d.ts.map +1 -1
- package/dist/components/Panel/index.js +123 -28
- package/dist/components/Panel/index.js.map +1 -1
- package/dist/components/Popover/index.d.ts +8 -0
- package/dist/components/Popover/index.d.ts.map +1 -1
- package/dist/components/Popover/index.js +145 -26
- package/dist/components/Popover/index.js.map +1 -1
- package/dist/components/Rating/index.d.ts.map +1 -1
- package/dist/components/Rating/index.js +9 -3
- package/dist/components/Rating/index.js.map +1 -1
- package/dist/components/RowActionsMenu/index.d.ts +22 -6
- package/dist/components/RowActionsMenu/index.d.ts.map +1 -1
- package/dist/components/RowActionsMenu/index.js +95 -18
- package/dist/components/RowActionsMenu/index.js.map +1 -1
- package/dist/components/SegmentedControl/index.d.ts.map +1 -1
- package/dist/components/SegmentedControl/index.js +3 -1
- package/dist/components/SegmentedControl/index.js.map +1 -1
- package/dist/components/SeverityRow/index.d.ts.map +1 -1
- package/dist/components/SeverityRow/index.js +6 -2
- package/dist/components/SeverityRow/index.js.map +1 -1
- package/dist/components/Statistic/index.d.ts.map +1 -1
- package/dist/components/Statistic/index.js +4 -1
- package/dist/components/Statistic/index.js.map +1 -1
- package/dist/components/Table/helpers.d.ts +5 -5
- package/dist/components/Table/helpers.d.ts.map +1 -1
- package/dist/components/Table/helpers.js +6 -7
- package/dist/components/Table/helpers.js.map +1 -1
- package/dist/components/Table/index.d.ts +15 -6
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +53 -21
- package/dist/components/Table/index.js.map +1 -1
- package/dist/components/Table/row.d.ts.map +1 -1
- package/dist/components/Table/row.js +21 -8
- package/dist/components/Table/row.js.map +1 -1
- package/dist/components/Tabs/list.d.ts.map +1 -1
- package/dist/components/Tabs/list.js +3 -1
- package/dist/components/Tabs/list.js.map +1 -1
- package/dist/components/Textarea/index.d.ts.map +1 -1
- package/dist/components/Textarea/index.js +36 -12
- package/dist/components/Textarea/index.js.map +1 -1
- package/dist/components/Timeline/index.d.ts.map +1 -1
- package/dist/components/Timeline/index.js +5 -4
- package/dist/components/Timeline/index.js.map +1 -1
- package/dist/components/Tree/modal.d.ts.map +1 -1
- package/dist/components/Tree/modal.js +3 -1
- package/dist/components/Tree/modal.js.map +1 -1
- package/dist/containers/ReqoreProvider.d.ts.map +1 -1
- package/dist/containers/ReqoreProvider.js +27 -13
- package/dist/containers/ReqoreProvider.js.map +1 -1
- package/dist/helpers/hoveringPointer.d.ts +54 -0
- package/dist/helpers/hoveringPointer.d.ts.map +1 -0
- package/dist/helpers/hoveringPointer.js +66 -0
- package/dist/helpers/hoveringPointer.js.map +1 -0
- package/dist/hooks/useCloneThroughFragments.d.ts.map +1 -1
- package/dist/hooks/useCloneThroughFragments.js +51 -18
- package/dist/hooks/useCloneThroughFragments.js.map +1 -1
- package/dist/hooks/useMarqueeOnHover.d.ts.map +1 -1
- package/dist/hooks/useMarqueeOnHover.js +10 -0
- package/dist/hooks/useMarqueeOnHover.js.map +1 -1
- package/dist/hooks/usePaging.d.ts +9 -4
- package/dist/hooks/usePaging.d.ts.map +1 -1
- package/dist/hooks/usePaging.js +21 -32
- package/dist/hooks/usePaging.js.map +1 -1
- package/dist/hooks/useReqoreMedia.d.ts +22 -7
- package/dist/hooks/useReqoreMedia.d.ts.map +1 -1
- package/dist/hooks/useReqoreMedia.js +33 -9
- package/dist/hooks/useReqoreMedia.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -3
- package/tests.json +1 -0
- package/vitest.config.ts +40 -23
package/vitest.config.ts
CHANGED
|
@@ -11,18 +11,25 @@ const dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
|
11
11
|
const qlipUploadToken = process.env.QLIP_UPLOAD_TOKEN;
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Story files
|
|
15
|
-
* so it does not load every story module only to skip it. Read from the
|
|
16
|
-
* is all it takes to run it on a touch screen.
|
|
14
|
+
* Story files that cannot hold a story tagged `touch`, relative to the project root. The touch
|
|
15
|
+
* project leaves them out, so it does not load every story module only to skip it. Read from the
|
|
16
|
+
* files themselves: tagging a story is all it takes to run it on a touch screen.
|
|
17
|
+
*
|
|
18
|
+
* Both story projects split the stories by the tags Storybook reads from a story file's source
|
|
19
|
+
* before it runs it (`tags` below): string literals, in a `tags` array on a story or its meta, or
|
|
20
|
+
* in an array the file names there. So a file with no `'touch'` or `"touch"` in it has no story
|
|
21
|
+
* either project counts as tagged, and any other file is loaded here. Matching the shape of a
|
|
22
|
+
* `tags` line instead left out a file that tagged its stories another way Storybook reads
|
|
23
|
+
* (`tags: TOUCH`, a comment in the array): the desktop project left those stories out and this
|
|
24
|
+
* one never loaded them, so they ran nowhere and nothing failed. A file that only mentions the
|
|
25
|
+
* word costs a module load. A tag a story only has when it runs (spread into it from a shared
|
|
26
|
+
* object) is read from the source by neither project: `.storybook/vitest.setup.ts` fails it.
|
|
17
27
|
*/
|
|
18
28
|
const storyFilesWithoutTouch = (): string[] =>
|
|
19
29
|
readdirSync(path.join(dirname, 'src'), { recursive: true, encoding: 'utf8' })
|
|
20
30
|
.filter((file) => file.endsWith('.stories.tsx'))
|
|
21
31
|
.map((file) => path.join('src', file).split(path.sep).join('/'))
|
|
22
|
-
.filter(
|
|
23
|
-
(file) =>
|
|
24
|
-
!/\btags:\s*\[[^\]]*['"]touch['"]/.test(readFileSync(path.join(dirname, file), 'utf8'))
|
|
25
|
-
);
|
|
32
|
+
.filter((file) => !/['"]touch['"]/.test(readFileSync(path.join(dirname, file), 'utf8')));
|
|
26
33
|
|
|
27
34
|
// One plugin for both story projects, so they make one qlip build: one build id, and one upload at the end
|
|
28
35
|
// of the run (the plugin registers its reporter once, however many projects load it).
|
|
@@ -36,8 +43,12 @@ const qlip = qlipVitestPlugin({
|
|
|
36
43
|
...(qlipUploadToken ? { upload: { uploadToken: qlipUploadToken } } : {}),
|
|
37
44
|
});
|
|
38
45
|
|
|
39
|
-
|
|
40
|
-
|
|
46
|
+
/**
|
|
47
|
+
* The browser a story project runs in: a desktop with a mouse, or - `phone` - the phone the stories tagged
|
|
48
|
+
* `touch` run on (`src/stories/utils/touchScreen.ts`). A new object for each project: Vitest names a
|
|
49
|
+
* project's browser instances on the objects themselves.
|
|
50
|
+
*/
|
|
51
|
+
const storyBrowser = (phone = false) => ({
|
|
41
52
|
enabled: true,
|
|
42
53
|
// Vitest 4's @vitest/browser-playwright no longer applies
|
|
43
54
|
// `browser.viewport` to the Playwright context (the line is
|
|
@@ -48,8 +59,17 @@ const storyBrowser = () => ({
|
|
|
48
59
|
// viewport through the provider's `contextOptions` (which IS
|
|
49
60
|
// applied) so the browser window matches qlip's capture viewport
|
|
50
61
|
// 1:1 and screenshots come out at their true resolution.
|
|
62
|
+
//
|
|
63
|
+
// The phone is a phone from the start: Playwright makes its context with `isMobile` and `hasTouch`, so
|
|
64
|
+
// `(pointer: coarse)` and `(hover: none)` match and a touch is a finger's, and nothing turns that on or
|
|
65
|
+
// off. Turning Chromium's touch emulation off over the DevTools protocol (how a touch story used to
|
|
66
|
+
// borrow a desktop page) leaves the page with the hover and pointer the machine reports, not the mouse
|
|
67
|
+
// Playwright launched it with (`--blink-settings=primaryHoverType=2,…`), and a Linux CI runner reports
|
|
68
|
+
// none: every later story in the page found `(hover: none)` (qorus#646).
|
|
51
69
|
provider: playwright({
|
|
52
|
-
contextOptions:
|
|
70
|
+
contextOptions: phone
|
|
71
|
+
? { viewport: { width: 390, height: 844 }, isMobile: true, hasTouch: true }
|
|
72
|
+
: { viewport: { width: 1920, height: 1080 } },
|
|
53
73
|
}),
|
|
54
74
|
headless: true,
|
|
55
75
|
instances: [{ browser: 'chromium' as const }],
|
|
@@ -70,14 +90,9 @@ export default mergeConfig(
|
|
|
70
90
|
// Component/interaction tests: run every story in a real browser via Playwright.
|
|
71
91
|
// Replaces the former @storybook/test-runner.
|
|
72
92
|
//
|
|
73
|
-
// Stories run in two projects,
|
|
74
|
-
//
|
|
75
|
-
//
|
|
76
|
-
// ones the browser was launched with. Playwright launches its headless Chromium as a mouse
|
|
77
|
-
// (`--blink-settings=primaryHoverType=2,…,primaryPointerType=4`); a Linux runner reports no mouse, so in
|
|
78
|
-
// CI every story after a touch story in the same page found `(hover: none)` - the hover-only actions
|
|
79
|
-
// shown, the Marquee and NavRail deaf to hover, Table's row menu at the touch size. On a Mac the machine
|
|
80
|
-
// reports a mouse, so the same run passes there.
|
|
93
|
+
// Stories run in two projects, each in a browser of its own kind (see `storyBrowser`): every story on
|
|
94
|
+
// a desktop with a mouse, but those tagged `touch`, which run on a phone. `.storybook/vitest.setup.ts`
|
|
95
|
+
// checks each story's browser is the one its project promises.
|
|
81
96
|
{
|
|
82
97
|
extends: true,
|
|
83
98
|
plugins: [
|
|
@@ -90,12 +105,15 @@ export default mergeConfig(
|
|
|
90
105
|
],
|
|
91
106
|
test: {
|
|
92
107
|
name: 'storybook',
|
|
108
|
+
// after the stories on the phone: each story here checks it still has its mouse
|
|
109
|
+
sequence: { groupOrder: 1 },
|
|
93
110
|
browser: storyBrowser(),
|
|
94
111
|
...storyTest,
|
|
95
112
|
},
|
|
96
113
|
},
|
|
97
|
-
// The stories tagged `touch`,
|
|
98
|
-
//
|
|
114
|
+
// The stories tagged `touch`, on the phone. Before the others, not beside them: the two projects share
|
|
115
|
+
// Storybook's dependency cache (it is named after the config directory), which is not built twice at
|
|
116
|
+
// once.
|
|
99
117
|
{
|
|
100
118
|
extends: true,
|
|
101
119
|
plugins: [
|
|
@@ -109,9 +127,8 @@ export default mergeConfig(
|
|
|
109
127
|
test: {
|
|
110
128
|
name: 'storybook-touch',
|
|
111
129
|
exclude: [...configDefaults.exclude, ...storyFilesWithoutTouch()],
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
browser: storyBrowser(),
|
|
130
|
+
sequence: { groupOrder: 0 },
|
|
131
|
+
browser: storyBrowser(true),
|
|
115
132
|
...storyTest,
|
|
116
133
|
},
|
|
117
134
|
},
|