@skhema/embed 0.1.6 → 0.1.8
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/components/SkhemaComponent.d.ts +0 -1
- package/dist/components/SkhemaComponent.d.ts.map +1 -1
- package/dist/components/SkhemaElement.d.ts +0 -1
- package/dist/components/SkhemaElement.d.ts.map +1 -1
- package/dist/components/types.d.ts +6 -0
- package/dist/components/types.d.ts.map +1 -1
- package/dist/embed.min.js +1 -1
- package/dist/embed.min.js.map +1 -1
- package/dist/index.cjs +52 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +52 -12
- package/dist/index.es.js.map +1 -1
- package/dist/styles/design-tokens.d.ts +1 -1
- package/dist/styles/design-tokens.d.ts.map +1 -1
- package/dist/utils/author-attribution.d.ts +16 -0
- package/dist/utils/author-attribution.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -57,7 +57,7 @@ export declare const CARD_VARS: {
|
|
|
57
57
|
/**
|
|
58
58
|
* Shared card structure styles (used by both SkhemaElement and SkhemaComponent).
|
|
59
59
|
*/
|
|
60
|
-
export declare const SHARED_CARD_STYLES = "\n/* Monospace acronym badge */\n.skhema-acronym-badge {\n display: inline-flex;\n align-items: center;\n font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;\n font-size: 10px;\n font-weight: 600;\n padding: 2px 6px;\n border-radius: 2px;\n letter-spacing: 0.02em;\n flex-shrink: 0;\n}\n\n/* Footer attribution tagline */\n.skhema-footer-attribution {\n font-size: 11px;\n color: var(--skhema-text-muted);\n line-height: 1.4;\n}\n\n.skhema-footer-attribution a {\n color: var(--skhema-text-muted);\n text-decoration: underline;\n text-decoration-color: var(--skhema-border);\n text-underline-offset: 2px;\n}\n\n.skhema-footer-attribution a:hover {\n color: var(--skhema-text);\n}\n\n/* Contributor line in footer */\n.skhema-contributor-line {\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: 12px;\n color: var(--skhema-text-muted);\n}\n\n.skhema-contributor-line svg {\n width: 14px;\n height: 14px;\n flex-shrink: 0;\n}\n\n/* Save button \u2014 primary brand color */\n.skhema-save-btn {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n background: var(--skhema-primary);\n color: white;\n border: none;\n padding: 6px 14px;\n border-radius: calc(var(--skhema-radius) + 2px);\n font-size: 12px;\n font-weight: 500;\n text-decoration: none;\n cursor: pointer;\n transition: background 0.15s ease;\n white-space: nowrap;\n}\n\n.skhema-save-btn:hover {\n background: var(--skhema-primary-hover);\n}\n\n.skhema-save-btn:active {\n background: var(--skhema-primary-pressed);\n}\n\n.skhema-save-btn:focus {\n outline: 2px solid var(--skhema-primary);\n outline-offset: 2px;\n}\n\n.skhema-save-btn::after {\n content: '\\2192';\n font-size: 13px;\n}\n";
|
|
60
|
+
export declare const SHARED_CARD_STYLES = "\n/* Monospace acronym badge */\n.skhema-acronym-badge {\n display: inline-flex;\n align-items: center;\n font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;\n font-size: 10px;\n font-weight: 600;\n padding: 2px 6px;\n border-radius: 2px;\n letter-spacing: 0.02em;\n flex-shrink: 0;\n}\n\n/* Footer attribution tagline */\n.skhema-footer-attribution {\n font-size: 11px;\n color: var(--skhema-text-muted);\n line-height: 1.4;\n}\n\n.skhema-footer-attribution a {\n color: var(--skhema-text-muted);\n text-decoration: underline;\n text-decoration-color: var(--skhema-border);\n text-underline-offset: 2px;\n}\n\n.skhema-footer-attribution a:hover {\n color: var(--skhema-text);\n}\n\n/* Contributor line in footer */\n.skhema-contributor-line {\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: 12px;\n color: var(--skhema-text-muted);\n}\n\n.skhema-contributor-line svg {\n width: 14px;\n height: 14px;\n flex-shrink: 0;\n}\n\n.skhema-author-link {\n color: inherit;\n text-decoration: none;\n}\n\n.skhema-author-link:hover {\n color: var(--skhema-text);\n text-decoration: underline;\n}\n\n/* Save button \u2014 primary brand color */\n.skhema-save-btn {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n background: var(--skhema-primary);\n color: white;\n border: none;\n padding: 6px 14px;\n border-radius: calc(var(--skhema-radius) + 2px);\n font-size: 12px;\n font-weight: 500;\n text-decoration: none;\n cursor: pointer;\n transition: background 0.15s ease;\n white-space: nowrap;\n}\n\n.skhema-save-btn:hover {\n background: var(--skhema-primary-hover);\n}\n\n.skhema-save-btn:active {\n background: var(--skhema-primary-pressed);\n}\n\n.skhema-save-btn:focus {\n outline: 2px solid var(--skhema-primary);\n outline-offset: 2px;\n}\n\n.skhema-save-btn::after {\n content: '\\2192';\n font-size: 13px;\n}\n";
|
|
61
61
|
/**
|
|
62
62
|
* User SVG icon (inline, no external deps).
|
|
63
63
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"design-tokens.d.ts","sourceRoot":"","sources":["../../src/styles/design-tokens.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BnB,CAAA;AAEV,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,gBAAgB,CAAA;AAE7D;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;CAmBZ,CAAA;AAEV;;GAEG;AACH,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"design-tokens.d.ts","sourceRoot":"","sources":["../../src/styles/design-tokens.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BnB,CAAA;AAEV,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,gBAAgB,CAAA;AAE7D;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;CAmBZ,CAAA;AAEV;;GAEG;AACH,eAAO,MAAM,kBAAkB,m4DA4F9B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,kRAA4P,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve author display from element attributes.
|
|
3
|
+
* Prefer author-name; contributor-name is deprecated.
|
|
4
|
+
*/
|
|
5
|
+
export interface AuthorAttribution {
|
|
6
|
+
authorName: string;
|
|
7
|
+
authorSlug?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function readAuthorAttribution(element: HTMLElement): AuthorAttribution | null;
|
|
10
|
+
/**
|
|
11
|
+
* Footer HTML: "By {authorName}", linked when authorSlug is set.
|
|
12
|
+
*/
|
|
13
|
+
export declare function formatAuthorAttributionHtml(authorName: string, authorSlug?: string): string;
|
|
14
|
+
export declare function formatContributorIdFallback(contributorId: string): string;
|
|
15
|
+
export declare function resolveAuthorFooterHtml(element: HTMLElement, contributorId: string): string;
|
|
16
|
+
//# sourceMappingURL=author-attribution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"author-attribution.d.ts","sourceRoot":"","sources":["../../src/utils/author-attribution.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,WAAW,GACnB,iBAAiB,GAAG,IAAI,CAY1B;AAUD;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,MAAM,EAClB,UAAU,CAAC,EAAE,MAAM,GAClB,MAAM,CAMR;AAED,wBAAgB,2BAA2B,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAKzE;AAED,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,WAAW,EACpB,aAAa,EAAE,MAAM,GACpB,MAAM,CASR"}
|