@object-ui/runner 0.3.0 → 0.3.1
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/CHANGELOG.md +13 -0
- package/README.md +155 -0
- package/dist/assets/AdvancedChartImpl-CBiVuUeV.js +7 -0
- package/dist/assets/BarChart-CegIWQbY.js +60 -0
- package/dist/assets/ChartImpl-8nTiicYj.js +1 -0
- package/dist/assets/{KanbanImpl-APLTSaom.js → KanbanImpl-BRB-4EEl.js} +1 -1
- package/dist/assets/index-Czlaw_Lh.js +8528 -0
- package/dist/assets/index-DOEBIU-6.css +1 -0
- package/dist/index.html +2 -2
- package/package.json +23 -12
- package/postcss.config.js +9 -1
- package/src/App.tsx +8 -0
- package/src/LayoutRenderer.tsx +8 -0
- package/src/index.css +90 -55
- package/src/lib/MetadataLoader.ts +8 -0
- package/src/lib/mockDataSource.ts +22 -0
- package/src/main.tsx +8 -0
- package/src/plugin-integration.test.ts +64 -0
- package/vite.config.ts +8 -0
- package/dist/assets/AdvancedChartImpl-DZ0-Siqu.js +0 -11
- package/dist/assets/BarChart-C_mJtBYc.js +0 -69
- package/dist/assets/ChartImpl-BcbiBEtK.js +0 -1
- package/dist/assets/index-BAf0tooB.css +0 -1
- package/dist/assets/index-CW0j9o4j.js +0 -16235
- package/tailwind.config.js +0 -63
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as n,f as L,j as i}from"./index-Czlaw_Lh.js";import{a as T,r as E,i as s,d as v,u as A,b as Y,g as B,c as R,e as F,f as G,h as m,s as I,j as _,k as z,l as M,m as N,n as H,o as K,p as W,C as q,R as V,B as X,q as $,X as J,T as Q,L as U,t as Z}from"./BarChart-CegIWQbY.js";var ee=["type"],re=["dangerouslySetInnerHTML","ticks","scale"],te=["id","scale"];function h(){return h=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var a in t)({}).hasOwnProperty.call(t,a)&&(r[a]=t[a])}return r},h.apply(null,arguments)}function O(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);e&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(r,l).enumerable})),t.push.apply(t,a)}return t}function k(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?O(Object(t),!0).forEach(function(a){ae(r,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach(function(a){Object.defineProperty(r,a,Object.getOwnPropertyDescriptor(t,a))})}return r}function ae(r,e,t){return(e=ie(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ie(r){var e=se(r,"string");return typeof e=="symbol"?e:e+""}function se(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var a=t.call(r,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function g(r,e){if(r==null)return{};var t,a,l=ne(r,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(a=0;a<o.length;a++)t=o[a],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(r,t)&&(l[t]=r[t])}return l}function ne(r,e){if(r==null)return{};var t={};for(var a in r)if({}.hasOwnProperty.call(r,a)){if(e.indexOf(a)!==-1)continue;t[a]=r[a]}return t}function oe(r){var e=A(),t=n.useRef(null),a=Y(),{type:l}=r,o=g(r,ee),f=B(a,"yAxis",l),c=n.useMemo(()=>{if(f!=null)return k(k({},o),{},{type:f})},[f,o]);return n.useLayoutEffect(()=>{c!=null&&(t.current===null?e(R(c)):t.current!==c&&e(F({prev:t.current,next:c})),t.current=c)},[c,e]),n.useLayoutEffect(()=>()=>{t.current&&(e(G(t.current)),t.current=null)},[e]),null}function le(r){var{yAxisId:e,className:t,width:a,label:l}=r,o=n.useRef(null),f=n.useRef(null),c=m(I),S=_(),b=A(),y="yAxis",d=m(u=>z(u,e)),x=m(u=>M(u,e)),w=m(u=>N(u,y,e,S)),p=m(u=>H(u,e));if(n.useLayoutEffect(()=>{if(!(a!=="auto"||!d||K(l)||n.isValidElement(l)||p==null)){var u=o.current;if(u){var j=u.getCalculatedWidth();Math.round(d.width)!==Math.round(j)&&b(W({id:e,width:j}))}}},[w,d,b,l,e,a,p]),d==null||x==null||p==null)return null;var{dangerouslySetInnerHTML:de,ticks:fe,scale:pe}=r,C=g(r,re),{id:me,scale:ye}=p,D=g(p,te);return n.createElement(q,h({},C,D,{ref:o,labelRef:f,x:x.x,y:x.y,tickTextProps:a==="auto"?{width:void 0}:{width:a},width:d.width,height:d.height,className:L("recharts-".concat(y," ").concat(y),t),viewBox:c,ticks:w,axisType:y}))}var ue={allowDataOverflow:s.allowDataOverflow,allowDecimals:s.allowDecimals,allowDuplicatedCategory:s.allowDuplicatedCategory,angle:s.angle,axisLine:v.axisLine,hide:!1,includeHidden:s.includeHidden,interval:s.interval,label:!1,minTickGap:s.minTickGap,mirror:s.mirror,orientation:s.orientation,padding:s.padding,reversed:s.reversed,scale:s.scale,tick:s.tick,tickCount:s.tickCount,tickLine:v.tickLine,tickSize:v.tickSize,type:s.type,width:s.width,yAxisId:0},ce=r=>{var e=E(r,ue);return n.createElement(n.Fragment,null,n.createElement(oe,{interval:e.interval,id:e.yAxisId,scale:e.scale,type:e.type,domain:e.domain,allowDataOverflow:e.allowDataOverflow,dataKey:e.dataKey,allowDuplicatedCategory:e.allowDuplicatedCategory,allowDecimals:e.allowDecimals,tickCount:e.tickCount,padding:e.padding,includeHidden:e.includeHidden,reversed:e.reversed,ticks:e.ticks,width:e.width,orientation:e.orientation,mirror:e.mirror,hide:e.hide,unit:e.unit,name:e.name,angle:e.angle,minTickGap:e.minTickGap,tick:e.tick,tickFormatter:e.tickFormatter}),n.createElement(le,e))},P=n.memo(ce,T);P.displayName="YAxis";function he({data:r=[],dataKey:e="value",xAxisKey:t="name",height:a=400,className:l="",color:o="hsl(var(--primary))"}){return i.jsx("div",{className:`p-4 rounded-xl border border-border bg-card/40 backdrop-blur-sm shadow-lg shadow-background/5 ${l}`,children:i.jsx(V,{width:"100%",height:a,children:i.jsxs(X,{data:r,margin:{top:20,right:30,left:20,bottom:5},children:[i.jsxs("defs",{children:[i.jsxs("linearGradient",{id:"barGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[i.jsx("stop",{offset:"0%",stopColor:o,stopOpacity:1}),i.jsx("stop",{offset:"90%",stopColor:o,stopOpacity:.6}),i.jsx("stop",{offset:"100%",stopColor:o,stopOpacity:.3})]}),i.jsxs("filter",{id:"glow",height:"130%",children:[i.jsx("feGaussianBlur",{in:"SourceAlpha",stdDeviation:"3",result:"blur"}),i.jsx("feOffset",{in:"blur",dx:"0",dy:"0",result:"offsetBlur"}),i.jsx("feFlood",{floodColor:o,floodOpacity:"0.5",result:"offsetColor"}),i.jsx("feComposite",{in:"offsetColor",in2:"offsetBlur",operator:"in",result:"offsetBlur"}),i.jsxs("feMerge",{children:[i.jsx("feMergeNode",{in:"offsetBlur"}),i.jsx("feMergeNode",{in:"SourceGraphic"})]})]})]}),i.jsx($,{strokeDasharray:"3 3",stroke:"hsl(var(--border))",vertical:!1}),i.jsx(J,{dataKey:t,tick:{fill:"hsl(var(--muted-foreground))",fontSize:12,fontFamily:"monospace"},tickLine:!1,axisLine:{stroke:"hsl(var(--border))"},dy:10}),i.jsx(P,{tick:{fill:"hsl(var(--muted-foreground))",fontSize:12,fontFamily:"monospace"},tickLine:!1,axisLine:!1}),i.jsx(Q,{cursor:{fill:"hsl(var(--muted))",opacity:.2},contentStyle:{backgroundColor:"hsl(var(--popover))",borderColor:"hsl(var(--border))",color:"hsl(var(--popover-foreground))",borderRadius:"8px",fontFamily:"monospace",boxShadow:"0 4px 6px -1px rgb(0 0 0 / 0.1)"},itemStyle:{color:"hsl(var(--primary))"}}),i.jsx(U,{wrapperStyle:{paddingTop:"20px",fontFamily:"monospace"}}),i.jsx(Z,{dataKey:e,fill:"url(#barGradient)",radius:[4,4,0,0],filter:"url(#glow)",animationDuration:1500})]})})})}export{he as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as l,R as T,a as Te,j as M,B as Vt,S as On,C as Mn,b as Tn,c as Ln,d as kn,e as jn}from"./index-
|
|
1
|
+
import{r as l,R as T,a as Te,j as M,B as Vt,S as On,C as Mn,b as Tn,c as Ln,d as kn,e as jn}from"./index-Czlaw_Lh.js";function Pn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return l.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const rt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function we(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function mt(e){return"nodeType"in e}function B(e){var t,n;return e?we(e)?e:mt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function yt(e){const{Document:t}=B(e);return e instanceof t}function Be(e){return we(e)?!1:e instanceof B(e).HTMLElement}function qt(e){return e instanceof B(e).SVGElement}function Ce(e){return e?we(e)?e.document:mt(e)?yt(e)?e:Be(e)||qt(e)?e.ownerDocument:document:document:document}const q=rt?l.useLayoutEffect:l.useEffect;function ot(e){const t=l.useRef(e);return q(()=>{t.current=e}),l.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function zn(){const e=l.useRef(null),t=l.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=l.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Pe(e,t){t===void 0&&(t=[e]);const n=l.useRef(e);return q(()=>{n.current!==e&&(n.current=e)},t),n}function Fe(e,t){const n=l.useRef();return l.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function _e(e){const t=ot(e),n=l.useRef(null),r=l.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function Qe(e){const t=l.useRef();return l.useEffect(()=>{t.current=e},[e]),t.current}let dt={};function $e(e,t){return l.useMemo(()=>{if(t)return t;const n=dt[e]==null?0:dt[e]+1;return dt[e]=n,e+"-"+n},[e,t])}function Gt(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((i,s)=>{const a=Object.entries(s);for(const[c,u]of a){const d=i[c];d!=null&&(i[c]=d+e*u)}return i},{...t})}}const xe=Gt(1),Ze=Gt(-1);function Bn(e){return"clientX"in e&&"clientY"in e}function it(e){if(!e)return!1;const{KeyboardEvent:t}=B(e.target);return t&&e instanceof t}function Fn(e){if(!e)return!1;const{TouchEvent:t}=B(e.target);return t&&e instanceof t}function et(e){if(Fn(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Bn(e)?{x:e.clientX,y:e.clientY}:null}const fe=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[fe.Translate.toString(e),fe.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),kt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function $n(e){return e.matches(kt)?e:e.querySelector(kt)}const Xn={display:"none"};function Yn(e){let{id:t,value:n}=e;return T.createElement("div",{id:t,style:Xn},n)}function Kn(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return T.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Un(){const[e,t]=l.useState("");return{announce:l.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Jt=l.createContext(null);function Wn(e){const t=l.useContext(Jt);l.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Hn(){const[e]=l.useState(()=>new Set),t=l.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[l.useCallback(r=>{let{type:o,event:i}=r;e.forEach(s=>{var a;return(a=s[o])==null?void 0:a.call(s,i)})},[e]),t]}const Vn={draggable:`
|
|
2
2
|
To pick up a draggable item, press the space bar.
|
|
3
3
|
While dragging, use the arrow keys to move the item.
|
|
4
4
|
Press space again to drop the item in its new position, or press escape to cancel.
|