@live-change/image-frontend 0.9.32 → 0.9.34

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.
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="w-full">
3
- <div class="w-full surface-0">
4
- <h2 class="p-4">Editor:</h2>
3
+ <div class="w-full bg-surface-0 dark:bg-surface-900">
4
+ <h2 class="p-6">Editor:</h2>
5
5
  <ImageEditor v-model="image" />
6
6
  <!-- :source-image="'[Wc6P55MDs.0@1V6ZJBwyF_1I98X_]'"-->
7
7
  </div>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="w-full relative surface-400 overflow-hidden" ref="dragArea"
2
+ <div class="w-full relative bg-surface-400 dark:bg-surface-400 overflow-hidden" ref="dragArea"
3
3
  @mousedown="handleEditorMouseDown"
4
4
  @mouseup="handleEditorMouseUp"
5
5
  @mouseout="handleEditorMouseOut"
@@ -9,13 +9,14 @@
9
9
  @touchcancel="handleEditorTouchCancel"
10
10
  @touchmove="handleEditorTouchMove"
11
11
  @wheel="handleEditorWheel">
12
- <div class="p-4 md:p-5 lg:p-6 flex flex-row justify-content-center align-items-center">
12
+ <div class="p-6 md:p-8 lg:p-12 flex flex-row justify-center items-center">
13
13
  <div class="w-full relative"
14
14
  :style="`aspect-ratio: ${aspectRatio}; max-width: 40vh;`"
15
15
  ref="cropArea">
16
- <div class="absolute left-50 top-50 w-0 h-0">
16
+ <div class="absolute left-1/2 top-1/2">
17
17
  <Image :image="sourceImage"
18
18
  :style="{ width: `${rectSize?.x}px`, transform: imageTransform }"
19
+ class="max-w-none"
19
20
  @size="handleImageSize" />
20
21
  </div>
21
22
  </div>
@@ -9,12 +9,12 @@
9
9
  :type="type"
10
10
  v-model:ready="cropReady"
11
11
  ref="imageCrop" style="max-height: 60vh" />
12
- <div class="flex p-3 pb-2 flex-wrap">
13
- <div class="flex-grow-1 flex justify-content-center">
12
+ <div class="flex p-4 pb-2 flex-wrap">
13
+ <div class="grow flex justify-center">
14
14
  <Button type="button" label="Upload" icon="pi pi-upload" class="p-button-primary mb-2"
15
15
  @click="() => state = 'upload' "/>
16
16
  </div>
17
- <div class="flex flex-grow-1 justify-content-center">
17
+ <div class="flex grow justify-center">
18
18
  <Button type="button" label="Save" icon="pi pi-save" class="p-button-warning ml-2 mb-2"
19
19
  :disabled="!cropReady" @click="saveImage" />
20
20
  <Button type="button" label="Remove" icon="pi pi-times" class="p-button-danger ml-2 mb-2"
@@ -22,17 +22,17 @@
22
22
  </div>
23
23
  </div>
24
24
  </div>
25
- <div v-else-if="state === 'upload'" class="flex flex-column align-items-center">
26
- <DropZone class="flex-grow-1 w-full relative p-4 md:p-5 lg:p-6 pt-2 md:pt-3 lg:pt-4 surface-section"
25
+ <div v-else-if="state === 'upload'" class="flex flex-col items-center">
26
+ <DropZone class="grow w-full relative p-6 md:p-8 lg:p-12 pt-2 md:pt-4 lg:pt-6 bg-surface-0 dark:bg-surface-950"
27
27
  :accept="acceptList" @input="handleFile">
28
- <div class="w-auto flex flex-row align-items-center justify-content-center">
29
- <div class="w-full border-dashed border-primary-500 flex align-items-center justify-content-center"
28
+ <div class="w-auto flex flex-row items-center justify-center">
29
+ <div class="w-full border-2 border-dashed border-primary-500 flex items-center justify-center"
30
30
  :style="`aspect-ratio: ${aspectRatio}; max-width: 50vh`">
