@uploadcare/file-uploader 0.50.1 → 1.0.0

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 (107) hide show
  1. package/README.md +16 -16
  2. package/abstract/Block.d.ts.map +1 -1
  3. package/abstract/Block.js +4 -2
  4. package/abstract/SolutionBlock.js +2 -2
  5. package/abstract/connectBlocksFrom.d.ts +1 -1
  6. package/abstract/connectBlocksFrom.js +4 -4
  7. package/abstract/registerBlocks.d.ts.map +1 -1
  8. package/abstract/registerBlocks.js +3 -2
  9. package/blocks/ActivityHeader/activity-header.css +2 -2
  10. package/blocks/CameraSource/CameraSource.js +8 -8
  11. package/blocks/CameraSource/camera-source.css +14 -14
  12. package/blocks/CloudImageEditor/src/CloudImageEditorBlock.js +1 -1
  13. package/blocks/CloudImageEditor/src/EditorButtonControl.js +1 -1
  14. package/blocks/CloudImageEditor/src/EditorFilterControl.js +1 -1
  15. package/blocks/CloudImageEditor/src/EditorImageCropper.js +1 -1
  16. package/blocks/CloudImageEditor/src/EditorSlider.js +2 -2
  17. package/blocks/CloudImageEditor/src/EditorToolbar.js +20 -20
  18. package/blocks/CloudImageEditor/src/css/common.css +142 -142
  19. package/blocks/CloudImageEditor/src/css/icons.css +2 -2
  20. package/blocks/CloudImageEditor/src/elements/button/{LrBtnUi.d.ts → BtnUi.d.ts} +3 -3
  21. package/blocks/CloudImageEditor/src/elements/button/BtnUi.d.ts.map +1 -0
  22. package/blocks/CloudImageEditor/src/elements/button/{LrBtnUi.js → BtnUi.js} +4 -4
  23. package/blocks/CloudImageEditor/src/index.d.ts +1 -1
  24. package/blocks/CloudImageEditor/src/index.js +1 -1
  25. package/blocks/CloudImageEditor/src/template.js +8 -8
  26. package/blocks/CloudImageEditorActivity/index.css +2 -2
  27. package/blocks/Config/Config.d.ts +1 -1
  28. package/blocks/Config/Config.js +7 -7
  29. package/blocks/Config/config.css +1 -1
  30. package/blocks/Copyright/copyright.css +4 -4
  31. package/blocks/DropArea/DropArea.d.ts +1 -1
  32. package/blocks/DropArea/DropArea.js +4 -4
  33. package/blocks/DropArea/drop-area.css +34 -34
  34. package/blocks/ExternalSource/ExternalSource.js +5 -5
  35. package/blocks/ExternalSource/external-source.css +9 -9
  36. package/blocks/FileItem/FileItem.js +5 -5
  37. package/blocks/FileItem/file-item.css +22 -22
  38. package/blocks/Icon/icon.css +2 -2
  39. package/blocks/Img/ImgConfig.js +1 -1
  40. package/blocks/Img/configurations.d.ts +1 -1
  41. package/blocks/Img/configurations.js +1 -1
  42. package/blocks/Img/test.css +5 -5
  43. package/blocks/Modal/Modal.js +1 -1
  44. package/blocks/Modal/modal.css +15 -15
  45. package/blocks/ProgressBar/progress-bar.css +3 -3
  46. package/blocks/ProgressBarCommon/ProgressBarCommon.js +1 -1
  47. package/blocks/ProgressBarCommon/progress-bar-common.css +2 -2
  48. package/blocks/Range/range.css +8 -8
  49. package/blocks/Select/select.css +2 -2
  50. package/blocks/SimpleBtn/SimpleBtn.js +4 -4
  51. package/blocks/SimpleBtn/simple-btn.css +11 -11
  52. package/blocks/SourceBtn/SourceBtn.js +1 -1
  53. package/blocks/SourceBtn/source-btn.css +5 -5
  54. package/blocks/SourceList/SourceList.js +1 -1
  55. package/blocks/StartFrom/start-from.css +5 -5
  56. package/blocks/UploadList/UploadList.js +6 -6
  57. package/blocks/UploadList/upload-list.css +10 -10
  58. package/blocks/UrlSource/UrlSource.js +5 -5
  59. package/blocks/UrlSource/url-source.css +4 -4
  60. package/blocks/themes/{lr-basic → uc-basic}/common.css +19 -19
  61. package/blocks/themes/{lr-basic → uc-basic}/config.css +1 -1
  62. package/blocks/themes/{lr-basic → uc-basic}/theme.css +7 -7
  63. package/env.d.ts +1 -1
  64. package/env.d.ts.map +1 -1
  65. package/env.js +1 -1
  66. package/index.ssr.d.ts +10 -10
  67. package/index.ssr.d.ts.map +1 -1
  68. package/index.ssr.js +108 -108
  69. package/package.json +1 -1
  70. package/solutions/adaptive-image/index.js +1 -1
  71. package/solutions/cloud-image-editor/CloudImageEditor.js +1 -1
  72. package/solutions/cloud-image-editor/index.css +1 -1
  73. package/solutions/file-uploader/inline/FileUploaderInline.js +12 -12
  74. package/solutions/file-uploader/inline/index.css +12 -12
  75. package/solutions/file-uploader/minimal/FileUploaderMinimal.js +6 -6
  76. package/solutions/file-uploader/minimal/index.css +25 -25
  77. package/solutions/file-uploader/regular/FileUploaderRegular.js +15 -15
  78. package/solutions/file-uploader/regular/index.css +1 -1
  79. package/types/global.d.ts +2 -2
  80. package/types/jsx.d.ts +37 -37
  81. package/web/blocks.iife.min.js +4 -4
  82. package/web/blocks.min.js +4 -4
  83. package/web/lr-basic.min.css +1 -1
  84. package/web/lr-cloud-image-editor.min.css +1 -1
  85. package/web/lr-cloud-image-editor.min.js +4 -4
  86. package/web/lr-file-uploader-inline.min.css +1 -1
  87. package/web/lr-file-uploader-inline.min.js +4 -4
  88. package/web/lr-file-uploader-minimal.min.css +1 -1
  89. package/web/lr-file-uploader-minimal.min.js +3 -3
  90. package/web/lr-file-uploader-regular.min.css +1 -1
  91. package/web/lr-file-uploader-regular.min.js +4 -4
  92. package/web/lr-img.min.js +2 -2
  93. package/web/uc-basic.min.css +1 -0
  94. package/web/uc-cloud-image-editor.min.css +1 -0
  95. package/web/uc-cloud-image-editor.min.js +29 -0
  96. package/web/uc-file-uploader-inline.min.css +1 -0
  97. package/web/uc-file-uploader-inline.min.js +29 -0
  98. package/web/uc-file-uploader-minimal.min.css +1 -0
  99. package/web/uc-file-uploader-minimal.min.js +28 -0
  100. package/web/uc-file-uploader-regular.min.css +1 -0
  101. package/web/uc-file-uploader-regular.min.js +29 -0
  102. package/web/uc-img.min.js +28 -0
  103. package/blocks/CloudImageEditor/src/elements/button/LrBtnUi.d.ts.map +0 -1
  104. /package/blocks/themes/{lr-basic → uc-basic}/index.css +0 -0
  105. /package/blocks/themes/{lr-basic → uc-basic}/svg-sprite.d.ts +0 -0
  106. /package/blocks/themes/{lr-basic → uc-basic}/svg-sprite.d.ts.map +0 -0
  107. /package/blocks/themes/{lr-basic → uc-basic}/svg-sprite.js +0 -0
