@primestyleai/tryon 5.10.105 → 5.10.107
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.
|
@@ -29,6 +29,8 @@ interface ButtonOptions {
|
|
|
29
29
|
label?: string;
|
|
30
30
|
accentColor?: string;
|
|
31
31
|
}
|
|
32
|
+
/** Exposed so the storefront entry can clone these into a shadow root. */
|
|
33
|
+
export declare const SIZE_GUIDE_STYLES = "\n .ps-sg-btn {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 8px 14px;\n margin: 0 0 10px 0;\n background: transparent;\n border: 1px solid rgba(0, 0, 0, 0.12);\n border-radius: 8px;\n color: var(--ps-sg-accent, #2154EF);\n font-size: 13px;\n font-weight: 600;\n font-family: inherit;\n cursor: pointer;\n transition: background 0.15s, border-color 0.15s;\n }\n .ps-sg-btn:hover {\n background: rgba(33, 84, 239, 0.04);\n border-color: var(--ps-sg-accent, #2154EF);\n }\n .ps-sg-btn svg { width: 14px; height: 14px; }\n .ps-sg-overlay {\n position: fixed; inset: 0;\n background: rgba(15, 23, 42, 0.55);\n display: flex; align-items: center; justify-content: center;\n z-index: 99999;\n padding: 16px;\n opacity: 0;\n animation: ps-sg-fadein 0.18s ease forwards;\n }\n @keyframes ps-sg-fadein { to { opacity: 1; } }\n .ps-sg-modal {\n background: #FFFFFF;\n border-radius: 14px;\n width: 100%;\n max-width: 720px;\n max-height: 88vh;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif;\n color: #1f2937;\n }\n .ps-sg-header {\n display: flex; align-items: center; justify-content: space-between;\n padding: 18px 22px 14px;\n border-bottom: 1px solid rgba(15, 23, 42, 0.08);\n }\n .ps-sg-title {\n margin: 0;\n font-size: 17px;\n font-weight: 700;\n }\n .ps-sg-toggle {\n display: inline-flex;\n background: rgba(15, 23, 42, 0.06);\n border-radius: 8px;\n padding: 3px;\n margin-right: 12px;\n }\n .ps-sg-toggle button {\n padding: 5px 14px;\n background: transparent;\n border: none;\n border-radius: 6px;\n font-size: 11px;\n font-weight: 700;\n cursor: pointer;\n color: rgba(15, 23, 42, 0.55);\n text-transform: uppercase;\n letter-spacing: 0.04em;\n font-family: inherit;\n }\n .ps-sg-toggle button.ps-sg-active {\n background: #FFFFFF;\n color: #1f2937;\n box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);\n }\n .ps-sg-close {\n background: transparent;\n border: none;\n color: rgba(15, 23, 42, 0.55);\n cursor: pointer;\n padding: 4px;\n border-radius: 6px;\n font-family: inherit;\n }\n .ps-sg-close:hover { background: rgba(15, 23, 42, 0.06); }\n .ps-sg-close svg { width: 18px; height: 18px; }\n .ps-sg-body {\n padding: 18px 22px 22px;\n overflow-y: auto;\n flex: 1;\n }\n .ps-sg-section { margin-bottom: 22px; }\n .ps-sg-section:last-child { margin-bottom: 0; }\n .ps-sg-section-title {\n margin: 0 0 6px;\n font-size: 14px;\n font-weight: 700;\n color: #0f172a;\n }\n .ps-sg-section-desc {\n margin: 0 0 10px;\n font-size: 12px;\n color: rgba(15, 23, 42, 0.6);\n }\n .ps-sg-table-wrap {\n overflow-x: auto;\n border: 1px solid rgba(15, 23, 42, 0.08);\n border-radius: 10px;\n }\n .ps-sg-table {\n width: 100%;\n border-collapse: collapse;\n font-size: 13px;\n }\n .ps-sg-table thead th {\n background: rgba(15, 23, 42, 0.04);\n padding: 10px 12px;\n text-align: left;\n font-weight: 700;\n font-size: 11px;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: rgba(15, 23, 42, 0.6);\n border-bottom: 1px solid rgba(15, 23, 42, 0.08);\n }\n .ps-sg-table tbody td {\n padding: 10px 12px;\n border-bottom: 1px solid rgba(15, 23, 42, 0.05);\n }\n .ps-sg-table tbody tr:last-child td { border-bottom: none; }\n .ps-sg-htm {\n margin-top: 18px;\n padding: 14px 16px;\n background: rgba(33, 84, 239, 0.05);\n border-radius: 10px;\n border: 1px solid rgba(33, 84, 239, 0.12);\n }\n .ps-sg-htm-title {\n font-size: 12px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: var(--ps-sg-accent, #2154EF);\n margin-bottom: 8px;\n }\n .ps-sg-htm ul {\n margin: 0;\n padding-left: 18px;\n font-size: 12px;\n line-height: 1.6;\n color: #1f2937;\n }\n";
|
|
32
34
|
/**
|
|
33
35
|
* Create a "Size Guide" button and insert it as a sibling above the
|
|
34
36
|
* given parent element. Returns a teardown function that removes the
|
package/package.json
CHANGED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shadow-DOM style collector.
|
|
3
|
-
*
|
|
4
|
-
* Vite injects all CSS imported by the storefront bundle as <style>
|
|
5
|
-
* tags appended to document.head at module-eval time. Theme app
|
|
6
|
-
* extensions render into the merchant's theme DOM, so those styles
|
|
7
|
-
* coexist with the merchant's theme CSS — and the theme's CSS leaks
|
|
8
|
-
* into our widget (table borders, button resets, font-family, etc).
|
|
9
|
-
*
|
|
10
|
-
* To isolate the widget inside a shadow root we need our SDK styles
|
|
11
|
-
* inside that shadow root, NOT in document.head. The cleanest way to
|
|
12
|
-
* intercept vite's runtime injection is to monkey-patch
|
|
13
|
-
* `document.head.appendChild` before our other imports evaluate, so
|
|
14
|
-
* every <style> tag the SDK emits during module load gets captured
|
|
15
|
-
* here and re-injected into each shadow root we mount later.
|
|
16
|
-
*
|
|
17
|
-
* IMPORTANT: this file MUST be imported as the *first* import of
|
|
18
|
-
* `src/storefront/index.ts`, before React or any CSS-importing module.
|
|
19
|
-
* ES module evaluation order is import-tree depth-first, so a
|
|
20
|
-
* side-effect import at the top of the entry runs before the rest.
|
|
21
|
-
*/
|
|
22
|
-
/**
|
|
23
|
-
* Returns CSS text concatenated from every <style> tag captured at
|
|
24
|
-
* module load + any <style> tags that were already in document.head
|
|
25
|
-
* matching SDK selector patterns (defense-in-depth for cases where
|
|
26
|
-
* patching missed an injection).
|
|
27
|
-
*/
|
|
28
|
-
export declare function getCollectedCss(): string;
|
|
29
|
-
/**
|
|
30
|
-
* Inject the SDK's collected styles into a shadow root so the widget
|
|
31
|
-
* looks identical regardless of theme. Idempotent — call once per
|
|
32
|
-
* shadow root after attachShadow().
|
|
33
|
-
*/
|
|
34
|
-
export declare function injectStylesIntoShadow(shadow: ShadowRoot): void;
|