@vis3/kit 1.0.1 → 1.0.2

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.mjs CHANGED
@@ -37629,7 +37629,7 @@ function b2e() {
37629
37629
  throw new Error("useFieldContext must be used within a FieldContext");
37630
37630
  return e;
37631
37631
  }
37632
- const aM = "data:image/svg+xml,%3csvg%20width='1em'%20height='1em'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.01415%202.0835C4.55392%202.0835%204.18082%202.45659%204.18082%202.91683V5.62578H2.91414C2.45391%205.62578%202.08081%205.99887%202.08081%206.45911V17.0835C2.08081%2017.5438%202.45391%2017.9169%202.91414%2017.9169H13.5417C14.0019%2017.9169%2014.375%2017.5438%2014.375%2017.0835V15.7735H17.0856C17.5458%2015.7735%2017.9189%2015.4004%2017.9189%2014.9401V2.91683C17.9189%202.45659%2017.5458%202.0835%2017.0856%202.0835H5.01415ZM14.375%2014.1068V6.45911C14.375%205.99887%2014.0019%205.62578%2013.5417%205.62578H5.84748V3.75016H16.2523V14.1068H14.375ZM3.74747%2016.2502V7.29244H12.7084V16.2502H3.74747Z'%20fill='currentColor'/%3e%3c/svg%3e";
37632
+ const aM = (e) => /* @__PURE__ */ Y.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ Y.createElement("path", { d: "M5.01415 2.0835C4.55392 2.0835 4.18082 2.45659 4.18082 2.91683V5.62578H2.91414C2.45391 5.62578 2.08081 5.99887 2.08081 6.45911V17.0835C2.08081 17.5438 2.45391 17.9169 2.91414 17.9169H13.5417C14.0019 17.9169 14.375 17.5438 14.375 17.0835V15.7735H17.0856C17.5458 15.7735 17.9189 15.4004 17.9189 14.9401V2.91683C17.9189 2.45659 17.5458 2.0835 17.0856 2.0835H5.01415ZM14.375 14.1068V6.45911C14.375 5.99887 14.0019 5.62578 13.5417 5.62578H5.84748V3.75016H16.2523V14.1068H14.375ZM3.74747 16.2502V7.29244H12.7084V16.2502H3.74747Z", fill: "currentColor" }));
37633
37633
  function r5(e) {
37634
37634
  const { t } = p1(), [r, n] = ut(t("copy")), i = _t(() => {
37635
37635
  try {
package/dist/index.umd.js CHANGED
@@ -193,7 +193,7 @@ Valid keys: `+JSON.stringify(Object.keys(_),null," "));var I=se(Y,ne,re,oe,ae+"
193
193
  min-width: 48px;
194
194
  overflow: hidden;
195
195
  text-overflow: ellipsis;
196
- `;function xee({className:e,name:t,title:r,titleExtra:n,extra:i,children:a,bodyStyle:o},s){const{builtIns:l}=gee();return j.jsx(Oee,{ref:s,size:"small",headStyle:{userSelect:"none"},className:Gd(e,"field-renderer"),title:r??j.jsxs(yee,{children:[j.jsx(we.Tooltip,{title:t,children:j.jsx(vee,{className:"field-name",children:t})}),l,n]}),extra:i,styles:{body:{flex:1,minHeight:0,overflow:"auto",paddingLeft:0,paddingRight:0,paddingBottom:0,paddingTop:0,...o}},children:a})}const R2=G.forwardRef(xee);R2.displayName="RenderCard";const sS=G.createContext({value:void 0,path:void 0});function Lee(){const e=G.useContext(sS);if(!e)throw new Error("useFieldContext must be used within a FieldContext");return e}const lS="data:image/svg+xml,%3csvg%20width='1em'%20height='1em'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.01415%202.0835C4.55392%202.0835%204.18082%202.45659%204.18082%202.91683V5.62578H2.91414C2.45391%205.62578%202.08081%205.99887%202.08081%206.45911V17.0835C2.08081%2017.5438%202.45391%2017.9169%202.91414%2017.9169H13.5417C14.0019%2017.9169%2014.375%2017.5438%2014.375%2017.0835V15.7735H17.0856C17.5458%2015.7735%2017.9189%2015.4004%2017.9189%2014.9401V2.91683C17.9189%202.45659%2017.5458%202.0835%2017.0856%202.0835H5.01415ZM14.375%2014.1068V6.45911C14.375%205.99887%2014.0019%205.62578%2013.5417%205.62578H5.84748V3.75016H16.2523V14.1068H14.375ZM3.74747%2016.2502V7.29244H12.7084V16.2502H3.74747Z'%20fill='currentColor'/%3e%3c/svg%3e";function Mi(e){const{t}=Jt(),[r,n]=G.useState(t("copy")),i=G.useCallback(()=>{try{if(typeof e=="object"){const o=JSON.stringify(e);navigator.clipboard.writeText(o)}else navigator.clipboard.writeText(e||"");n(t("copied"))}catch(o){console.error(o),n(t("copy"))}setTimeout(()=>{n(t("copy"))},1e3)},[e]);return[G.useMemo(()=>j.jsx(we.Tooltip,{title:r,children:j.jsx(we.Button,{size:"small",type:"text",icon:j.jsx(lS,{}),onClick:i})}),[r,i])]}const bee=e=>K.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},K.createElement("path",{d:"M2.5 6.6665C2.76447 7.17455 3.16519 7.64584 3.67615 8.06459C5.10875 9.23871 7.40792 9.99984 10 9.99984C12.5921 9.99984 14.8912 9.23871 16.3238 8.06459C16.8348 7.64584 17.2355 7.17455 17.5 6.6665",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),K.createElement("path",{d:"M12.0742 10L12.9369 13.2197",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),K.createElement("path",{d:"M15.5645 8.89746L17.9215 11.2545",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),K.createElement("path",{d:"M2.08398 11.2545L4.44101 8.89746",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),K.createElement("path",{d:"M7.05273 13.2198L7.91544 10",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),See=e=>K.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},K.createElement("path",{d:"M10.0013 15C14.6037 15 18.3346 10 18.3346 10C18.3346 10 14.6037 5 10.0013 5C5.39893 5 1.66797 10 1.66797 10C1.66797 10 5.39893 15 10.0013 15Z",stroke:"currentColor",strokeWidth:2,strokeLinejoin:"round"}),K.createElement("path",{d:"M10.0013 12.0832C11.1519 12.0832 12.0846 11.1504 12.0846 9.99984C12.0846 8.84925 11.1519 7.9165 10.0013 7.9165C8.85072 7.9165 7.91797 8.84925 7.91797 9.99984C7.91797 11.1504 8.85072 12.0832 10.0013 12.0832Z",stroke:"currentColor",strokeWidth:2,strokeLinejoin:"round"}));function Pi(e=!0,t){const[r,n]=G.useState(e),{t:i}=Jt(),a=G.useCallback(l=>{n(l),t?.(l)},[t]),o=G.useMemo(()=>j.jsx(Z0,{activated:r,onTitle:i("renderer.closePreview"),offTitle:i("renderer.openPreview"),onIcon:j.jsx(See,{}),offIcon:j.jsx(bee,{}),onChange:a}),[r,a,i]),s=G.useMemo(()=>({preview:r}),[r]);return[o,s,a]}const uS=[{key:"raw",label:Ke.t("renderer.raw"),value:"raw"},{key:"image",label:Ke.t("renderer.image"),value:"image"},{key:"html",label:Ke.t("renderer.html"),value:"html"},{key:"json",label:Ke.t("renderer.json"),value:"json"},{key:"markdown",label:Ke.t("renderer.markdown"),value:"markdown"},{type:"divider"},{key:"content_list",label:Ke.t("renderer.contentList"),value:"content_list"},{key:"img_list",label:Ke.t("renderer.imgList"),value:"img_list"}],Eee=Ee.div`
196
+ `;function xee({className:e,name:t,title:r,titleExtra:n,extra:i,children:a,bodyStyle:o},s){const{builtIns:l}=gee();return j.jsx(Oee,{ref:s,size:"small",headStyle:{userSelect:"none"},className:Gd(e,"field-renderer"),title:r??j.jsxs(yee,{children:[j.jsx(we.Tooltip,{title:t,children:j.jsx(vee,{className:"field-name",children:t})}),l,n]}),extra:i,styles:{body:{flex:1,minHeight:0,overflow:"auto",paddingLeft:0,paddingRight:0,paddingBottom:0,paddingTop:0,...o}},children:a})}const R2=G.forwardRef(xee);R2.displayName="RenderCard";const sS=G.createContext({value:void 0,path:void 0});function Lee(){const e=G.useContext(sS);if(!e)throw new Error("useFieldContext must be used within a FieldContext");return e}const lS=e=>K.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},K.createElement("path",{d:"M5.01415 2.0835C4.55392 2.0835 4.18082 2.45659 4.18082 2.91683V5.62578H2.91414C2.45391 5.62578 2.08081 5.99887 2.08081 6.45911V17.0835C2.08081 17.5438 2.45391 17.9169 2.91414 17.9169H13.5417C14.0019 17.9169 14.375 17.5438 14.375 17.0835V15.7735H17.0856C17.5458 15.7735 17.9189 15.4004 17.9189 14.9401V2.91683C17.9189 2.45659 17.5458 2.0835 17.0856 2.0835H5.01415ZM14.375 14.1068V6.45911C14.375 5.99887 14.0019 5.62578 13.5417 5.62578H5.84748V3.75016H16.2523V14.1068H14.375ZM3.74747 16.2502V7.29244H12.7084V16.2502H3.74747Z",fill:"currentColor"}));function Mi(e){const{t}=Jt(),[r,n]=G.useState(t("copy")),i=G.useCallback(()=>{try{if(typeof e=="object"){const o=JSON.stringify(e);navigator.clipboard.writeText(o)}else navigator.clipboard.writeText(e||"");n(t("copied"))}catch(o){console.error(o),n(t("copy"))}setTimeout(()=>{n(t("copy"))},1e3)},[e]);return[G.useMemo(()=>j.jsx(we.Tooltip,{title:r,children:j.jsx(we.Button,{size:"small",type:"text",icon:j.jsx(lS,{}),onClick:i})}),[r,i])]}const bee=e=>K.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},K.createElement("path",{d:"M2.5 6.6665C2.76447 7.17455 3.16519 7.64584 3.67615 8.06459C5.10875 9.23871 7.40792 9.99984 10 9.99984C12.5921 9.99984 14.8912 9.23871 16.3238 8.06459C16.8348 7.64584 17.2355 7.17455 17.5 6.6665",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),K.createElement("path",{d:"M12.0742 10L12.9369 13.2197",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),K.createElement("path",{d:"M15.5645 8.89746L17.9215 11.2545",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),K.createElement("path",{d:"M2.08398 11.2545L4.44101 8.89746",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),K.createElement("path",{d:"M7.05273 13.2198L7.91544 10",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),See=e=>K.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},K.createElement("path",{d:"M10.0013 15C14.6037 15 18.3346 10 18.3346 10C18.3346 10 14.6037 5 10.0013 5C5.39893 5 1.66797 10 1.66797 10C1.66797 10 5.39893 15 10.0013 15Z",stroke:"currentColor",strokeWidth:2,strokeLinejoin:"round"}),K.createElement("path",{d:"M10.0013 12.0832C11.1519 12.0832 12.0846 11.1504 12.0846 9.99984C12.0846 8.84925 11.1519 7.9165 10.0013 7.9165C8.85072 7.9165 7.91797 8.84925 7.91797 9.99984C7.91797 11.1504 8.85072 12.0832 10.0013 12.0832Z",stroke:"currentColor",strokeWidth:2,strokeLinejoin:"round"}));function Pi(e=!0,t){const[r,n]=G.useState(e),{t:i}=Jt(),a=G.useCallback(l=>{n(l),t?.(l)},[t]),o=G.useMemo(()=>j.jsx(Z0,{activated:r,onTitle:i("renderer.closePreview"),offTitle:i("renderer.openPreview"),onIcon:j.jsx(See,{}),offIcon:j.jsx(bee,{}),onChange:a}),[r,a,i]),s=G.useMemo(()=>({preview:r}),[r]);return[o,s,a]}const uS=[{key:"raw",label:Ke.t("renderer.raw"),value:"raw"},{key:"image",label:Ke.t("renderer.image"),value:"image"},{key:"html",label:Ke.t("renderer.html"),value:"html"},{key:"json",label:Ke.t("renderer.json"),value:"json"},{key:"markdown",label:Ke.t("renderer.markdown"),value:"markdown"},{type:"divider"},{key:"content_list",label:Ke.t("renderer.contentList"),value:"content_list"},{key:"img_list",label:Ke.t("renderer.imgList"),value:"img_list"}],Eee=Ee.div`
197
197
  display: flex;
198
198
  align-items: center;
199
199
  gap: 0.5rem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vis3/kit",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "scripts": {
5
5
  "build": "vite build && tsc -d --emitDeclarationOnly",
6
6
  "clean": "rimraf ./node_modules",