31
31
  <p class="text-primary text-xl">Drop image here!</p>
32
32
  </div>
33
33
  </div>
34
34
  </DropZone>
35
- <div class="w-full flex justify-content-center px-4 pt-3 pb-3 flex-grow-0">
35
+ <div class="w-full flex justify-center px-6 pt-4 pb-4 grow-0">
36
36
  <FileInput :accept="acceptList" @input="handleFile" class="block">
37
37
  <Button type="button" label="Upload Image" icon="pi pi-upload" class="p-button-primary" />
38
38
  </FileInput>
@@ -191,9 +191,9 @@
191
191
  )
192
192
  const originalImage = imageData.value.originalImage
193
193
  console.log("IM DATA", imageData, originalImage)
194
- imageName.value = originalImage.name
195
- const splitName = originalImage.name.split('.')
196
- const extension = splitName[splitName.length - 1].toLowerCase()
194
+ imageName.value = originalImage?.name ?? imageData.value.name
195
+ const extension = (imageData.value.extension ?? originalImage?.extension) ||
196
+ (originalImage?.name && originalImage.name.split('.').pop())
197
197
  switch(extension) {
198
198
  case 'jpg':
199
199
  case 'jpeg':
@@ -208,7 +208,7 @@
208
208
  break
209
209
  }
210
210
  cropData.value = imageData.value.crop
211
- sourceImage.value = originalImage.id
211
+ sourceImage.value = originalImage?.id ?? imageData.value.id
212
212
  console.log("IMAGE", imageName.value, imageType.value)
213
213
  })())
214
214
  }
@@ -1,20 +1,20 @@
1
1
  <template>
2
2
  <div>
3
- <div v-if="modelValue" class="flex flex-column align-items-center">
3
+ <div v-if="modelValue" class="flex flex-col items-center">
4
4
  <Image :image="modelValue" :key="modelValue"
5
5
  :width="definition?.width ?? 400" :height="definition?.height ?? 400"
6
6
  style="max-width: 100%" />
7
- <div class="w-full mt-2 flex flex-row flex-wrap justify-content-around align-items-center">
7
+ <div class="w-full mt-2 flex flex-row flex-wrap justify-around items-center">
8
8
  <Button @click="cropImage" type="button" label="Crop Image"
9
- icon="pi pi-pencil" class="p-button-secondary w-12rem" />
9
+ icon="pi pi-pencil" class="p-button-secondary w-48" />
10
10
  <Button @click="deleteImage" type="button" label="Remove Image"
11
- icon="pi pi-trash" class="p-button-danger w-12rem" />
11
+ icon="pi pi-trash" class="p-button-danger w-48" />
12
12
  </div>
13
13
  </div>
14
14
  <div v-else>
15
- <DropZone class="w-full relative p-2 flex justify-content-center align-items-center"
15
+ <DropZone class="w-full relative p-2 flex justify-center items-center"
16
16
  :accept="acceptList" @input="handleFile">
17
- <div class="w-auto border-dashed border-primary-500 flex align-items-center justify-content-center p-2"
17
+ <div class="w-auto border-dashed border-primary-500 flex items-center justify-center p-2"
18
18
  :style="dropZoneStyle">
19
19
  <p class="text-primary text-xl">Drop image here!</p>
20
20
  </div>
@@ -2,49 +2,49 @@
2
2
  <div class="surface-overlay py-3 px-6 shadow-2 flex align-items-center justify-content-between
3
3
  relative md:sticky top-0 z-5"
4
4
  style="min-height: 80px" key="navbar">
5
- <img src="/images/logo.svg" alt="Image" height="40" class="mr-0 lg:mr-6">
6
- <a v-ripple class="cursor-pointer block lg:hidden text-700 p-ripple"
7
- v-styleclass="{ selector: '@next', enterClass: 'hidden', leaveToClass: 'hidden', hideOnOutsideClick: true }">
5
+ <img src="/images/logo.svg" alt="Image" height="40" class="mr-0 lg:mr-12">
6
+ <a v-ripple class="cursor-pointer block lg:hidden text-surface-700 dark:text-surface-100 p-ripple"
7
+ v-styleclass="{ selector: '@next', enterFromClass: 'hidden', leaveToClass: 'hidden', hideOnOutsideClick: true }">
8
8
  <i class="pi pi-bars text-4xl"></i>
