@dvina/widget-kit 0.0.35 → 0.0.36
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/compose.js +2 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -1
- package/dist/react-loader.js +2 -2
- package/dist/react.js +299 -0
- package/package.json +4 -2
package/dist/compose.js
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
kitReactScript,
|
|
5
5
|
kitScript,
|
|
6
6
|
reactLoaderScript,
|
|
7
|
+
reactScript,
|
|
7
8
|
standaloneScript,
|
|
8
9
|
tailwindCss,
|
|
9
10
|
tailwindScript,
|
|
@@ -60,6 +61,7 @@ ${END}</body></html>`;
|
|
|
60
61
|
const react = [
|
|
61
62
|
`<style type="text/tailwindcss" id="dvina-tailwind">${inScript(tailwindCss)}</style>`,
|
|
62
63
|
`<script id="dvina-tailwind-script">${inScript(tailwindScript)}</script>`,
|
|
64
|
+
`<script id="dvina-react">${inScript(reactScript)}</script>`,
|
|
63
65
|
`<script id="dvina-react-loader">${inScript(reactLoaderScript)}</script>`
|
|
64
66
|
].join("");
|
|
65
67
|
const mount = `var root=document.getElementById("root");window.__dvinaMountReact(root,${literal(compiled.code)},{text:${literal(kitReactScript)}}).catch(function(error){root.textContent=String(error&&error.message||error);});`;
|
package/dist/index.d.ts
CHANGED
|
@@ -6,10 +6,12 @@ export declare const kitCss: string;
|
|
|
6
6
|
export declare const kitScript: string;
|
|
7
7
|
/** The React components as an IIFE that reads `window.React` and sets `window.DvinaKit`. */
|
|
8
8
|
export declare const kitReactScript: string;
|
|
9
|
-
/** React mode's loader, an IIFE: React from its pinned CDN, the kit's components, then the widget module mounted. */
|
|
9
|
+
/** React mode's loader, an IIFE: React (from the page if it carries it, else its pinned CDN), the kit's components, then the widget module mounted. */
|
|
10
10
|
export declare const reactLoaderScript: string;
|
|
11
11
|
/** A downloaded widget's data on its own, an IIFE: `window.dvina` over its seed and localStorage, when no viewer set one. */
|
|
12
12
|
export declare const standaloneScript: string;
|
|
13
|
+
/** React and ReactDOM 18.3.1 (production UMD, pinned), setting `window.React` and `window.ReactDOM`; saved pages only. */
|
|
14
|
+
export declare const reactScript: string;
|
|
13
15
|
/** Tailwind's theme over the kit's tokens, as text for a text/tailwindcss style; React artifacts only. */
|
|
14
16
|
export declare const tailwindCss: string;
|
|
15
17
|
/** Tailwind v4's browser build (pinned), which compiles that theme and the classes it finds in the page. */
|