@stackshift-ui/blockstyle 7.0.0-beta.4 → 7.0.0-beta.6

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/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",
4
+ "version": "7.0.0-beta.6",
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/heading": "7.0.0-beta.3",
38
- "@stackshift-ui/system": "6.1.0-beta.3",
39
- "@stackshift-ui/image": "6.1.0-beta.4",
40
- "@stackshift-ui/link": "6.1.0-beta.3",
41
- "@stackshift-ui/text": "7.0.0-beta.3",
42
- "@stackshift-ui/scripts": "6.1.0-beta.2"
37
+ "@stackshift-ui/system": "7.0.0-beta.5",
38
+ "@stackshift-ui/text": "7.0.0-beta.5",
39
+ "@stackshift-ui/heading": "7.0.0-beta.5",
40
+ "@stackshift-ui/image": "7.0.0-beta.6",
41
+ "@stackshift-ui/link": "7.0.0-beta.5",
42
+ "@stackshift-ui/scripts": "7.0.0-beta.4"
43
43
  },
44
44
  "peerDependencies": {
45
- "@stackshift-ui/system": ">=6.1.0-beta.3",
45
+ "@stackshift-ui/system": ">=7.0.0-beta.5",
46
46
  "@types/react": "16.8 - 19",
47
47
  "next": "10 - 14",
48
48
  "react": "16.8 - 19",
@@ -1,8 +0,0 @@
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>;
@@ -1 +0,0 @@
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});
@@ -1 +0,0 @@
1
- import{a}from"./chunk-34BAENR7.mjs";import"./chunk-MWQ5ZP4S.mjs";export{a as Blockstyle};
@@ -1 +0,0 @@
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};
@@ -1,65 +0,0 @@
1
- // src/defaultBlockStyle.tsx
2
- import { Heading } from "@stackshift-ui/heading";
3
- import { Image } from "@stackshift-ui/image";
4
- import { Link } from "@stackshift-ui/link";
5
- import { Text } from "@stackshift-ui/text";
6
- import { jsx, jsxs } from "react/jsx-runtime";
7
- var defaultBlockStyle = {
8
- block: {
9
- h1: ({ children }) => /* @__PURE__ */ jsx(Heading, { fontSize: "5xl", weight: "bold", className: "mb-8 leading-normal text-black", children }),
10
- h2: ({ children }) => /* @__PURE__ */ jsx(Heading, { type: "h2", weight: "bold", fontSize: "4xl", className: "mb-8 text-black", children }),
11
- h3: ({ children }) => /* @__PURE__ */ jsx(Heading, { type: "h3", fontSize: "3xl", weight: "bold", className: "mb-8 leading-normal text-black", children }),
12
- h4: ({ children }) => /* @__PURE__ */ jsx(Heading, { type: "h4", weight: "bold", fontSize: "2xl", className: "mb-8 leading-normal text-black", children }),
13
- h5: ({ children }) => /* @__PURE__ */ jsx(Heading, { type: "h4", weight: "bold", fontSize: "xl", className: "mb-8 leading-normal text-black", children }),
14
- h6: ({ children }) => /* @__PURE__ */ jsx(Heading, { type: "h4", weight: "bold", fontSize: "lg", className: "mb-8 leading-normal text-black", children }),
15
- normal: ({ children }) => /* @__PURE__ */ jsx(Text, { className: "mb-8 leading-relaxed", children }),
16
- blockquote: ({ children }) => /* @__PURE__ */ jsxs("blockquote", { className: "mb-6 italic leading-loose text-gray-500 px-14", children: [
17
- "- ",
18
- children
19
- ] })
20
- },
21
- code: ({ value }) => /* @__PURE__ */ jsx("pre", { "data-language": value.language, children: /* @__PURE__ */ jsx("code", { children: value.code }) }),
22
- list: {
23
- bullet: ({ children }) => /* @__PURE__ */ jsx("ul", { className: "flex flex-col pl-10 mb-8 space-y-4 leading-relaxed list-disc", children }),
24
- number: ({ children }) => /* @__PURE__ */ jsx("ol", { className: "flex flex-col pl-10 mb-8 space-y-4 leading-relaxed list-decimal", children })
25
- },
26
- listItem: {
27
- bullet: ({ children }) => /* @__PURE__ */ jsx("li", { className: "leading-relaxed", children }),
28
- number: ({ children }) => /* @__PURE__ */ jsx("li", { className: "leading-relaxed", children })
29
- },
30
- marks: {
31
- strong: ({ children }) => /* @__PURE__ */ jsx("strong", { children }),
32
- em: ({ children }) => /* @__PURE__ */ jsx("em", { children }),
33
- code: ({ children }) => /* @__PURE__ */ jsx("code", { children }),
34
- link: ({ children, value }) => /* @__PURE__ */ jsx(
35
- Link,
36
- {
37
- className: "hover:text-primary-foreground text-primary",
38
- href: value.href,
39
- target: "_blank",
40
- rel: "noopener noreferrer",
41
- children
42
- }
43
- )
44
- },
45
- types: {
46
- addImage: ({ value }) => {
47
- var _a, _b, _c;
48
- return /* @__PURE__ */ jsx(
49
- Image,
50
- {
51
- className: "w-full h-full mb-5",
52
- width: 500,
53
- height: 500,
54
- sizes: "(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",
55
- src: value == null ? void 0 : value.image,
56
- alt: (_c = value == null ? void 0 : value.alt) != null ? _c : (_b = (_a = value == null ? void 0 : value.image) == null ? void 0 : _a.asset) == null ? void 0 : _b._ref
57
- }
58
- );
59
- }
60
- }
61
- };
62
-
63
- export {
64
- defaultBlockStyle
65
- };
@@ -1 +0,0 @@
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};
@@ -1,24 +0,0 @@
1
- import {
2
- defaultBlockStyle
3
- } from "./chunk-MR5EDJ66.mjs";
4
-
5
- // src/blockstyle.tsx
6
- import { PortableText } from "@portabletext/react";
7
- import { DefaultComponent, useStackShiftUIComponents } from "@stackshift-ui/system";
8
- import { jsx } from "react/jsx-runtime";
9
- var displayName = "Blockstyle";
10
- var Blockstyle = ({
11
- children,
12
- className,
13
- as,
14
- content,
15
- ...props
16
- }) => {
17
- const { [displayName]: Component = DefaultComponent } = useStackShiftUIComponents();
18
- return /* @__PURE__ */ jsx(Component, { as, className, ...props, children: content ? /* @__PURE__ */ jsx(PortableText, { value: content, components: defaultBlockStyle }) : children });
19
- };
20
- Blockstyle.displayName = displayName;
21
-
22
- export {
23
- Blockstyle
24
- };
@@ -1,10 +0,0 @@
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;
@@ -1 +0,0 @@
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});
@@ -1 +0,0 @@
1
- import{a}from"./chunk-MWQ5ZP4S.mjs";export{a as defaultBlockStyle};
package/dist/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export { Blockstyle } from "./blockstyle";
2
- export { defaultBlockStyle } from "./defaultBlockStyle";
package/dist/index.js DELETED
@@ -1,2 +0,0 @@
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 DELETED
@@ -1,2 +0,0 @@
1
- "use client";
2
- "use strict";import{a as l}from"./chunk-34BAENR7.mjs";import{a as e}from"./chunk-MWQ5ZP4S.mjs";export{l as Blockstyle,e as defaultBlockStyle};