UNPKG

repoweaver

Version:

A GitHub App that skillfully weaves multiple templates together to create and update repositories with intelligent merge strategies

1 lines 3.93 kB
{"ast":null,"code":"import invariant from 'fbjs/lib/invariant';\nclass Share {\n static share(content, options) {\n if (options === void 0) {\n options = {};\n }\n invariant(typeof content === 'object' && content !== null, 'Content to share must be a valid object');\n invariant(typeof content.url === 'string' || typeof content.message === 'string', 'At least one of URL and message is required');\n invariant(typeof options === 'object' && options !== null, 'Options must be a valid object');\n invariant(!content.title || typeof content.title === 'string', 'Invalid title: title should be a string.');\n if (window.navigator.share !== undefined) {\n return window.navigator.share({\n title: content.title,\n text: content.message,\n url: content.url\n });\n } else {\n return Promise.reject(new Error('Share is not supported in this browser'));\n }\n }\n static get sharedAction() {\n return 'sharedAction';\n }\n static get dismissedAction() {\n return 'dismissedAction';\n }\n}\nexport default Share;","map":{"version":3,"names":["invariant","Share","share","content","options","url","message","title","window","navigator","undefined","text","Promise","reject","Error","sharedAction","dismissedAction"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/react-native-web/dist/exports/Share/index.js"],"sourcesContent":["/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nimport invariant from 'fbjs/lib/invariant';\nclass Share {\n static share(content, options) {\n if (options === void 0) {\n options = {};\n }\n invariant(typeof content === 'object' && content !== null, 'Content to share must be a valid object');\n invariant(typeof content.url === 'string' || typeof content.message === 'string', 'At least one of URL and message is required');\n invariant(typeof options === 'object' && options !== null, 'Options must be a valid object');\n invariant(!content.title || typeof content.title === 'string', 'Invalid title: title should be a string.');\n if (window.navigator.share !== undefined) {\n return window.navigator.share({\n title: content.title,\n text: content.message,\n url: content.url\n });\n } else {\n return Promise.reject(new Error('Share is not supported in this browser'));\n }\n }\n\n /**\n * The content was successfully shared.\n */\n static get sharedAction() {\n return 'sharedAction';\n }\n\n /**\n * The dialog has been dismissed.\n * @platform ios\n */\n static get dismissedAction() {\n return 'dismissedAction';\n }\n}\nexport default Share;"],"mappings":"AAUA,OAAOA,SAAS,MAAM,oBAAoB;AAC1C,MAAMC,KAAK,CAAC;EACV,OAAOC,KAAKA,CAACC,OAAO,EAAEC,OAAO,EAAE;IAC7B,IAAIA,OAAO,KAAK,KAAK,CAAC,EAAE;MACtBA,OAAO,GAAG,CAAC,CAAC;IACd;IACAJ,SAAS,CAAC,OAAOG,OAAO,KAAK,QAAQ,IAAIA,OAAO,KAAK,IAAI,EAAE,yCAAyC,CAAC;IACrGH,SAAS,CAAC,OAAOG,OAAO,CAACE,GAAG,KAAK,QAAQ,IAAI,OAAOF,OAAO,CAACG,OAAO,KAAK,QAAQ,EAAE,6CAA6C,CAAC;IAChIN,SAAS,CAAC,OAAOI,OAAO,KAAK,QAAQ,IAAIA,OAAO,KAAK,IAAI,EAAE,gCAAgC,CAAC;IAC5FJ,SAAS,CAAC,CAACG,OAAO,CAACI,KAAK,IAAI,OAAOJ,OAAO,CAACI,KAAK,KAAK,QAAQ,EAAE,0CAA0C,CAAC;IAC1G,IAAIC,MAAM,CAACC,SAAS,CAACP,KAAK,KAAKQ,SAAS,EAAE;MACxC,OAAOF,MAAM,CAACC,SAAS,CAACP,KAAK,CAAC;QAC5BK,KAAK,EAAEJ,OAAO,CAACI,KAAK;QACpBI,IAAI,EAAER,OAAO,CAACG,OAAO;QACrBD,GAAG,EAAEF,OAAO,CAACE;MACf,CAAC,CAAC;IACJ,CAAC,MAAM;MACL,OAAOO,OAAO,CAACC,MAAM,CAAC,IAAIC,KAAK,CAAC,wCAAwC,CAAC,CAAC;IAC5E;EACF;EAKA,WAAWC,YAAYA,CAAA,EAAG;IACxB,OAAO,cAAc;EACvB;EAMA,WAAWC,eAAeA,CAAA,EAAG;IAC3B,OAAO,iBAAiB;EAC1B;AACF;AACA,eAAef,KAAK","ignoreList":[]},"metadata":{"hasCjsExports":false},"sourceType":"module","externalDependencies":[]}