9
9
  </a>
10
- <div class="align-items-center flex-grow-1 justify-content-between hidden lg:flex absolute lg:static w-full surface-overlay left-0 top-100 z-1 shadow-2 lg:shadow-none">
11
- <ul class="list-none p-0 m-0 flex lg:align-items-center select-none flex-column lg:flex-row">
10
+ <div class="items-center grow justify-between hidden lg:flex absolute lg:static w-full bg-surface-0 dark:bg-surface-900 left-0 top-full z-10 shadow lg:shadow-none">
11
+ <ul class="list-none p-0 m-0 flex lg:items-center select-none flex-col lg:flex-row">
12
12
  <li>
13
- <a v-ripple class="flex px-6 p-3 lg:px-3 lg:py-2 align-items-center text-600 hover:text-900 hover:surface-100 font-medium border-round cursor-pointer transition-colors transition-duration-150 p-ripple">
13
+ <a v-ripple class="flex px-12 p-4 lg:px-4 lg:py-2 items-center text-surface-600 dark:text-surface-200 hover:text-surface-900 dark:hover:text-surface-0 hover:bg-surface-100 dark:hover:bg-surface-700 font-medium rounded-border cursor-pointer transition-colors duration-150 p-ripple">
14
14
  <i class="pi pi-home mr-2"></i>
15
15
  <span>Home</span>
16
16
  </a>
17
17
  </li>
18
18
  <li class="lg:relative">
19
- <a v-ripple class="flex px-6 p-3 lg:px-3 lg:py-2 align-items-center text-600 hover:text-900 hover:surface-100 font-medium border-round cursor-pointer transition-colors transition-duration-150 p-ripple"
20
- v-styleclass="{ selector: '@next', enterClass: 'hidden', enterActiveClass: 'scalein', leaveToClass: 'hidden', leaveActiveClass: 'fadeout', hideOnOutsideClick: true }">
19
+ <a v-ripple class="flex px-12 p-4 lg:px-4 lg:py-2 items-center text-surface-600 dark:text-surface-200 hover:text-surface-900 dark:hover:text-surface-0 hover:bg-surface-100 dark:hover:bg-surface-700 font-medium rounded-border cursor-pointer transition-colors duration-150 p-ripple"
20
+ v-styleclass="{ selector: '@next', enterFromClass: 'hidden', enterActiveClass: 'scalein', leaveToClass: 'hidden', leaveActiveClass: 'fadeout', hideOnOutsideClick: true }">
21
21
  <i class="pi pi-users mr-2"></i>
22
22
  <span>Customers</span>
23
- <i class="pi pi-angle-down ml-auto lg:ml-3"></i>
23
+ <i class="pi pi-angle-down ml-auto lg:ml-4"></i>
24
24
  </a>
25
- <ul class="list-none py-3 px-6 m-0 lg:px-0 lg:py-0 border-round shadow-0 lg:shadow-2 lg:border-1 border-50 lg:absolute surface-overlay hidden origin-top w-full lg:w-15rem cursor-pointer">
25
+ <ul class="list-none py-4 px-12 m-0 lg:px-0 lg:py-0 rounded-border shadow-0 lg:shadow lg:border border-surface-50 dark:border-surface-800 lg:absolute bg-surface-0 dark:bg-surface-900 hidden origin-top w-full lg:w-60 cursor-pointer">
26
26
  <li>
