@stackshift-ui/blockstyle 7.0.0-beta.5 → 7.0.0-beta.7
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/blockstyle.d.ts +8 -0
- package/dist/blockstyle.js +1 -0
- package/dist/blockstyle.mjs +1 -0
- package/dist/chunk-34BAENR7.mjs +1 -0
- package/dist/chunk-MWQ5ZP4S.mjs +1 -0
- package/dist/defaultBlockStyle.d.ts +10 -0
- package/dist/defaultBlockStyle.js +1 -0
- package/dist/defaultBlockStyle.mjs +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.mjs +2 -0
- package/package.json +8 -8
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ElementType, HTMLProps, ReactNode } from "react";
|
|
2
|
+
export interface BlockstyleProps extends Omit<HTMLProps<HTMLElement>, "as"> {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
as?: ElementType;
|
|
6
|
+
content?: any;
|
|
7
|
+
}
|
|
8
|
+
export declare const Blockstyle: React.FC<BlockstyleProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var r=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var N=Object.prototype.hasOwnProperty;var w=(e,l)=>{for(var o in l)r(e,o,{get:l[o],enumerable:!0})},T=(e,l,o,a)=>{if(l&&typeof l=="object"||typeof l=="function")for(let m of k(l))!N.call(e,m)&&m!==o&&r(e,m,{get:()=>l[m],enumerable:!(a=y(l,m))||a.enumerable});return e};var S=e=>T(r({},"__esModule",{value:!0}),e);var H={};w(H,{Blockstyle:()=>f});module.exports=S(H);var x=require("@portabletext/react"),s=require("@stackshift-ui/system");var n=require("@stackshift-ui/heading"),c=require("@stackshift-ui/image"),d=require("@stackshift-ui/link"),p=require("@stackshift-ui/text"),t=require("react/jsx-runtime"),g={block:{h1:({children:e})=>(0,t.jsx)(n.Heading,{fontSize:"5xl",weight:"bold",className:"mb-8 leading-normal text-black",children:e}),h2:({children:e})=>(0,t.jsx)(n.Heading,{type:"h2",weight:"bold",fontSize:"4xl",className:"mb-8 text-black",children:e}),h3:({children:e})=>(0,t.jsx)(n.Heading,{type:"h3",fontSize:"3xl",weight:"bold",className:"mb-8 leading-normal text-black",children:e}),h4:({children:e})=>(0,t.jsx)(n.Heading,{type:"h4",weight:"bold",fontSize:"2xl",className:"mb-8 leading-normal text-black",children:e}),h5:({children:e})=>(0,t.jsx)(n.Heading,{type:"h4",weight:"bold",fontSize:"xl",className:"mb-8 leading-normal text-black",children:e}),h6:({children:e})=>(0,t.jsx)(n.Heading,{type:"h4",weight:"bold",fontSize:"lg",className:"mb-8 leading-normal text-black",children:e}),normal:({children:e})=>(0,t.jsx)(p.Text,{className:"mb-8 leading-relaxed",children:e}),blockquote:({children:e})=>(0,t.jsxs)("blockquote",{className:"mb-6 italic leading-loose text-gray-500 px-14",children:["- ",e]})},code:({value:e})=>(0,t.jsx)("pre",{"data-language":e.language,children:(0,t.jsx)("code",{children:e.code})}),list:{bullet:({children:e})=>(0,t.jsx)("ul",{className:"flex flex-col pl-10 mb-8 space-y-4 leading-relaxed list-disc",children:e}),number:({children:e})=>(0,t.jsx)("ol",{className:"flex flex-col pl-10 mb-8 space-y-4 leading-relaxed list-decimal",children:e})},listItem:{bullet:({children:e})=>(0,t.jsx)("li",{className:"leading-relaxed",children:e}),number:({children:e})=>(0,t.jsx)("li",{className:"leading-relaxed",children:e})},marks:{strong:({children:e})=>(0,t.jsx)("strong",{children:e}),em:({children:e})=>(0,t.jsx)("em",{children:e}),code:({children:e})=>(0,t.jsx)("code",{children:e}),link:({children:e,value:l})=>(0,t.jsx)(d.Link,{className:"hover:text-primary-foreground text-primary",href:l.href,target:"_blank",rel:"noopener noreferrer",children:e})},types:{addImage:({value:e})=>{var l,o,a;return(0,t.jsx)(c.Image,{className:"w-full h-full mb-5",width:500,height:500,sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",src:e==null?void 0:e.image,alt:(a=e==null?void 0:e.alt)!=null?a:(o=(l=e==null?void 0:e.image)==null?void 0:l.asset)==null?void 0:o._ref})}}};var b="Blockstyle",f=({children:e,className:l,as:o,content:a,...m})=>{let{[b]:h=s.DefaultComponent}=(0,s.useStackShiftUIComponents)();return(0,t.jsx)(h,{as:o,className:l,...m,children:a?(0,t.jsx)(x.PortableText,{value:a,components:g}):e})};f.displayName=b;0&&(module.exports={Blockstyle});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-34BAENR7.mjs";import"./chunk-MWQ5ZP4S.mjs";export{a as Blockstyle};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t}from"./chunk-MWQ5ZP4S.mjs";import{PortableText as r}from"@portabletext/react";import{DefaultComponent as c,useStackShiftUIComponents as y}from"@stackshift-ui/system";import{jsx as o}from"react/jsx-runtime";var s="Blockstyle",i=({children:l,className:a,as:n,content:e,...m})=>{let{[s]:p=c}=y();return o(p,{as:n,className:a,...m,children:e?o(r,{value:e,components:t}):l})};i.displayName=s;export{i as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Heading as t}from"@stackshift-ui/heading";import{Image as i}from"@stackshift-ui/image";import{Link as n}from"@stackshift-ui/link";import{Text as r}from"@stackshift-ui/text";import{jsx as l,jsxs as s}from"react/jsx-runtime";var x={block:{h1:({children:e})=>l(t,{fontSize:"5xl",weight:"bold",className:"mb-8 leading-normal text-black",children:e}),h2:({children:e})=>l(t,{type:"h2",weight:"bold",fontSize:"4xl",className:"mb-8 text-black",children:e}),h3:({children:e})=>l(t,{type:"h3",fontSize:"3xl",weight:"bold",className:"mb-8 leading-normal text-black",children:e}),h4:({children:e})=>l(t,{type:"h4",weight:"bold",fontSize:"2xl",className:"mb-8 leading-normal text-black",children:e}),h5:({children:e})=>l(t,{type:"h4",weight:"bold",fontSize:"xl",className:"mb-8 leading-normal text-black",children:e}),h6:({children:e})=>l(t,{type:"h4",weight:"bold",fontSize:"lg",className:"mb-8 leading-normal text-black",children:e}),normal:({children:e})=>l(r,{className:"mb-8 leading-relaxed",children:e}),blockquote:({children:e})=>s("blockquote",{className:"mb-6 italic leading-loose text-gray-500 px-14",children:["- ",e]})},code:({value:e})=>l("pre",{"data-language":e.language,children:l("code",{children:e.code})}),list:{bullet:({children:e})=>l("ul",{className:"flex flex-col pl-10 mb-8 space-y-4 leading-relaxed list-disc",children:e}),number:({children:e})=>l("ol",{className:"flex flex-col pl-10 mb-8 space-y-4 leading-relaxed list-decimal",children:e})},listItem:{bullet:({children:e})=>l("li",{className:"leading-relaxed",children:e}),number:({children:e})=>l("li",{className:"leading-relaxed",children:e})},marks:{strong:({children:e})=>l("strong",{children:e}),em:({children:e})=>l("em",{children:e}),code:({children:e})=>l("code",{children:e}),link:({children:e,value:a})=>l(n,{className:"hover:text-primary-foreground text-primary",href:a.href,target:"_blank",rel:"noopener noreferrer",children:e})},types:{addImage:({value:e})=>{var a,o,m;return l(i,{className:"w-full h-full mb-5",width:500,height:500,sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",src:e==null?void 0:e.image,alt:(m=e==null?void 0:e.alt)!=null?m:(o=(a=e==null?void 0:e.image)==null?void 0:a.asset)==null?void 0:o._ref})}}};export{x as a};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PortableTextComponents } from "@portabletext/react";
|
|
2
|
+
export type MyPortableTextComponents = PortableTextComponents & {
|
|
3
|
+
code?: ({ value }: {
|
|
4
|
+
value: {
|
|
5
|
+
language?: string;
|
|
6
|
+
code?: string;
|
|
7
|
+
};
|
|
8
|
+
}) => JSX.Element;
|
|
9
|
+
};
|
|
10
|
+
export declare const defaultBlockStyle: MyPortableTextComponents;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var n=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var b=Object.prototype.hasOwnProperty;var x=(e,t)=>{for(var a in t)n(e,a,{get:t[a],enumerable:!0})},p=(e,t,a,m)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of c(t))!b.call(e,i)&&i!==a&&n(e,i,{get:()=>t[i],enumerable:!(m=g(t,i))||m.enumerable});return e};var h=e=>p(n({},"__esModule",{value:!0}),e);var k={};x(k,{defaultBlockStyle:()=>f});module.exports=h(k);var o=require("@stackshift-ui/heading"),r=require("@stackshift-ui/image"),s=require("@stackshift-ui/link"),d=require("@stackshift-ui/text"),l=require("react/jsx-runtime"),f={block:{h1:({children:e})=>(0,l.jsx)(o.Heading,{fontSize:"5xl",weight:"bold",className:"mb-8 leading-normal text-black",children:e}),h2:({children:e})=>(0,l.jsx)(o.Heading,{type:"h2",weight:"bold",fontSize:"4xl",className:"mb-8 text-black",children:e}),h3:({children:e})=>(0,l.jsx)(o.Heading,{type:"h3",fontSize:"3xl",weight:"bold",className:"mb-8 leading-normal text-black",children:e}),h4:({children:e})=>(0,l.jsx)(o.Heading,{type:"h4",weight:"bold",fontSize:"2xl",className:"mb-8 leading-normal text-black",children:e}),h5:({children:e})=>(0,l.jsx)(o.Heading,{type:"h4",weight:"bold",fontSize:"xl",className:"mb-8 leading-normal text-black",children:e}),h6:({children:e})=>(0,l.jsx)(o.Heading,{type:"h4",weight:"bold",fontSize:"lg",className:"mb-8 leading-normal text-black",children:e}),normal:({children:e})=>(0,l.jsx)(d.Text,{className:"mb-8 leading-relaxed",children:e}),blockquote:({children:e})=>(0,l.jsxs)("blockquote",{className:"mb-6 italic leading-loose text-gray-500 px-14",children:["- ",e]})},code:({value:e})=>(0,l.jsx)("pre",{"data-language":e.language,children:(0,l.jsx)("code",{children:e.code})}),list:{bullet:({children:e})=>(0,l.jsx)("ul",{className:"flex flex-col pl-10 mb-8 space-y-4 leading-relaxed list-disc",children:e}),number:({children:e})=>(0,l.jsx)("ol",{className:"flex flex-col pl-10 mb-8 space-y-4 leading-relaxed list-decimal",children:e})},listItem:{bullet:({children:e})=>(0,l.jsx)("li",{className:"leading-relaxed",children:e}),number:({children:e})=>(0,l.jsx)("li",{className:"leading-relaxed",children:e})},marks:{strong:({children:e})=>(0,l.jsx)("strong",{children:e}),em:({children:e})=>(0,l.jsx)("em",{children:e}),code:({children:e})=>(0,l.jsx)("code",{children:e}),link:({children:e,value:t})=>(0,l.jsx)(s.Link,{className:"hover:text-primary-foreground text-primary",href:t.href,target:"_blank",rel:"noopener noreferrer",children:e})},types:{addImage:({value:e})=>{var t,a,m;return(0,l.jsx)(r.Image,{className:"w-full h-full mb-5",width:500,height:500,sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",src:e==null?void 0:e.image,alt:(m=e==null?void 0:e.alt)!=null?m:(a=(t=e==null?void 0:e.image)==null?void 0:t.asset)==null?void 0:a._ref})}}};0&&(module.exports={defaultBlockStyle});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-MWQ5ZP4S.mjs";export{a as defaultBlockStyle};
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";var i=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var N=Object.prototype.hasOwnProperty;var w=(e,l)=>{for(var o in l)i(e,o,{get:l[o],enumerable:!0})},S=(e,l,o,a)=>{if(l&&typeof l=="object"||typeof l=="function")for(let m of k(l))!N.call(e,m)&&m!==o&&i(e,m,{get:()=>l[m],enumerable:!(a=y(l,m))||a.enumerable});return e};var T=e=>S(i({},"__esModule",{value:!0}),e);var H={};w(H,{Blockstyle:()=>d,defaultBlockStyle:()=>s});module.exports=T(H);var b=require("@portabletext/react"),r=require("@stackshift-ui/system");var n=require("@stackshift-ui/heading"),p=require("@stackshift-ui/image"),g=require("@stackshift-ui/link"),x=require("@stackshift-ui/text"),t=require("react/jsx-runtime"),s={block:{h1:({children:e})=>(0,t.jsx)(n.Heading,{fontSize:"5xl",weight:"bold",className:"mb-8 leading-normal text-black",children:e}),h2:({children:e})=>(0,t.jsx)(n.Heading,{type:"h2",weight:"bold",fontSize:"4xl",className:"mb-8 text-black",children:e}),h3:({children:e})=>(0,t.jsx)(n.Heading,{type:"h3",fontSize:"3xl",weight:"bold",className:"mb-8 leading-normal text-black",children:e}),h4:({children:e})=>(0,t.jsx)(n.Heading,{type:"h4",weight:"bold",fontSize:"2xl",className:"mb-8 leading-normal text-black",children:e}),h5:({children:e})=>(0,t.jsx)(n.Heading,{type:"h4",weight:"bold",fontSize:"xl",className:"mb-8 leading-normal text-black",children:e}),h6:({children:e})=>(0,t.jsx)(n.Heading,{type:"h4",weight:"bold",fontSize:"lg",className:"mb-8 leading-normal text-black",children:e}),normal:({children:e})=>(0,t.jsx)(x.Text,{className:"mb-8 leading-relaxed",children:e}),blockquote:({children:e})=>(0,t.jsxs)("blockquote",{className:"mb-6 italic leading-loose text-gray-500 px-14",children:["- ",e]})},code:({value:e})=>(0,t.jsx)("pre",{"data-language":e.language,children:(0,t.jsx)("code",{children:e.code})}),list:{bullet:({children:e})=>(0,t.jsx)("ul",{className:"flex flex-col pl-10 mb-8 space-y-4 leading-relaxed list-disc",children:e}),number:({children:e})=>(0,t.jsx)("ol",{className:"flex flex-col pl-10 mb-8 space-y-4 leading-relaxed list-decimal",children:e})},listItem:{bullet:({children:e})=>(0,t.jsx)("li",{className:"leading-relaxed",children:e}),number:({children:e})=>(0,t.jsx)("li",{className:"leading-relaxed",children:e})},marks:{strong:({children:e})=>(0,t.jsx)("strong",{children:e}),em:({children:e})=>(0,t.jsx)("em",{children:e}),code:({children:e})=>(0,t.jsx)("code",{children:e}),link:({children:e,value:l})=>(0,t.jsx)(g.Link,{className:"hover:text-primary-foreground text-primary",href:l.href,target:"_blank",rel:"noopener noreferrer",children:e})},types:{addImage:({value:e})=>{var l,o,a;return(0,t.jsx)(p.Image,{className:"w-full h-full mb-5",width:500,height:500,sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",src:e==null?void 0:e.image,alt:(a=e==null?void 0:e.alt)!=null?a:(o=(l=e==null?void 0:e.image)==null?void 0:l.asset)==null?void 0:o._ref})}}};var f="Blockstyle",d=({children:e,className:l,as:o,content:a,...m})=>{let{[f]:h=r.DefaultComponent}=(0,r.useStackShiftUIComponents)();return(0,t.jsx)(h,{as:o,className:l,...m,children:a?(0,t.jsx)(b.PortableText,{value:a,components:s}):e})};d.displayName=f;0&&(module.exports={Blockstyle,defaultBlockStyle});
|
package/dist/index.mjs
ADDED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackshift-ui/blockstyle",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "7.0.0-beta.
|
|
4
|
+
"version": "7.0.0-beta.7",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@portabletext/react": "^3.1.0",
|
|
37
|
-
"@stackshift-ui/
|
|
38
|
-
"@stackshift-ui/
|
|
39
|
-
"@stackshift-ui/
|
|
40
|
-
"@stackshift-ui/
|
|
41
|
-
"@stackshift-ui/
|
|
42
|
-
"@stackshift-ui/
|
|
37
|
+
"@stackshift-ui/system": "7.0.0-beta.6",
|
|
38
|
+
"@stackshift-ui/heading": "7.0.0-beta.6",
|
|
39
|
+
"@stackshift-ui/text": "7.0.0-beta.6",
|
|
40
|
+
"@stackshift-ui/scripts": "7.0.0-beta.5",
|
|
41
|
+
"@stackshift-ui/image": "7.0.0-beta.7",
|
|
42
|
+
"@stackshift-ui/link": "7.0.0-beta.6"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@stackshift-ui/system": ">=7.0.0-beta.
|
|
45
|
+
"@stackshift-ui/system": ">=7.0.0-beta.6",
|
|
46
46
|
"@types/react": "16.8 - 19",
|
|
47
47
|
"next": "10 - 14",
|
|
48
48
|
"react": "16.8 - 19",
|