@teambit/schema 1.0.510 → 1.0.511
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/artifacts/__bit_junit.xml +3 -3
- package/artifacts/preview/teambit_semantics_schema-preview.js +1 -1
- package/dist/mock/button-schemas.json +22 -13
- package/dist/{preview-1736705249371.js → preview-1736711473672.js} +3 -3
- package/mock/button-schemas.json +22 -13
- package/package.json +18 -18
- package/artifacts/schema.json +0 -4240
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<testsuites tests="3" failures="0" errors="0" skipped="0">
|
|
3
|
-
<testsuite name="teambit.semantics/schema@1.0.
|
|
4
|
-
<testcase classname="dist/schema.spec.js" name="should be able to generate JSON object with all schemas" time="0.
|
|
5
|
-
<testcase classname="dist/schema.spec.js" name="should be able to deserialize an JSON object to SchemaNode instances" time="0.
|
|
3
|
+
<testsuite name="teambit.semantics/schema@1.0.511" tests="3" failures="0" errors="0" skipped="0">
|
|
4
|
+
<testcase classname="dist/schema.spec.js" name="should be able to generate JSON object with all schemas" time="0.011"/>
|
|
5
|
+
<testcase classname="dist/schema.spec.js" name="should be able to deserialize an JSON object to SchemaNode instances" time="0.009"/>
|
|
6
6
|
<testcase classname="dist/schema.spec.js" name="should not throw when it does not recognize the schema" time="0.001"/>
|
|
7
7
|
</testsuite>
|
|
8
8
|
</testsuites>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see teambit_semantics_schema-preview.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.semantics/schema-preview"]=t():e["teambit.semantics/schema-preview"]=t()}(self,(()=>(()=>{var e={685:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)){if(n.length){var i=r.apply(null,n);i&&e.push(i)}}else if("object"===a)if(n.toString===Object.prototype.toString)for(var s in n)o.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},949:(e,t)=>{"use strict";var n=Object.prototype.hasOwnProperty;function o(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function r(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var o,a,i=[];for(a in"string"!=typeof t&&(t="?"),e)if(n.call(e,a)){if((o=e[a])||null!=o&&!isNaN(o)||(o=""),a=r(a),o=r(o),null===a||null===o)continue;i.push(a+"="+o)}return i.length?t+i.join("&"):""},t.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,r={};t=n.exec(e);){var a=o(t[1]),i=o(t[2]);null===a||null===i||a in r||(r[a]=i)}return r}},788:e=>{"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},448:(e,t,n)=>{"use strict";var o=n(788),r=n(949),a=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,i=/[\n\r\t]/g,s=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,c=/:\d+$/,u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,l=/^[a-zA-Z]:/;function p(e){return(e||"").toString().replace(a,"")}var f=[["#","hash"],["?","query"],function(e,t){return h(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],d={hash:1,query:1};function m(e){var t,o=("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).location||{},r={},a=typeof(e=e||o);if("blob:"===e.protocol)r=new v(unescape(e.pathname),{});else if("string"===a)for(t in r=new v(e,{}),d)delete r[t];else if("object"===a){for(t in e)t in d||(r[t]=e[t]);void 0===r.slashes&&(r.slashes=s.test(e.href))}return r}function h(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function b(e,t){e=(e=p(e)).replace(i,""),t=t||{};var n,o=u.exec(e),r=o[1]?o[1].toLowerCase():"",a=!!o[2],s=!!o[3],c=0;return a?s?(n=o[2]+o[3]+o[4],c=o[2].length+o[3].length):(n=o[2]+o[4],c=o[2].length):s?(n=o[3]+o[4],c=o[3].length):n=o[4],"file:"===r?c>=2&&(n=n.slice(2)):h(r)?n=o[4]:r?a&&(n=n.slice(2)):c>=2&&h(t.protocol)&&(n=o[4]),{protocol:r,slashes:a||h(r),slashesCount:c,rest:n}}function v(e,t,n){if(e=(e=p(e)).replace(i,""),!(this instanceof v))return new v(e,t,n);var a,s,c,u,d,_,y=f.slice(),g=typeof t,O=this,w=0;for("object"!==g&&"string"!==g&&(n=t,t=null),n&&"function"!=typeof n&&(n=r.parse),a=!(s=b(e||"",t=m(t))).protocol&&!s.slashes,O.slashes=s.slashes||a&&t.slashes,O.protocol=s.protocol||t.protocol||"",e=s.rest,("file:"===s.protocol&&(2!==s.slashesCount||l.test(e))||!s.slashes&&(s.protocol||s.slashesCount<2||!h(O.protocol)))&&(y[3]=[/(.*)/,"pathname"]);w<y.length;w++)"function"!=typeof(u=y[w])?(c=u[0],_=u[1],c!=c?O[_]=e:"string"==typeof c?~(d="@"===c?e.lastIndexOf(c):e.indexOf(c))&&("number"==typeof u[2]?(O[_]=e.slice(0,d),e=e.slice(d+u[2])):(O[_]=e.slice(d),e=e.slice(0,d))):(d=c.exec(e))&&(O[_]=d[1],e=e.slice(0,d.index)),O[_]=O[_]||a&&u[3]&&t[_]||"",u[4]&&(O[_]=O[_].toLowerCase())):e=u(e,O);n&&(O.query=n(O.query)),a&&t.slashes&&"/"!==O.pathname.charAt(0)&&(""!==O.pathname||""!==t.pathname)&&(O.pathname=function(e,t){if(""===e)return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),o=n.length,r=n[o-1],a=!1,i=0;o--;)"."===n[o]?n.splice(o,1):".."===n[o]?(n.splice(o,1),i++):i&&(0===o&&(a=!0),n.splice(o,1),i--);return a&&n.unshift(""),"."!==r&&".."!==r||n.push(""),n.join("/")}(O.pathname,t.pathname)),"/"!==O.pathname.charAt(0)&&h(O.protocol)&&(O.pathname="/"+O.pathname),o(O.port,O.protocol)||(O.host=O.hostname,O.port=""),O.username=O.password="",O.auth&&(~(d=O.auth.indexOf(":"))?(O.username=O.auth.slice(0,d),O.username=encodeURIComponent(decodeURIComponent(O.username)),O.password=O.auth.slice(d+1),O.password=encodeURIComponent(decodeURIComponent(O.password))):O.username=encodeURIComponent(decodeURIComponent(O.auth)),O.auth=O.password?O.username+":"+O.password:O.username),O.origin="file:"!==O.protocol&&h(O.protocol)&&O.host?O.protocol+"//"+O.host:"null",O.href=O.toString()}v.prototype={set:function(e,t,n){var a=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(n||r.parse)(t)),a[e]=t;break;case"port":a[e]=t,o(t,a.protocol)?t&&(a.host=a.hostname+":"+t):(a.host=a.hostname,a[e]="");break;case"hostname":a[e]=t,a.port&&(t+=":"+a.port),a.host=t;break;case"host":a[e]=t,c.test(t)?(t=t.split(":"),a.port=t.pop(),a.hostname=t.join(":")):(a.hostname=t,a.port="");break;case"protocol":a.protocol=t.toLowerCase(),a.slashes=!n;break;case"pathname":case"hash":if(t){var i="pathname"===e?"/":"#";a[e]=t.charAt(0)!==i?i+t:t}else a[e]=t;break;case"username":case"password":a[e]=encodeURIComponent(t);break;case"auth":var s=t.indexOf(":");~s?(a.username=t.slice(0,s),a.username=encodeURIComponent(decodeURIComponent(a.username)),a.password=t.slice(s+1),a.password=encodeURIComponent(decodeURIComponent(a.password))):a.username=encodeURIComponent(decodeURIComponent(t))}for(var u=0;u<f.length;u++){var l=f[u];l[4]&&(a[l[1]]=a[l[1]].toLowerCase())}return a.auth=a.password?a.username+":"+a.password:a.username,a.origin="file:"!==a.protocol&&h(a.protocol)&&a.host?a.protocol+"//"+a.host:"null",a.href=a.toString(),a},toString:function(e){e&&"function"==typeof e||(e=r.stringify);var t,n=this,o=n.host,a=n.protocol;a&&":"!==a.charAt(a.length-1)&&(a+=":");var i=a+(n.protocol&&n.slashes||h(n.protocol)?"//":"");return n.username?(i+=n.username,n.password&&(i+=":"+n.password),i+="@"):n.password?(i+=":"+n.password,i+="@"):"file:"!==n.protocol&&h(n.protocol)&&!o&&"/"!==n.pathname&&(i+="@"),(":"===o[o.length-1]||c.test(n.hostname)&&!n.port)&&(o+=":"),i+=o+n.pathname,(t="object"==typeof n.query?e(n.query):n.query)&&(i+="?"!==t.charAt(0)?"?"+t:t),n.hash&&(i+=n.hash),i}},v.extractProtocol=b,v.location=m,v.trimLeft=p,v.qs=r,e.exports=v},665:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NavigationProvider=t.useNavigation=t.useNavigate=t.useLocation=t.Link=void 0;var o=n(445);Object.defineProperty(t,"Link",{enumerable:!0,get:function(){return o.Link}});var r=n(756);Object.defineProperty(t,"useLocation",{enumerable:!0,get:function(){return r.useLocation}});var a=n(280);Object.defineProperty(t,"useNavigate",{enumerable:!0,get:function(){return a.useNavigate}});var i=n(793);Object.defineProperty(t,"useNavigation",{enumerable:!0,get:function(){return i.useNavigation}}),Object.defineProperty(t,"NavigationProvider",{enumerable:!0,get:function(){return i.NavigationProvider}})},445:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Link=void 0;const i=a(n(594)),s=n(793),c=n(423);t.Link=(0,i.forwardRef)((function(e,t){const n=(0,s.useNavigation)().Link||c.NativeLink;return e.native||e.external?i.default.createElement(c.NativeLink,Object.assign({},e,{ref:t})):i.default.createElement(n,Object.assign({},e,{ref:t}))}))},423:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t},i=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.NativeLink=void 0;const c=a(n(594)),u=s(n(685)),l=n(481),p=n(756),f={rel:"noopener",target:"_blank"};t.NativeLink=(0,c.forwardRef)((function(e,t){var{className:n,style:o,activeClassName:r,activeStyle:a,active:s,strict:d,exact:m,href:h,external:b,native:v,state:_}=e,y=i(e,["className","style","activeClassName","activeStyle","active","strict","exact","href","external","native","state"]);const g=(0,p.useLocation)(),O=!!r||!!a,w=(0,c.useMemo)((()=>!!O&&("boolean"==typeof s?s:!(!g||!h)&&(0,l.compareUrl)(g.pathname,h,{exact:m,strict:d}))),[s,h,g,O]),j=b?f:{},P=(0,c.useMemo)((()=>w&&a?Object.assign(Object.assign({},o),a):o),[w,o]);return c.default.createElement("a",Object.assign({},j,y,{ref:t,href:h,className:(0,u.default)(n,w&&r),style:P}))}))},793:function(e,t,n){"use strict";var o={id:"teambit.base-react/navigation/link@2.0.31",homepage:"https://bit.cloud/teambit/base-react/navigation/link",exported:!0},r=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.NavigationProvider=t.useNavigation=t.NavigationContext=void 0;const s=i(n(594));function c(){return(0,s.useContext)(t.NavigationContext)}function u({children:e,implementation:n}){return s.default.createElement(t.NavigationContext.Provider,{value:n},e)}t.NavigationContext=s.default.createContext({}),c.__bit_component=o,t.useNavigation=c,u.__bit_component=o,t.NavigationProvider=u},756:(e,t,n)=>{"use strict";var o={id:"teambit.base-react/navigation/link@2.0.31",homepage:"https://bit.cloud/teambit/base-react/navigation/link",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.useLocation=void 0;const r=n(793);function a(){return((0,r.useNavigation)().useLocation||i)()}function i(){if("undefined"!=typeof window)return window.location}a.__bit_component=o,t.useLocation=a,i.__bit_component=o},280:(e,t,n)=>{"use strict";var o={id:"teambit.base-react/navigation/link@2.0.31",homepage:"https://bit.cloud/teambit/base-react/navigation/link",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.useNavigate=void 0;const r=n(793);function a(){var e;const t=(0,r.useNavigation)();return(null===(e=t.useNavigate)||void 0===e?void 0:e.call(t))||i}function i(e,{replace:t}={}){if("undefined"==typeof window)throw new Error("base-react.navigation.use-location - cannot use native navigator outside of browser. Inject a custom useNavigate, or use navigation after mount");const{location:n,history:o}=window;"number"==typeof e?o.go(e):t?n.replace(e):n.assign(e)}a.__bit_component=o,t.useNavigate=a,i.__bit_component=o},22:function(e,t,n){"use strict";var o={id:"teambit.base-ui/routing/compare-url@1.0.1",homepage:"https://bit.dev/teambit/base-ui/routing/compare-url",exported:!0},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.compareUrl=void 0;const a=r(n(448));function i(e,t,{exact:n,strict:o}={}){if(e===t)return!0;o||(e=e.replace(/\/(?=[?#]|$)/,""),t=t.replace(/\/(?=[?#]|$)/,""));const r=(0,a.default)(e),i=(0,a.default)(t),l=s(r,i),p=!n||c(r,i),f=!o||u(r,i);return l&&p&&f}function s(e,t){return(!t.protocol||t.protocol===e.protocol)&&(!t.hostname||t.hostname===e.hostname)&&(!t.port||t.port===e.port)&&(!t.pathname||e.pathname.startsWith(t.pathname))&&(!t.query||l(t.query,e.query))&&(!t.hash||t.hash===e.hash)&&(!t.password||t.password===e.password)&&(!t.username||t.username===e.username)}function c(e,t){return(!t.pathname||e.pathname===t.pathname)&&(!t.query||l(e.query,t.query))}function u(e,t){return!t.pathname||e.pathname.endsWith("/")===t.pathname.endsWith("/")}function l(e,t){return Object.keys(e).every((n=>e[n]===t[n]))}i.__bit_component=o,t.compareUrl=i,s.__bit_component=o,c.__bit_component=o,u.__bit_component=o,l.__bit_component=o},481:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compareUrl=void 0;var o=n(22);Object.defineProperty(t,"compareUrl",{enumerable:!0,get:function(){return o.compareUrl}})},230:(e,t,n)=>{"use strict";var o={id:"teambit.semantics/schema@1.0.510",homepage:"https://bit.cloud/teambit/semantics/schema",exported:!0};function r(){const e=i(n(594));return r=function(){return e},e}function a(){const e=n(118);return a=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.ButtonWithIcon=t.ButtonWithCustomStyles=t.ButtonAsALink=t.BasicButton=void 0,t.Footer=c,r.__bit_component=o,a.__bit_component=o,i.__bit_component=o;const s=()=>r().default.createElement(a().Button,null,"click me");function c({children:e=r().default.createElement(s,null)}){return r().default.createElement(a().Button,null,e)}s.__bit_component=o,t.BasicButton=s,c.__bit_component=o;const u=()=>r().default.createElement(a().Button,{style:{background:"red"}},"click me");u.__bit_component=o,t.ButtonWithCustomStyles=u;const l=()=>r().default.createElement(a().Button,null,"click me");l.__bit_component=o,t.ButtonWithIcon=l;const p=()=>r().default.createElement(a().Button,{href:"https://bit.dev"},"Bit");p.__bit_component=o,t.ButtonAsALink=p},118:(e,t,n)=>{"use strict";var o={id:"teambit.semantics/schema@1.0.510",homepage:"https://bit.cloud/teambit/semantics/schema",exported:!0};function r(){const e=s(n(594));return r=function(){return e},e}function a(){const e=n(665);return a=function(){return e},e}function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}function s(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var o={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=r?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=e[a]}return o.default=e,n&&n.set(e,o),o}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},c.apply(null,arguments)}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return(t=f(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e){var t=d(e,"string");return"symbol"==typeof t?t:t+""}function d(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function m(e){const t=(0,r().useRef)(),n=l({},e),o=e.href?.startsWith("http:")||e.href?.startsWith("https:");return r().default.createElement(r().default.Fragment,null,e.href?r().default.createElement(a().Link,c({external:o,ref:t,className:e.className},n),e.children):r().default.createElement("button",c({className:e.className,ref:t},n),e.children))}Object.defineProperty(t,"__esModule",{value:!0}),t.Bar=void 0,t.Button=m,r.__bit_component=o,a.__bit_component=o,i.__bit_component=o,s.__bit_component=o,c.__bit_component=o,u.__bit_component=o,l.__bit_component=o,p.__bit_component=o,f.__bit_component=o,d.__bit_component=o,m.__bit_component=o,t.Bar=class{foo(){}}},993:(e,t,n)=>{"use strict";var o={id:"teambit.semantics/schema@1.0.510",homepage:"https://bit.cloud/teambit/semantics/schema",exported:!0};function r(){const e=a(n(594));return r=function(){return e},e}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,r.__bit_component=o,a.__bit_component=o;const i=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/code.svg"}));i.__bit_component=o,t.Logo=i},594:e=>{"use strict";e.exports=React}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var a=t[o]={exports:{}};return e[o].call(a.exports,a,a.exports,n),a.exports}n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{"use strict";n.r(o),n.d(o,{compositions:()=>f,compositions_metadata:()=>m,overview:()=>d});var e={};n.r(e),n.d(e,{default:()=>p});var t=n(993),r=n(230);n(594);const a=MdxJsReact,i=TeambitMdxUiMdxScopeContext;var s=["components"];function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},c.apply(null,arguments)}var u={},l="wrapper";function p(e){var t=e.components,n=function(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.includes(o))continue;n[o]=e[o]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,s);return(0,a.mdx)(l,c({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}p.isMDXComponent=!0;const f=[t,r],d=[e],m={compositions:[{displayName:"Logo",identifier:"Logo"},{displayName:"Basic button",identifier:"BasicButton"},{displayName:"Footer",identifier:"Footer"},{displayName:"Button with custom styles",identifier:"ButtonWithCustomStyles"},{displayName:"Button with icon",identifier:"ButtonWithIcon"},{displayName:"Button as a link",identifier:"ButtonAsALink"}]}})(),o})()));
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.semantics/schema-preview"]=t():e["teambit.semantics/schema-preview"]=t()}(self,(()=>(()=>{var e={685:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)){if(n.length){var i=r.apply(null,n);i&&e.push(i)}}else if("object"===a)if(n.toString===Object.prototype.toString)for(var s in n)o.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},949:(e,t)=>{"use strict";var n=Object.prototype.hasOwnProperty;function o(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function r(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var o,a,i=[];for(a in"string"!=typeof t&&(t="?"),e)if(n.call(e,a)){if((o=e[a])||null!=o&&!isNaN(o)||(o=""),a=r(a),o=r(o),null===a||null===o)continue;i.push(a+"="+o)}return i.length?t+i.join("&"):""},t.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,r={};t=n.exec(e);){var a=o(t[1]),i=o(t[2]);null===a||null===i||a in r||(r[a]=i)}return r}},788:e=>{"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},448:(e,t,n)=>{"use strict";var o=n(788),r=n(949),a=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,i=/[\n\r\t]/g,s=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,c=/:\d+$/,u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,l=/^[a-zA-Z]:/;function p(e){return(e||"").toString().replace(a,"")}var f=[["#","hash"],["?","query"],function(e,t){return h(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],d={hash:1,query:1};function m(e){var t,o=("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).location||{},r={},a=typeof(e=e||o);if("blob:"===e.protocol)r=new v(unescape(e.pathname),{});else if("string"===a)for(t in r=new v(e,{}),d)delete r[t];else if("object"===a){for(t in e)t in d||(r[t]=e[t]);void 0===r.slashes&&(r.slashes=s.test(e.href))}return r}function h(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function b(e,t){e=(e=p(e)).replace(i,""),t=t||{};var n,o=u.exec(e),r=o[1]?o[1].toLowerCase():"",a=!!o[2],s=!!o[3],c=0;return a?s?(n=o[2]+o[3]+o[4],c=o[2].length+o[3].length):(n=o[2]+o[4],c=o[2].length):s?(n=o[3]+o[4],c=o[3].length):n=o[4],"file:"===r?c>=2&&(n=n.slice(2)):h(r)?n=o[4]:r?a&&(n=n.slice(2)):c>=2&&h(t.protocol)&&(n=o[4]),{protocol:r,slashes:a||h(r),slashesCount:c,rest:n}}function v(e,t,n){if(e=(e=p(e)).replace(i,""),!(this instanceof v))return new v(e,t,n);var a,s,c,u,d,_,y=f.slice(),g=typeof t,O=this,w=0;for("object"!==g&&"string"!==g&&(n=t,t=null),n&&"function"!=typeof n&&(n=r.parse),a=!(s=b(e||"",t=m(t))).protocol&&!s.slashes,O.slashes=s.slashes||a&&t.slashes,O.protocol=s.protocol||t.protocol||"",e=s.rest,("file:"===s.protocol&&(2!==s.slashesCount||l.test(e))||!s.slashes&&(s.protocol||s.slashesCount<2||!h(O.protocol)))&&(y[3]=[/(.*)/,"pathname"]);w<y.length;w++)"function"!=typeof(u=y[w])?(c=u[0],_=u[1],c!=c?O[_]=e:"string"==typeof c?~(d="@"===c?e.lastIndexOf(c):e.indexOf(c))&&("number"==typeof u[2]?(O[_]=e.slice(0,d),e=e.slice(d+u[2])):(O[_]=e.slice(d),e=e.slice(0,d))):(d=c.exec(e))&&(O[_]=d[1],e=e.slice(0,d.index)),O[_]=O[_]||a&&u[3]&&t[_]||"",u[4]&&(O[_]=O[_].toLowerCase())):e=u(e,O);n&&(O.query=n(O.query)),a&&t.slashes&&"/"!==O.pathname.charAt(0)&&(""!==O.pathname||""!==t.pathname)&&(O.pathname=function(e,t){if(""===e)return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),o=n.length,r=n[o-1],a=!1,i=0;o--;)"."===n[o]?n.splice(o,1):".."===n[o]?(n.splice(o,1),i++):i&&(0===o&&(a=!0),n.splice(o,1),i--);return a&&n.unshift(""),"."!==r&&".."!==r||n.push(""),n.join("/")}(O.pathname,t.pathname)),"/"!==O.pathname.charAt(0)&&h(O.protocol)&&(O.pathname="/"+O.pathname),o(O.port,O.protocol)||(O.host=O.hostname,O.port=""),O.username=O.password="",O.auth&&(~(d=O.auth.indexOf(":"))?(O.username=O.auth.slice(0,d),O.username=encodeURIComponent(decodeURIComponent(O.username)),O.password=O.auth.slice(d+1),O.password=encodeURIComponent(decodeURIComponent(O.password))):O.username=encodeURIComponent(decodeURIComponent(O.auth)),O.auth=O.password?O.username+":"+O.password:O.username),O.origin="file:"!==O.protocol&&h(O.protocol)&&O.host?O.protocol+"//"+O.host:"null",O.href=O.toString()}v.prototype={set:function(e,t,n){var a=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(n||r.parse)(t)),a[e]=t;break;case"port":a[e]=t,o(t,a.protocol)?t&&(a.host=a.hostname+":"+t):(a.host=a.hostname,a[e]="");break;case"hostname":a[e]=t,a.port&&(t+=":"+a.port),a.host=t;break;case"host":a[e]=t,c.test(t)?(t=t.split(":"),a.port=t.pop(),a.hostname=t.join(":")):(a.hostname=t,a.port="");break;case"protocol":a.protocol=t.toLowerCase(),a.slashes=!n;break;case"pathname":case"hash":if(t){var i="pathname"===e?"/":"#";a[e]=t.charAt(0)!==i?i+t:t}else a[e]=t;break;case"username":case"password":a[e]=encodeURIComponent(t);break;case"auth":var s=t.indexOf(":");~s?(a.username=t.slice(0,s),a.username=encodeURIComponent(decodeURIComponent(a.username)),a.password=t.slice(s+1),a.password=encodeURIComponent(decodeURIComponent(a.password))):a.username=encodeURIComponent(decodeURIComponent(t))}for(var u=0;u<f.length;u++){var l=f[u];l[4]&&(a[l[1]]=a[l[1]].toLowerCase())}return a.auth=a.password?a.username+":"+a.password:a.username,a.origin="file:"!==a.protocol&&h(a.protocol)&&a.host?a.protocol+"//"+a.host:"null",a.href=a.toString(),a},toString:function(e){e&&"function"==typeof e||(e=r.stringify);var t,n=this,o=n.host,a=n.protocol;a&&":"!==a.charAt(a.length-1)&&(a+=":");var i=a+(n.protocol&&n.slashes||h(n.protocol)?"//":"");return n.username?(i+=n.username,n.password&&(i+=":"+n.password),i+="@"):n.password?(i+=":"+n.password,i+="@"):"file:"!==n.protocol&&h(n.protocol)&&!o&&"/"!==n.pathname&&(i+="@"),(":"===o[o.length-1]||c.test(n.hostname)&&!n.port)&&(o+=":"),i+=o+n.pathname,(t="object"==typeof n.query?e(n.query):n.query)&&(i+="?"!==t.charAt(0)?"?"+t:t),n.hash&&(i+=n.hash),i}},v.extractProtocol=b,v.location=m,v.trimLeft=p,v.qs=r,e.exports=v},46:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NavigationProvider=t.useNavigation=t.useNavigate=t.useLocation=t.Link=void 0;var o=n(445);Object.defineProperty(t,"Link",{enumerable:!0,get:function(){return o.Link}});var r=n(756);Object.defineProperty(t,"useLocation",{enumerable:!0,get:function(){return r.useLocation}});var a=n(280);Object.defineProperty(t,"useNavigate",{enumerable:!0,get:function(){return a.useNavigate}});var i=n(793);Object.defineProperty(t,"useNavigation",{enumerable:!0,get:function(){return i.useNavigation}}),Object.defineProperty(t,"NavigationProvider",{enumerable:!0,get:function(){return i.NavigationProvider}})},445:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Link=void 0;const i=a(n(594)),s=n(793),c=n(423);t.Link=(0,i.forwardRef)((function(e,t){const n=(0,s.useNavigation)().Link||c.NativeLink;return e.native||e.external?i.default.createElement(c.NativeLink,Object.assign({},e,{ref:t})):i.default.createElement(n,Object.assign({},e,{ref:t}))}))},423:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t},i=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.NativeLink=void 0;const c=a(n(594)),u=s(n(685)),l=n(481),p=n(756),f={rel:"noopener",target:"_blank"};t.NativeLink=(0,c.forwardRef)((function(e,t){var{className:n,style:o,activeClassName:r,activeStyle:a,active:s,strict:d,exact:m,href:h,external:b,native:v,state:_}=e,y=i(e,["className","style","activeClassName","activeStyle","active","strict","exact","href","external","native","state"]);const g=(0,p.useLocation)(),O=!!r||!!a,w=(0,c.useMemo)((()=>!!O&&("boolean"==typeof s?s:!(!g||!h)&&(0,l.compareUrl)(g.pathname,h,{exact:m,strict:d}))),[s,h,g,O]),j=b?f:{},P=(0,c.useMemo)((()=>w&&a?Object.assign(Object.assign({},o),a):o),[w,o]);return c.default.createElement("a",Object.assign({},j,y,{ref:t,href:h,className:(0,u.default)(n,w&&r),style:P}))}))},793:function(e,t,n){"use strict";var o={id:"teambit.base-react/navigation/link@2.0.31",homepage:"https://bit.cloud/teambit/base-react/navigation/link",exported:!0},r=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.NavigationProvider=t.useNavigation=t.NavigationContext=void 0;const s=i(n(594));function c(){return(0,s.useContext)(t.NavigationContext)}function u({children:e,implementation:n}){return s.default.createElement(t.NavigationContext.Provider,{value:n},e)}t.NavigationContext=s.default.createContext({}),c.__bit_component=o,t.useNavigation=c,u.__bit_component=o,t.NavigationProvider=u},756:(e,t,n)=>{"use strict";var o={id:"teambit.base-react/navigation/link@2.0.31",homepage:"https://bit.cloud/teambit/base-react/navigation/link",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.useLocation=void 0;const r=n(793);function a(){return((0,r.useNavigation)().useLocation||i)()}function i(){if("undefined"!=typeof window)return window.location}a.__bit_component=o,t.useLocation=a,i.__bit_component=o},280:(e,t,n)=>{"use strict";var o={id:"teambit.base-react/navigation/link@2.0.31",homepage:"https://bit.cloud/teambit/base-react/navigation/link",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.useNavigate=void 0;const r=n(793);function a(){var e;const t=(0,r.useNavigation)();return(null===(e=t.useNavigate)||void 0===e?void 0:e.call(t))||i}function i(e,{replace:t}={}){if("undefined"==typeof window)throw new Error("base-react.navigation.use-location - cannot use native navigator outside of browser. Inject a custom useNavigate, or use navigation after mount");const{location:n,history:o}=window;"number"==typeof e?o.go(e):t?n.replace(e):n.assign(e)}a.__bit_component=o,t.useNavigate=a,i.__bit_component=o},22:function(e,t,n){"use strict";var o={id:"teambit.base-ui/routing/compare-url@1.0.1",homepage:"https://bit.dev/teambit/base-ui/routing/compare-url",exported:!0},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.compareUrl=void 0;const a=r(n(448));function i(e,t,{exact:n,strict:o}={}){if(e===t)return!0;o||(e=e.replace(/\/(?=[?#]|$)/,""),t=t.replace(/\/(?=[?#]|$)/,""));const r=(0,a.default)(e),i=(0,a.default)(t),l=s(r,i),p=!n||c(r,i),f=!o||u(r,i);return l&&p&&f}function s(e,t){return(!t.protocol||t.protocol===e.protocol)&&(!t.hostname||t.hostname===e.hostname)&&(!t.port||t.port===e.port)&&(!t.pathname||e.pathname.startsWith(t.pathname))&&(!t.query||l(t.query,e.query))&&(!t.hash||t.hash===e.hash)&&(!t.password||t.password===e.password)&&(!t.username||t.username===e.username)}function c(e,t){return(!t.pathname||e.pathname===t.pathname)&&(!t.query||l(e.query,t.query))}function u(e,t){return!t.pathname||e.pathname.endsWith("/")===t.pathname.endsWith("/")}function l(e,t){return Object.keys(e).every((n=>e[n]===t[n]))}i.__bit_component=o,t.compareUrl=i,s.__bit_component=o,c.__bit_component=o,u.__bit_component=o,l.__bit_component=o},481:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compareUrl=void 0;var o=n(22);Object.defineProperty(t,"compareUrl",{enumerable:!0,get:function(){return o.compareUrl}})},157:(e,t,n)=>{"use strict";var o={id:"teambit.semantics/schema@1.0.511",homepage:"https://bit.cloud/teambit/semantics/schema",exported:!0};function r(){const e=i(n(594));return r=function(){return e},e}function a(){const e=n(665);return a=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.ButtonWithIcon=t.ButtonWithCustomStyles=t.ButtonAsALink=t.BasicButton=void 0,t.Footer=c,r.__bit_component=o,a.__bit_component=o,i.__bit_component=o;const s=()=>r().default.createElement(a().Button,null,"click me");function c({children:e=r().default.createElement(s,null)}){return r().default.createElement(a().Button,null,e)}s.__bit_component=o,t.BasicButton=s,c.__bit_component=o;const u=()=>r().default.createElement(a().Button,{style:{background:"red"}},"click me");u.__bit_component=o,t.ButtonWithCustomStyles=u;const l=()=>r().default.createElement(a().Button,null,"click me");l.__bit_component=o,t.ButtonWithIcon=l;const p=()=>r().default.createElement(a().Button,{href:"https://bit.dev"},"Bit");p.__bit_component=o,t.ButtonAsALink=p},665:(e,t,n)=>{"use strict";var o={id:"teambit.semantics/schema@1.0.511",homepage:"https://bit.cloud/teambit/semantics/schema",exported:!0};function r(){const e=s(n(594));return r=function(){return e},e}function a(){const e=n(46);return a=function(){return e},e}function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}function s(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var o={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var s=r?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=e[a]}return o.default=e,n&&n.set(e,o),o}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},c.apply(null,arguments)}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return(t=f(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e){var t=d(e,"string");return"symbol"==typeof t?t:t+""}function d(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function m(e){const t=(0,r().useRef)(),n=l({},e),o=e.href?.startsWith("http:")||e.href?.startsWith("https:");return r().default.createElement(r().default.Fragment,null,e.href?r().default.createElement(a().Link,c({external:o,ref:t,className:e.className},n),e.children):r().default.createElement("button",c({className:e.className,ref:t},n),e.children))}Object.defineProperty(t,"__esModule",{value:!0}),t.Bar=void 0,t.Button=m,r.__bit_component=o,a.__bit_component=o,i.__bit_component=o,s.__bit_component=o,c.__bit_component=o,u.__bit_component=o,l.__bit_component=o,p.__bit_component=o,f.__bit_component=o,d.__bit_component=o,m.__bit_component=o,t.Bar=class{foo(){}}},638:(e,t,n)=>{"use strict";var o={id:"teambit.semantics/schema@1.0.511",homepage:"https://bit.cloud/teambit/semantics/schema",exported:!0};function r(){const e=a(n(594));return r=function(){return e},e}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,r.__bit_component=o,a.__bit_component=o;const i=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/code.svg"}));i.__bit_component=o,t.Logo=i},594:e=>{"use strict";e.exports=React}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var a=t[o]={exports:{}};return e[o].call(a.exports,a,a.exports,n),a.exports}n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{"use strict";n.r(o),n.d(o,{compositions:()=>f,compositions_metadata:()=>m,overview:()=>d});var e={};n.r(e),n.d(e,{default:()=>p});var t=n(638),r=n(157);n(594);const a=MdxJsReact,i=TeambitMdxUiMdxScopeContext;var s=["components"];function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},c.apply(null,arguments)}var u={},l="wrapper";function p(e){var t=e.components,n=function(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.includes(o))continue;n[o]=e[o]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,s);return(0,a.mdx)(l,c({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}p.isMDXComponent=!0;const f=[t,r],d=[e],m={compositions:[{displayName:"Logo",identifier:"Logo"},{displayName:"Basic button",identifier:"BasicButton"},{displayName:"Footer",identifier:"Footer"},{displayName:"Button with custom styles",identifier:"ButtonWithCustomStyles"},{displayName:"Button with icon",identifier:"ButtonWithIcon"},{displayName:"Button as a link",identifier:"ButtonAsALink"}]}})(),o})()));
|
|
@@ -229,7 +229,8 @@
|
|
|
229
229
|
"character": 3
|
|
230
230
|
},
|
|
231
231
|
"raw": "/**\n * children of the Button.\n */",
|
|
232
|
-
"comment": "children of the Button."
|
|
232
|
+
"comment": "children of the Button.",
|
|
233
|
+
"tags": []
|
|
233
234
|
},
|
|
234
235
|
"signature": "(property) children: ReactNode",
|
|
235
236
|
"name": "children",
|
|
@@ -260,7 +261,8 @@
|
|
|
260
261
|
"character": 3
|
|
261
262
|
},
|
|
262
263
|
"raw": "/**\n * link to target page. once href is used, Button is considered an A tag.\n */",
|
|
263
|
-
"comment": "link to target page. once href is used, Button is considered an A tag."
|
|
264
|
+
"comment": "link to target page. once href is used, Button is considered an A tag.",
|
|
265
|
+
"tags": []
|
|
264
266
|
},
|
|
265
267
|
"signature": "(property) href?: string | undefined",
|
|
266
268
|
"name": "href",
|
|
@@ -290,7 +292,8 @@
|
|
|
290
292
|
"character": 3
|
|
291
293
|
},
|
|
292
294
|
"raw": "/**\n * class names to inject.\n */",
|
|
293
|
-
"comment": "class names to inject."
|
|
295
|
+
"comment": "class names to inject.",
|
|
296
|
+
"tags": []
|
|
294
297
|
},
|
|
295
298
|
"signature": "(property) className?: string | undefined",
|
|
296
299
|
"name": "className",
|
|
@@ -337,7 +340,7 @@
|
|
|
337
340
|
"line": 25,
|
|
338
341
|
"character": 1
|
|
339
342
|
},
|
|
340
|
-
"signature": "function Button(props:
|
|
343
|
+
"signature": "function Button(props: any): any",
|
|
341
344
|
"name": "Button",
|
|
342
345
|
"params": [
|
|
343
346
|
{
|
|
@@ -519,7 +522,8 @@
|
|
|
519
522
|
"character": 1
|
|
520
523
|
},
|
|
521
524
|
"raw": "/**\n * example of passing a JSX Element as a parameter\n */",
|
|
522
|
-
"comment": "example of passing a JSX Element as a parameter"
|
|
525
|
+
"comment": "example of passing a JSX Element as a parameter",
|
|
526
|
+
"tags": []
|
|
523
527
|
},
|
|
524
528
|
"signature": "function Footer({ children }: {\n children?: any;\n}): any",
|
|
525
529
|
"name": "Footer",
|
|
@@ -720,6 +724,7 @@
|
|
|
720
724
|
"line": 50,
|
|
721
725
|
"character": 10
|
|
722
726
|
},
|
|
727
|
+
"signature": "class ClassSomething",
|
|
723
728
|
"name": "ClassSomething",
|
|
724
729
|
"exportNode": {
|
|
725
730
|
"__schema": "ClassSchema",
|
|
@@ -759,7 +764,7 @@
|
|
|
759
764
|
"line": 38,
|
|
760
765
|
"character": 3
|
|
761
766
|
},
|
|
762
|
-
"signature": "constructor ClassSomething(da:
|
|
767
|
+
"signature": "constructor ClassSomething(da: \"dsa\"): ClassSomething",
|
|
763
768
|
"name": "constructor",
|
|
764
769
|
"params": [
|
|
765
770
|
{
|
|
@@ -1850,7 +1855,8 @@
|
|
|
1850
1855
|
"character": 1
|
|
1851
1856
|
},
|
|
1852
1857
|
"raw": "/**\n * Conditional Generic Type\n */",
|
|
1853
|
-
"comment": "Conditional Generic Type"
|
|
1858
|
+
"comment": "Conditional Generic Type",
|
|
1859
|
+
"tags": []
|
|
1854
1860
|
},
|
|
1855
1861
|
"signature": "type If<T, U, Y, N> = T extends U ? Y : N",
|
|
1856
1862
|
"name": "If",
|
|
@@ -2018,7 +2024,7 @@
|
|
|
2018
2024
|
"line": 145,
|
|
2019
2025
|
"character": 1
|
|
2020
2026
|
},
|
|
2021
|
-
"signature": "function CustomClassDecorator(config: {\n name: string;\n description: string;\n fn?: (
|
|
2027
|
+
"signature": "function CustomClassDecorator(config: {\n name: string;\n description: string;\n fn?: () => string;\n class?: ClassSomething;\n arr?: [string, number, boolean, boolean, number | undefined, (a: string) => void, {\n a: string;\n b: number;\n }, ClassSomething];\n}): (target: any) => void",
|
|
2022
2028
|
"name": "CustomClassDecorator",
|
|
2023
2029
|
"params": [
|
|
2024
2030
|
{
|
|
@@ -2950,7 +2956,7 @@
|
|
|
2950
2956
|
"line": 38,
|
|
2951
2957
|
"character": 3
|
|
2952
2958
|
},
|
|
2953
|
-
"signature": "constructor ClassSomething(da:
|
|
2959
|
+
"signature": "constructor ClassSomething(da: \"dsa\"): ClassSomething",
|
|
2954
2960
|
"name": "constructor",
|
|
2955
2961
|
"params": [
|
|
2956
2962
|
{
|
|
@@ -3422,7 +3428,8 @@
|
|
|
3422
3428
|
"character": 3
|
|
3423
3429
|
},
|
|
3424
3430
|
"raw": "/**\n * children of the Button.\n */",
|
|
3425
|
-
"comment": "children of the Button."
|
|
3431
|
+
"comment": "children of the Button.",
|
|
3432
|
+
"tags": []
|
|
3426
3433
|
},
|
|
3427
3434
|
"signature": "(property) children: ReactNode",
|
|
3428
3435
|
"name": "children",
|
|
@@ -3453,7 +3460,8 @@
|
|
|
3453
3460
|
"character": 3
|
|
3454
3461
|
},
|
|
3455
3462
|
"raw": "/**\n * link to target page. once href is used, Button is considered an A tag.\n */",
|
|
3456
|
-
"comment": "link to target page. once href is used, Button is considered an A tag."
|
|
3463
|
+
"comment": "link to target page. once href is used, Button is considered an A tag.",
|
|
3464
|
+
"tags": []
|
|
3457
3465
|
},
|
|
3458
3466
|
"signature": "(property) href?: string | undefined",
|
|
3459
3467
|
"name": "href",
|
|
@@ -3483,7 +3491,8 @@
|
|
|
3483
3491
|
"character": 3
|
|
3484
3492
|
},
|
|
3485
3493
|
"raw": "/**\n * class names to inject.\n */",
|
|
3486
|
-
"comment": "class names to inject."
|
|
3494
|
+
"comment": "class names to inject.",
|
|
3495
|
+
"tags": []
|
|
3487
3496
|
},
|
|
3488
3497
|
"signature": "(property) className?: string | undefined",
|
|
3489
3498
|
"name": "className",
|
|
@@ -3530,7 +3539,7 @@
|
|
|
3530
3539
|
"line": 25,
|
|
3531
3540
|
"character": 1
|
|
3532
3541
|
},
|
|
3533
|
-
"signature": "function Button(props:
|
|
3542
|
+
"signature": "function Button(props: any): any",
|
|
3534
3543
|
"name": "Button",
|
|
3535
3544
|
"params": [
|
|
3536
3545
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.semantics_schema@1.0.
|
|
2
|
-
import * as compositions_1 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.semantics_schema@1.0.
|
|
3
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.semantics_schema@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.semantics_schema@1.0.511/dist/schema.composition.js';
|
|
2
|
+
import * as compositions_1 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.semantics_schema@1.0.511/dist/mock/button/button.composition.js';
|
|
3
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.semantics_schema@1.0.511/dist/schema.docs.mdx';
|
|
4
4
|
|
|
5
5
|
export const compositions = [compositions_0, compositions_1];
|
|
6
6
|
export const overview = [overview_0];
|
package/mock/button-schemas.json
CHANGED
|
@@ -229,7 +229,8 @@
|
|
|
229
229
|
"character": 3
|
|
230
230
|
},
|
|
231
231
|
"raw": "/**\n * children of the Button.\n */",
|
|
232
|
-
"comment": "children of the Button."
|
|
232
|
+
"comment": "children of the Button.",
|
|
233
|
+
"tags": []
|
|
233
234
|
},
|
|
234
235
|
"signature": "(property) children: ReactNode",
|
|
235
236
|
"name": "children",
|
|
@@ -260,7 +261,8 @@
|
|
|
260
261
|
"character": 3
|
|
261
262
|
},
|
|
262
263
|
"raw": "/**\n * link to target page. once href is used, Button is considered an A tag.\n */",
|
|
263
|
-
"comment": "link to target page. once href is used, Button is considered an A tag."
|
|
264
|
+
"comment": "link to target page. once href is used, Button is considered an A tag.",
|
|
265
|
+
"tags": []
|
|
264
266
|
},
|
|
265
267
|
"signature": "(property) href?: string | undefined",
|
|
266
268
|
"name": "href",
|
|
@@ -290,7 +292,8 @@
|
|
|
290
292
|
"character": 3
|
|
291
293
|
},
|
|
292
294
|
"raw": "/**\n * class names to inject.\n */",
|
|
293
|
-
"comment": "class names to inject."
|
|
295
|
+
"comment": "class names to inject.",
|
|
296
|
+
"tags": []
|
|
294
297
|
},
|
|
295
298
|
"signature": "(property) className?: string | undefined",
|
|
296
299
|
"name": "className",
|
|
@@ -337,7 +340,7 @@
|
|
|
337
340
|
"line": 25,
|
|
338
341
|
"character": 1
|
|
339
342
|
},
|
|
340
|
-
"signature": "function Button(props:
|
|
343
|
+
"signature": "function Button(props: any): any",
|
|
341
344
|
"name": "Button",
|
|
342
345
|
"params": [
|
|
343
346
|
{
|
|
@@ -519,7 +522,8 @@
|
|
|
519
522
|
"character": 1
|
|
520
523
|
},
|
|
521
524
|
"raw": "/**\n * example of passing a JSX Element as a parameter\n */",
|
|
522
|
-
"comment": "example of passing a JSX Element as a parameter"
|
|
525
|
+
"comment": "example of passing a JSX Element as a parameter",
|
|
526
|
+
"tags": []
|
|
523
527
|
},
|
|
524
528
|
"signature": "function Footer({ children }: {\n children?: any;\n}): any",
|
|
525
529
|
"name": "Footer",
|
|
@@ -720,6 +724,7 @@
|
|
|
720
724
|
"line": 50,
|
|
721
725
|
"character": 10
|
|
722
726
|
},
|
|
727
|
+
"signature": "class ClassSomething",
|
|
723
728
|
"name": "ClassSomething",
|
|
724
729
|
"exportNode": {
|
|
725
730
|
"__schema": "ClassSchema",
|
|
@@ -759,7 +764,7 @@
|
|
|
759
764
|
"line": 38,
|
|
760
765
|
"character": 3
|
|
761
766
|
},
|
|
762
|
-
"signature": "constructor ClassSomething(da:
|
|
767
|
+
"signature": "constructor ClassSomething(da: \"dsa\"): ClassSomething",
|
|
763
768
|
"name": "constructor",
|
|
764
769
|
"params": [
|
|
765
770
|
{
|
|
@@ -1850,7 +1855,8 @@
|
|
|
1850
1855
|
"character": 1
|
|
1851
1856
|
},
|
|
1852
1857
|
"raw": "/**\n * Conditional Generic Type\n */",
|
|
1853
|
-
"comment": "Conditional Generic Type"
|
|
1858
|
+
"comment": "Conditional Generic Type",
|
|
1859
|
+
"tags": []
|
|
1854
1860
|
},
|
|
1855
1861
|
"signature": "type If<T, U, Y, N> = T extends U ? Y : N",
|
|
1856
1862
|
"name": "If",
|
|
@@ -2018,7 +2024,7 @@
|
|
|
2018
2024
|
"line": 145,
|
|
2019
2025
|
"character": 1
|
|
2020
2026
|
},
|
|
2021
|
-
"signature": "function CustomClassDecorator(config: {\n name: string;\n description: string;\n fn?: (
|
|
2027
|
+
"signature": "function CustomClassDecorator(config: {\n name: string;\n description: string;\n fn?: () => string;\n class?: ClassSomething;\n arr?: [string, number, boolean, boolean, number | undefined, (a: string) => void, {\n a: string;\n b: number;\n }, ClassSomething];\n}): (target: any) => void",
|
|
2022
2028
|
"name": "CustomClassDecorator",
|
|
2023
2029
|
"params": [
|
|
2024
2030
|
{
|
|
@@ -2950,7 +2956,7 @@
|
|
|
2950
2956
|
"line": 38,
|
|
2951
2957
|
"character": 3
|
|
2952
2958
|
},
|
|
2953
|
-
"signature": "constructor ClassSomething(da:
|
|
2959
|
+
"signature": "constructor ClassSomething(da: \"dsa\"): ClassSomething",
|
|
2954
2960
|
"name": "constructor",
|
|
2955
2961
|
"params": [
|
|
2956
2962
|
{
|
|
@@ -3422,7 +3428,8 @@
|
|
|
3422
3428
|
"character": 3
|
|
3423
3429
|
},
|
|
3424
3430
|
"raw": "/**\n * children of the Button.\n */",
|
|
3425
|
-
"comment": "children of the Button."
|
|
3431
|
+
"comment": "children of the Button.",
|
|
3432
|
+
"tags": []
|
|
3426
3433
|
},
|
|
3427
3434
|
"signature": "(property) children: ReactNode",
|
|
3428
3435
|
"name": "children",
|
|
@@ -3453,7 +3460,8 @@
|
|
|
3453
3460
|
"character": 3
|
|
3454
3461
|
},
|
|
3455
3462
|
"raw": "/**\n * link to target page. once href is used, Button is considered an A tag.\n */",
|
|
3456
|
-
"comment": "link to target page. once href is used, Button is considered an A tag."
|
|
3463
|
+
"comment": "link to target page. once href is used, Button is considered an A tag.",
|
|
3464
|
+
"tags": []
|
|
3457
3465
|
},
|
|
3458
3466
|
"signature": "(property) href?: string | undefined",
|
|
3459
3467
|
"name": "href",
|
|
@@ -3483,7 +3491,8 @@
|
|
|
3483
3491
|
"character": 3
|
|
3484
3492
|
},
|
|
3485
3493
|
"raw": "/**\n * class names to inject.\n */",
|
|
3486
|
-
"comment": "class names to inject."
|
|
3494
|
+
"comment": "class names to inject.",
|
|
3495
|
+
"tags": []
|
|
3487
3496
|
},
|
|
3488
3497
|
"signature": "(property) className?: string | undefined",
|
|
3489
3498
|
"name": "className",
|
|
@@ -3530,7 +3539,7 @@
|
|
|
3530
3539
|
"line": 25,
|
|
3531
3540
|
"character": 1
|
|
3532
3541
|
},
|
|
3533
|
-
"signature": "function Button(props:
|
|
3542
|
+
"signature": "function Button(props: any): any",
|
|
3534
3543
|
"name": "Button",
|
|
3535
3544
|
"params": [
|
|
3536
3545
|
{
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/schema",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.511",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/semantics/schema",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.semantics",
|
|
8
8
|
"name": "schema",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.511"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"p-map-series": "2.1.0",
|
|
@@ -14,19 +14,19 @@
|
|
|
14
14
|
"graphql-type-json": "0.3.2",
|
|
15
15
|
"fs-extra": "10.0.0",
|
|
16
16
|
"@teambit/harmony": "0.4.6",
|
|
17
|
-
"@teambit/semantics.entities.semantic-schema": "0.0.
|
|
18
|
-
"@teambit/envs": "1.0.
|
|
19
|
-
"@teambit/component": "1.0.
|
|
20
|
-
"@teambit/formatter": "1.0.
|
|
21
|
-
"@teambit/cli": "0.0.
|
|
22
|
-
"@teambit/legacy.constants": "0.0.
|
|
23
|
-
"@teambit/logger": "0.0.
|
|
24
|
-
"@teambit/graphql": "1.0.
|
|
25
|
-
"@teambit/builder": "1.0.
|
|
26
|
-
"@teambit/defender.prettier.config-mutator": "0.0.
|
|
27
|
-
"@teambit/scope": "1.0.
|
|
28
|
-
"@teambit/typescript": "1.0.
|
|
29
|
-
"@teambit/workspace": "1.0.
|
|
17
|
+
"@teambit/semantics.entities.semantic-schema": "0.0.77",
|
|
18
|
+
"@teambit/envs": "1.0.511",
|
|
19
|
+
"@teambit/component": "1.0.511",
|
|
20
|
+
"@teambit/formatter": "1.0.511",
|
|
21
|
+
"@teambit/cli": "0.0.1088",
|
|
22
|
+
"@teambit/legacy.constants": "0.0.5",
|
|
23
|
+
"@teambit/logger": "0.0.1181",
|
|
24
|
+
"@teambit/graphql": "1.0.511",
|
|
25
|
+
"@teambit/builder": "1.0.511",
|
|
26
|
+
"@teambit/defender.prettier.config-mutator": "0.0.103",
|
|
27
|
+
"@teambit/scope": "1.0.511",
|
|
28
|
+
"@teambit/typescript": "1.0.511",
|
|
29
|
+
"@teambit/workspace": "1.0.511"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/fs-extra": "9.0.7",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"@types/mocha": "9.1.0",
|
|
36
36
|
"@teambit/component-id": "1.2.2",
|
|
37
37
|
"@teambit/harmony.envs.core-aspect-env": "0.0.65",
|
|
38
|
-
"@teambit/harmony.testing.load-aspect": "0.0.
|
|
39
|
-
"@teambit/tracker": "1.0.
|
|
40
|
-
"@teambit/workspace.testing.mock-workspace": "0.0.
|
|
38
|
+
"@teambit/harmony.testing.load-aspect": "0.0.273",
|
|
39
|
+
"@teambit/tracker": "1.0.511",
|
|
40
|
+
"@teambit/workspace.testing.mock-workspace": "0.0.45"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"react": "^17.0.0 || ^18.0.0",
|