new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"1":"F A B","2":"J D E CC"},B:{"1":"C K L G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"1":"0 1 2 3 4 5 6 7 8 9 g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","2":"DC tB","260":"I v J D E F A B C K L G M N O w EC FC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC"},E:{"1":"I v J D E F A IC JC KC LC 0B","2":"HC zB","513":"B C K L G qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 B C G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e RC SC qB AC TC rB","2":"F PC QC"},G:{"1":"E zB UC BC VC WC XC YC ZC aC bC cC","513":"dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B"},H:{"2":"oC"},I:{"1":"tB I f rC sC BC tC uC","132":"pC qC"},J:{"1":"D A"},K:{"1":"B C h qB AC rB","2":"A"},L:{"1":"H"},M:{"1":"H"},N:{"1":"A B"},O:{"1":"vC"},P:{"1":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"1":"1B"},R:{"1":"9C"},S:{"1":"AD BD"}},B:1,C:"Video element"};
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"skipWhile.js","sourceRoot":"","sources":["../../../../src/internal/operators/skipWhile.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAiDhE,MAAM,UAAU,SAAS,CAAI,SAA+C;IAC1E,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,MAAM,GAAG,KAAK,CAAC;QACnB,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAK,IAAK,OAAA,CAAC,MAAM,IAAI,CAAC,MAAM,GAAG,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAA3E,CAA2E,CAAC,CAC7H,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
||||
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = require("./is-implemented")() ? globalThis : require("./implementation");
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,28 @@
|
||||
// Inspired by Underscore's groupBy:
|
||||
// http://documentcloud.github.com/underscore/#groupBy
|
||||
|
||||
"use strict";
|
||||
|
||||
var callable = require("../../object/valid-callable")
|
||||
, value = require("../../object/valid-value")
|
||||
, forEach = Array.prototype.forEach
|
||||
, apply = Function.prototype.apply;
|
||||
|
||||
module.exports = function (cb /*, thisArg*/) {
|
||||
var result;
|
||||
|
||||
value(this);
|
||||
callable(cb);
|
||||
|
||||
result = Object.create(null);
|
||||
forEach.call(
|
||||
this,
|
||||
function (item) {
|
||||
var key = apply.call(cb, this, arguments);
|
||||
if (!result[key]) result[key] = [];
|
||||
result[key].push(item);
|
||||
},
|
||||
arguments[1]
|
||||
);
|
||||
return result;
|
||||
};
|
||||
@@ -0,0 +1,439 @@
|
||||
|
||||
# Toastify
|
||||
|
||||

|
||||
|
||||
[](https://www.npmjs.com/package/toastify-js)
|
||||

|
||||
|
||||
Toastify is a lightweight, vanilla JS toast notification library.
|
||||
|
||||
## Demo
|
||||
|
||||
[Click here](https://apvarun.github.io/toastify-js/)
|
||||
|
||||
## Features
|
||||
|
||||
* Multiple stacked notifications
|
||||
* Customizable
|
||||
* No blocking of execution thread
|
||||
|
||||
### Customization options
|
||||
|
||||
* Notification Text
|
||||
* Duration
|
||||
* Toast background color
|
||||
* Close icon display
|
||||
* Display position
|
||||
* Offset position
|
||||
|
||||
## Installation
|
||||
|
||||
#### Toastify now supports installation via NPM
|
||||
|
||||
* Run the below command to add toastify-js to your exisitng or new project.
|
||||
|
||||
```
|
||||
npm install --save toastify-js
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```
|
||||
yarn add toastify-js -S
|
||||
```
|
||||
|
||||
* Import toastify-js into your module to start using it.
|
||||
|
||||
```
|
||||
import Toastify from 'toastify-js'
|
||||
```
|
||||
|
||||
You can use the default CSS from Toastify as below and later override it or choose to write your own CSS.
|
||||
|
||||
```
|
||||
import "toastify-js/src/toastify.css"
|
||||
```
|
||||
|
||||
#### Adding ToastifyJs to HTML page using the traditional method
|
||||
|
||||
To start using **Toastify**, add the following CSS on to your page.
|
||||
|
||||
```html
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css">
|
||||
```
|
||||
|
||||
And the script at the bottom of the page
|
||||
|
||||
```html
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/toastify-js"></script>
|
||||
```
|
||||
|
||||
> Files are delivered via the CDN service provided by [jsdeliver](https://www.jsdelivr.com/)
|
||||
|
||||
## Documentation
|
||||
|
||||
```javascript
|
||||
Toastify({
|
||||
text: "This is a toast",
|
||||
duration: 3000,
|
||||
destination: "https://github.com/apvarun/toastify-js",
|
||||
newWindow: true,
|
||||
close: true,
|
||||
gravity: "top", // `top` or `bottom`
|
||||
position: "left", // `left`, `center` or `right`
|
||||
stopOnFocus: true, // Prevents dismissing of toast on hover
|
||||
style: {
|
||||
background: "linear-gradient(to right, #00b09b, #96c93d)",
|
||||
},
|
||||
onClick: function(){} // Callback after click
|
||||
}).showToast();
|
||||
```
|
||||
|
||||
> Toast messages will be centered on devices with screen width less than 360px.
|
||||
|
||||
* See the [changelog](https://github.com/apvarun/toastify-js/blob/master/CHANGELOG.md)
|
||||
|
||||
### Add own custom classes
|
||||
|
||||
If you want to use custom classes on the toast for customizing (like info or warning for example), you can do that as follows:
|
||||
|
||||
```javascript
|
||||
Toastify({
|
||||
text: "This is a toast",
|
||||
className: "info",
|
||||
style: {
|
||||
background: "linear-gradient(to right, #00b09b, #96c93d)",
|
||||
}
|
||||
}).showToast();
|
||||
```
|
||||
|
||||
Multiple classes also can be assigned as a string, with spaces between class names.
|
||||
|
||||
### Add some offset
|
||||
|
||||
If you want to add offset to the toast, you can do that as follows:
|
||||
|
||||
```javascript
|
||||
Toastify({
|
||||
text: "This is a toast with offset",
|
||||
offset: {
|
||||
x: 50, // horizontal axis - can be a number or a string indicating unity. eg: '2em'
|
||||
y: 10 // vertical axis - can be a number or a string indicating unity. eg: '2em'
|
||||
},
|
||||
}).showToast();
|
||||
```
|
||||
|
||||
Toast will be pushed 50px from right in x axis and 10px from top in y axis.
|
||||
|
||||
**Note:**
|
||||
|
||||
If `position` is equals to `left`, it will be pushed from left.
|
||||
If `gravity` is equals to `bottom`, it will be pushed from bottom.
|
||||
|
||||
## API
|
||||
|
||||
| Option Key | type | Usage | Defaults |
|
||||
|-----------------|----------------------|----------------------------------------------------------------------------|-------------|
|
||||
| text | string | Message to be displayed in the toast | "Hi there!" |
|
||||
| node | ELEMENT_NODE | Provide a node to be mounted inside the toast. `node` takes higher precedence over `text` | |
|
||||
| duration | number | Duration for which the toast should be displayed.<br>-1 for permanent toast | 3000 |
|
||||
| selector | string \| ELEMENT_NODE | ShadowRoot | CSS Selector or Element Node on which the toast should be added | body |
|
||||
| destination | URL string | URL to which the browser should be navigated on click of the toast | |
|
||||
| newWindow | boolean | Decides whether the `destination` should be opened in a new window or not | false |
|
||||
| close | boolean | To show the close icon or not | false |
|
||||
| gravity | "top" or "bottom" | To show the toast from top or bottom | "top" |
|
||||
| position | "left" or "right" | To show the toast on left or right | "right" |
|
||||
| backgroundColor | CSS background value | To be deprecated, use `style.background` option instead. Sets the background color of the toast | |
|
||||
| avatar | URL string | Image/icon to be shown before text | |
|
||||
| className | string | Ability to provide custom class name for further customization | |
|
||||
| stopOnFocus | boolean | To stop timer when hovered over the toast (Only if duration is set) | true |
|
||||
| callback | Function | Invoked when the toast is dismissed | |
|
||||
| onClick | Function | Invoked when the toast is clicked | |
|
||||
| offset | Object | Ability to add some offset to axis | |
|
||||
| escapeMarkup | boolean | Toggle the default behavior of escaping HTML markup | true |
|
||||
| style | object | Use the HTML DOM Style properties to add any style directly to toast | |
|
||||
| ariaLive | string | Announce the toast to screen readers, see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions for options | "polite" |
|
||||
| oldestFirst | boolean | Set the order in which toasts are stacked in page | true |
|
||||
|
||||
> Deprecated properties: `backgroundColor` - use `style.background` option instead
|
||||
|
||||
## Browsers support
|
||||
|
||||
| ![][ie]<br />IE / Edge | ![][firefox]<br />Firefox | ![][chrome]<br />Chrome | ![][safari]<br />Safari | ![][opera]<br />Opera |
|
||||
| ---------------------- | ------------------------- | ----------------------- | ----------------------- | --------------------- |
|
||||
| IE10, IE11, Edge | last 10 versions | last 10 versions | last 10 versions | last 10 versions |
|
||||
|
||||
## Contributors
|
||||
|
||||
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/AStoker">
|
||||
<img
|
||||
alt="AStoker"
|
||||
src="https://avatars.githubusercontent.com/u/2907279?v=4"
|
||||
width="117"
|
||||
/>
|
||||
<br />
|
||||
AStoker
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/caiomoura1994">
|
||||
<img
|
||||
alt="caiomoura1994"
|
||||
src="https://avatars.githubusercontent.com/u/9389139?v=4"
|
||||
width="117"
|
||||
/>
|
||||
<br />
|
||||
caiomoura1994
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/rndevfx">
|
||||
<img
|
||||
alt="rndevfx"
|
||||
src="https://avatars.githubusercontent.com/u/5052076?v=4"
|
||||
width="117"
|
||||
/>
|
||||
<br />
|
||||
rndevfx
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/1ess">
|
||||
<img
|
||||
alt="1ess"
|
||||
src="https://avatars.githubusercontent.com/u/36092926?v=4"
|
||||
width="117"
|
||||
/>
|
||||
<br />
|
||||
1ess
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/d4rn0k">
|
||||
<img
|
||||
alt="d4rn0k"
|
||||
src="https://avatars.githubusercontent.com/u/2183269?v=4"
|
||||
width="117"
|
||||
/>
|
||||
<br />
|
||||
d4rn0k
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/danielkaiser80">
|
||||
<img
|
||||
alt="danielkaiser80"
|
||||
src="https://avatars.githubusercontent.com/u/33827555?v=4"
|
||||
width="117"
|
||||
/>
|
||||
<br />
|
||||
danielkaiser80
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/skjnldsv">
|
||||
<img
|
||||
alt="skjnldsv"
|
||||
src="https://avatars.githubusercontent.com/u/14975046?v=4"
|
||||
width="117"
|
||||
/>
|
||||
<br />
|
||||
skjnldsv
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/chasedeanda">
|
||||
<img
|
||||
alt="chasedeanda"
|
||||
src="https://avatars.githubusercontent.com/u/8203134?v=4"
|
||||
width="117"
|
||||
/>
|
||||
<br />
|
||||
chasedeanda
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/chrisgraham">
|
||||
<img
|
||||
alt="chrisgraham"
|
||||
src="https://avatars.githubusercontent.com/u/195389?v=4"
|
||||
width="117"
|
||||
/>
|
||||
<br />
|
||||
chrisgraham
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/Wachiwi">
|
||||
<img
|
||||
alt="Wachiwi"
|
||||
src="https://avatars.githubusercontent.com/u/4199845?v=4"
|
||||
width="117"
|
||||
/>
|
||||
<br />
|
||||
Wachiwi
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/FeixuRuins">
|
||||
<img
|
||||
alt="FeixuRuins"
|
||||
src="https://avatars.githubusercontent.com/u/66232834?v=4"
|
||||
width="117"
|
||||
/>
|
||||
<br />
|
||||
FeixuRuins
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/gavinhungry">
|
||||
<img
|
||||
alt="gavinhungry"
|
||||
src="https://avatars.githubusercontent.com/u/744538?v=4"
|
||||
width="117"
|
||||
/>
|
||||
<br />
|
||||
gavinhungry
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/haydster7">
|
||||
<img
|
||||
alt="haydster7"
|
||||
src="https://avatars.githubusercontent.com/u/4540595?v=4"
|
||||
width="117"
|
||||
/>
|
||||
<br />
|
||||
haydster7
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/joaquinwojcik">
|
||||
<img
|
||||
alt="joaquinwojcik"
|
||||
src="https://avatars.githubusercontent.com/u/3205737?v=4"
|
||||
width="117"
|
||||
/>
|
||||
<br />
|
||||
joaquinwojcik
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/juliushaertl">
|
||||
<img
|
||||
alt="juliushaertl"
|
||||
src="https://avatars.githubusercontent.com/u/3404133?v=4"
|
||||
width="117"
|
||||
/>
|
||||
<br />
|
||||
juliushaertl
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/mort3za">
|
||||
<img
|
||||
alt="mort3za"
|
||||
src="https://avatars.githubusercontent.com/u/510242?v=4"
|
||||
width="117"
|
||||
/>
|
||||
<br />
|
||||
mort3za
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/Sandip124">
|
||||
<img
|
||||
alt="Sandip124"
|
||||
src="https://avatars.githubusercontent.com/u/37034590?v=4"
|
||||
width="117"
|
||||
/>
|
||||
<br />
|
||||
Sandip124
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/Tadaz">
|
||||
<img
|
||||
alt="Tadaz"
|
||||
src="https://avatars.githubusercontent.com/u/10881931?v=4"
|
||||
width="117"
|
||||
/>
|
||||
<br />
|
||||
Tadaz
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/t12ung">
|
||||
<img
|
||||
alt="t12ung"
|
||||
src="https://avatars.githubusercontent.com/u/9781423?v=4"
|
||||
width="117"
|
||||
/>
|
||||
<br />
|
||||
t12ung
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/victorfeijo">
|
||||
<img
|
||||
alt="victorfeijo"
|
||||
src="https://avatars.githubusercontent.com/u/8865899?v=4"
|
||||
width="117"
|
||||
/>
|
||||
<br />
|
||||
victorfeijo
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/fiatjaf">
|
||||
<img
|
||||
alt="fiatjaf"
|
||||
src="https://avatars.githubusercontent.com/u/1653275?v=4"
|
||||
width="117"
|
||||
/>
|
||||
<br />
|
||||
fiatjaf
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/prousseau-korem">
|
||||
<img
|
||||
alt="prousseau-korem"
|
||||
src="https://avatars.githubusercontent.com/u/59747802?v=4"
|
||||
width="117"
|
||||
/>
|
||||
<br />
|
||||
prousseau-korem
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Varun A P](https://github.com/apvarun)
|
||||
|
||||
<a href="https://www.buymeacoffee.com/apvarun" target="_blank" rel="noopener"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" height="40" width="145" alt="Buy Me A Coffee"></a>
|
||||
|
||||
[ie]: https://raw.githubusercontent.com/godban/browsers-support-badges/master/src/images/edge.png
|
||||
[firefox]: https://raw.githubusercontent.com/godban/browsers-support-badges/master/src/images/firefox.png
|
||||
[chrome]: https://raw.githubusercontent.com/godban/browsers-support-badges/master/src/images/chrome.png
|
||||
[safari]: https://raw.githubusercontent.com/godban/browsers-support-badges/master/src/images/safari.png
|
||||
[opera]: https://raw.githubusercontent.com/godban/browsers-support-badges/master/src/images/opera.png
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('reduceRight', require('../reduceRight'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,23 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const sync_1 = require("../readers/sync");
|
||||
const provider_1 = require("./provider");
|
||||
class ProviderSync extends provider_1.default {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this._reader = new sync_1.default(this._settings);
|
||||
}
|
||||
read(task) {
|
||||
const root = this._getRootDirectory(task);
|
||||
const options = this._getReaderOptions(task);
|
||||
const entries = this.api(root, task, options);
|
||||
return entries.map(options.transform);
|
||||
}
|
||||
api(root, task, options) {
|
||||
if (task.dynamic) {
|
||||
return this._reader.dynamic(root, options);
|
||||
}
|
||||
return this._reader.static(task.patterns, options);
|
||||
}
|
||||
}
|
||||
exports.default = ProviderSync;
|
||||
@@ -0,0 +1,217 @@
|
||||
import { flagEnabled } from '../featureFlags'
|
||||
import * as regex from './regex'
|
||||
|
||||
export function defaultExtractor(context) {
|
||||
let patterns = Array.from(buildRegExps(context))
|
||||
|
||||
/**
|
||||
* @param {string} content
|
||||
*/
|
||||
return (content) => {
|
||||
/** @type {(string|string)[]} */
|
||||
let results = []
|
||||
|
||||
for (let pattern of patterns) {
|
||||
results = [...results, ...(content.match(pattern) ?? [])]
|
||||
}
|
||||
|
||||
return results.filter((v) => v !== undefined).map(clipAtBalancedParens)
|
||||
}
|
||||
}
|
||||
|
||||
function* buildRegExps(context) {
|
||||
let separator = context.tailwindConfig.separator
|
||||
let variantGroupingEnabled = flagEnabled(context.tailwindConfig, 'variantGrouping')
|
||||
let prefix =
|
||||
context.tailwindConfig.prefix !== ''
|
||||
? regex.optional(regex.pattern([/-?/, regex.escape(context.tailwindConfig.prefix)]))
|
||||
: ''
|
||||
|
||||
let utility = regex.any([
|
||||
// Arbitrary properties (without square brackets)
|
||||
/\[[^\s:'"`]+:[^\s\[\]]+\]/,
|
||||
|
||||
// Arbitrary properties with balanced square brackets
|
||||
// This is a targeted fix to continue to allow theme()
|
||||
// with square brackets to work in arbitrary properties
|
||||
// while fixing a problem with the regex matching too much
|
||||
/\[[^\s:'"`]+:[^\s]+?\[[^\s]+?\][^\s]+?\]/,
|
||||
|
||||
// Utilities
|
||||
regex.pattern([
|
||||
// Utility Name / Group Name
|
||||
/-?(?:\w+)/,
|
||||
|
||||
// Normal/Arbitrary values
|
||||
regex.optional(
|
||||
regex.any([
|
||||
regex.pattern([
|
||||
// Arbitrary values
|
||||
/-(?:\w+-)*\[[^\s:]+\]/,
|
||||
|
||||
// Not immediately followed by an `{[(`
|
||||
/(?![{([]])/,
|
||||
|
||||
// optionally followed by an opacity modifier
|
||||
/(?:\/[^\s'"`\\><$]*)?/,
|
||||
]),
|
||||
|
||||
regex.pattern([
|
||||
// Arbitrary values
|
||||
/-(?:\w+-)*\[[^\s]+\]/,
|
||||
|
||||
// Not immediately followed by an `{[(`
|
||||
/(?![{([]])/,
|
||||
|
||||
// optionally followed by an opacity modifier
|
||||
/(?:\/[^\s'"`\\$]*)?/,
|
||||
]),
|
||||
|
||||
// Normal values w/o quotes — may include an opacity modifier
|
||||
/[-\/][^\s'"`\\$={><]*/,
|
||||
])
|
||||
),
|
||||
]),
|
||||
])
|
||||
|
||||
let variantPatterns = [
|
||||
// Without quotes
|
||||
regex.any([
|
||||
// This is here to provide special support for the `@` variant
|
||||
regex.pattern([/@\[[^\s"'`]+\](\/[^\s"'`]+)?/, separator]),
|
||||
|
||||
regex.pattern([/([^\s"'`\[\\]+-)?\[[^\s"'`]+\]/, separator]),
|
||||
regex.pattern([/[^\s"'`\[\\]+/, separator]),
|
||||
]),
|
||||
|
||||
// With quotes allowed
|
||||
regex.any([
|
||||
regex.pattern([/([^\s"'`\[\\]+-)?\[[^\s`]+\]/, separator]),
|
||||
regex.pattern([/[^\s`\[\\]+/, separator]),
|
||||
]),
|
||||
]
|
||||
|
||||
for (const variantPattern of variantPatterns) {
|
||||
yield regex.pattern([
|
||||
// Variants
|
||||
'((?=((',
|
||||
variantPattern,
|
||||
')+))\\2)?',
|
||||
|
||||
// Important (optional)
|
||||
/!?/,
|
||||
|
||||
prefix,
|
||||
|
||||
variantGroupingEnabled
|
||||
? regex.any([
|
||||
// Or any of those things but grouped separated by commas
|
||||
regex.pattern([/\(/, utility, regex.zeroOrMore([/,/, utility]), /\)/]),
|
||||
|
||||
// Arbitrary properties, constrained utilities, arbitrary values, etc…
|
||||
utility,
|
||||
])
|
||||
: utility,
|
||||
])
|
||||
}
|
||||
|
||||
// 5. Inner matches
|
||||
yield /[^<>"'`\s.(){}[\]#=%$]*[^<>"'`\s.(){}[\]#=%:$]/g
|
||||
}
|
||||
|
||||
// We want to capture any "special" characters
|
||||
// AND the characters immediately following them (if there is one)
|
||||
let SPECIALS = /([\[\]'"`])([^\[\]'"`])?/g
|
||||
let ALLOWED_CLASS_CHARACTERS = /[^"'`\s<>\]]+/
|
||||
|
||||
/**
|
||||
* Clips a string ensuring that parentheses, quotes, etc… are balanced
|
||||
* Used for arbitrary values only
|
||||
*
|
||||
* We will go past the end of the balanced parens until we find a non-class character
|
||||
*
|
||||
* Depth matching behavior:
|
||||
* w-[calc(100%-theme('spacing[some_key][1.5]'))]']
|
||||
* ┬ ┬ ┬┬ ┬ ┬┬ ┬┬┬┬┬┬┬
|
||||
* 1 2 3 4 34 3 210 END
|
||||
* ╰────┴──────────┴────────┴────────┴┴───┴─┴┴┴
|
||||
*
|
||||
* @param {string} input
|
||||
*/
|
||||
function clipAtBalancedParens(input) {
|
||||
// We are care about this for arbitrary values
|
||||
if (!input.includes('-[')) {
|
||||
return input
|
||||
}
|
||||
|
||||
let depth = 0
|
||||
let openStringTypes = []
|
||||
|
||||
// Find all parens, brackets, quotes, etc
|
||||
// Stop when we end at a balanced pair
|
||||
// This is naive and will treat mismatched parens as balanced
|
||||
// This shouldn't be a problem in practice though
|
||||
let matches = input.matchAll(SPECIALS)
|
||||
|
||||
// We can't use lookbehind assertions because we have to support Safari
|
||||
// So, instead, we've emulated it using capture groups and we'll re-work the matches to accommodate
|
||||
matches = Array.from(matches).flatMap((match) => {
|
||||
const [, ...groups] = match
|
||||
|
||||
return groups.map((group, idx) =>
|
||||
Object.assign([], match, {
|
||||
index: match.index + idx,
|
||||
0: group,
|
||||
})
|
||||
)
|
||||
})
|
||||
|
||||
for (let match of matches) {
|
||||
let char = match[0]
|
||||
let inStringType = openStringTypes[openStringTypes.length - 1]
|
||||
|
||||
if (char === inStringType) {
|
||||
openStringTypes.pop()
|
||||
} else if (char === "'" || char === '"' || char === '`') {
|
||||
openStringTypes.push(char)
|
||||
}
|
||||
|
||||
if (inStringType) {
|
||||
continue
|
||||
} else if (char === '[') {
|
||||
depth++
|
||||
continue
|
||||
} else if (char === ']') {
|
||||
depth--
|
||||
continue
|
||||
}
|
||||
|
||||
// We've gone one character past the point where we should stop
|
||||
// This means that there was an extra closing `]`
|
||||
// We'll clip to just before it
|
||||
if (depth < 0) {
|
||||
return input.substring(0, match.index - 1)
|
||||
}
|
||||
|
||||
// We've finished balancing the brackets but there still may be characters that can be included
|
||||
// For example in the class `text-[#336699]/[.35]`
|
||||
// The depth goes to `0` at the closing `]` but goes up again at the `[`
|
||||
|
||||
// If we're at zero and encounter a non-class character then we clip the class there
|
||||
if (depth === 0 && !ALLOWED_CLASS_CHARACTERS.test(char)) {
|
||||
return input.substring(0, match.index)
|
||||
}
|
||||
}
|
||||
|
||||
return input
|
||||
}
|
||||
|
||||
// Regular utilities
|
||||
// {{modifier}:}*{namespace}{-{suffix}}*{/{opacityModifier}}?
|
||||
|
||||
// Arbitrary values
|
||||
// {{modifier}:}*{namespace}-[{arbitraryValue}]{/{opacityModifier}}?
|
||||
// arbitraryValue: no whitespace, balanced quotes unless within quotes, balanced brackets unless within quotes
|
||||
|
||||
// Arbitrary properties
|
||||
// {{modifier}:}*[{validCssPropertyName}:{arbitraryValue}]
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"multicast.js","sourceRoot":"","sources":["../../../../src/internal/operators/multicast.ts"],"names":[],"mappings":";;;AAEA,6EAA4E;AAE5E,iDAAgD;AAChD,qCAAoC;AA4EpC,SAAgB,SAAS,CACvB,uBAAwD,EACxD,QAAmD;IAEnD,IAAM,cAAc,GAAG,uBAAU,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,cAAM,OAAA,uBAAuB,EAAvB,CAAuB,CAAC;IAErH,IAAI,uBAAU,CAAC,QAAQ,CAAC,EAAE;QAIxB,OAAO,iBAAO,CAAC,QAAQ,EAAE;YACvB,SAAS,EAAE,cAAc;SAC1B,CAAC,CAAC;KACJ;IAED,OAAO,UAAC,MAAqB,IAAK,OAAA,IAAI,6CAAqB,CAAM,MAAM,EAAE,cAAc,CAAC,EAAtD,CAAsD,CAAC;AAC3F,CAAC;AAhBD,8BAgBC"}
|
||||
@@ -0,0 +1,187 @@
|
||||
let Prefixer = require('./prefixer')
|
||||
let Browsers = require('./browsers')
|
||||
let utils = require('./utils')
|
||||
|
||||
class Declaration extends Prefixer {
|
||||
/**
|
||||
* Always true, because we already get prefixer by property name
|
||||
*/
|
||||
check(/* decl */) {
|
||||
return true
|
||||
}
|
||||
|
||||
/**
|
||||
* Return prefixed version of property
|
||||
*/
|
||||
prefixed(prop, prefix) {
|
||||
return prefix + prop
|
||||
}
|
||||
|
||||
/**
|
||||
* Return unprefixed version of property
|
||||
*/
|
||||
normalize(prop) {
|
||||
return prop
|
||||
}
|
||||
|
||||
/**
|
||||
* Check `value`, that it contain other prefixes, rather than `prefix`
|
||||
*/
|
||||
otherPrefixes(value, prefix) {
|
||||
for (let other of Browsers.prefixes()) {
|
||||
if (other === prefix) {
|
||||
continue
|
||||
}
|
||||
if (value.includes(other)) {
|
||||
return value.replace(/var\([^)]+\)/, '').includes(other)
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
* Set prefix to declaration
|
||||
*/
|
||||
set(decl, prefix) {
|
||||
decl.prop = this.prefixed(decl.prop, prefix)
|
||||
return decl
|
||||
}
|
||||
|
||||
/**
|
||||
* Should we use visual cascade for prefixes
|
||||
*/
|
||||
needCascade(decl) {
|
||||
if (!decl._autoprefixerCascade) {
|
||||
decl._autoprefixerCascade =
|
||||
this.all.options.cascade !== false && decl.raw('before').includes('\n')
|
||||
}
|
||||
return decl._autoprefixerCascade
|
||||
}
|
||||
|
||||
/**
|
||||
* Return maximum length of possible prefixed property
|
||||
*/
|
||||
maxPrefixed(prefixes, decl) {
|
||||
if (decl._autoprefixerMax) {
|
||||
return decl._autoprefixerMax
|
||||
}
|
||||
|
||||
let max = 0
|
||||
for (let prefix of prefixes) {
|
||||
prefix = utils.removeNote(prefix)
|
||||
if (prefix.length > max) {
|
||||
max = prefix.length
|
||||
}
|
||||
}
|
||||
decl._autoprefixerMax = max
|
||||
|
||||
return decl._autoprefixerMax
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate indentation to create visual cascade
|
||||
*/
|
||||
calcBefore(prefixes, decl, prefix = '') {
|
||||
let max = this.maxPrefixed(prefixes, decl)
|
||||
let diff = max - utils.removeNote(prefix).length
|
||||
|
||||
let before = decl.raw('before')
|
||||
if (diff > 0) {
|
||||
before += Array(diff).fill(' ').join('')
|
||||
}
|
||||
|
||||
return before
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove visual cascade
|
||||
*/
|
||||
restoreBefore(decl) {
|
||||
let lines = decl.raw('before').split('\n')
|
||||
let min = lines[lines.length - 1]
|
||||
|
||||
this.all.group(decl).up(prefixed => {
|
||||
let array = prefixed.raw('before').split('\n')
|
||||
let last = array[array.length - 1]
|
||||
if (last.length < min.length) {
|
||||
min = last
|
||||
}
|
||||
})
|
||||
|
||||
lines[lines.length - 1] = min
|
||||
decl.raws.before = lines.join('\n')
|
||||
}
|
||||
|
||||
/**
|
||||
* Clone and insert new declaration
|
||||
*/
|
||||
insert(decl, prefix, prefixes) {
|
||||
let cloned = this.set(this.clone(decl), prefix)
|
||||
if (!cloned) return undefined
|
||||
|
||||
let already = decl.parent.some(
|
||||
i => i.prop === cloned.prop && i.value === cloned.value
|
||||
)
|
||||
if (already) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
if (this.needCascade(decl)) {
|
||||
cloned.raws.before = this.calcBefore(prefixes, decl, prefix)
|
||||
}
|
||||
return decl.parent.insertBefore(decl, cloned)
|
||||
}
|
||||
|
||||
/**
|
||||
* Did this declaration has this prefix above
|
||||
*/
|
||||
isAlready(decl, prefixed) {
|
||||
let already = this.all.group(decl).up(i => i.prop === prefixed)
|
||||
if (!already) {
|
||||
already = this.all.group(decl).down(i => i.prop === prefixed)
|
||||
}
|
||||
return already
|
||||
}
|
||||
|
||||
/**
|
||||
* Clone and add prefixes for declaration
|
||||
*/
|
||||
add(decl, prefix, prefixes, result) {
|
||||
let prefixed = this.prefixed(decl.prop, prefix)
|
||||
if (
|
||||
this.isAlready(decl, prefixed) ||
|
||||
this.otherPrefixes(decl.value, prefix)
|
||||
) {
|
||||
return undefined
|
||||
}
|
||||
return this.insert(decl, prefix, prefixes, result)
|
||||
}
|
||||
|
||||
/**
|
||||
* Add spaces for visual cascade
|
||||
*/
|
||||
process(decl, result) {
|
||||
if (!this.needCascade(decl)) {
|
||||
super.process(decl, result)
|
||||
return
|
||||
}
|
||||
|
||||
let prefixes = super.process(decl, result)
|
||||
|
||||
if (!prefixes || !prefixes.length) {
|
||||
return
|
||||
}
|
||||
|
||||
this.restoreBefore(decl)
|
||||
decl.raws.before = this.calcBefore(prefixes, decl)
|
||||
}
|
||||
|
||||
/**
|
||||
* Return list of prefixed properties to clean old prefixes
|
||||
*/
|
||||
old(prop, prefix) {
|
||||
return [this.prefixed(prop, prefix)]
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Declaration
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"mergeInternals.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeInternals.ts"],"names":[],"mappings":";;;AACA,qDAAoD;AAGpD,2DAA0D;AAC1D,2DAAgE;AAehE,SAAgB,cAAc,CAC5B,MAAqB,EACrB,UAAyB,EACzB,OAAwD,EACxD,UAAkB,EAClB,YAAsC,EACtC,MAAgB,EAChB,iBAAiC,EACjC,mBAAgC;IAGhC,IAAM,MAAM,GAAQ,EAAE,CAAC;IAEvB,IAAI,MAAM,GAAG,CAAC,CAAC;IAEf,IAAI,KAAK,GAAG,CAAC,CAAC;IAEd,IAAI,UAAU,GAAG,KAAK,CAAC;IAKvB,IAAM,aAAa,GAAG;QAIpB,IAAI,UAAU,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE;YAC3C,UAAU,CAAC,QAAQ,EAAE,CAAC;SACvB;IACH,CAAC,CAAC;IAGF,IAAM,SAAS,GAAG,UAAC,KAAQ,IAAK,OAAA,CAAC,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAA9D,CAA8D,CAAC;IAE/F,IAAM,UAAU,GAAG,UAAC,KAAQ;QAI1B,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,KAAY,CAAC,CAAC;QAIxC,MAAM,EAAE,CAAC;QAKT,IAAI,aAAa,GAAG,KAAK,CAAC;QAG1B,qBAAS,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAC1C,6CAAwB,CACtB,UAAU,EACV,UAAC,UAAU;YAGT,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAG,UAAU,CAAC,CAAC;YAE3B,IAAI,MAAM,EAAE;gBAGV,SAAS,CAAC,UAAiB,CAAC,CAAC;aAC9B;iBAAM;gBAEL,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;aAC7B;QACH,CAAC,EACD;YAGE,aAAa,GAAG,IAAI,CAAC;QACvB,CAAC,EAED,SAAS,EACT;YAIE,IAAI,aAAa,EAAE;gBAKjB,IAAI;oBAIF,MAAM,EAAE,CAAC;;wBAMP,IAAM,aAAa,GAAG,MAAM,CAAC,KAAK,EAAG,CAAC;wBAItC,IAAI,iBAAiB,EAAE;4BACrB,iCAAe,CAAC,UAAU,EAAE,iBAAiB,EAAE,cAAM,OAAA,UAAU,CAAC,aAAa,CAAC,EAAzB,CAAyB,CAAC,CAAC;yBACjF;6BAAM;4BACL,UAAU,CAAC,aAAa,CAAC,CAAC;yBAC3B;;oBATH,OAAO,MAAM,CAAC,MAAM,IAAI,MAAM,GAAG,UAAU;;qBAU1C;oBAED,aAAa,EAAE,CAAC;iBACjB;gBAAC,OAAO,GAAG,EAAE;oBACZ,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACvB;aACF;QACH,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC;IAGF,MAAM,CAAC,SAAS,CACd,6CAAwB,CAAC,UAAU,EAAE,SAAS,EAAE;QAE9C,UAAU,GAAG,IAAI,CAAC;QAClB,aAAa,EAAE,CAAC;IAClB,CAAC,CAAC,CACH,CAAC;IAIF,OAAO;QACL,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,EAAI,CAAC;IAC1B,CAAC,CAAC;AACJ,CAAC;AAhID,wCAgIC"}
|
||||
@@ -0,0 +1,124 @@
|
||||
import Container from './container.js'
|
||||
import Node from './node.js'
|
||||
|
||||
interface DeclarationRaws extends Record<string, unknown> {
|
||||
/**
|
||||
* The space symbols before the node. It also stores `*`
|
||||
* and `_` symbols before the declaration (IE hack).
|
||||
*/
|
||||
before?: string
|
||||
|
||||
/**
|
||||
* The symbols between the property and value for declarations.
|
||||
*/
|
||||
between?: string
|
||||
|
||||
/**
|
||||
* The content of the important statement, if it is not just `!important`.
|
||||
*/
|
||||
important?: string
|
||||
|
||||
/**
|
||||
* Declaration value with comments.
|
||||
*/
|
||||
value?: {
|
||||
value: string
|
||||
raw: string
|
||||
}
|
||||
}
|
||||
|
||||
export interface DeclarationProps {
|
||||
/** Name of the declaration. */
|
||||
prop: string
|
||||
/** Value of the declaration. */
|
||||
value: string
|
||||
/** Whether the declaration has an `!important` annotation. */
|
||||
important?: boolean
|
||||
/** Information used to generate byte-to-byte equal node string as it was in the origin input. */
|
||||
raws?: DeclarationRaws
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a CSS declaration.
|
||||
*
|
||||
* ```js
|
||||
* Once (root, { Declaration }) {
|
||||
* let color = new Declaration({ prop: 'color', value: 'black' })
|
||||
* root.append(color)
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* ```js
|
||||
* const root = postcss.parse('a { color: black }')
|
||||
* const decl = root.first.first
|
||||
* decl.type //=> 'decl'
|
||||
* decl.toString() //=> ' color: black'
|
||||
* ```
|
||||
*/
|
||||
export default class Declaration extends Node {
|
||||
type: 'decl'
|
||||
parent: Container | undefined
|
||||
raws: DeclarationRaws
|
||||
|
||||
/**
|
||||
* The declaration's property name.
|
||||
*
|
||||
* ```js
|
||||
* const root = postcss.parse('a { color: black }')
|
||||
* const decl = root.first.first
|
||||
* decl.prop //=> 'color'
|
||||
* ```
|
||||
*/
|
||||
prop: string
|
||||
|
||||
/**
|
||||
* The declaration’s value.
|
||||
*
|
||||
* This value will be cleaned of comments. If the source value contained
|
||||
* comments, those comments will be available in the `raws` property.
|
||||
* If you have not changed the value, the result of `decl.toString()`
|
||||
* will include the original raws value (comments and all).
|
||||
*
|
||||
* ```js
|
||||
* const root = postcss.parse('a { color: black }')
|
||||
* const decl = root.first.first
|
||||
* decl.value //=> 'black'
|
||||
* ```
|
||||
*/
|
||||
value: string
|
||||
|
||||
/**
|
||||
* `true` if the declaration has an `!important` annotation.
|
||||
*
|
||||
* ```js
|
||||
* const root = postcss.parse('a { color: black !important; color: red }')
|
||||
* root.first.first.important //=> true
|
||||
* root.first.last.important //=> undefined
|
||||
* ```
|
||||
*/
|
||||
important: boolean
|
||||
|
||||
/**
|
||||
* `true` if declaration is declaration of CSS Custom Property
|
||||
* or Sass variable.
|
||||
*
|
||||
* ```js
|
||||
* const root = postcss.parse(':root { --one: 1 }')
|
||||
* let one = root.first.first
|
||||
* one.variable //=> true
|
||||
* ```
|
||||
*
|
||||
* ```js
|
||||
* const root = postcss.parse('$one: 1')
|
||||
* let one = root.first
|
||||
* one.variable //=> true
|
||||
* ```
|
||||
*/
|
||||
variable: boolean
|
||||
|
||||
constructor(defaults?: DeclarationProps)
|
||||
assign(overrides: object | DeclarationProps): this
|
||||
clone(overrides?: Partial<DeclarationProps>): this
|
||||
cloneBefore(overrides?: Partial<DeclarationProps>): this
|
||||
cloneAfter(overrides?: Partial<DeclarationProps>): this
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
export function createObject(keys, values) {
|
||||
return keys.reduce((result, key, i) => ((result[key] = values[i]), result), {});
|
||||
}
|
||||
//# sourceMappingURL=createObject.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('updateWith', require('../updateWith'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
||||
module.exports={C:{"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0.03177,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0.04942,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0.00353,"109":0.23651,"110":0.13414,"111":0,"112":0,"3.5":0,"3.6":0},D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0.00706,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0.00353,"66":0.00706,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0.01412,"80":0,"81":0,"83":0,"84":0.00353,"85":0,"86":0,"87":0.00706,"88":0,"89":0,"90":0,"91":0.00353,"92":0.00353,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0.00353,"100":0,"101":0.01059,"102":0,"103":0.01059,"104":0.00353,"105":0.03177,"106":0.00353,"107":0.00706,"108":0.29299,"109":1.92032,"110":1.18608,"111":0,"112":0,"113":0},F:{"9":0,"11":0,"12":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"60":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0.01412,"94":0.10943,"95":0.02471,"9.5-9.6":0,"10.0-10.1":0,"10.5":0,"10.6":0,"11.1":0,"11.5":0,"11.6":0,"12.1":0},B:{"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"79":0,"80":0,"81":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0.00353,"108":0.00706,"109":0.39889,"110":0.44478},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0.09178,"15":0.0353,_:"0","3.1":0,"3.2":0,"5.1":0,"6.1":0,"7.1":0,"9.1":0,"10.1":0,"11.1":0,"12.1":0.00353,"13.1":0.01412,"14.1":0.0706,"15.1":0.0353,"15.2-15.3":0.08825,"15.4":0.16238,"15.5":0.353,"15.6":2.30509,"16.0":0.09884,"16.1":0.49773,"16.2":2.07917,"16.3":1.24609,"16.4":0.00353},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0,"6.0-6.1":0,"7.0-7.1":0,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.04379,"10.0-10.2":0,"10.3":0.03503,"11.0-11.2":0,"11.3-11.4":0,"12.0-12.1":0,"12.2-12.5":0.21893,"13.0-13.1":0,"13.2":0,"13.3":0,"13.4-13.7":0.02627,"14.0-14.4":0.33278,"14.5-14.8":0.70059,"15.0-15.1":0.26272,"15.2-15.3":0.31526,"15.4":1.26981,"15.5":2.23312,"15.6":11.60347,"16.0":7.85533,"16.1":23.60103,"16.2":21.36791,"16.3":11.06052,"16.4":0.02627},P:{"4":0.02008,"20":0.35139,"5.0-5.4":0,"6.2-6.4":0,"7.2-7.4":0,"8.2":0,"9.2":0,"10.1":0,"11.1-11.2":0,"12.0":0,"13.0":0,"14.0":0,"15.0":0,"16.0":0.01004,"17.0":0.01004,"18.0":0.01004,"19.0":0.76301},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.02059},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.01412,"5.5":0},N:{"10":0,"11":0},S:{"2.5":0,_:"3.0-3.1"},J:{"7":0,"10":0},O:{"0":0},H:{"0":0.0245},L:{"0":5.07987},R:{_:"0"},M:{"0":0.07764},Q:{"13.1":0}};
|
||||
@@ -0,0 +1,2 @@
|
||||
"Style","Description","SKU","BusinessAreaCode","BusinessAreaDescription","DepartmentCode","DepartmentDescription","ClassCode","ClassDescription","ColorCode","ColorDescription","SizeCode","SizeDescription","PrimaryMaterialCode","PrimaryMaterialDescription","VendorCode","VendorDescription","CurrentRetail"
|
||||
"503951518","OVERSIZE ROUND GOLD PENDANT ON 32" THICK BLACK CORD","00505039515193","W12","Jewelry","1231","Jewelry","123111","D2 New Jewelry Necklace","70","GOLD","100","1 Size","065","Costume/Imitation","3522","KENNETH JAY LANE, INC.","79.0000"
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"delayWhen.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/delayWhen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAQrE,2EAA2E;AAC3E,wBAAgB,SAAS,CAAC,CAAC,EACzB,qBAAqB,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,eAAe,CAAC,GAAG,CAAC,EACxE,iBAAiB,EAAE,UAAU,CAAC,GAAG,CAAC,GACjC,wBAAwB,CAAC,CAAC,CAAC,CAAC;AAC/B,wBAAgB,SAAS,CAAC,CAAC,EAAE,qBAAqB,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,eAAe,CAAC,GAAG,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC"}
|
||||
@@ -0,0 +1,11 @@
|
||||
import type { Config, PluginCreator } from './types/config'
|
||||
type Plugin = {
|
||||
withOptions<T>(
|
||||
plugin: (options: T) => PluginCreator,
|
||||
config?: (options: T) => Partial<Config>
|
||||
): { (options: T): { handler: PluginCreator; config?: Partial<Config> }; __isOptionsFunction: true }
|
||||
(plugin: PluginCreator, config?: Partial<Config>): { handler: PluginCreator; config?: Partial<Config> }
|
||||
}
|
||||
|
||||
declare const plugin: Plugin
|
||||
export = plugin
|
||||
@@ -0,0 +1,10 @@
|
||||
module.exports = {
|
||||
"name": "flat",
|
||||
"processSafe": true,
|
||||
"regExp": /^\*flat\*/,
|
||||
"parserFunc": function parser_flat (params) {
|
||||
var key = this.getHeadStr();
|
||||
var val = params.item;
|
||||
params.resultRow[key] = val;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
if(typeof cptable === 'undefined') cptable = {};
|
||||
cptable[38598] = (function(){ var d = "\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~
¢£¤¥¦§¨©×«¬®‾°±²³´µ¶·¸¹÷»¼½¾‗אבגדהוזחטיךכלםמןנסעףפץצקרשת", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {"enc": e, "dec": D }; })();
|
||||
@@ -0,0 +1,73 @@
|
||||
import { debug } from 'node:util';
|
||||
import _ from 'lodash';
|
||||
|
||||
class Plugin {
|
||||
static isEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
static disablePlugin() {
|
||||
return null;
|
||||
}
|
||||
|
||||
constructor({ namespace, options = {}, container = {} } = {}) {
|
||||
this.namespace = namespace;
|
||||
this.options = Object.freeze(this.getInitialOptions(options, namespace));
|
||||
this.context = {};
|
||||
this.config = container.config;
|
||||
this.log = container.log;
|
||||
this.shell = container.shell;
|
||||
this.spinner = container.spinner;
|
||||
this.prompt = container.prompt;
|
||||
this.debug = debug(`release-it:${namespace}`);
|
||||
}
|
||||
|
||||
getInitialOptions(options, namespace) {
|
||||
return options[namespace] || {};
|
||||
}
|
||||
|
||||
init() {}
|
||||
getName() {}
|
||||
getLatestVersion() {}
|
||||
getChangelog() {}
|
||||
getIncrement() {}
|
||||
getIncrementedVersionCI() {}
|
||||
getIncrementedVersion() {}
|
||||
beforeBump() {}
|
||||
bump() {}
|
||||
beforeRelease() {}
|
||||
release() {}
|
||||
afterRelease() {}
|
||||
|
||||
getContext(path) {
|
||||
const context = Object.assign({}, this.options, this.context);
|
||||
return path ? _.get(context, path) : context;
|
||||
}
|
||||
|
||||
setContext(context) {
|
||||
_.merge(this.context, context);
|
||||
}
|
||||
|
||||
exec(command, { options, context = {} } = {}) {
|
||||
const ctx = Object.assign(context, this.config.getContext(), { [this.namespace]: this.getContext() });
|
||||
return this.shell.exec(command, options, ctx);
|
||||
}
|
||||
|
||||
registerPrompts(prompts) {
|
||||
this.prompt.register(prompts, this.namespace);
|
||||
}
|
||||
|
||||
async showPrompt(options) {
|
||||
options.namespace = this.namespace;
|
||||
return this.prompt.show(options);
|
||||
}
|
||||
|
||||
step(options) {
|
||||
const context = Object.assign({}, this.config.getContext(), { [this.namespace]: this.getContext() });
|
||||
const opts = Object.assign({}, options, { context });
|
||||
const isException = this.config.isPromptOnlyVersion && ['incrementList', 'publish', 'otp'].includes(opts.prompt);
|
||||
return this.config.isCI && !isException ? this.spinner.show(opts) : this.showPrompt(opts);
|
||||
}
|
||||
}
|
||||
|
||||
export default Plugin;
|
||||
@@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.isValidDate = void 0;
|
||||
function isValidDate(value) {
|
||||
return value instanceof Date && !isNaN(value);
|
||||
}
|
||||
exports.isValidDate = isValidDate;
|
||||
//# sourceMappingURL=isDate.js.map
|
||||
@@ -0,0 +1,78 @@
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
var pify = require('pify');
|
||||
|
||||
var stat = pify(fs.stat);
|
||||
var readFile = pify(fs.readFile);
|
||||
var resolve = path.resolve;
|
||||
|
||||
var cache = Object.create(null);
|
||||
|
||||
function convert(content, encoding) {
|
||||
if (Buffer.isEncoding(encoding)) {
|
||||
return content.toString(encoding);
|
||||
}
|
||||
return content;
|
||||
}
|
||||
|
||||
module.exports = function (path, encoding) {
|
||||
path = resolve(path);
|
||||
|
||||
return stat(path).then(function (stats) {
|
||||
var item = cache[path];
|
||||
|
||||
if (item && item.mtime.getTime() === stats.mtime.getTime()) {
|
||||
return convert(item.content, encoding);
|
||||
}
|
||||
|
||||
return readFile(path).then(function (data) {
|
||||
cache[path] = {
|
||||
mtime: stats.mtime,
|
||||
content: data
|
||||
};
|
||||
|
||||
return convert(data, encoding);
|
||||
});
|
||||
}).catch(function (err) {
|
||||
cache[path] = null;
|
||||
return Promise.reject(err);
|
||||
});
|
||||
};
|
||||
|
||||
module.exports.sync = function (path, encoding) {
|
||||
path = resolve(path);
|
||||
|
||||
try {
|
||||
var stats = fs.statSync(path);
|
||||
var item = cache[path];
|
||||
|
||||
if (item && item.mtime.getTime() === stats.mtime.getTime()) {
|
||||
return convert(item.content, encoding);
|
||||
}
|
||||
|
||||
var data = fs.readFileSync(path);
|
||||
|
||||
cache[path] = {
|
||||
mtime: stats.mtime,
|
||||
content: data
|
||||
};
|
||||
|
||||
return convert(data, encoding);
|
||||
} catch (err) {
|
||||
cache[path] = null;
|
||||
throw err;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
module.exports.get = function (path, encoding) {
|
||||
path = resolve(path);
|
||||
if (cache[path]) {
|
||||
return convert(cache[path].content, encoding);
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
module.exports.clear = function () {
|
||||
cache = Object.create(null);
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
'use strict';
|
||||
|
||||
var parse = require('../');
|
||||
var test = require('tape');
|
||||
|
||||
test('short -k=v', function (t) {
|
||||
t.plan(1);
|
||||
|
||||
var argv = parse(['-b=123']);
|
||||
t.deepEqual(argv, { b: 123, _: [] });
|
||||
});
|
||||
|
||||
test('multi short -k=v', function (t) {
|
||||
t.plan(1);
|
||||
|
||||
var argv = parse(['-a=whatever', '-b=robots']);
|
||||
t.deepEqual(argv, { a: 'whatever', b: 'robots', _: [] });
|
||||
});
|
||||
|
||||
test('short with embedded equals -k=a=b', function (t) {
|
||||
t.plan(1);
|
||||
|
||||
var argv = parse(['-k=a=b']);
|
||||
t.deepEqual(argv, { k: 'a=b', _: [] });
|
||||
});
|
||||
|
||||
test('short with later equals like -ab=c', function (t) {
|
||||
t.plan(1);
|
||||
|
||||
var argv = parse(['-ab=c']);
|
||||
t.deepEqual(argv, { a: true, b: 'c', _: [] });
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
'use strict';
|
||||
|
||||
var parse = require('../');
|
||||
var test = require('tape');
|
||||
|
||||
test('parse with modifier functions', function (t) {
|
||||
t.plan(1);
|
||||
|
||||
var argv = parse(['-b', '123'], { boolean: 'b' });
|
||||
t.deepEqual(argv, { b: true, _: [123] });
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={C:{"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0.00486,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0.00486,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0.00486,"85":0,"86":0,"87":0,"88":0.00486,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0.02429,"98":0,"99":0,"100":0,"101":0,"102":0.00971,"103":0,"104":0.01943,"105":0.00971,"106":0.00971,"107":0.02429,"108":0.01457,"109":0.26714,"110":0.17971,"111":0,"112":0,"3.5":0,"3.6":0},D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0.00486,"35":0,"36":0,"37":0,"38":0.01943,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0.00486,"48":0,"49":0.01457,"50":0,"51":0,"52":0,"53":0.00971,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0.00971,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0.00486,"75":0,"76":0.00486,"77":0.00486,"78":0.00486,"79":0.18942,"80":0.00486,"81":0.01943,"83":0.00486,"84":0.00486,"85":0.00486,"86":0.00486,"87":0.02429,"88":0.00971,"89":0.00486,"90":0.00971,"91":0.04857,"92":0.02914,"93":0.02914,"94":0.00971,"95":0.02429,"96":0.034,"97":0.02914,"98":0.01943,"99":0.02429,"100":0.02429,"101":0.034,"102":0.01943,"103":0.08257,"104":0.05343,"105":0.05343,"106":0.04857,"107":0.09228,"108":0.30113,"109":10.48141,"110":7.06208,"111":0.00486,"112":0,"113":0},F:{"9":0,"11":0,"12":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0.00486,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0.00486,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"60":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0.00486,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0.00486,"93":0.12143,"94":0.99569,"95":0.34485,"9.5-9.6":0,"10.0-10.1":0,"10.5":0,"10.6":0,"11.1":0,"11.5":0,"11.6":0,"12.1":0},B:{"12":0.00486,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0.00486,"79":0,"80":0,"81":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0.00486,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0.00486,"104":0,"105":0.00486,"106":0.00486,"107":0.01457,"108":0.01943,"109":0.54884,"110":0.76255},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0.00971,"15":0.00486,_:"0","3.1":0,"3.2":0,"5.1":0,"6.1":0,"7.1":0,"9.1":0,"10.1":0,"11.1":0,"12.1":0,"13.1":0.01457,"14.1":0.02429,"15.1":0.00486,"15.2-15.3":0.00486,"15.4":0.00486,"15.5":0.01943,"15.6":0.07286,"16.0":0.01457,"16.1":0.04857,"16.2":0.07286,"16.3":0.05343,"16.4":0},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0.00326,"6.0-6.1":0,"7.0-7.1":0.00131,"8.1-8.4":0,"9.0-9.2":0.00392,"9.3":0.01762,"10.0-10.2":0,"10.3":0.01306,"11.0-11.2":0.00392,"11.3-11.4":0.00261,"12.0-12.1":0.00783,"12.2-12.5":0.20105,"13.0-13.1":0.00587,"13.2":0.00131,"13.3":0.01044,"13.4-13.7":0.02872,"14.0-14.4":0.0705,"14.5-14.8":0.22128,"15.0-15.1":0.0594,"15.2-15.3":0.06854,"15.4":0.1175,"15.5":0.24152,"15.6":0.62077,"16.0":0.73369,"16.1":1.36555,"16.2":1.40472,"16.3":0.88774,"16.4":0.00392},P:{"4":0.29544,"20":0.25469,"5.0-5.4":0.01019,"6.2-6.4":0,"7.2-7.4":0.11206,"8.2":0,"9.2":0.01019,"10.1":0,"11.1-11.2":0.03056,"12.0":0,"13.0":0.04075,"14.0":0.03056,"15.0":0.02038,"16.0":0.06113,"17.0":0.06113,"18.0":0.07131,"19.0":0.60108},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0.01061,"4.2-4.3":0.00424,"4.4":0,"4.4.3-4.4.4":0.09972},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.02914,"5.5":0},N:{"10":0,"11":0},S:{"2.5":0,_:"3.0-3.1"},J:{"7":0,"10":0},O:{"0":0.02057},H:{"0":0.18502},L:{"0":67.98175},R:{_:"0"},M:{"0":0.08743},Q:{"13.1":0}};
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"dateTimestampProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/dateTimestampProvider.ts"],"names":[],"mappings":";;;AAMa,QAAA,qBAAqB,GAA0B;IAC1D,GAAG;QAGD,OAAO,CAAC,6BAAqB,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC;IACxD,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"}
|
||||
@@ -0,0 +1,35 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getSignals=void 0;var _os=require("os");
|
||||
|
||||
var _core=require("./core.js");
|
||||
var _realtime=require("./realtime.js");
|
||||
|
||||
|
||||
|
||||
const getSignals=function(){
|
||||
const realtimeSignals=(0,_realtime.getRealtimeSignals)();
|
||||
const signals=[..._core.SIGNALS,...realtimeSignals].map(normalizeSignal);
|
||||
return signals;
|
||||
};exports.getSignals=getSignals;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const normalizeSignal=function({
|
||||
name,
|
||||
number:defaultNumber,
|
||||
description,
|
||||
action,
|
||||
forced=false,
|
||||
standard})
|
||||
{
|
||||
const{
|
||||
signals:{[name]:constantSignal}}=
|
||||
_os.constants;
|
||||
const supported=constantSignal!==undefined;
|
||||
const number=supported?constantSignal:defaultNumber;
|
||||
return{name,number,description,supported,action,forced,standard};
|
||||
};
|
||||
//# sourceMappingURL=signals.js.map
|
||||
@@ -0,0 +1,80 @@
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var HasOwnProperty = require('./HasOwnProperty');
|
||||
var ToNumeric = require('./ToNumeric');
|
||||
var ToPrimitive = require('./ToPrimitive');
|
||||
var ToString = require('./ToString');
|
||||
var Type = require('./Type');
|
||||
|
||||
var NumberAdd = require('./Number/add');
|
||||
var NumberBitwiseAND = require('./Number/bitwiseAND');
|
||||
var NumberBitwiseOR = require('./Number/bitwiseOR');
|
||||
var NumberBitwiseXOR = require('./Number/bitwiseXOR');
|
||||
var NumberDivide = require('./Number/divide');
|
||||
var NumberExponentiate = require('./Number/exponentiate');
|
||||
var NumberLeftShift = require('./Number/leftShift');
|
||||
var NumberMultiply = require('./Number/multiply');
|
||||
var NumberRemainder = require('./Number/remainder');
|
||||
var NumberSignedRightShift = require('./Number/signedRightShift');
|
||||
var NumberSubtract = require('./Number/subtract');
|
||||
var NumberUnsignedRightShift = require('./Number/unsignedRightShift');
|
||||
var BigIntAdd = require('./BigInt/add');
|
||||
var BigIntBitwiseAND = require('./BigInt/bitwiseAND');
|
||||
var BigIntBitwiseOR = require('./BigInt/bitwiseOR');
|
||||
var BigIntBitwiseXOR = require('./BigInt/bitwiseXOR');
|
||||
var BigIntDivide = require('./BigInt/divide');
|
||||
var BigIntExponentiate = require('./BigInt/exponentiate');
|
||||
var BigIntLeftShift = require('./BigInt/leftShift');
|
||||
var BigIntMultiply = require('./BigInt/multiply');
|
||||
var BigIntRemainder = require('./BigInt/remainder');
|
||||
var BigIntSignedRightShift = require('./BigInt/signedRightShift');
|
||||
var BigIntSubtract = require('./BigInt/subtract');
|
||||
var BigIntUnsignedRightShift = require('./BigInt/unsignedRightShift');
|
||||
|
||||
// https://262.ecma-international.org/12.0/#sec-applystringornumericbinaryoperator
|
||||
|
||||
// https://262.ecma-international.org/12.0/#step-applystringornumericbinaryoperator-operations-table
|
||||
var table = {
|
||||
'**': [NumberExponentiate, BigIntExponentiate],
|
||||
'*': [NumberMultiply, BigIntMultiply],
|
||||
'/': [NumberDivide, BigIntDivide],
|
||||
'%': [NumberRemainder, BigIntRemainder],
|
||||
'+': [NumberAdd, BigIntAdd],
|
||||
'-': [NumberSubtract, BigIntSubtract],
|
||||
'<<': [NumberLeftShift, BigIntLeftShift],
|
||||
'>>': [NumberSignedRightShift, BigIntSignedRightShift],
|
||||
'>>>': [NumberUnsignedRightShift, BigIntUnsignedRightShift],
|
||||
'&': [NumberBitwiseAND, BigIntBitwiseAND],
|
||||
'^': [NumberBitwiseXOR, BigIntBitwiseXOR],
|
||||
'|': [NumberBitwiseOR, BigIntBitwiseOR]
|
||||
};
|
||||
|
||||
module.exports = function ApplyStringOrNumericBinaryOperator(lval, opText, rval) {
|
||||
if (Type(opText) !== 'String' || !HasOwnProperty(table, opText)) {
|
||||
throw new $TypeError('Assertion failed: `opText` must be a valid operation string');
|
||||
}
|
||||
if (opText === '+') {
|
||||
var lprim = ToPrimitive(lval);
|
||||
var rprim = ToPrimitive(rval);
|
||||
if (Type(lprim) === 'String' || Type(rprim) === 'String') {
|
||||
var lstr = ToString(lprim);
|
||||
var rstr = ToString(rprim);
|
||||
return lstr + rstr;
|
||||
}
|
||||
/* eslint no-param-reassign: 1 */
|
||||
lval = lprim;
|
||||
rval = rprim;
|
||||
}
|
||||
var lnum = ToNumeric(lval);
|
||||
var rnum = ToNumeric(rval);
|
||||
var T = Type(lnum);
|
||||
if (T !== Type(rnum)) {
|
||||
throw new $TypeError('types of ' + lnum + ' and ' + rnum + ' differ');
|
||||
}
|
||||
var Operation = table[opText][T === 'BigInt' ? 1 : 0];
|
||||
return Operation(lnum, rnum);
|
||||
};
|
||||
@@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.WebSocketSubject = exports.webSocket = void 0;
|
||||
var webSocket_1 = require("../internal/observable/dom/webSocket");
|
||||
Object.defineProperty(exports, "webSocket", { enumerable: true, get: function () { return webSocket_1.webSocket; } });
|
||||
var WebSocketSubject_1 = require("../internal/observable/dom/WebSocketSubject");
|
||||
Object.defineProperty(exports, "WebSocketSubject", { enumerable: true, get: function () { return WebSocketSubject_1.WebSocketSubject; } });
|
||||
//# sourceMappingURL=index.js.map
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"1":"C K L G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"1":"0 1 2 3 4 5 6 7 8 9 y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","2":"DC tB I v J D E F A B C K L G M N O w g x EC FC"},D:{"1":"4 5 6 7 8 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","2":"0 1 2 3 I v J D E F A B C K L G M N O w g x y z"},E:{"1":"F A B C K L G LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","2":"I v J D E HC zB IC JC KC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e rB","2":"F B C PC QC RC SC qB AC TC"},G:{"1":"ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","2":"E zB UC BC VC WC XC YC"},H:{"1":"oC"},I:{"1":"f tC uC","2":"tB I pC qC rC sC BC"},J:{"2":"D A"},K:{"1":"h","2":"A B C qB AC rB"},L:{"1":"H"},M:{"1":"H"},N:{"2":"A B"},O:{"1":"vC"},P:{"1":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"1":"1B"},R:{"1":"9C"},S:{"1":"AD BD"}},B:4,C:"CSS Feature Queries"};
|
||||
@@ -0,0 +1,8 @@
|
||||
'use strict'
|
||||
module.exports = function (Yallist) {
|
||||
Yallist.prototype[Symbol.iterator] = function* () {
|
||||
for (let walker = this.head; walker; walker = walker.next) {
|
||||
yield walker.value
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"root": true,
|
||||
"extends": "@ljharb",
|
||||
"rules": {
|
||||
"complexity": 0,
|
||||
"func-style": [2, "declaration"],
|
||||
"indent": [2, 4],
|
||||
"max-lines": 1,
|
||||
"max-lines-per-function": 1,
|
||||
"max-params": [2, 4],
|
||||
"max-statements": 0,
|
||||
"max-statements-per-line": [2, { "max": 2 }],
|
||||
"no-magic-numbers": 0,
|
||||
"no-param-reassign": 1,
|
||||
"strict": 0, // TODO
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["test/**", "test-*", "example/**"],
|
||||
"extends": "@ljharb/eslint-config/tests",
|
||||
"rules": {
|
||||
"id-length": 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
"files": ["example/**"],
|
||||
"rules": {
|
||||
"no-console": 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
"files": ["test/browser/**"],
|
||||
"env": {
|
||||
"browser": true,
|
||||
},
|
||||
},
|
||||
{
|
||||
"files": ["test/bigint*"],
|
||||
"rules": {
|
||||
"new-cap": [2, { "capIsNewExceptions": ["BigInt"] }],
|
||||
},
|
||||
},
|
||||
{
|
||||
"files": "index.js",
|
||||
"globals": {
|
||||
"HTMLElement": false,
|
||||
},
|
||||
"rules": {
|
||||
"no-use-before-define": 1,
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [ljharb]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: npm/is-arguments
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright 2016 Bogdan Chadkin <trysound@yandex.ru>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -0,0 +1,53 @@
|
||||
// This is not the set of all possible signals.
|
||||
//
|
||||
// It IS, however, the set of all signals that trigger
|
||||
// an exit on either Linux or BSD systems. Linux is a
|
||||
// superset of the signal names supported on BSD, and
|
||||
// the unknown signals just fail to register, so we can
|
||||
// catch that easily enough.
|
||||
//
|
||||
// Don't bother with SIGKILL. It's uncatchable, which
|
||||
// means that we can't fire any callbacks anyway.
|
||||
//
|
||||
// If a user does happen to register a handler on a non-
|
||||
// fatal signal like SIGWINCH or something, and then
|
||||
// exit, it'll end up firing `process.emit('exit')`, so
|
||||
// the handler will be fired anyway.
|
||||
//
|
||||
// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised
|
||||
// artificially, inherently leave the process in a
|
||||
// state from which it is not safe to try and enter JS
|
||||
// listeners.
|
||||
module.exports = [
|
||||
'SIGABRT',
|
||||
'SIGALRM',
|
||||
'SIGHUP',
|
||||
'SIGINT',
|
||||
'SIGTERM'
|
||||
]
|
||||
|
||||
if (process.platform !== 'win32') {
|
||||
module.exports.push(
|
||||
'SIGVTALRM',
|
||||
'SIGXCPU',
|
||||
'SIGXFSZ',
|
||||
'SIGUSR2',
|
||||
'SIGTRAP',
|
||||
'SIGSYS',
|
||||
'SIGQUIT',
|
||||
'SIGIOT'
|
||||
// should detect profiler and enable/disable accordingly.
|
||||
// see #21
|
||||
// 'SIGPROF'
|
||||
)
|
||||
}
|
||||
|
||||
if (process.platform === 'linux') {
|
||||
module.exports.push(
|
||||
'SIGIO',
|
||||
'SIGPOLL',
|
||||
'SIGPWR',
|
||||
'SIGSTKFLT',
|
||||
'SIGUNUSED'
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('spread', require('../spread'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"array.prototype.map","version":"1.0.5","files":{".nycrc":{"checkedAt":1678883669555,"integrity":"sha512-2vm1RFz8Ajl/OYrfoCWPJIm3Bpnf7Gyn5bha/lZx/cq+We3uMy9xj15XeP6x4wF3jf/pO7KMHAkU9mllm605xg==","mode":420,"size":139},".editorconfig":{"checkedAt":1678883671533,"integrity":"sha512-gD3iQtgC7ZgFS97pyZqR0FPjMNyRAfat8dipbSL28iiJ6B1MP5dDeDYeEnP5sYMTz8whQIk3E5vltk2kcyJJEQ==","mode":420,"size":286},"LICENSE":{"checkedAt":1678883671533,"integrity":"sha512-d2fjYr50p8QKjqC0qhH5nWv3sgAsKHHicw91kVzLPCZ54cpPIRw8zJk+nn45Y6q/yJ/T/xdxK77zBLuAvFgmVg==","mode":420,"size":1071},"auto.js":{"checkedAt":1678883671533,"integrity":"sha512-8Q3Im5cACiIFrMmxvLnJnA8SXOjAd1kh/R0UIDVnErDD1WUlJIDrNfaOcIB6rtjAXNhq/OdL1374JM/QcAJ1VQ==","mode":420,"size":36},"test/implementation.js":{"checkedAt":1678883671537,"integrity":"sha512-ozGVXIDo0S8hYotl5hPntc1YU6b2sIJoRf59ObTbvrITvsZAAy4CSnHIiZ5ilSlzJ8Dj2TS7wQrxjG9nUqKmPg==","mode":420,"size":1120},"implementation.js":{"checkedAt":1678883671537,"integrity":"sha512-LAc7G//Mf3g6ldvSwUlgGpbljasUpf1CXvp7CMitMhRgRx7Xc5CSbBwbzz7wD1GraDseAzcmnhzGi1oziGoP6A==","mode":420,"size":1606},".eslintrc":{"checkedAt":1678883671537,"integrity":"sha512-QApI4c6L8NuvVthfLfgHQpd+Lb1ih7A3Wmt3lx7yL0+/v89ojM7XsQvASEd4iWhdGth3MwedFW/NYxkaCRUKiw==","mode":420,"size":536},"index.js":{"checkedAt":1678883671537,"integrity":"sha512-owN14bP5JBqtxkMpa2/5f+uoWQgNzcyZikTK5e6nsRE0pajodaj6mvOVOlOGsoJXmqJRFFqd/gxBXpUlDxVapA==","mode":420,"size":705},"test/index.js":{"checkedAt":1678883671537,"integrity":"sha512-qrtGFtwE/jNMgKIA4QMgaperSQx++BIfFdYrPLYFjtdKrg4FrAR/utRLFs8XmjXAx2n3ISfFGu4YbmHyH92sKQ==","mode":420,"size":487},"polyfill.js":{"checkedAt":1678883671537,"integrity":"sha512-Ys4QB1gI9LCrdtsjZ+Soc4R9gsLcV6NDFU0sjlhxqxdNtexRSeTrrhjKie8aU7BoKtytIpuOHf3f5TLCNteORA==","mode":420,"size":289},"shim.js":{"checkedAt":1678883671537,"integrity":"sha512-GYqxrg0TpwaQHJRujkjhkPw3OxDnB5xlS3uPQhElc11Wz3pqOgp6PVU4zXItKjS+MF8BkyDJ8g5+vHyAY/uowA==","mode":420,"size":325},"test/shimmed.js":{"checkedAt":1678883671540,"integrity":"sha512-S9y3755ByfB0BlJTTtMBsOjrHAQWA7y1CmLEpH3O+IUlLcI7foRBhqjAW5e4g1OEXZPBrFxDonlbhSCN3cWKQQ==","mode":420,"size":1769},"package.json":{"checkedAt":1678883671540,"integrity":"sha512-0iF+zXA9Lma9iZky1zvpOsS+/wHlMD5ZLIl+2p+Nld/Rm/cl1E8QQV/H6XVZT3Z+6lkYnosrux149UBcvKFE7w==","mode":420,"size":2272},"test/tests.js":{"checkedAt":1678883671540,"integrity":"sha512-54EDwzcYsAuEOQjr5bqEZRqsS6Qyqvqg1LM5wXKcDmvC35Vl/JE941K8hmtakY8un3rHDntUfp4ZOxuE8QUc4Q==","mode":420,"size":4898},"CHANGELOG.md":{"checkedAt":1678883671543,"integrity":"sha512-FeOuT4E9UJKnSBQQ7kZ/lvIaao8WkGvnlrz61r2yQb7WE+6R/glfGIoHGF8s0bLUometbJHyMKs5W3lCYO21ng==","mode":420,"size":10356},"README.md":{"checkedAt":1678883671543,"integrity":"sha512-vMf97izg2mHOdM2ceVAZbb0ig6y/8v02TPT01WxYu2G1YmUL2pV7pm6n5spDo8VwSlLcIjjV7/9z+ieGI9JMXw==","mode":420,"size":2894}}}
|
||||
@@ -0,0 +1,27 @@
|
||||
module.exports = register;
|
||||
|
||||
function register(state, name, method, options) {
|
||||
if (typeof method !== "function") {
|
||||
throw new Error("method for before hook must be a function");
|
||||
}
|
||||
|
||||
if (!options) {
|
||||
options = {};
|
||||
}
|
||||
|
||||
if (Array.isArray(name)) {
|
||||
return name.reverse().reduce(function (callback, name) {
|
||||
return register.bind(null, state, name, callback, options);
|
||||
}, method)();
|
||||
}
|
||||
|
||||
return Promise.resolve().then(function () {
|
||||
if (!state.registry[name]) {
|
||||
return method(options);
|
||||
}
|
||||
|
||||
return state.registry[name].reduce(function (method, registered) {
|
||||
return registered.hook.bind(null, method, options);
|
||||
}, method)();
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user