@streamline-pulse/formkrafter-core 0.31.1 → 0.32.1
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/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +3 -3
- package/dist/services/file_picker_service.d.ts +15 -0
- package/dist/services/index.d.ts +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { FileLike } from "./file_upload_service.js";
|
|
2
|
+
/**
|
|
3
|
+
* Picks a file on platforms without an `<input type="file">` (React Native):
|
|
4
|
+
* the host installs an implementation (camera, document picker…); without
|
|
5
|
+
* one, the native document brick only shows an existing reading.
|
|
6
|
+
*/
|
|
7
|
+
export interface FilePickOptions {
|
|
8
|
+
/** Accepted types, as an `accept` string (`image/*,.pdf`). */
|
|
9
|
+
accept?: string;
|
|
10
|
+
/** Prefer the camera when the platform has one. */
|
|
11
|
+
capture?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface FilePickerService {
|
|
14
|
+
pick(options?: FilePickOptions): Promise<FileLike | undefined>;
|
|
15
|
+
}
|
package/dist/services/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { type FileUploadService } from "./file_upload_service.js";
|
|
|
4
4
|
import { type SpecSourceService } from "./spec_source_service.js";
|
|
5
5
|
import { type OptionSourceService } from "./option_source_service.js";
|
|
6
6
|
import { type DocumentReaderService } from "./document_reader_service.js";
|
|
7
|
+
import type { FilePickerService } from "./file_picker_service.js";
|
|
7
8
|
export interface Services {
|
|
8
9
|
jsRunnerService: JsRunnerService;
|
|
9
10
|
dataSourceService: DataSourceService;
|
|
@@ -11,6 +12,8 @@ export interface Services {
|
|
|
11
12
|
specSourceService: SpecSourceService;
|
|
12
13
|
optionSourceService: OptionSourceService;
|
|
13
14
|
documentReaderService: DocumentReaderService;
|
|
15
|
+
/** Optional: file picking on platforms without a file input (React Native). */
|
|
16
|
+
filePickerService?: FilePickerService;
|
|
14
17
|
}
|
|
15
18
|
declare const services: Services;
|
|
16
19
|
export { services };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamline-pulse/formkrafter-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.1",
|
|
4
4
|
"description": "Framework-agnostic core for FormKrafter: form specs, RFC 6902 ops with undo/redo, Ajv validation, sandboxed rules engine and injectable services",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|