@opentiny/next-sdk 0.1.2 → 0.1.3
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.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/remoter/createRemoter.js +1 -1
- package/package.json +1 -1
- package/remoter/createRemoter.ts +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -108,7 +108,7 @@ Minimum version required to store current data is: `+s+`.
|
|
|
108
108
|
<path d="M9 18H15V20H9V18Z" fill="currentColor"/>
|
|
109
109
|
</svg>`}];class FD{constructor(e){if(this.isExpanded=!1,!e.sessionId)throw new Error("sessionId is required");this.options={qrCodeUrl:e.qrCodeUrl||"https://ai.opentiny.design/next-remoter",...e},this.menuItems=this.mergeMenuItems(e.menuItems),this.init()}mergeMenuItems(e){return e?_h.map(r=>{const a=e.find(n=>n.action===r.action);return a?{...r,...a,show:a.show!==void 0?a.show:r.show}:r}):_h}init(){this.createFloatingBlock(),this.createDropdownMenu(),this.bindEvents(),this.addStyles()}createFloatingBlock(){this.floatingBlock=document.createElement("div"),this.floatingBlock.className="tiny-remoter-floating-block",this.floatingBlock.innerHTML=`
|
|
110
110
|
<div class="tiny-remoter-floating-block__icon">
|
|
111
|
-
<img style="display: block; width:
|
|
111
|
+
<img style="display: block; width: 56px;" src="https://ai.opentiny.design/next-remoter/svgs/logo-next-no-bg-left.svg" alt="icon" />
|
|
112
112
|
</div>
|
|
113
113
|
`,document.body.appendChild(this.floatingBlock)}createDropdownMenu(){this.dropdownMenu=document.createElement("div"),this.dropdownMenu.className="tiny-remoter-floating-dropdown";const e=this.menuItems.filter(r=>r.show!==!1).map(r=>`
|
|
114
114
|
<div class="tiny-remoter-dropdown-item" data-action="${r.action}">
|
package/dist/index.es.js
CHANGED
|
@@ -31223,7 +31223,7 @@ class ED {
|
|
|
31223
31223
|
createFloatingBlock() {
|
|
31224
31224
|
this.floatingBlock = document.createElement("div"), this.floatingBlock.className = "tiny-remoter-floating-block", this.floatingBlock.innerHTML = `
|
|
31225
31225
|
<div class="tiny-remoter-floating-block__icon">
|
|
31226
|
-
<img style="display: block; width:
|
|
31226
|
+
<img style="display: block; width: 56px;" src="https://ai.opentiny.design/next-remoter/svgs/logo-next-no-bg-left.svg" alt="icon" />
|
|
31227
31227
|
</div>
|
|
31228
31228
|
`, document.body.appendChild(this.floatingBlock);
|
|
31229
31229
|
}
|
package/dist/index.umd.js
CHANGED
|
@@ -108,7 +108,7 @@ Minimum version required to store current data is: `+s+`.
|
|
|
108
108
|
<path d="M9 18H15V20H9V18Z" fill="currentColor"/>
|
|
109
109
|
</svg>`}];class TD{constructor(e){if(this.isExpanded=!1,!e.sessionId)throw new Error("sessionId is required");this.options={qrCodeUrl:e.qrCodeUrl||"https://ai.opentiny.design/next-remoter",...e},this.menuItems=this.mergeMenuItems(e.menuItems),this.init()}mergeMenuItems(e){return e?O0.map(r=>{const a=e.find(n=>n.action===r.action);return a?{...r,...a,show:a.show!==void 0?a.show:r.show}:r}):O0}init(){this.createFloatingBlock(),this.createDropdownMenu(),this.bindEvents(),this.addStyles()}createFloatingBlock(){this.floatingBlock=document.createElement("div"),this.floatingBlock.className="tiny-remoter-floating-block",this.floatingBlock.innerHTML=`
|
|
110
110
|
<div class="tiny-remoter-floating-block__icon">
|
|
111
|
-
<img style="display: block; width:
|
|
111
|
+
<img style="display: block; width: 56px;" src="https://ai.opentiny.design/next-remoter/svgs/logo-next-no-bg-left.svg" alt="icon" />
|
|
112
112
|
</div>
|
|
113
113
|
`,document.body.appendChild(this.floatingBlock)}createDropdownMenu(){this.dropdownMenu=document.createElement("div"),this.dropdownMenu.className="tiny-remoter-floating-dropdown";const e=this.menuItems.filter(r=>r.show!==!1).map(r=>`
|
|
114
114
|
<div class="tiny-remoter-dropdown-item" data-action="${r.action}">
|
|
@@ -90,7 +90,7 @@ class FloatingBlock {
|
|
|
90
90
|
this.floatingBlock.className = 'tiny-remoter-floating-block';
|
|
91
91
|
this.floatingBlock.innerHTML = `
|
|
92
92
|
<div class="tiny-remoter-floating-block__icon">
|
|
93
|
-
<img style="display: block; width:
|
|
93
|
+
<img style="display: block; width: 56px;" src="https://ai.opentiny.design/next-remoter/svgs/logo-next-no-bg-left.svg" alt="icon" />
|
|
94
94
|
</div>
|
|
95
95
|
`;
|
|
96
96
|
document.body.appendChild(this.floatingBlock);
|
package/package.json
CHANGED
package/remoter/createRemoter.ts
CHANGED
|
@@ -129,7 +129,7 @@ class FloatingBlock {
|
|
|
129
129
|
this.floatingBlock.className = 'tiny-remoter-floating-block'
|
|
130
130
|
this.floatingBlock.innerHTML = `
|
|
131
131
|
<div class="tiny-remoter-floating-block__icon">
|
|
132
|
-
<img style="display: block; width:
|
|
132
|
+
<img style="display: block; width: 56px;" src="https://ai.opentiny.design/next-remoter/svgs/logo-next-no-bg-left.svg" alt="icon" />
|
|
133
133
|
</div>
|
|
134
134
|
`
|
|
135
135
|
|