27
- <a v-ripple class="flex p-3 align-items-center text-600 hover:text-900 hover:surface-100 transition-colors transition-duration-150 p-ripple">
27
+ <a v-ripple class="flex p-4 items-center text-surface-600 dark:text-surface-200 hover:text-surface-900 dark:hover:text-surface-0 hover:bg-surface-100 dark:hover:bg-surface-700 transition-colors duration-150 p-ripple">
28
28
  <i class="pi pi-user-plus mr-2"></i>
29
29
  <span class="font-medium">Add New</span>
30
30
  </a>
31
31
  </li>
32
32
  <li class="relative">
33
- <a v-ripple class="flex p-3 align-items-center text-600 hover:text-900 hover:surface-100 transition-colors transition-duration-150 p-ripple"
34
- v-styleclass="{ selector: '@next', enterClass: 'hidden', enterActiveClass: 'scalein', leaveToClass: 'hidden', leaveActiveClass: 'fadeout', hideOnOutsideClick: true }">
33
+ <a v-ripple class="flex p-4 items-center text-surface-600 dark:text-surface-200 hover:text-surface-900 dark:hover:text-surface-0 hover:bg-surface-100 dark:hover:bg-surface-700 transition-colors duration-150 p-ripple"
34
+ v-styleclass="{ selector: '@next', enterFromClass: 'hidden', enterActiveClass: 'scalein', leaveToClass: 'hidden', leaveActiveClass: 'fadeout', hideOnOutsideClick: true }">
35
35
  <i class="pi pi-search mr-2"></i>
36
36
  <span class="font-medium">Search</span>
37
37
  <i class="pi pi-angle-down ml-auto lg:-rotate-90"></i>
38
38
  </a>
39
- <ul class="list-none py-3 pl-3 m-0 lg:px-0 lg:py-0 border-round shadow-0 lg:shadow-2 lg:border-1 border-50 lg:absolute surface-overlay hidden origin-top w-full lg:w-15rem cursor-pointer left-100 top-0">
39
+ <ul class="list-none py-4 pl-4 m-0 lg:px-0 lg:py-0 rounded-border shadow-0 lg:shadow lg:border border-surface-50 dark:border-surface-800 lg:absolute bg-surface-0 dark:bg-surface-900 hidden origin-top w-full lg:w-60 cursor-pointer left-full top-0">
40
40
  <li>
41
- <a v-ripple class="flex p-3 align-items-center text-600 hover:text-900 hover:surface-100 transition-colors transition-duration-150 p-ripple">
41
+ <a v-ripple class="flex p-4 items-center text-surface-600 dark:text-surface-200 hover:text-surface-900 dark:hover:text-surface-0 hover:bg-surface-100 dark:hover:bg-surface-700 transition-colors duration-150 p-ripple">
42
42
  <i class="pi pi-shopping-cart mr-2"></i>
43
43
  <span class="font-medium">Purchases</span>
44
44
  </a>
45
45
  </li>
46
46
  <li class="relative">
47
- <a v-ripple class="flex p-3 align-items-center text-600 hover:text-900 hover:surface-100 transition-colors transition-duration-150 p-ripple">
47
+ <a v-ripple class="flex p-4 items-center text-surface-600 dark:text-surface-200 hover:text-surface-900 dark:hover:text-surface-0 hover:bg-surface-100 dark:hover:bg-surface-700 transition-colors duration-150 p-ripple">
48
48
  <i class="pi pi-comments mr-2"></i>
49
49
  <span class="font-medium">Messages</span>
50
50
  </a>
@@ -54,21 +54,21 @@
54
54
  </ul>
55
55
  </li>
56
56
  <li>
57
- <a v-ripple class="flex px-6 p-3 lg:px-3 lg:py-2 align-items-center text-600 hover:text-900 hover:surface-100 font-medium border-round cursor-pointer transition-colors transition-duration-150 p-ripple">
57
+ <a v-ripple class="flex px-12 p-4 lg:px-4 lg:py-2 items-center text-surface-600 dark:text-surface-200 hover:text-surface-900 dark:hover:text-surface-0 hover:bg-surface-100 dark:hover:bg-surface-700 font-medium rounded-border cursor-pointer transition-colors duration-150 p-ripple">
58
58
  <i class="pi pi-calendar mr-2"></i>
