amotify 0.2.157 → 0.2.159

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.
@@ -2,9 +2,9 @@ import ReactDOMClient from 'react-dom/client'
2
2
  import * as ReactRouterDOM from 'react-router-dom'
3
3
  import React,{ StrictMode,useEffect,useState } from 'react'
4
4
 
5
- import $$,{ UUID } from 'jmini'
5
+ import $$,{ Filer,UUID } from 'jmini'
6
6
 
7
- import {
7
+ import amotify,{
8
8
  Config,
9
9
  useRouterEffect,
10
10
  LaunchReactApp,
@@ -14,8 +14,14 @@ import {
14
14
  Button,
15
15
  Plate,
16
16
  Column,
17
+ Cropper,
18
+ Img,
17
19
  } from 'amotify'
18
20
 
21
+ import {
22
+
23
+ } from 'amotify/@styles/index'
24
+
19
25
  import '../../dist/@styles/style.css'
20
26
 
21
27
  import {
@@ -32,11 +38,43 @@ let Test = () => {
32
38
 
33
39
  let accordionID = 'accordionIDD'
34
40
 
41
+ let [ val_image,set_image ] = useState( '' )
42
+
35
43
  return <Box>
36
44
  <Plate size='S'>
37
45
  <Column
38
46
  padding={ 2 }
39
47
  >
48
+ <Button.Prime
49
+ onClick={ () => {
50
+ Cropper.openDialogNEdit( {
51
+ // use: '16:9',
52
+ // use: '9:16',
53
+
54
+ // use: '3:4',
55
+ // use: '4:3',
56
+
57
+ use: [ 9,16 ],
58
+
59
+ develops: [
60
+ { size: 'L' }
61
+ ],
62
+ onProcessFinished: async ( files ) => {
63
+ console.log( files )
64
+
65
+ let filer = await await Filer.fromFile( files[ 0 ] )
66
+ set_image( await filer.toDataURL() )
67
+ }
68
+ } )
69
+ } }
70
+ >
71
+ Submit
72
+ </Button.Prime>
73
+
74
+ { val_image && <Img
75
+ src={ val_image }
76
+ /> }
77
+
40
78
  <Input.Select
41
79
  options={ [
42
80
  { value: 'option1',label: 'Option 1',searchValue: 'Option 1' },
@@ -2504,7 +2504,7 @@ const Cropping = () => {
2504
2504
  onClick={ () => {
2505
2505
  Cropper.openDialogNEdit( {
2506
2506
  // use: 'square',
2507
- use: 'wallpaper.horizontal',
2507
+ use: '3:1',
2508
2508
  develops: [
2509
2509
  { size: 'S' },
2510
2510
  { size: 'R' },