package/README.md CHANGED
@@ -67,63 +67,63 @@ We use [JSDoc type annotations](https://www.typescriptlang.org/docs/handbook/int
67
67
 
68
68
  ### From CDN
69
69
 
70
- 1. Connect Uploadcare File Uploader directly from your document replacing `{{PACKAGE_VERSION}}` with the [latest version](https://github.com/uploadcare/blocks/releases) of the package:
70
+ 1. Connect Uploadcare File Uploader directly from your document:
71
71
 
72
72
  ```html
73
73
  <script type="module">
74
- import * as LR from 'https://cdn.jsdelivr.net/npm/@uploadcare/file-uploader@{{PACKAGE_VERSION}}/web/blocks.min.js';
74
+ import * as UC from 'https://cdn.jsdelivr.net/npm/@uploadcare/file-uploader@1/web/blocks.min.js';
75
75
 
76
- LR.registerBlocks(LR);
76
+ UC.registerBlocks(UC);
77
77
  </script>
78
78
  ```
79
79
 
80
- 2. Start using Uploadcare File Uploader in your application markup (don't forget to specify `{{PACKAGE_VERSION}}` with the [latest one](https://github.com/uploadcare/blocks/releases)):
80
+ 2. Start using Uploadcare File Uploader in your application markup:
81
81
 
82
82
  ```html
83
83
  <link
84
84
  rel="stylesheet"
85
- href="https://cdn.jsdelivr.net/npm/@uploadcare/file-uploader@{{PACKAGE_VERSION}}/web/lr-file-uploader-regular.min.css"
85
+ href="https://cdn.jsdelivr.net/npm/@uploadcare/file-uploader@1/web/uc-file-uploader-regular.min.css"
86
86
  />
87
87
 
88
- <lr-file-uploader-regular ctx-name="my-uploader"> </lr-file-uploader-regular>
88
+ <uc-file-uploader-regular ctx-name="my-uploader"> </uc-file-uploader-regular>
89
89
  ```
90
90
 
91
91
  3. Configure Uploadcare File Uploader and add your personal public key to the project. Discover the instructions in the [following section](#configuration).
92
92
 
93
93
  ### From NPM
94
94
 
95
- 1. Install Uploadcare File Uploader package: `npm i --save-exact @uploadcare/file-uploader`
95
+ 1. Install Uploadcare File Uploader package: `npm i @uploadcare/file-uploader`
96
96
  2. Connect `Blocks` from your script file:
97
97
 
98
98
  ```js
99
- import * as LR from '@uploadcare/file-uploader';
99
+ import * as UC from '@uploadcare/file-uploader';
100
100
 
101
- LR.registerBlocks(LR);
101
+ UC.registerBlocks(UC);
102
102
  ```
103
103
 
104
- 3. Start using Uploadcare File Uploader in your application markup and replace `{{PACKAGE_VERSION}}` with the [latest version](https://github.com/uploadcare/blocks/releases) of the package:
104
+ 3. Start using Uploadcare File Uploader in your application markup:
105
105
 
106
106
  ```html
107
107
  <link
108
108
  rel="stylesheet"
109
- href="https://cdn.jsdelivr.net/npm/@uploadcare/file-uploader@{{PACKAGE_VERSION}}/web/lr-file-uploader-regular.min.css"
109
+ href="https://cdn.jsdelivr.net/npm/@uploadcare/file-uploader@1/web/uc-file-uploader-regular.min.css"
110
110
  />
111
111
 
112
- <lr-file-uploader-inline ctx-name="my-uploader"> </lr-file-uploader-inline>
112
+ <uc-file-uploader-inline ctx-name="my-uploader"> </uc-file-uploader-inline>
113
113
  ```
114
114
 
115
115
  4. Configure Uploadcare File Uploader and add your personal public key to the project. Discover the instructions in the [following section](#configuration).
116
116
 
117
117
  ### Configuration
118
118
 
119
- All configurations in Uploadcare File Uploader are managed from `lr-config` block.
119
+ All configurations in Uploadcare File Uploader are managed from `uc-config` block.
120
120
 
121
121
  1. Sign up to [Uploadcare](https://app.uploadcare.com/accounts/signup/?ref=github-readme).
122
122
  2. Get a Public API key in [Uploadcare project's dashboard](https://app.uploadcare.com/projects/-/api-keys/?ref=github-readme).
123
- 3. Add a `lr-config` block to your markup and replace `YOUR_PUBLIC_KEY` with your own public key:
123
+ 3. Add a `uc-config` block to your markup and replace `YOUR_PUBLIC_KEY` with your own public key:
124
124
 
125
125
  ```html
126
- <lr-config ctx-name="my-uploader" pubkey="YOUR_PUBLIC_KEY"></lr-config>
126
+ <uc-config ctx-name="my-uploader" pubkey="YOUR_PUBLIC_KEY"></uc-config>
127
127
  ```
128
128
 
129
129
  4. Make sure that your config block uses the same `ctx-name` attribute value as your solution block.
@@ -156,7 +156,7 @@ All the source code is accessible and works in raw mode. Use _developer tools_ t
156
156
 
157
157
  You’re always welcome to contribute:
158
158
 
159
- - Create [issues](https://github.com/uploadcare/blocks/issues) every time you feel something is missing or goes wrong.
159
+ - Create [issues](https://github.com/uploadcare/file-uploader/issues) every time you feel something is missing or goes wrong.
160
160
  - Provide your feedback or drop us a support request at <a href="mailto:hello@uploadcare.com">hello@uploadcare.com</a>.
161
161
  - Ask questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/uploadcare) with "uploadcare" tag if others can have these questions as well.
162
162
  - Fork project, make changes and send it as pull request. For launching the developing mode follow these commands:
@@ -1 +1 @@
1
- {"version":3,"file":"Block.d.ts","sourceRoot":"","sources":["Block.js"],"names":[],"mappings":"AAmBA;IACE,4BAA4B;IAC5B,2BADW,MAAM,GAAG,IAAI,CACS;IAEjC,uBAAuB;IACvB,mBADW,MAAM,EAAE,CACI;IAoTvB,6BAA6B;IAC7B,4CAMC;IAvQD,cAMC;IAxDD,iBAAiB;IACjB,kCAAuB;IAEvB,wDAAwD;IACxD,cADW,OAAO,oBAAoB,EAAE,YAAY,CAChC;IAEpB,UAAmB;IAEnB;;;;OAIG;IACH;;eAcC;IAED;;;;;OAKG;IACH,kBAIC;IAED;;;;OAIG;IACH,wBAJW,MAAM,YACN,MAAM,IAAI,QAKpB;IAIC,uDAAuD;IACvD,mBADW,IAAI,MAAM,EAAE,IAAI;QAAE,MAAM,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC,CAAC,CACjB;IAKpC;;;;OAIG;IACH,WAJW;;qBAAuF,CAAC,CAAC,YACzF;;qBAAuF,CAAC,CAAC,YACzF;;qBAAuF,CAAC,CAAC,QASnG;IAED;;;OAGG;IACH,gCAHmB,KAAK,KAAK,OAAO,WAUnC;IAED;;;OAGG;IACH,oCAFW,GAAG,QASb;IAkED;;;OAGG;IACH,4BAEC;IAED;;;OAGG;IACH,kCAEC;IAED,yBAAyB;IACzB,iCAEC;IAsBD;;;;OAIG;IACH,qCAIC;IAED;;;;OAIG;IACH,iCAHa,eAAe,CA6B3B;IAED,iDAAiD;IACjD,yCA8BC;IA3BG,eAAe;IACf,mBAuBE;IAKN;;;;OAIG;IACH,6HAFwD,IAAI,QAQ3D;IAED,8BAA8B;IAC9B,oBADY,OAAO,EAAE,QAWpB;CAUF;;8BAnVmC,sBAAsB;qBAarC,WAAW"}
1
+ {"version":3,"file":"Block.d.ts","sourceRoot":"","sources":["Block.js"],"names":[],"mappings":"AAmBA;IACE,4BAA4B;IAC5B,2BADW,MAAM,GAAG,IAAI,CACS;IAEjC,uBAAuB;IACvB,mBADW,MAAM,EAAE,CACI;IAoTvB,6BAA6B;IAC7B,4CAQC;IAzQD,cAMC;IAxDD,iBAAiB;IACjB,kCAAuB;IAEvB,wDAAwD;IACxD,cADW,OAAO,oBAAoB,EAAE,YAAY,CAChC;IAEpB,UAAmB;IAEnB;;;;OAIG;IACH;;eAcC;IAED;;;;;OAKG;IACH,kBAIC;IAED;;;;OAIG;IACH,wBAJW,MAAM,YACN,MAAM,IAAI,QAKpB;IAIC,uDAAuD;IACvD,mBADW,IAAI,MAAM,EAAE,IAAI;QAAE,MAAM,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC,CAAC,CACjB;IAKpC;;;;OAIG;IACH,WAJW;;qBAAuF,CAAC,CAAC,YACzF;;qBAAuF,CAAC,CAAC,YACzF;;qBAAuF,CAAC,CAAC,QASnG;IAED;;;OAGG;IACH,gCAHmB,KAAK,KAAK,OAAO,WAUnC;IAED;;;OAGG;IACH,oCAFW,GAAG,QASb;IAkED;;;OAGG;IACH,4BAEC;IAED;;;OAGG;IACH,kCAEC;IAED,yBAAyB;IACzB,iCAEC;IAsBD;;;;OAIG;IACH,qCAIC;IAED;;;;OAIG;IACH,iCAHa,eAAe,CA6B3B;IAED,iDAAiD;IACjD,yCA8BC;IA3BG,eAAe;IACf,mBAuBE;IAKN;;;;OAIG;IACH,6HAFwD,IAAI,QAQ3D;IAED,8BAA8B;IAC9B,oBADY,OAAO,EAAE,QAWpB;CAYF;;8BArVmC,sBAAsB;qBAarC,WAAW"}
package/abstract/Block.js CHANGED
@@ -14,7 +14,7 @@ import { l10nProcessor } from './l10nProcessor.js';
14
14
  import { sharedConfigKey } from './sharedConfigKey.js';
15
15
  import { A11y } from './a11y.js';
16
16
 
17
- const TAG_PREFIX = 'lr-';
17
+ const TAG_PREFIX = 'uc-';
18
18
 
19
19
  // @ts-ignore TODO: fix this
20
20
  export class Block extends BaseComponent {
@@ -336,7 +336,9 @@ export class Block extends BaseComponent {
336
336
  super.reg();
337
337
  return;
338
338
  }
339
- super.reg(name.startsWith(TAG_PREFIX) ? name : TAG_PREFIX + name);
339
+ if (name.startsWith(TAG_PREFIX)) {
340
+ super.reg(name);
341
+ }
340
342
  }
341
343
  }
342
344
 
@@ -1,9 +1,9 @@
1
- import svgIconsSprite from '../blocks/themes/lr-basic/svg-sprite.js';
1
+ import svgIconsSprite from '../blocks/themes/uc-basic/svg-sprite.js';
2
2
  import { Block } from './Block.js';
3
3
  import { uploaderBlockCtx } from './CTX.js';
4
4
 
5
5
  export class SolutionBlock extends Block {
6
- static styleAttrs = ['lr-wgt-common'];
6
+ static styleAttrs = ['uc-wgt-common'];
7
7
  requireCtxName = true;
8
8
  init$ = uploaderBlockCtx(this);
9
9
  _template = null;
@@ -4,5 +4,5 @@
4
4
  * @returns {Promise<import('../index.js')>}
5
5
  */
6
6
  export function connectBlocksFrom(url: string, register?: boolean | undefined): Promise<typeof import("../index.js")>;
7
- export const LR_WINDOW_KEY: "LR";
7
+ export const UC_WINDOW_KEY: "UC";
8
8
  //# sourceMappingURL=connectBlocksFrom.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import { registerBlocks } from './registerBlocks.js';
2
2
 
3
- export const LR_WINDOW_KEY = 'LR';
3
+ export const UC_WINDOW_KEY = 'UC';
4
4
 
5
5
  /**
6
6
  * @param {String} url Blocks pack url
@@ -13,8 +13,8 @@ export async function connectBlocksFrom(url, register = false) {
13
13
  resolve(null);
14
14
  return;
15
15
  }
16
- if (typeof window === 'object' && window[LR_WINDOW_KEY]) {
17
- resolve(window[LR_WINDOW_KEY]);
16
+ if (typeof window === 'object' && window[UC_WINDOW_KEY]) {
17
+ resolve(window[UC_WINDOW_KEY]);
18
18
  return;
19
19
  }
20
20
  let script = document.createElement('script');
@@ -25,7 +25,7 @@ export async function connectBlocksFrom(url, register = false) {
25
25
  };
26
26
  script.onload = () => {
27
27
  /** @type {import('../index.js')} */
28
- let blocks = window[LR_WINDOW_KEY];
28
+ let blocks = window[UC_WINDOW_KEY];
29
29
  register && registerBlocks(blocks);
30
30
  resolve(blocks);
31
31
  };
@@ -1 +1 @@
1
- {"version":3,"file":"registerBlocks.d.ts","sourceRoot":"","sources":["registerBlocks.js"],"names":[],"mappings":"AAAA,gDAAgD;AAChD;QADmB,MAAM,GAAE,GAAG;SAmB7B"}
1
+ {"version":3,"file":"registerBlocks.d.ts","sourceRoot":"","sources":["registerBlocks.js"],"names":[],"mappings":"AAAA,gDAAgD;AAChD;QADmB,MAAM,GAAE,GAAG;SAoB7B"}
@@ -10,8 +10,9 @@ export function registerBlocks(blockExports) {
10
10
  if (tagName.startsWith('-')) {
11
11
  tagName = tagName.replace('-', '');
12
12
  }
13
- if (!tagName.startsWith('lr-')) {
14
- tagName = 'lr-' + tagName;
13
+
14
+ if (!tagName.startsWith('uc-')) {
15
+ tagName = 'uc-' + tagName;
15
16
  }
16
17
  if (blockExports[blockName].reg) {
17
18
  blockExports[blockName].reg(tagName);
@@ -1,4 +1,4 @@
1
- lr-activity-header {
1
+ uc-activity-header {
2
2
  display: flex;
3
3
  justify-content: space-between;
4
4
  gap: var(--uc-padding);
@@ -8,7 +8,7 @@ lr-activity-header {
8
8
  font-size: 1em;
9
9
  }
10
10
 
11
- lr-activity-header > * {
11
+ uc-activity-header > * {
12
12
  display: flex;
13
13
  align-items: center;
14
14
  }
@@ -214,23 +214,23 @@ export class CameraSource extends UploaderBlock {
214
214
  }
215
215
 
216
216
  CameraSource.template = /* HTML */ `
217
- <lr-activity-header>
217
+ <uc-activity-header>
218
218
  <button type="button" class="uc-mini-btn" set="onclick: *historyBack">
219
- <lr-icon name="back"></lr-icon>
219
+ <uc-icon name="back"></uc-icon>
220
220
  </button>
221
221
  <div set="@hidden: !cameraSelectHidden">
222
- <lr-icon name="camera"></lr-icon>
222
+ <uc-icon name="camera"></uc-icon>
223
223
  <span l10n="caption-camera"></span>
224
224
  </div>
225
- <lr-select
225
+ <uc-select
226
226
  class="uc-camera-select"
227
227
  set="$.options: cameraSelectOptions; @hidden: cameraSelectHidden; onchange: onCameraSelectChange"
228
228
  >
229
- </lr-select>
229
+ </uc-select>
230
230
  <button type="button" class="uc-mini-btn uc-close-btn" set="onclick: *closeModal">
231
- <lr-icon name="close"></lr-icon>
231
+ <uc-icon name="close"></uc-icon>
232
232
  </button>
233
- </lr-activity-header>
233
+ </uc-activity-header>
234
234
  <div class="uc-content">
235
235
  <video
236
236
  autoplay
@@ -247,7 +247,7 @@ CameraSource.template = /* HTML */ `
247
247
  ></button>
248
248
  </div>
249
249
  <button type="button" class="uc-shot-btn" set="onclick: onShot; @disabled: shotBtnDisabled">
250
- <lr-icon name="camera"></lr-icon>
250
+ <uc-icon name="camera"></uc-icon>
251
251
  </button>
252
252
  </div>
253
253
  `;
@@ -1,4 +1,4 @@
1
- lr-camera-source {
1
+ uc-camera-source {
2
2
  position: relative;
3
3
  display: flex;
4
4
  flex-direction: column;
@@ -10,24 +10,24 @@ lr-camera-source {
10
10
  border-radius: var(--uc-radius);
11
11
  }
12
12
 
13
- [lr-modal] lr-camera-source {
13
+ [uc-modal] uc-camera-source {
14
14
  width: min(calc(var(--uc-dialog-max-width) - var(--uc-padding) * 2), calc(100vw - var(--uc-padding) * 2));
15
15
  height: 100vh;
16
16
  max-height: var(--modal-max-content-height);
17
17
  }
18
18
 
19
- lr-camera-source.uc-initialized {
19
+ uc-camera-source.uc-initialized {
20
20
  height: max-content;
21
21
  }
22
22
 
23
23
  @media only screen and (max-width: 430px) {
24
- lr-camera-source {
24
+ uc-camera-source {
25
25
  width: calc(100vw - var(--uc-padding) * 2);
26
26
  height: var(--modal-content-height-fill, 100%);
27
27
  }
28
28
  }
29
29
 
30
- lr-camera-source video {
30
+ uc-camera-source video {
31
31
  display: block;
32
32
  width: 100%;
33
33
  max-height: 100%;
@@ -37,7 +37,7 @@ lr-camera-source video {
37
37
  border-radius: var(--uc-radius);
38
38
  }
39
39
 
40
- lr-camera-source .uc-toolbar {
40
+ uc-camera-source .uc-toolbar {
41
41
  position: absolute;
42
42
  bottom: 0;
43
43
  display: flex;
@@ -47,7 +47,7 @@ lr-camera-source .uc-toolbar {
47
47
  background-color: var(--uc-background);
48
48
  }
49
49
 
50
- lr-camera-source .uc-content {
50
+ uc-camera-source .uc-content {
51
51
  display: flex;
52
52
  flex: 1;
53
53
  justify-content: center;
@@ -57,7 +57,7 @@ lr-camera-source .uc-content {
57
57
  overflow: hidden;
58
58
  }
59
59
 
60
- lr-camera-source .uc-message-box {
60
+ uc-camera-source .uc-message-box {
61
61
  display: flex;
62
62
  flex-direction: column;
63
63
  grid-gap: 40px;
@@ -67,12 +67,12 @@ lr-camera-source .uc-message-box {
67
67
  color: var(--uc-foreground);
68
68
  }
69
69
 
70
- lr-camera-source .uc-message-box button {
70
+ uc-camera-source .uc-message-box button {
71
71
  color: var(--uc-primary-foreground);
72
72
  background-color: var(--uc-primary);
73
73
  }
74
74
 
75
- lr-camera-source .uc-shot-btn {
75
+ uc-camera-source .uc-shot-btn {
76
76
  position: absolute;
77
77
  bottom: 20px;
78
78
  width: 58px;
@@ -87,21 +87,21 @@ lr-camera-source .uc-shot-btn {
87
87
  transform var(--uc-transition);
88
88
  }
89
89
 
90
- lr-camera-source .uc-shot-btn:hover {
90
+ uc-camera-source .uc-shot-btn:hover {
91
91
  transform: scale(1.05);
92
92
  opacity: 1;
93
93
  }
94
94
 
95
- lr-camera-source .uc-shot-btn:active {
95
+ uc-camera-source .uc-shot-btn:active {
96
96
  transform: scale(1);
97
97
  opacity: 1;
98
98
  }
99
99
 
100
- lr-camera-source .uc-shot-btn[disabled] {
100
+ uc-camera-source .uc-shot-btn[disabled] {
101
101
  bottom: -80px;
102
102
  }
103
103
 
104
- lr-camera-source .uc-shot-btn lr-icon svg {
104
+ uc-camera-source .uc-shot-btn uc-icon svg {
105
105
  width: 20px;
106
106
  height: 20px;
107
107
  }
@@ -19,7 +19,7 @@ import { TabId } from './toolbar-constants.js';
19
19
 
20
20
  export class CloudImageEditorBlock extends Block {
21
21
  ctxOwner = true;
22
- static styleAttrs = ['lr-cloud-image-editor'];
22
+ static styleAttrs = ['uc-cloud-image-editor'];
23
23
 
24
24
  constructor() {
25
25
  super();
@@ -38,7 +38,7 @@ export class EditorButtonControl extends Block {
38
38
 
39
39
  EditorButtonControl.template = /* HTML */ `
40
40
  <button type="button" role="option">
41
- <lr-icon set="@name: icon;"></lr-icon>
41
+ <uc-icon set="@name: icon;"></uc-icon>
42
42
  <div class="uc-title" ref="title-el">{{title}}</div>
43
43
  </button>
44
44
  `;
@@ -160,6 +160,6 @@ export class EditorFilterControl extends EditorButtonControl {
160
160
  EditorFilterControl.template = /* HTML */ `
161
161
  <button type="button" role="option">
162
162
  <div class="uc-preview" ref="preview-el"></div>
163
- <lr-icon ref="icon-el" set="@name: icon; @size: iconSize;"></lr-icon>
163
+ <uc-icon ref="icon-el" set="@name: icon; @size: iconSize;"></uc-icon>
164
164
  </button>
165
165
  `;
@@ -547,5 +547,5 @@ export class EditorImageCropper extends Block {
547
547
 
548
548
  EditorImageCropper.template = /* HTML */ `
549
549
  <canvas class="uc-canvas" ref="canvas-el"></canvas>
550
- <lr-crop-frame ref="frame-el"></lr-crop-frame>
550
+ <uc-crop-frame ref="frame-el"></uc-crop-frame>
551
551
  `;
@@ -111,8 +111,8 @@ export class EditorSlider extends Block {
111
111
  }
112
112
 
113
113
  EditorSlider.template = /* HTML */ `
114
- <lr-slider-ui
114
+ <uc-slider-ui
115
115
  ref="slider-el"
116
116
  set="disabled: disabled; min: min; max: max; defaultValue: defaultValue; zero: zero; onInput: on.input;"
117
- ></lr-slider-ui>
117
+ ></uc-slider-ui>
118
118
  `;
@@ -19,31 +19,31 @@ import { viewerImageSrc } from './util.js';
19
19
  /** @param {String} id */
20
20
  function renderTabToggle(id) {
21
21
  return /* HTML */ `
22
- <lr-presence-toggle
22
+ <uc-presence-toggle
23
23
  class="uc-tab-toggle"
24
24
  set="visible: presence.tabToggle.${id}; styles: presence.tabToggleStyles;"
25
25
  >
26
- <lr-btn-ui
26
+ <uc-btn-ui
27
27
  theme="tab"
28
28
  ref="tab-toggle-${id}"
29
29
  data-id="${id}"
30
30
  icon="${id}"
31
31
  set="onclick: on.clickTab; aria-role:tab_role; aria-controls:tab_${id}"
32
32
  >
33
- </lr-btn-ui>
34
- </lr-presence-toggle>
33
+ </uc-btn-ui>
34
+ </uc-presence-toggle>
35
35
  `;
36
36
  }
37
37
 
38
38
  /** @param {String} id */
39
39
  function renderTabContent(id) {
40
40
  return /* HTML */ `
41
- <lr-presence-toggle
41
+ <uc-presence-toggle
42
42
  id="tab_${id}"
43
43
  class="uc-tab-content"
44
44
  set="visible: presence.tabContent.${id}; styles: presence.tabContentStyles"
45
45
  >
46
- <lr-editor-scroller hidden-scrollbar>
46
+ <uc-editor-scroller hidden-scrollbar>
47
47
  <div class="uc-controls-list_align">
48
48
  <div
49
49
  role="listbox"
@@ -52,8 +52,8 @@ function renderTabContent(id) {
52
52
  ref="controls-list-${id}"
53
53
  ></div>
54
54
  </div>
55
- </lr-editor-scroller>
56
- </lr-presence-toggle>
55
+ </uc-editor-scroller>
56
+ </uc-presence-toggle>
57
57
  `;
58
58
  }
59
59
 
@@ -400,42 +400,42 @@ export class EditorToolbar extends Block {
400
400
  }
401
401
 
402
402
  EditorToolbar.template = /* HTML */ `
403
- <lr-line-loader-ui set="active: showLoader"></lr-line-loader-ui>
403
+ <uc-line-loader-ui set="active: showLoader"></uc-line-loader-ui>
404
404
  <div class="uc-info-tooltip_container">
405
405
  <div class="uc-info-tooltip_wrapper">
406
406
  <div ref="tooltip-el" class="uc-info-tooltip uc-info-tooltip_hidden">{{*operationTooltip}}</div>
407
407
  </div>
408
408
  </div>
409
409
  <div class="uc-toolbar-container">
410
- <lr-presence-toggle
410
+ <uc-presence-toggle
411
411
  role="tablist"
412
412
  class="uc-sub-toolbar"
413
413
  set="visible: presence.mainToolbar; styles: presence.subTopToolbarStyles"
414
414
  >
415
415
  <div class="uc-tab-content-row">${ALL_TABS.map(renderTabContent).join('')}</div>
416
416
  <div class="uc-controls-row">
417
- <lr-presence-toggle
417
+ <uc-presence-toggle
418
418
  class="uc-tab-toggles"
419
419
  set="visible: presence.tabToggles; styles: presence.tabTogglesStyles"
420
420
  >
421
421
  <div ref="tabs-indicator" class="uc-tab-toggles_indicator"></div>
422
422
  ${ALL_TABS.map(renderTabToggle).join('')}
423
- </lr-presence-toggle>
424
- <lr-btn-ui style="order: -1" theme="secondary-icon" icon="closeMax" set="onclick: on.cancel"> </lr-btn-ui>
425
- <lr-btn-ui theme="primary-icon" icon="done" set="onclick: on.apply"> </lr-btn-ui>
423
+ </uc-presence-toggle>
424
+ <uc-btn-ui style="order: -1" theme="secondary-icon" icon="closeMax" set="onclick: on.cancel"> </uc-btn-ui>
425
+ <uc-btn-ui theme="primary-icon" icon="done" set="onclick: on.apply"> </uc-btn-ui>
426
426
  </div>
427
- </lr-presence-toggle>
428
- <lr-presence-toggle
427
+ </uc-presence-toggle>
428
+ <uc-presence-toggle
429
429
  class="uc-sub-toolbar"
430
430
  set="visible: presence.subToolbar; styles: presence.subBottomToolbarStyles"
431
431
  >
432
432
  <div class="uc-slider">
433
- <lr-editor-slider ref="slider-el"></lr-editor-slider>
433
+ <uc-editor-slider ref="slider-el"></uc-editor-slider>
434
434
  </div>
435
435
  <div class="uc-controls-row">
436
- <lr-btn-ui theme="secondary" set="onclick: on.cancelSlider;" l10n="@text:cancel"> </lr-btn-ui>
437
- <lr-btn-ui theme="primary" set="onclick: on.applySlider;" l10n="@text:apply"> </lr-btn-ui>
436
+ <uc-btn-ui theme="secondary" set="onclick: on.cancelSlider;" l10n="@text:cancel"> </uc-btn-ui>
437
+ <uc-btn-ui theme="primary" set="onclick: on.applySlider;" l10n="@text:apply"> </uc-btn-ui>
438
438
  </div>
439
- </lr-presence-toggle>
439
+ </uc-presence-toggle>
440
440
  </div>
441
441
  `;