@ohhwells/bridge 0.1.72 → 0.1.73
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 +1 -1
- package/dist/index.js +1 -1
- package/dist/social-glyphs.d.cts +30 -0
- package/dist/social-glyphs.d.ts +30 -0
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -19592,7 +19592,7 @@ function OhhwellsBridge() {
|
|
|
19592
19592
|
postToParent2({
|
|
19593
19593
|
type: "ow:ready",
|
|
19594
19594
|
version: "1",
|
|
19595
|
-
bridgeVersion: "0.1.
|
|
19595
|
+
bridgeVersion: "0.1.73",
|
|
19596
19596
|
path: pathname,
|
|
19597
19597
|
nodes: collectEditableNodes(editContentRef.current),
|
|
19598
19598
|
sections
|
package/dist/index.js
CHANGED
|
@@ -19525,7 +19525,7 @@ function OhhwellsBridge() {
|
|
|
19525
19525
|
postToParent2({
|
|
19526
19526
|
type: "ow:ready",
|
|
19527
19527
|
version: "1",
|
|
19528
|
-
bridgeVersion: "0.1.
|
|
19528
|
+
bridgeVersion: "0.1.73",
|
|
19529
19529
|
path: pathname,
|
|
19530
19530
|
nodes: collectEditableNodes(editContentRef.current),
|
|
19531
19531
|
sections
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Brand marks for social rows, drawn once for the whole product.
|
|
3
|
+
*
|
|
4
|
+
* They live here because the bridge is the one thing installed in every template and updated by a
|
|
5
|
+
* single publish. While each side kept its own copy — the editor from one icon package, a template
|
|
6
|
+
* from another or from an outside service — the mark that shipped with a template and the mark the
|
|
7
|
+
* editor inserted came from different sets and looked nothing alike (OHH-762). Anything reading
|
|
8
|
+
* from here cannot drift.
|
|
9
|
+
*
|
|
10
|
+
* Outlines in the lucide hand (ISC licensed): a 24 unit box, strokes on `currentColor`, so a mark
|
|
11
|
+
* takes the colour and size of the words beside it.
|
|
12
|
+
*/
|
|
13
|
+
declare const GLYPH_BODIES: {
|
|
14
|
+
readonly facebook: "<path d='M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z' />";
|
|
15
|
+
readonly instagram: "<rect width='20' height='20' x='2' y='2' rx='5' ry='5' /><path d='M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z' /><line x1='17.5' x2='17.51' y1='6.5' y2='6.5' />";
|
|
16
|
+
readonly youtube: "<path d='M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17' /><path d='m10 15 5-3-5-3z' />";
|
|
17
|
+
readonly linkedin: "<path d='M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z' /><rect width='4' height='12' x='2' y='9' /><circle cx='4' cy='4' r='2' />";
|
|
18
|
+
readonly twitter: "<path d='M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z' />";
|
|
19
|
+
};
|
|
20
|
+
/** Drawn for a platform we ship no mark for — a link is still a link. */
|
|
21
|
+
declare const SOCIAL_GLYPH_FALLBACK = "<circle cx='12' cy='12' r='10' /><path d='M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20' /><path d='M2 12h20' />";
|
|
22
|
+
type SocialPlatform = keyof typeof GLYPH_BODIES;
|
|
23
|
+
/** The body of the mark — paths only, so a caller can wrap it in its own sized svg. */
|
|
24
|
+
declare function socialGlyphBody(platform: string): string;
|
|
25
|
+
/** A complete mark, ready to drop into an icon slot. Size comes from the surrounding font size. */
|
|
26
|
+
declare function socialGlyphMarkup(platform: string): string;
|
|
27
|
+
/** Platforms this set draws, for a picker or a template listing what it supports. */
|
|
28
|
+
declare function socialGlyphPlatforms(): string[];
|
|
29
|
+
|
|
30
|
+
export { SOCIAL_GLYPH_FALLBACK, type SocialPlatform, socialGlyphBody, socialGlyphMarkup, socialGlyphPlatforms };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Brand marks for social rows, drawn once for the whole product.
|
|
3
|
+
*
|
|
4
|
+
* They live here because the bridge is the one thing installed in every template and updated by a
|
|
5
|
+
* single publish. While each side kept its own copy — the editor from one icon package, a template
|
|
6
|
+
* from another or from an outside service — the mark that shipped with a template and the mark the
|
|
7
|
+
* editor inserted came from different sets and looked nothing alike (OHH-762). Anything reading
|
|
8
|
+
* from here cannot drift.
|
|
9
|
+
*
|
|
10
|
+
* Outlines in the lucide hand (ISC licensed): a 24 unit box, strokes on `currentColor`, so a mark
|
|
11
|
+
* takes the colour and size of the words beside it.
|
|
12
|
+
*/
|
|
13
|
+
declare const GLYPH_BODIES: {
|
|
14
|
+
readonly facebook: "<path d='M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z' />";
|
|
15
|
+
readonly instagram: "<rect width='20' height='20' x='2' y='2' rx='5' ry='5' /><path d='M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z' /><line x1='17.5' x2='17.51' y1='6.5' y2='6.5' />";
|
|
16
|
+
readonly youtube: "<path d='M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17' /><path d='m10 15 5-3-5-3z' />";
|
|
17
|
+
readonly linkedin: "<path d='M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z' /><rect width='4' height='12' x='2' y='9' /><circle cx='4' cy='4' r='2' />";
|
|
18
|
+
readonly twitter: "<path d='M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z' />";
|
|
19
|
+
};
|
|
20
|
+
/** Drawn for a platform we ship no mark for — a link is still a link. */
|
|
21
|
+
declare const SOCIAL_GLYPH_FALLBACK = "<circle cx='12' cy='12' r='10' /><path d='M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20' /><path d='M2 12h20' />";
|
|
22
|
+
type SocialPlatform = keyof typeof GLYPH_BODIES;
|
|
23
|
+
/** The body of the mark — paths only, so a caller can wrap it in its own sized svg. */
|
|
24
|
+
declare function socialGlyphBody(platform: string): string;
|
|
25
|
+
/** A complete mark, ready to drop into an icon slot. Size comes from the surrounding font size. */
|
|
26
|
+
declare function socialGlyphMarkup(platform: string): string;
|
|
27
|
+
/** Platforms this set draws, for a picker or a template listing what it supports. */
|
|
28
|
+
declare function socialGlyphPlatforms(): string[];
|
|
29
|
+
|
|
30
|
+
export { SOCIAL_GLYPH_FALLBACK, type SocialPlatform, socialGlyphBody, socialGlyphMarkup, socialGlyphPlatforms };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ohhwells/bridge",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.73",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"dist"
|
|
24
24
|
],
|
|
25
25
|
"scripts": {
|
|
26
|
-
"build": "tsup && postcss src/styles.css -o dist/styles.css",
|
|
26
|
+
"build": "rm -rf dist && tsup && postcss src/styles.css -o dist/styles.css",
|
|
27
27
|
"dev": "tsup --watch"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|