@getcortexlabs/mavis 0.1.0-rc.12 → 0.1.0-rc.12.2

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.
Files changed (76) hide show
  1. package/README.md +5 -5
  2. package/dist/native/date-format.android.d.ts +4 -0
  3. package/dist/native/date-format.android.d.ts.map +1 -1
  4. package/dist/native/date-format.android.js +20 -0
  5. package/dist/native/date-format.android.js.map +1 -1
  6. package/dist/native/date-format.d.ts +3 -0
  7. package/dist/native/date-format.d.ts.map +1 -1
  8. package/dist/native/date-format.ios.d.ts +4 -0
  9. package/dist/native/date-format.ios.d.ts.map +1 -1
  10. package/dist/native/date-format.ios.js +18 -0
  11. package/dist/native/date-format.ios.js.map +1 -1
  12. package/dist/native/date-format.js +3 -0
  13. package/dist/native/date-format.js.map +1 -1
  14. package/dist/native/image-crop-common.d.ts +5 -0
  15. package/dist/native/image-crop-common.d.ts.map +1 -0
  16. package/dist/native/image-crop-common.js +36 -0
  17. package/dist/native/image-crop-common.js.map +1 -0
  18. package/dist/native/image-crop.android.d.ts +3 -0
  19. package/dist/native/image-crop.android.d.ts.map +1 -0
  20. package/dist/native/image-crop.android.js +92 -0
  21. package/dist/native/image-crop.android.js.map +1 -0
  22. package/dist/native/image-crop.d.ts +3 -0
  23. package/dist/native/image-crop.d.ts.map +1 -0
  24. package/dist/native/image-crop.ios.d.ts +3 -0
  25. package/dist/native/image-crop.ios.d.ts.map +1 -0
  26. package/dist/native/image-crop.ios.js +68 -0
  27. package/dist/native/image-crop.ios.js.map +1 -0
  28. package/dist/native/image-crop.js +4 -0
  29. package/dist/native/image-crop.js.map +1 -0
  30. package/dist/vue/components/DateCalendar.d.ts +1 -1
  31. package/dist/vue/components/MAccordion.d.ts +1 -1
  32. package/dist/vue/components/MButton.d.ts +5 -5
  33. package/dist/vue/components/MCard.d.ts +1 -1
  34. package/dist/vue/components/MChip.d.ts +1 -1
  35. package/dist/vue/components/MCombobox.d.ts +2 -2
  36. package/dist/vue/components/MDatePicker.d.ts +16 -16
  37. package/dist/vue/components/MDialog.d.ts +2 -2
  38. package/dist/vue/components/MEmptyState.d.ts +1 -1
  39. package/dist/vue/components/MImageCompare.d.ts +1 -1
  40. package/dist/vue/components/MImageViewer.d.ts +5 -5
  41. package/dist/vue/components/MInput.d.ts +3 -3
  42. package/dist/vue/components/MPopover.d.ts +1 -1
  43. package/dist/vue/components/MProgress.d.ts +1 -1
  44. package/dist/vue/components/MRangeSlider.d.ts +1 -1
  45. package/dist/vue/components/MResizablePanels.d.ts +3 -3
  46. package/dist/vue/components/MSelect.d.ts +1 -1
  47. package/dist/vue/components/MStack.d.ts +6 -6
  48. package/dist/vue/components/MTimePicker.d.ts +8 -8
  49. package/dist/vue/components/MTooltip.d.ts +1 -1
  50. package/dist/vue/components/advanced.d.ts +850 -0
  51. package/dist/vue/components/advanced.d.ts.map +1 -0
  52. package/dist/vue/components/advanced.js +214 -0
  53. package/dist/vue/components/advanced.js.map +1 -0
  54. package/dist/vue/components/configurator.d.ts +6 -6
  55. package/dist/vue/components/creative.d.ts +3 -3
  56. package/dist/vue/components/dashboard.d.ts +5 -5
  57. package/dist/vue/components/discovery.d.ts +1 -1
  58. package/dist/vue/components/interactive.d.ts +1 -1
  59. package/dist/vue/components/navigation.d.ts +3 -3
  60. package/dist/vue/components/screen-components.d.ts +5 -5
  61. package/dist/vue/components/wayfinding.d.ts +6 -6
  62. package/dist/vue/components/workflows.d.ts +3 -3
  63. package/dist/vue/index.d.ts +2 -1
  64. package/dist/vue/index.d.ts.map +1 -1
  65. package/dist/vue/index.js +8 -1
  66. package/dist/vue/index.js.map +1 -1
  67. package/package.json +3 -3
  68. package/src/native/date-format.android.ts +22 -0
  69. package/src/native/date-format.ios.ts +22 -0
  70. package/src/native/date-format.ts +7 -0
  71. package/src/native/image-crop-common.ts +46 -0
  72. package/src/native/image-crop.android.ts +140 -0
  73. package/src/native/image-crop.ios.ts +94 -0
  74. package/src/native/image-crop.ts +4 -0
  75. package/src/vue/components/advanced.ts +263 -0
  76. package/src/vue/index.ts +20 -0
