@flighthq/dialog 0.5.1-next.903.f434bc2 → 0.5.1-next.905.5fbf787
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 +2 -2
- package/package.json +3 -3
- package/src/dialog.test.ts +14 -1
- package/src/fileDialog.test.ts +7 -1
package/README.md
CHANGED
|
@@ -13,5 +13,5 @@ Import the supported application-facing API from `@flighthq/dialog`. The `@fligh
|
|
|
13
13
|
This package is part of the locked-version Flight SDK graph. Applications may instead install and import `@flighthq/sdk` when package-level tree shaking is sufficient.
|
|
14
14
|
|
|
15
15
|
- [Flight project](https://github.com/flighthq/flight)
|
|
16
|
-
- [Source for @flighthq/dialog@0.5.1-next.
|
|
17
|
-
- [License](https://github.com/flighthq/flight/blob/
|
|
16
|
+
- [Source for @flighthq/dialog@0.5.1-next.905.5fbf787](https://github.com/flighthq/flight/tree/5fbf7874064c384307542d68b4dcb6a895ff0dcf/packages/dialog)
|
|
17
|
+
- [License](https://github.com/flighthq/flight/blob/5fbf7874064c384307542d68b4dcb6a895ff0dcf/LICENSE.md)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flighthq/dialog",
|
|
3
|
-
"version": "0.5.1-next.
|
|
3
|
+
"version": "0.5.1-next.905.5fbf787",
|
|
4
4
|
"author": "Joshua Granick and other contributors",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"clean:dist": "tsx ../../scripts/clean-package-dist.ts"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@flighthq/entity": "0.5.1-next.
|
|
42
|
-
"@flighthq/types": "0.5.1-next.
|
|
41
|
+
"@flighthq/entity": "0.5.1-next.905.5fbf787",
|
|
42
|
+
"@flighthq/types": "0.5.1-next.905.5fbf787"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"typescript": "^5.3.0"
|
package/src/dialog.test.ts
CHANGED
|
@@ -2,6 +2,8 @@ import { allocateEntity, finishEntity } from '@flighthq/entity/contract';
|
|
|
2
2
|
import type { EntityWithoutRuntime, MessageDialogBackend, PromptDialogBackend } from '@flighthq/types/contract';
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
|
+
initializeWebMessageDialogBackend,
|
|
6
|
+
initializeWebPromptDialogBackend,
|
|
5
7
|
showConfirmDialog,
|
|
6
8
|
showErrorBox,
|
|
7
9
|
showErrorDialog,
|
|
@@ -55,6 +57,18 @@ function severityHost(observed: string[]) {
|
|
|
55
57
|
};
|
|
56
58
|
}
|
|
57
59
|
|
|
60
|
+
describe('initializeWebMessageDialogBackend', () => {
|
|
61
|
+
it('is the construction initializer of createWebMessageDialogBackend', () => {
|
|
62
|
+
expect(typeof initializeWebMessageDialogBackend).toBe('function');
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
describe('initializeWebPromptDialogBackend', () => {
|
|
67
|
+
it('is the construction initializer of createWebPromptDialogBackend', () => {
|
|
68
|
+
expect(typeof initializeWebPromptDialogBackend).toBe('function');
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
|
|
58
72
|
describe('showConfirmDialog', () => {
|
|
59
73
|
it('delegates confirmation through the explicit message slot', async () => {
|
|
60
74
|
expect(await showConfirmDialog(fakeHost(), { message: 'sure?' })).toBe(true);
|
|
@@ -107,7 +121,6 @@ describe('showMessageDialog', () => {
|
|
|
107
121
|
expect((await showMessageDialog(fakeHost(), { message: 'hello' })).buttonIndex).toBe(2);
|
|
108
122
|
});
|
|
109
123
|
});
|
|
110
|
-
|
|
111
124
|
describe('showPromptDialog', () => {
|
|
112
125
|
it('delegates prompts through the explicit prompt slot', async () => {
|
|
113
126
|
expect(await showPromptDialog(fakeHost(), { message: 'name?' })).toBe('typed');
|
package/src/fileDialog.test.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { EntityRuntimeKey } from '@flighthq/types/contract';
|
|
|
5
5
|
import {
|
|
6
6
|
createFileDialogHandle,
|
|
7
7
|
getFileDialogHandleOperations,
|
|
8
|
+
initializeFileDialogHandle,
|
|
8
9
|
showOpenDirectoryDialog,
|
|
9
10
|
showOpenFileDialog,
|
|
10
11
|
showSaveFileDialog,
|
|
@@ -63,6 +64,12 @@ describe('getFileDialogHandleOperations', () => {
|
|
|
63
64
|
});
|
|
64
65
|
});
|
|
65
66
|
|
|
67
|
+
describe('initializeFileDialogHandle', () => {
|
|
68
|
+
it('is the construction initializer of createFileDialogHandle', () => {
|
|
69
|
+
expect(typeof initializeFileDialogHandle).toBe('function');
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
|
|
66
73
|
describe('showOpenDirectoryDialog', () => {
|
|
67
74
|
it('routes the single-directory operation through its independent capability slot', async () => {
|
|
68
75
|
const result = await showOpenDirectoryDialog(fakeHost());
|
|
@@ -126,7 +133,6 @@ describe('showOpenFileDialog', () => {
|
|
|
126
133
|
expect((await showOpenFileDialog(host, {})).outcome).toBe('security-denied');
|
|
127
134
|
});
|
|
128
135
|
});
|
|
129
|
-
|
|
130
136
|
describe('showSaveFileDialog', () => {
|
|
131
137
|
it('routes file save through its independent capability slot', async () => {
|
|
132
138
|
const result = await showSaveFileDialog(fakeHost(), { defaultName: 'out.txt' });
|