59
59
  <span>Calendar</span>
60
60
  </a>
61
61
  </li>
62
62
  <li>
63
- <a v-ripple class="flex px-6 p-3 lg:px-3 lg:py-2 align-items-center text-600 hover:text-900 hover:surface-100 font-medium border-round cursor-pointer transition-colors transition-duration-150 p-ripple">
63
+ <a v-ripple class="flex px-12 p-4 lg:px-4 lg:py-2 items-center text-surface-600 dark:text-surface-200 hover:text-surface-900 dark:hover:text-surface-0 hover:bg-surface-100 dark:hover:bg-surface-700 font-medium rounded-border cursor-pointer transition-colors duration-150 p-ripple">
64
64
  <i class="pi pi-chart-line mr-2"></i>
65
65
  <span>Stats</span>
66
66
  </a>
67
67
  </li>
68
68
  </ul>
69
- <ul class="list-none p-0 m-0 flex lg:align-items-center select-none flex-column lg:flex-row border-top-1 surface-border lg:border-top-none">
69
+ <ul class="list-none p-0 m-0 flex lg:items-center select-none flex-col lg:flex-row border-t border-surface lg:border-t-0">
70
70
  <li>
71
- <a v-ripple class="flex px-6 p-3 lg:px-3 lg:py-2 align-items-center text-600 hover:text-900 hover:surface-100 font-medium border-round cursor-pointer transition-colors transition-duration-150 p-ripple">
71
+ <a v-ripple class="flex px-12 p-4 lg:px-4 lg:py-2 items-center text-surface-600 dark:text-surface-200 hover:text-surface-900 dark:hover:text-surface-0 hover:bg-surface-100 dark:hover:bg-surface-700 font-medium rounded-border cursor-pointer transition-colors duration-150 p-ripple">
72
72
  <i class="pi pi-inbox text-base lg:text-2xl mr-2 lg:mr-0"></i>
73
73
  <span class="block lg:hidden font-medium">Inbox</span>
74
74
  </a>
@@ -82,12 +82,12 @@
82
82
  <span class="block lg:hidden font-medium">Notifications</span>
83
83
  </a>
84
84
  </li>
85
- <li class="border-top-1 surface-border lg:border-top-none">
86
- <a v-ripple class="flex px-6 p-3 lg:px-3 lg:py-2 align-items-center hover:surface-100 font-medium border-round cursor-pointer transition-colors transition-duration-150 p-ripple">
87
- <img src="/images/empty-user-photo.svg" class="mr-3 lg:mr-0 border-circle" style="width: 28px; height: 28px"/>
85
+ <li class="border-t border-surface lg:border-t-0">
86
+ <a v-ripple class="flex px-12 p-4 lg:px-4 lg:py-2 items-center hover:bg-surface-100 dark:hover:bg-surface-700 font-medium rounded-border cursor-pointer transition-colors duration-150 p-ripple">
87
+ <img src="/images/empty-user-photo.svg" class="mr-4 lg:mr-0 rounded-full" style="width: 28px; height: 28px"/>
88
88
  <div class="block lg:hidden">
89
- <div class="text-900 font-medium">Josephine Lillard</div>
90
- <span class="text-600 font-medium text-sm">Marketing Specialist</span>
89
+ <div class="text-surface-900 dark:text-surface-0 font-medium">Josephine Lillard</div>
90
+ <span class="text-surface-600 dark:text-surface-200 font-medium text-sm">Marketing Specialist</span>
91
91
  </div>
92
92
  </a>
93
93
  </li>
@@ -1,7 +1,7 @@
1
1
  <template>
2
- <div class="w-full sm:w-9 md:w-8 lg:w-6 surface-card p-4 shadow-2 border-round">
3
- <div class="text-center mb-5">
4
- <div class="text-900 text-3xl font-medium mb-3">
2
+ <div class="w-full sm:w-9/12 md:w-8/12 lg:w-6/12 bg-surface-0 dark:bg-surface-900 p-6 shadow rounded-border">
3
+ <div class="text-center mb-8">
4
+ <div class="text-surface-900 dark:text-surface-0 text-3xl font-medium mb-4">
5
5
  Upload Test