package/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # Mavis UI for NativeScript
2
2
 
3
- NativeScript components and themes for Mavis UI `0.1.0-rc.12`, starting with Vue. Experimental prerelease for testing in real apps; the API can change between prerelease versions. Licensed under MIT.
3
+ NativeScript components and themes for Mavis UI `0.1.0-rc.12.1`, starting with Vue. Experimental prerelease for testing in real apps; the API can change between prerelease versions. Licensed under MIT.
4
4
 
5
5
  In an existing NativeScript-Vue application:
6
6
 
7
7
  Alpha.9 includes `createMavisServices` from `@getcortexlabs/mavis/vue/services` for local component imports and the adaptive `MGrid`. See the [modular installation guide](https://mavis-ui.getcortexlabs.com/guide/modular).
8
8
 
9
9
  ```sh
10
- npm install @getcortexlabs/mavis@0.1.0-rc.12 @rafaelaugusto/jolt@0.1.0-rc.11.1
10
+ npm install @getcortexlabs/mavis@0.1.0-rc.12.2 @rafaelaugusto/jolt@0.1.0-rc.12.1
11
11
  ```
12
12
 
13
13
  ```ts
@@ -30,9 +30,9 @@ The plugin registers the layout, typography, form, selection, feedback and overl
30
30
  - `platforms/android/java/`: the native flex measurement adapter, compiled by NativeScript.
31
31
  - `src/vue/`: Vue components, reactive theme context, and optional global registration.
32
32
 
33
- The root entry exports themes and their types. The `/vue` entry exports components, `createMavis`, and `useMavisTheme`. `createMavis({ theme, darkTheme })` follows the device appearance and `setAppearance` overrides it. NativeScript Core 9.1.3+, Jolt 0.1.0-rc.11.1+, and NativeScript-Vue 3.1.3+ are the source development baseline. The consuming Vue app installs all three; Vue is optional on the package metadata so importing theme values does not require a Vue renderer.
33
+ The root entry exports themes and their types. The `/vue` entry exports components, `createMavis`, and `useMavisTheme`. `createMavis({ theme, darkTheme })` follows the device appearance and `setAppearance` overrides it. NativeScript Core 9.1.3+, Jolt 0.1.0-rc.12.1+, and NativeScript-Vue 3.1.3+ are the source development baseline. The consuming Vue app installs all three; Vue is optional on the package metadata so importing theme values does not require a Vue renderer.
34
34
 
35
- Tested package-consumer baseline: NativeScript Core 9.1.3, NativeScript-Vue 3.1.3, Jolt 0.1.0-rc.11.1, Android runtime 9.1.1 and iOS runtime 9.1.0. See [Getting started](https://mavis-ui.getcortexlabs.com/guide/foundation) for setup.
35
+ Package-consumer validation target: NativeScript Core 9.1.3, NativeScript-Vue 3.1.3, Jolt 0.1.0-rc.12.1, Android runtime 9.1.1 and iOS runtime 9.1.0. See [Getting started](https://mavis-ui.getcortexlabs.com/guide/foundation) for setup.
36
36
 
37
37
  Changes to the Android adapter require a native build. If an existing checkout reports a missing `com.mavis.ui.FlexLayout` after upgrading, run `ns clean` in the app directory and rebuild to regenerate native metadata.
38
38
 
@@ -40,4 +40,4 @@ Other NativeScript frameworks come after the Vue implementation. No adapters for
40
40
 
41
41
  Deep native layouts can be expensive ([#56](https://github.com/getcortexlabs/mavis-ui/issues/56)); VoiceOver can skip a newly inserted offscreen status ([#54](https://github.com/getcortexlabs/mavis-ui/issues/54)). Physical Android and full keyboard coverage remain pending. Read the [release notes](https://github.com/getcortexlabs/mavis-ui/blob/main/CHANGELOG.md) before adopting the release candidate.
42
42
 
43
- This release requires Jolt **0.1.0-rc.11.1** for the experimental visual effects, retained collections, platform motion and sensor integrations. Keep the Mavis packages at the same version. Rebuild native applications after upgrading Jolt.
43
+ This source checkout requires Jolt **0.1.0-rc.12.1** for the experimental visual effects, retained collections, platform motion and sensor integrations. Keep the Mavis packages at the same version. Rebuild native applications after upgrading Jolt.
@@ -2,4 +2,8 @@ import { type DateTimeValue, type DateTimeFormatOptions } from '@getcortexlabs/m
2
2
  export type { DateTimeValue, DateTimeFormatOptions, DateTimeStyle } from '@getcortexlabs/mavis-core';
3
3
  export declare function formatDateTime(value: DateTimeValue, options: DateTimeFormatOptions): string;
4
4
  export declare function dateTimeToCivilDate(value: DateTimeValue, options: Pick<DateTimeFormatOptions, 'timeZone'>): `${number}-${number}-${number}`;
5
+ export declare function schedulerParts(value: DateTimeValue, options: Pick<DateTimeFormatOptions, 'timeZone'>): {
6
+ date: `${number}-${number}-${number}`;
7
+ minute: number;
8
+ };
5
9
  //# sourceMappingURL=date-format.android.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-format.android.d.ts","sourceRoot":"","sources":["../../src/native/date-format.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC3B,MAAM,2BAA2B,CAAA;AAClC,YAAY,EAAE,aAAa,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAsCpG,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,qBAAqB,GAAG,MAAM,CAc3F;AACD,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,aAAa,EACpB,OAAO,EAAE,IAAI,CAAC,qBAAqB,EAAE,UAAU,CAAC,mCASjD"}
1
+ {"version":3,"file":"date-format.android.d.ts","sourceRoot":"","sources":["../../src/native/date-format.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC3B,MAAM,2BAA2B,CAAA;AAClC,YAAY,EAAE,aAAa,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAsCpG,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,qBAAqB,GAAG,MAAM,CAc3F;AACD,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,aAAa,EACpB,OAAO,EAAE,IAAI,CAAC,qBAAqB,EAAE,UAAU,CAAC,mCASjD;AAGD,wBAAgB,cAAc,CAC5B,KAAK,EAAE,aAAa,EACpB,OAAO,EAAE,IAAI,CAAC,qBAAqB,EAAE,UAAU,CAAC;;;EAiBjD"}
@@ -36,4 +36,24 @@ export function dateTimeToCivilDate(value, options) {
36
36
  throw new RangeError('Civil dates support years 0001–9999.');
37
37
  return civilDate(text.slice(3));
38
38
  }
39
+ const schedulerFormats = new Map();
40
+ export function schedulerParts(value, options) {
41
+ const milliseconds = dateTimeMilliseconds(value);
42
+ const { timeZone } = resolveDateTimeOptions(options);
43
+ let result = schedulerFormats.get(timeZone);
44
+ if (!result) {
45
+ result = new java.text.SimpleDateFormat('G yyyy-MM-dd HH:mm', java.util.Locale.US);
46
+ configureCalendar(result, timeZone, java.util.Locale.US);
47
+ if (schedulerFormats.size >= 32)
48
+ schedulerFormats.clear();
49
+ schedulerFormats.set(timeZone, result);
50
+ }
51
+ const text = String(result.format(new java.util.Date(milliseconds)));
52
+ if (!text.startsWith('AD '))
53
+ throw new RangeError('Civil dates support years 0001–9999.');
54
+ return {
55
+ date: civilDate(text.slice(3, 13)),
56
+ minute: Number(text.slice(14, 16)) * 60 + Number(text.slice(17, 19)),
57
+ };
58
+ }
39
59
  //# sourceMappingURL=date-format.android.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-format.android.js","sourceRoot":"","sources":["../../src/native/date-format.android.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,oBAAoB,EACpB,sBAAsB,GAGvB,MAAM,2BAA2B,CAAA;AA2BlC,SAAS,IAAI,CAAC,IAAY;IACxB,2FAA2F;IAC3F,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,eAAe,EAAE,CAAC,CAAA;IAC9D,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC;QAAE,MAAM,IAAI,UAAU,CAAC,qBAAqB,IAAI,EAAE,CAAC,CAAA;IAC5E,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;AAC7C,CAAC;AACD,SAAS,iBAAiB,CAAC,SAAoB,EAAE,QAAgB,EAAE,MAAe;IAChF,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAA;IAC5B,MAAM,QAAQ,GAAG,IAAI,IAAI,CAAC,IAAI,CA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android implementation in a device bundle. */
4
4
  export declare function formatDateTime(_value: DateTimeValue, _options: DateTimeFormatOptions): string;
5
5
  export declare function dateTimeToCivilDate(_value: DateTimeValue, _options: Pick<DateTimeFormatOptions, 'timeZone'>): CivilDate;
6
+ export declare function schedulerParts(_value: number, _options: {
7
+ timeZone: string;
8
+ }): import('@getcortexlabs/mavis-core').SchedulerCivilTime;
6
9
  //# sourceMappingURL=date-format.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-format.d.ts","sourceRoot":"","sources":["../../src/native/date-format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAChG,YAAY,EAAE,aAAa,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEpG,iFAAiF;AACjF,wBAAgB,cAAc,CAAC,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,qBAAqB,GAAG,MAAM,CAI7F;AACD,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,IAAI,CAAC,qBAAqB,EAAE,UAAU,CAAC,GAChD,SAAS,CAIX"}
1
+ {"version":3,"file":"date-format.d.ts","sourceRoot":"","sources":["../../src/native/date-format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAChG,YAAY,EAAE,aAAa,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEpG,iFAAiF;AACjF,wBAAgB,cAAc,CAAC,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,qBAAqB,GAAG,MAAM,CAI7F;AACD,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,IAAI,CAAC,qBAAqB,EAAE,UAAU,CAAC,GAChD,SAAS,CAIX;AAED,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,GAC7B,OAAO,2BAA2B,EAAE,kBAAkB,CAExD"}
@@ -2,4 +2,8 @@ import { type DateTimeValue, type DateTimeFormatOptions } from '@getcortexlabs/m
2
2
  export type { DateTimeValue, DateTimeFormatOptions, DateTimeStyle } from '@getcortexlabs/mavis-core';
3
3
  export declare function formatDateTime(value: DateTimeValue, options: DateTimeFormatOptions): string;
4
4
  export declare function dateTimeToCivilDate(value: DateTimeValue, options: Pick<DateTimeFormatOptions, 'timeZone'>): `${number}-${number}-${number}`;
5
+ export declare function schedulerParts(value: DateTimeValue, options: Pick<DateTimeFormatOptions, 'timeZone'>): {
6
+ date: `${number}-${number}-${number}`;
7
+ minute: number;
8
+ };
5
9
  //# sourceMappingURL=date-format.ios.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-format.ios.d.ts","sourceRoot":"","sources":["../../src/native/date-format.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC3B,MAAM,2BAA2B,CAAA;AAClC,YAAY,EAAE,aAAa,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AA+BpG,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,qBAAqB,GAAG,MAAM,CAG3F;AACD,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,aAAa,EACpB,OAAO,EAAE,IAAI,CAAC,qBAAqB,EAAE,UAAU,CAAC,mCASjD"}
1
+ {"version":3,"file":"date-format.ios.d.ts","sourceRoot":"","sources":["../../src/native/date-format.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC3B,MAAM,2BAA2B,CAAA;AAClC,YAAY,EAAE,aAAa,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AA+BpG,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,qBAAqB,GAAG,MAAM,CAG3F;AACD,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,aAAa,EACpB,OAAO,EAAE,IAAI,CAAC,qBAAqB,EAAE,UAAU,CAAC,mCASjD;AAGD,wBAAgB,cAAc,CAC5B,KAAK,EAAE,aAAa,EACpB,OAAO,EAAE,IAAI,CAAC,qBAAqB,EAAE,UAAU,CAAC;;;EAiBjD"}
@@ -26,4 +26,22 @@ export function dateTimeToCivilDate(value, options) {
26
26
  throw new RangeError('Civil dates support years 0001–9999.');
27
27
  return civilDate(text.slice(3));
28
28
  }
29
+ const schedulerFormats = new Map();
30
+ export function schedulerParts(value, options) {
31
+ let result = schedulerFormats.get(options.timeZone);
32
+ if (!result) {
33
+ result = formatter({ ...options, locale: 'en-US-POSIX', dateStyle: 'short' });
34
+ result.dateFormat = 'G yyyy-MM-dd HH:mm';
35
+ if (schedulerFormats.size >= 32)
36
+ schedulerFormats.clear();
37
+ schedulerFormats.set(options.timeZone, result);
38
+ }
39
+ const text = result.stringFromDate(NSDate.dateWithTimeIntervalSince1970(dateTimeMilliseconds(value) / 1000));
40
+ if (!text.startsWith('AD '))
41
+ throw new RangeError('Civil dates support years 0001–9999.');
42
+ return {
43
+ date: civilDate(text.slice(3, 13)),
44
+ minute: Number(text.slice(14, 16)) * 60 + Number(text.slice(17, 19)),
45
+ };
46
+ }
29
47
  //# sourceMappingURL=date-format.ios.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-format.ios.js","sourceRoot":"","sources":["../../src/native/date-format.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,oBAAoB,EACpB,sBAAsB,GAGvB,MAAM,2BAA2B,CAAA;AAkBlC,SAAS,SAAS,CAAC,OAA8B;IAC/C,MAAM,MAAM,GAAG,sBAAsB,CAAC,OAAO,CAAC,CAAA;IAC9C,MAAM,IAAI,GAAG,UAAU,CAAC,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,CAAC;AAED,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAqB,CAAA;AACrD,MAAM,UAAU,cAAc,CAC5B,KAAoB,EACpB,OAAgD;IAEhD,IAAI,MAAM,GAAG,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;IACnD,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,GAAG,SAAS,CAAC,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAA;QAC7E,MAAM,CAAC,UAAU,GAAG,oBAAoB,CAAA;QACxC,IAAI,gBAAgB,CAAC,IAAI,IAAI,EAAE;YAAE,gBAAgB,CAAC,KAAK,EAAE,CAAA;QACzD,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;IAChD,CAAC;IACD,MAAM,IAAI,GAAG,MAAM,CAAC,cAAc,CAChC,MAAM,CAAC,6BAA6B,CAAC,oBAAoB,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CACzE,CAAA;IACD,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;QAAE,MAAM,IAAI,UAAU,CAAC,sCAAsC,CAAC,CAAA;IACzF,OAAO;QACL,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAClC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;KACrE,CAAA;AACH,CAAC"}
@@ -5,4 +5,7 @@ export function formatDateTime(_value, _options) {
5
5
  export function dateTimeToCivilDate(_value, _options) {
6
6
  throw new Error('Native date formatting requires an iOS or Android runtime. Use the Web formatter on the server.');
7
7
  }
8
+ export function schedulerParts(_value, _options) {
9
+ throw new Error('Native scheduling requires an iOS or Android runtime.');
10
+ }
8
11
  //# sourceMappingURL=date-format.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-format.js","sourceRoot":"","sources":["../../src/native/date-format.ts"],"names":[],"mappings":"AAGA,iFAAiF;AACjF,MAAM,UAAU,cAAc,CAAC,MAAqB,EAAE,QAA+B;IACnF,MAAM,IAAI,KAAK,CACb,iGAAiG,CAClG,CAAA;AACH,CAAC;AACD,MAAM,UAAU,mBAAmB,CACjC,MAAqB,EACrB,QAAiD;IAEjD,MAAM,IAAI,KAAK,CACb,iGAAiG,CAClG,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"date-format.js","sourceRoot":"","sources":["../../src/native/date-format.ts"],"names":[],"mappings":"AAGA,iFAAiF;AACjF,MAAM,UAAU,cAAc,CAAC,MAAqB,EAAE,QAA+B;IACnF,MAAM,IAAI,KAAK,CACb,iGAAiG,CAClG,CAAA;AACH,CAAC;AACD,MAAM,UAAU,mBAAmB,CACjC,MAAqB,EACrB,QAAiD;IAEjD,MAAM,IAAI,KAAK,CACb,iGAAiG,CAClG,CAAA;AACH,CAAC;AAED,MAAM,UAAU,cAAc,CAC5B,MAAc,EACd,QAA8B;IAE9B,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAA;AAC1E,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { ImageSource } from '@nativescript/core';
2
+ import type { CropExport, CropExportOptions } from '@getcortexlabs/mavis-core';
3
+ export declare function loadSource(src: string): Promise<ImageSource>;
4
+ export declare function saveCrop(source: ImageSource, width: number, height: number, options: CropExportOptions): Promise<CropExport>;
5
+ //# sourceMappingURL=image-crop-common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-crop-common.d.ts","sourceRoot":"","sources":["../../src/native/image-crop-common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAA4B,MAAM,oBAAoB,CAAA;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC9E,wBAAsB,UAAU,CAAC,GAAG,EAAE,MAAM,wBAS3C;AAED,wBAAsB,QAAQ,CAC5B,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,UAAU,CAAC,CA2BrB"}
@@ -0,0 +1,36 @@
1
+ import { ImageSource, File, knownFolders, path } from '@nativescript/core';
2
+ export async function loadSource(src) {
3
+ const source = /^https?:\/\//i.test(src)
4
+ ? await ImageSource.fromUrl(src)
5
+ : src.startsWith('data:image/')
6
+ ? await ImageSource.fromBase64(src.slice(src.indexOf(',') + 1))
7
+ : ImageSource.fromFileOrResourceSync(src);
8
+ if (!source || !Number.isFinite(source.width) || source.width <= 0 || source.height <= 0)
9
+ throw new Error('Could not decode the crop image.');
10
+ return source;
11
+ }
12
+ let serial = 0;
13
+ export async function saveCrop(source, width, height, options) {
14
+ const uri = path.join(knownFolders.temp().path, `mavis-crop-${Date.now()}-${++serial}.${options.mimeType === 'image/png' ? 'png' : 'jpg'}`);
15
+ let disposal;
16
+ function dispose() {
17
+ return (disposal ??= File.exists(uri) ? File.fromPath(uri).remove() : Promise.resolve());
18
+ }
19
+ try {
20
+ const saved = await source.saveToFileAsync(uri, options.mimeType === 'image/png' ? 'png' : 'jpeg', Math.round(options.quality * 100));
21
+ if (!saved)
22
+ throw new Error('Could not save the cropped image.');
23
+ }
24
+ catch (error) {
25
+ await dispose();
26
+ throw error;
27
+ }
28
+ return {
29
+ uri,
30
+ width,
31
+ height,
32
+ mimeType: options.mimeType,
33
+ dispose,
34
+ };
35
+ }
36
+ //# sourceMappingURL=image-crop-common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-crop-common.js","sourceRoot":"","sources":["../../src/native/image-crop-common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,YAAY,EAA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AC,MAAM,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAA;IAC1F,CAAC;IACD,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,eAAe,CACxC,GAAG,EACH,OAAO,CAAC,QAAQ,KAAK,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EACjD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,GAAG,GAAG,CAAC,CAClC,CAAA;QACD,IAAI,CAAC,KAAK;YAAE,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAA;IAClE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,OAAO,EAAE,CAAA;QACf,MAAM,KAAK,CAAA;IACb,CAAC;IACD,OAAO;QACL,GAAG;QACH,KAAK;QACL,MAAM;QACN,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,OAAO;KACR,CAAA;AACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type CropSource } from '@getcortexlabs/mavis-core';
2
+ export declare function loadCropImage(src: string): Promise<CropSource>;
3
+ //# sourceMappingURL=image-crop.android.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-crop.android.d.ts","sourceRoot":"","sources":["../../src/native/image-crop.android.ts"],"names":[],"mappings":"AACA,OAAO,EAAqC,KAAK,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAiF9F,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAyDpE"}
@@ -0,0 +1,92 @@
1
+ import { ImageSource, File, Http, knownFolders, path } from '@nativescript/core';
2
+ import { cropOutputSize, validateImageCrop } from '@getcortexlabs/mavis-core';
3
+ import { loadSource, saveCrop } from './image-crop-common';
4
+ let sequence = 0;
5
+ /** Keep original bytes until EXIF has been applied, including data URIs and downloads. */
6
+ async function androidSource(src) {
7
+ let filename = src, temporary = false;
8
+ try {
9
+ if (/^https?:\/\//i.test(src) || src.startsWith('data:image/')) {
10
+ filename = path.join(knownFolders.temp().path, `mavis-crop-source-${Date.now()}-${++sequence}.img`);
11
+ temporary = true;
12
+ if (src.startsWith('data:image/')) {
13
+ if (!src.slice(0, src.indexOf(',')).endsWith(';base64'))
14
+ throw new TypeError('Native crop data URIs must be base64 encoded.');
15
+ File.fromPath(filename).writeSync(android.util.Base64.decode(src.slice(src.indexOf(',') + 1), 0));
16
+ }
17
+ else
18
+ await Http.getFile(src, filename);
19
+ }
20
+ else if (src.startsWith('~/'))
21
+ filename = path.join(knownFolders.currentApp().path, src.slice(2));
22
+ const source = await loadSource(filename);
23
+ let orientation = 1;
24
+ if (!filename.startsWith('res://')) {
25
+ // Platform ExifInterface may not support metadata for every decodable format.
26
+ try {
27
+ orientation = new android.media.ExifInterface(filename).getAttributeInt('Orientation', 1);
28
+ }
29
+ catch {
30
+ orientation =
31
+ { 90: 6, 180: 3, 270: 8 }[source.rotationAngle] ?? 1;
32
+ }
33
+ }
34
+ return { source, orientation };
35
+ }
36
+ finally {
37
+ if (temporary && File.exists(filename))
38
+ await File.fromPath(filename).remove();
39
+ }
40
+ }
41
+ export async function loadCropImage(src) {
42
+ const { source, orientation } = await androidSource(src);
43
+ let bitmap = source.android;
44
+ if (source.width * source.height > 40000000)
45
+ throw new RangeError('ImageCropper supports at most 40 megapixels.');
46
+ if (orientation >= 2 && orientation <= 8) {
47
+ const matrix = new android.graphics.Matrix();
48
+ const rotation = { 3: 180, 4: 180, 5: 90, 6: 90, 7: 270, 8: 270 }[orientation] ?? 0;
49
+ if (rotation)
50
+ matrix.postRotate(rotation);
51
+ if ([2, 4, 5, 7].includes(orientation))
52
+ matrix.postScale(-1, 1);
53
+ bitmap = android.graphics.Bitmap.createBitmap(bitmap, 0, 0, source.width, source.height, matrix, true);
54
+ }
55
+ const width = bitmap.getWidth(), height = bitmap.getHeight(), preview = new ImageSource(bitmap);
56
+ let disposed = false;
57
+ return {
58
+ width,
59
+ height,
60
+ preview,
61
+ dispose() {
62
+ disposed = true; /* The view can retain the bitmap until its next layout; leave native reclamation to GC. */
63
+ },
64
+ async export(crop, options) {
65
+ if (disposed)
66
+ throw new Error('Image source has been released.');
67
+ validateImageCrop({ width, height }, crop);
68
+ const size = cropOutputSize(crop, options);
69
+ const output = android.graphics.Bitmap.createBitmap(size.width, size.height, android.graphics.Bitmap.Config.ARGB_8888);
70
+ try {
71
+ const canvas = new android.graphics.Canvas(output);
72
+ if (options.mimeType === 'image/jpeg')
73
+ canvas.drawColor(android.graphics.Color.WHITE);
74
+ canvas.scale(size.width / crop.width, size.height / crop.height);
75
+ canvas.translate(-crop.x, -crop.y);
76
+ if (crop.rotation === 90)
77
+ canvas.translate(height, 0);
78
+ if (crop.rotation === 180)
79
+ canvas.translate(width, height);
80
+ if (crop.rotation === 270)
81
+ canvas.translate(0, width);
82
+ canvas.rotate(crop.rotation);
83
+ canvas.drawBitmap(bitmap, 0, 0, new android.graphics.Paint(3));
84
+ return await saveCrop(new ImageSource(output), size.width, size.height, options);
85
+ }
86
+ finally {
87
+ output.recycle();
88
+ }
89
+ },
90
+ };
91
+ }
92
+ //# sourceMappingURL=image-crop.android.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-crop.android.js","sourceRoot":"","sources":["../../src/native/image-crop.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAChF,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAmB,MAAM,2BAA2B,CAAA;AAC9F,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AA2C1D,IAAI,QAAQ,GAAG,CAAC,CAAA;AAChB,0FAA0F;AAC1F,KAAK,UAAU,aAAa,CAAC,GAAW;IACtC,IAAI,QAAQ,GAAG,GAAG,EAChB,SAAS,GAAG,KAAK,CAAA;IACnB,IAAI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ceMappingURL=image-crop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-crop.d.ts","sourceRoot":"","sources":["../../src/native/image-crop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAC3D,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAErE"}
@@ -0,0 +1,3 @@
1
+ import { type CropSource } from '@getcortexlabs/mavis-core';
2
+ export declare function loadCropImage(src: string): Promise<CropSource>;
3
+ //# sourceMappingURL=image-crop.ios.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-crop.ios.d.ts","sourceRoot":"","sources":["../../src/native/image-crop.ios.ts"],"names":[],"mappings":"AACA,OAAO,EAAqC,KAAK,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAsC9F,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAsDpE"}
@@ -0,0 +1,68 @@
1
+ import { ImageSource } from '@nativescript/core';
2
+ import { cropOutputSize, validateImageCrop } from '@getcortexlabs/mavis-core';
3
+ import { loadSource, saveCrop } from './image-crop-common';
4
+ const rect = (width, height) => ({
5
+ origin: { x: 0, y: 0 },
6
+ size: { width, height },
7
+ });
8
+ export async function loadCropImage(src) {
9
+ const source = await loadSource(src), original = source.ios, width = Math.round(original.size.width * original.scale), height = Math.round(original.size.height * original.scale);
10
+ if (width * height > 40000000)
11
+ throw new RangeError('ImageCropper supports at most 40 megapixels.');
12
+ let image;
13
+ UIGraphicsBeginImageContextWithOptions({ width, height }, false, 1);
14
+ try {
15
+ original.drawInRect(rect(width, height));
16
+ image = UIGraphicsGetImageFromCurrentImageContext();
17
+ }
18
+ finally {
19
+ UIGraphicsEndImageContext();
20
+ }
21
+ if (!image)
22
+ throw new Error('Could not normalize the source image.');
23
+ const normalized = image, preview = new ImageSource(normalized);
24
+ let disposed = false;
25
+ return {
26
+ width,
27
+ height,
28
+ preview,
29
+ dispose() {
30
+ disposed = true;
31
+ },
32
+ async export(crop, options) {
33
+ if (disposed)
34
+ throw new Error('Image source has been released.');
35
+ validateImageCrop({ width, height }, crop);
36
+ const size = cropOutputSize(crop, options);
37
+ let result;
38
+ UIGraphicsBeginImageContextWithOptions(size, false, 1);
39
+ try {
40
+ const context = UIGraphicsGetCurrentContext();
41
+ if (!context)
42
+ throw new Error('Could not allocate the crop context.');
43
+ if (options.mimeType === 'image/jpeg') {
44
+ CGContextSetRGBFillColor(context, 1, 1, 1, 1);
45
+ CGContextFillRect(context, rect(size.width, size.height));
46
+ }
47
+ CGContextScaleCTM(context, size.width / crop.width, size.height / crop.height);
48
+ CGContextTranslateCTM(context, -crop.x, -crop.y);
49
+ if (crop.rotation === 90)
50
+ CGContextTranslateCTM(context, height, 0);
51
+ if (crop.rotation === 180)
52
+ CGContextTranslateCTM(context, width, height);
53
+ if (crop.rotation === 270)
54
+ CGContextTranslateCTM(context, 0, width);
55
+ CGContextRotateCTM(context, (crop.rotation * Math.PI) / 180);
56
+ normalized.drawInRect(rect(width, height));
57
+ result = UIGraphicsGetImageFromCurrentImageContext();
58
+ }
59
+ finally {
60
+ UIGraphicsEndImageContext();
61
+ }
62
+ if (!result)
63
+ throw new Error('Could not render the cropped image.');
64
+ return saveCrop(new ImageSource(result), size.width, size.height, options);
65
+ },
66
+ };
67
+ }
68
+ //# sourceMappingURL=image-crop.ios.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-crop.ios.js","sourceRoot":"","sources":["../../src/native/image-crop.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAmB,MAAM,2BAA2B,CAAA;AAC9F,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAiC1D,MAAM,IAAI,GAAG,CAAC,KAAa,EAAE,MAA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K,GAAG;oBAAE,qBAAqB,CAAC,OAAO,EAAE,CAAC,EAAE,KAAK,CAAC,CAAA;gBACnE,kBAAkB,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,CAAA;gBAC5D,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAA;gBAC1C,MAAM,GAAG,yCAAyC,EAAE,CAAA;YACtD,CAAC;oBAAS,CAAC;gBACT,yBAAyB,EAAE,CAAA;YAC7B,CAAC;YACD,IAAI,CAAC,MAAM;gBAAE,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAA;YACnE,OAAO,QAAQ,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;QAC5E,CAAC;KACF,CAAA;AACH,CAAC"}
@@ -0,0 +1,4 @@
1
+ export async function loadCropImage(_src) {
2
+ throw new Error('Image cropping requires an iOS or Android runtime.');
3
+ }
4
+ //# sourceMappingURL=image-crop.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-crop.js","sourceRoot":"","sources":["../../src/native/image-crop.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,IAAY;IAC9C,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAA;AACvE,CAAC"}
@@ -96,9 +96,9 @@ export declare const DateCalendar: import("nativescript-vue").DefineComponent<im
96
96
  }>, {
97
97
  locale: import("@getcortexlabs/mavis-core").DateLocale;
98
98
  disabled: boolean;
99
+ readonly: boolean;
99
100
  min: `${number}-${number}-${number}`;
100
101
  max: `${number}-${number}-${number}`;
101
- readonly: boolean;
102
102
  selected: `${number}-${number}-${number}` | null;
103
103
  rangeStart: `${number}-${number}-${number}` | null;
104
104
  rangeEnd: `${number}-${number}-${number}` | null;
@@ -110,9 +110,9 @@ export declare const MAccordion: import("nativescript-vue").DefineComponent<impo
110
110
  grow: number;
111
111
  shrink: number;
112
112
  modelValue: readonly import("@getcortexlabs/mavis-core").ChoiceValue[];
113
+ multiple: boolean;
113
114
  expandedLabel: string;
114
115
  collapsedLabel: string;
115
- multiple: boolean;
116
116
  }, SlotsType<{
117
117
  default: AccordionPanelProps;
118
118
  }>, {}, {}, string, import("nativescript-vue").ComponentProvideOptions, true, {}, any>;