6
6
  </div>
7
7
  </div>
@@ -17,7 +17,7 @@
17
17
  <h2>Image: {{ image }}</h2>
18
18
  <Image :image="image" width="200" height="200" />
19
19
  </div>
20
- <!-- <UploadView v-if="upload" :upload="upload" cancelable class="surface-card shadow-2 border-round p-4 mt-3" />-->
20
+ <!-- <UploadView v-if="upload" :upload="upload" cancelable class="bg-surface-0 dark:bg-surface-900 shadow rounded-border p-6 mt-4" />-->
21
21
  </div>
22
22
  </template>
23
23
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/image-frontend",
3
- "version": "0.9.32",
3
+ "version": "0.9.34",
4
4
  "scripts": {
5
5
  "memDev": "node server/start.js memDev --enableSessions --initScript ./init.js --dbAccess",
6
6
  "localDevInit": "rm tmp.db; lcli localDev --enableSessions --initScript ./init.js",
@@ -22,15 +22,15 @@
22
22
  "type": "module",
23
23
  "dependencies": {
24
24
  "@fortawesome/fontawesome-free": "^6.7.2",
25
- "@live-change/cli": "^0.9.32",
26
- "@live-change/dao": "^0.9.32",
27
- "@live-change/dao-vue3": "^0.9.32",
28
- "@live-change/dao-websocket": "^0.9.32",
29
- "@live-change/framework": "^0.9.32",
30
- "@live-change/image-service": "^0.9.32",
31
- "@live-change/session-service": "^0.9.32",
32
- "@live-change/vue3-components": "^0.9.32",
33
- "@live-change/vue3-ssr": "^0.9.32",
25
+ "@live-change/cli": "^0.9.34",
26
+ "@live-change/dao": "^0.9.34",
27
+ "@live-change/dao-vue3": "^0.9.34",
28
+ "@live-change/dao-websocket": "^0.9.34",
29
+ "@live-change/framework": "^0.9.34",
30
+ "@live-change/image-service": "^0.9.34",
31
+ "@live-change/session-service": "^0.9.34",
32
+ "@live-change/vue3-components": "^0.9.34",
33
+ "@live-change/vue3-ssr": "^0.9.34",
34
34
  "@vueuse/core": "^12.3.0",
35
35
  "codeceptjs-assert": "^0.0.5",
36
36
  "compression": "^1.7.5",
@@ -40,7 +40,7 @@
40
40
  "pretty-bytes": "^6.1.1",
41
41
  "primeflex": "^3.3.1",
42
42
  "primeicons": "^7.0.0",
43
- "primevue": "^3.52.0",
43
+ "primevue": "^4.2.5",
44
44
  "rollup-plugin-node-builtins": "^2.1.2",
45
45
  "rollup-plugin-visualizer": "5.14.0",
46
46
  "serialize-javascript": "^6.0.2",
@@ -50,7 +50,7 @@
50
50
  "vue3-scroll-border": "0.1.6"
51
51
  },
52
52
  "devDependencies": {
53
- "@live-change/codeceptjs-helper": "^0.9.32",
53
+ "@live-change/codeceptjs-helper": "^0.9.34",
54
54
  "codeceptjs": "^3.6.10",
55
55
  "generate-password": "1.7.1",
56
56
  "playwright": "1.49.1",
@@ -61,5 +61,5 @@
61
61
  "author": "Michał Łaszczewski <michal@laszczewski.pl>",
62
62
  "license": "BSD-3-Clause",
63
63
  "description": "",
64
- "gitHead": "41022fc283020e2da3e82aa27274401052d2379a"
64
+ "gitHead": "e5f22de77fe6a3c0a0e1b91d17593e195aaae3b3"
65
65
  }