isomorfeus-preact 10.5.0 → 10.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +29 -0
- data/lib/isomorfeus/preact/config.rb +19 -35
- data/lib/isomorfeus/preact/imports.rb +30 -0
- data/lib/isomorfeus/preact_view_helper.rb +34 -42
- data/lib/isomorfeus-preact.rb +6 -4
- data/lib/lucid_app/context.rb +9 -9
- data/lib/preact/version.rb +1 -1
- data/node_modules/.bin/loose-envify +12 -0
- data/node_modules/.bin/loose-envify.cmd +17 -0
- data/node_modules/.bin/loose-envify.ps1 +28 -0
- data/node_modules/.package-lock.json +278 -0
- data/node_modules/@babel/runtime/LICENSE +22 -0
- data/node_modules/@babel/runtime/README.md +19 -0
- data/node_modules/@babel/runtime/helpers/AsyncGenerator.js +99 -0
- data/node_modules/@babel/runtime/helpers/AwaitValue.js +6 -0
- data/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js +31 -0
- data/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +12 -0
- data/node_modules/@babel/runtime/helpers/arrayWithHoles.js +6 -0
- data/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js +8 -0
- data/node_modules/@babel/runtime/helpers/assertThisInitialized.js +10 -0
- data/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js +57 -0
- data/node_modules/@babel/runtime/helpers/asyncIterator.js +16 -0
- data/node_modules/@babel/runtime/helpers/asyncToGenerator.js +38 -0
- data/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js +8 -0
- data/node_modules/@babel/runtime/helpers/checkPrivateRedeclaration.js +8 -0
- data/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js +23 -0
- data/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js +10 -0
- data/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js +14 -0
- data/node_modules/@babel/runtime/helpers/classCallCheck.js +8 -0
- data/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js +8 -0
- data/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js +8 -0
- data/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js +10 -0
- data/node_modules/@babel/runtime/helpers/classNameTDZError.js +6 -0
- data/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js +11 -0
- data/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js +11 -0
- data/node_modules/@babel/runtime/helpers/classPrivateFieldInitSpec.js +9 -0
- data/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js +10 -0
- data/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js +8 -0
- data/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js +12 -0
- data/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js +10 -0
- data/node_modules/@babel/runtime/helpers/classPrivateMethodInitSpec.js +9 -0
- data/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js +6 -0
- data/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js +14 -0
- data/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js +14 -0
- data/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js +15 -0
- data/node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js +9 -0
- data/node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js +6 -0
- data/node_modules/@babel/runtime/helpers/construct.js +26 -0
- data/node_modules/@babel/runtime/helpers/createClass.js +18 -0
- data/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js +61 -0
- data/node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js +25 -0
- data/node_modules/@babel/runtime/helpers/createSuper.js +25 -0
- data/node_modules/@babel/runtime/helpers/decorate.js +401 -0
- data/node_modules/@babel/runtime/helpers/defaults.js +17 -0
- data/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js +25 -0
- data/node_modules/@babel/runtime/helpers/defineProperty.js +17 -0
- data/node_modules/@babel/runtime/helpers/esm/AsyncGenerator.js +95 -0
- data/node_modules/@babel/runtime/helpers/esm/AwaitValue.js +3 -0
- data/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js +28 -0
- data/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +9 -0
- data/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +3 -0
- data/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +4 -0
- data/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +7 -0
- data/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js +54 -0
- data/node_modules/@babel/runtime/helpers/esm/asyncIterator.js +13 -0
- data/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +35 -0
- data/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js +4 -0
- data/node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js +5 -0
- data/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js +20 -0
- data/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js +7 -0
- data/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js +11 -0
- data/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +5 -0
- data/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js +5 -0
- data/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +5 -0
- data/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js +7 -0
- data/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js +3 -0
- data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js +6 -0
- data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js +6 -0
- data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js +5 -0
- data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js +7 -0
- data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js +4 -0
- data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js +7 -0
- data/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js +7 -0
- data/node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js +5 -0
- data/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js +3 -0
- data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js +8 -0
- data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js +8 -0
- data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js +9 -0
- data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodGet.js +5 -0
- data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js +3 -0
- data/node_modules/@babel/runtime/helpers/esm/construct.js +18 -0
- data/node_modules/@babel/runtime/helpers/esm/createClass.js +15 -0
- data/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js +57 -0
- data/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.js +21 -0
- data/node_modules/@babel/runtime/helpers/esm/createSuper.js +19 -0
- data/node_modules/@babel/runtime/helpers/esm/decorate.js +396 -0
- data/node_modules/@babel/runtime/helpers/esm/defaults.js +14 -0
- data/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js +22 -0
- data/node_modules/@babel/runtime/helpers/esm/defineProperty.js +14 -0
- data/node_modules/@babel/runtime/helpers/esm/extends.js +17 -0
- data/node_modules/@babel/runtime/helpers/esm/get.js +20 -0
- data/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +6 -0
- data/node_modules/@babel/runtime/helpers/esm/inherits.js +15 -0
- data/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +6 -0
- data/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js +9 -0
- data/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js +3 -0
- data/node_modules/@babel/runtime/helpers/esm/instanceof.js +7 -0
- data/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js +5 -0
- data/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js +51 -0
- data/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js +3 -0
- data/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +12 -0
- data/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +3 -0
- data/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +29 -0
- data/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimitLoose.js +14 -0
- data/node_modules/@babel/runtime/helpers/esm/jsx.js +46 -0
- data/node_modules/@babel/runtime/helpers/esm/maybeArrayLike.js +9 -0
- data/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js +5 -0
- data/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +3 -0
- data/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +3 -0
- data/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js +3 -0
- data/node_modules/@babel/runtime/helpers/esm/objectSpread.js +19 -0
- data/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +39 -0
- data/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +19 -0
- data/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +14 -0
- data/node_modules/@babel/runtime/helpers/esm/package.json +3 -0
- data/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +11 -0
- data/node_modules/@babel/runtime/helpers/esm/readOnlyError.js +3 -0
- data/node_modules/@babel/runtime/helpers/esm/set.js +51 -0
- data/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +8 -0
- data/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js +7 -0
- data/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +7 -0
- data/node_modules/@babel/runtime/helpers/esm/slicedToArrayLoose.js +7 -0
- data/node_modules/@babel/runtime/helpers/esm/superPropBase.js +9 -0
- data/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +11 -0
- data/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js +8 -0
- data/node_modules/@babel/runtime/helpers/esm/tdz.js +3 -0
- data/node_modules/@babel/runtime/helpers/esm/temporalRef.js +5 -0
- data/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js +1 -0
- data/node_modules/@babel/runtime/helpers/esm/toArray.js +7 -0
- data/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +7 -0
- data/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +13 -0
- data/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +6 -0
- data/node_modules/@babel/runtime/helpers/esm/typeof.js +15 -0
- data/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +9 -0
- data/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js +6 -0
- data/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js +37 -0
- data/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js +65 -0
- data/node_modules/@babel/runtime/helpers/esm/writeOnlyError.js +3 -0
- data/node_modules/@babel/runtime/helpers/extends.js +21 -0
- data/node_modules/@babel/runtime/helpers/get.js +27 -0
- data/node_modules/@babel/runtime/helpers/getPrototypeOf.js +10 -0
- data/node_modules/@babel/runtime/helpers/inherits.js +19 -0
- data/node_modules/@babel/runtime/helpers/inheritsLoose.js +10 -0
- data/node_modules/@babel/runtime/helpers/initializerDefineProperty.js +12 -0
- data/node_modules/@babel/runtime/helpers/initializerWarningHelper.js +6 -0
- data/node_modules/@babel/runtime/helpers/instanceof.js +10 -0
- data/node_modules/@babel/runtime/helpers/interopRequireDefault.js +8 -0
- data/node_modules/@babel/runtime/helpers/interopRequireWildcard.js +54 -0
- data/node_modules/@babel/runtime/helpers/isNativeFunction.js +6 -0
- data/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js +15 -0
- data/node_modules/@babel/runtime/helpers/iterableToArray.js +6 -0
- data/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js +32 -0
- data/node_modules/@babel/runtime/helpers/iterableToArrayLimitLoose.js +17 -0
- data/node_modules/@babel/runtime/helpers/jsx.js +50 -0
- data/node_modules/@babel/runtime/helpers/maybeArrayLike.js +13 -0
- data/node_modules/@babel/runtime/helpers/newArrowCheck.js +8 -0
- data/node_modules/@babel/runtime/helpers/nonIterableRest.js +6 -0
- data/node_modules/@babel/runtime/helpers/nonIterableSpread.js +6 -0
- data/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js +6 -0
- data/node_modules/@babel/runtime/helpers/objectSpread.js +23 -0
- data/node_modules/@babel/runtime/helpers/objectSpread2.js +42 -0
- data/node_modules/@babel/runtime/helpers/objectWithoutProperties.js +23 -0
- data/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +17 -0
- data/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js +16 -0
- data/node_modules/@babel/runtime/helpers/readOnlyError.js +6 -0
- data/node_modules/@babel/runtime/helpers/set.js +55 -0
- data/node_modules/@babel/runtime/helpers/setPrototypeOf.js +12 -0
- data/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js +10 -0
- data/node_modules/@babel/runtime/helpers/slicedToArray.js +14 -0
- data/node_modules/@babel/runtime/helpers/slicedToArrayLoose.js +14 -0
- data/node_modules/@babel/runtime/helpers/superPropBase.js +13 -0
- data/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js +14 -0
- data/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js +11 -0
- data/node_modules/@babel/runtime/helpers/tdz.js +6 -0
- data/node_modules/@babel/runtime/helpers/temporalRef.js +10 -0
- data/node_modules/@babel/runtime/helpers/temporalUndefined.js +4 -0
- data/node_modules/@babel/runtime/helpers/toArray.js +14 -0
- data/node_modules/@babel/runtime/helpers/toConsumableArray.js +14 -0
- data/node_modules/@babel/runtime/helpers/toPrimitive.js +17 -0
- data/node_modules/@babel/runtime/helpers/toPropertyKey.js +11 -0
- data/node_modules/@babel/runtime/helpers/typeof.js +22 -0
- data/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +13 -0
- data/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js +10 -0
- data/node_modules/@babel/runtime/helpers/wrapNativeSuper.js +45 -0
- data/node_modules/@babel/runtime/helpers/wrapRegExp.js +72 -0
- data/node_modules/@babel/runtime/helpers/writeOnlyError.js +6 -0
- data/node_modules/@babel/runtime/package.json +848 -0
- data/node_modules/@babel/runtime/regenerator/index.js +1 -0
- data/node_modules/css-in-js-utils/Changelog.md +16 -0
- data/node_modules/css-in-js-utils/LICENSE +21 -0
- data/node_modules/css-in-js-utils/README.md +241 -0
- data/node_modules/css-in-js-utils/lib/__tests__/assignStyle-test.js +117 -0
- data/node_modules/css-in-js-utils/lib/__tests__/camelCaseProperty-test.js +15 -0
- data/node_modules/css-in-js-utils/lib/__tests__/cssifyDeclaration-test.js +15 -0
- data/node_modules/css-in-js-utils/lib/__tests__/cssifyObject-test.js +31 -0
- data/node_modules/css-in-js-utils/lib/__tests__/isPrefixedProperty-test.js +19 -0
- data/node_modules/css-in-js-utils/lib/__tests__/isPrefixedValue-test.js +19 -0
- data/node_modules/css-in-js-utils/lib/__tests__/isUnitlessProperty-test.js +43 -0
- data/node_modules/css-in-js-utils/lib/__tests__/normalizeProperty-test.js +21 -0
- data/node_modules/css-in-js-utils/lib/__tests__/resolveArrayValue-test.js +17 -0
- data/node_modules/css-in-js-utils/lib/__tests__/unprefixProperty-test.js +19 -0
- data/node_modules/css-in-js-utils/lib/__tests__/unprefixValue-test.js +20 -0
- data/node_modules/css-in-js-utils/lib/assignStyle.js +37 -0
- data/node_modules/css-in-js-utils/lib/camelCaseProperty.js +15 -0
- data/node_modules/css-in-js-utils/lib/cssifyDeclaration.js +17 -0
- data/node_modules/css-in-js-utils/lib/cssifyObject.js +34 -0
- data/node_modules/css-in-js-utils/lib/hyphenateProperty.js +17 -0
- data/node_modules/css-in-js-utils/lib/index.js +71 -0
- data/node_modules/css-in-js-utils/lib/isPrefixedProperty.js +12 -0
- data/node_modules/css-in-js-utils/lib/isPrefixedValue.js +12 -0
- data/node_modules/css-in-js-utils/lib/isUnitlessProperty.js +64 -0
- data/node_modules/css-in-js-utils/lib/normalizeProperty.js +21 -0
- data/node_modules/css-in-js-utils/lib/resolveArrayValue.js +19 -0
- data/node_modules/css-in-js-utils/lib/unprefixProperty.js +13 -0
- data/node_modules/css-in-js-utils/lib/unprefixValue.js +16 -0
- data/node_modules/css-in-js-utils/package.json +56 -0
- data/node_modules/css-tree/CHANGELOG.md +590 -0
- data/node_modules/css-tree/LICENSE +19 -0
- data/node_modules/css-tree/README.md +130 -0
- data/node_modules/css-tree/data/index.js +103 -0
- data/node_modules/css-tree/data/patch.json +721 -0
- data/node_modules/css-tree/dist/csstree.js +12606 -0
- data/node_modules/css-tree/dist/csstree.min.js +1 -0
- data/node_modules/css-tree/lib/common/List.js +576 -0
- data/node_modules/css-tree/lib/common/OffsetToLocation.js +91 -0
- data/node_modules/css-tree/lib/common/SyntaxError.js +82 -0
- data/node_modules/css-tree/lib/common/TokenStream.js +219 -0
- data/node_modules/css-tree/lib/common/adopt-buffer.js +10 -0
- data/node_modules/css-tree/lib/convertor/create.js +28 -0
- data/node_modules/css-tree/lib/convertor/index.js +3 -0
- data/node_modules/css-tree/lib/definition-syntax/SyntaxError.js +14 -0
- data/node_modules/css-tree/lib/definition-syntax/generate.js +129 -0
- data/node_modules/css-tree/lib/definition-syntax/index.js +6 -0
- data/node_modules/css-tree/lib/definition-syntax/parse.js +568 -0
- data/node_modules/css-tree/lib/definition-syntax/tokenizer.js +55 -0
- data/node_modules/css-tree/lib/definition-syntax/walk.js +52 -0
- data/node_modules/css-tree/lib/generator/create.js +66 -0
- data/node_modules/css-tree/lib/generator/index.js +4 -0
- data/node_modules/css-tree/lib/generator/sourceMap.js +95 -0
- data/node_modules/css-tree/lib/index.js +1 -0
- data/node_modules/css-tree/lib/lexer/Lexer.js +466 -0
- data/node_modules/css-tree/lib/lexer/error.js +127 -0
- data/node_modules/css-tree/lib/lexer/generic-an-plus-b.js +236 -0
- data/node_modules/css-tree/lib/lexer/generic-urange.js +159 -0
- data/node_modules/css-tree/lib/lexer/generic.js +585 -0
- data/node_modules/css-tree/lib/lexer/index.js +3 -0
- data/node_modules/css-tree/lib/lexer/match-graph.js +455 -0
- data/node_modules/css-tree/lib/lexer/match.js +639 -0
- data/node_modules/css-tree/lib/lexer/prepare-tokens.js +73 -0
- data/node_modules/css-tree/lib/lexer/search.js +65 -0
- data/node_modules/css-tree/lib/lexer/structure.js +163 -0
- data/node_modules/css-tree/lib/lexer/trace.js +79 -0
- data/node_modules/css-tree/lib/parser/create.js +304 -0
- data/node_modules/css-tree/lib/parser/index.js +4 -0
- data/node_modules/css-tree/lib/parser/sequence.js +54 -0
- data/node_modules/css-tree/lib/syntax/atrule/font-face.js +8 -0
- data/node_modules/css-tree/lib/syntax/atrule/import.js +40 -0
- data/node_modules/css-tree/lib/syntax/atrule/index.js +7 -0
- data/node_modules/css-tree/lib/syntax/atrule/media.js +12 -0
- data/node_modules/css-tree/lib/syntax/atrule/page.js +12 -0
- data/node_modules/css-tree/lib/syntax/atrule/supports.js +89 -0
- data/node_modules/css-tree/lib/syntax/config/lexer.js +9 -0
- data/node_modules/css-tree/lib/syntax/config/mix.js +140 -0
- data/node_modules/css-tree/lib/syntax/config/parser.js +25 -0
- data/node_modules/css-tree/lib/syntax/config/walker.js +3 -0
- data/node_modules/css-tree/lib/syntax/create.js +77 -0
- data/node_modules/css-tree/lib/syntax/function/expression.js +7 -0
- data/node_modules/css-tree/lib/syntax/function/var.js +43 -0
- data/node_modules/css-tree/lib/syntax/index.js +21 -0
- data/node_modules/css-tree/lib/syntax/node/AnPlusB.js +297 -0
- data/node_modules/css-tree/lib/syntax/node/Atrule.js +107 -0
- data/node_modules/css-tree/lib/syntax/node/AtrulePrelude.js +51 -0
- data/node_modules/css-tree/lib/syntax/node/AttributeSelector.js +165 -0
- data/node_modules/css-tree/lib/syntax/node/Block.js +91 -0
- data/node_modules/css-tree/lib/syntax/node/Brackets.js +34 -0
- data/node_modules/css-tree/lib/syntax/node/CDC.js +19 -0
- data/node_modules/css-tree/lib/syntax/node/CDO.js +19 -0
- data/node_modules/css-tree/lib/syntax/node/ClassSelector.js +29 -0
- data/node_modules/css-tree/lib/syntax/node/Combinator.js +55 -0
- data/node_modules/css-tree/lib/syntax/node/Comment.js +36 -0
- data/node_modules/css-tree/lib/syntax/node/Declaration.js +169 -0
- data/node_modules/css-tree/lib/syntax/node/DeclarationList.js +49 -0
- data/node_modules/css-tree/lib/syntax/node/Dimension.js +29 -0
- data/node_modules/css-tree/lib/syntax/node/Function.js +40 -0
- data/node_modules/css-tree/lib/syntax/node/Hash.js +26 -0
- data/node_modules/css-tree/lib/syntax/node/IdSelector.js +27 -0
- data/node_modules/css-tree/lib/syntax/node/Identifier.js +20 -0
- data/node_modules/css-tree/lib/syntax/node/MediaFeature.js +76 -0
- data/node_modules/css-tree/lib/syntax/node/MediaQuery.js +68 -0
- data/node_modules/css-tree/lib/syntax/node/MediaQueryList.js +36 -0
- data/node_modules/css-tree/lib/syntax/node/Nth.js +51 -0
- data/node_modules/css-tree/lib/syntax/node/Number.js +18 -0
- data/node_modules/css-tree/lib/syntax/node/Operator.js +21 -0
- data/node_modules/css-tree/lib/syntax/node/Parentheses.js +34 -0
- data/node_modules/css-tree/lib/syntax/node/Percentage.js +27 -0
- data/node_modules/css-tree/lib/syntax/node/PseudoClassSelector.js +61 -0
- data/node_modules/css-tree/lib/syntax/node/PseudoElementSelector.js +62 -0
- data/node_modules/css-tree/lib/syntax/node/Ratio.js +66 -0
- data/node_modules/css-tree/lib/syntax/node/Raw.js +87 -0
- data/node_modules/css-tree/lib/syntax/node/Rule.js +54 -0
- data/node_modules/css-tree/lib/syntax/node/Selector.js +32 -0
- data/node_modules/css-tree/lib/syntax/node/SelectorList.js +39 -0
- data/node_modules/css-tree/lib/syntax/node/String.js +18 -0
- data/node_modules/css-tree/lib/syntax/node/StyleSheet.js +81 -0
- data/node_modules/css-tree/lib/syntax/node/TypeSelector.js +53 -0
- data/node_modules/css-tree/lib/syntax/node/UnicodeRange.js +173 -0
- data/node_modules/css-tree/lib/syntax/node/Url.js +69 -0
- data/node_modules/css-tree/lib/syntax/node/Value.js +19 -0
- data/node_modules/css-tree/lib/syntax/node/WhiteSpace.js +26 -0
- data/node_modules/css-tree/lib/syntax/node/index.js +42 -0
- data/node_modules/css-tree/lib/syntax/pseudo/common/nth.js +9 -0
- data/node_modules/css-tree/lib/syntax/pseudo/common/nthWithOfClause.js +9 -0
- data/node_modules/css-tree/lib/syntax/pseudo/common/selectorList.js +7 -0
- data/node_modules/css-tree/lib/syntax/pseudo/dir.js +7 -0
- data/node_modules/css-tree/lib/syntax/pseudo/has.js +7 -0
- data/node_modules/css-tree/lib/syntax/pseudo/index.js +12 -0
- data/node_modules/css-tree/lib/syntax/pseudo/lang.js +7 -0
- data/node_modules/css-tree/lib/syntax/pseudo/matches.js +1 -0
- data/node_modules/css-tree/lib/syntax/pseudo/not.js +1 -0
- data/node_modules/css-tree/lib/syntax/pseudo/nth-child.js +1 -0
- data/node_modules/css-tree/lib/syntax/pseudo/nth-last-child.js +1 -0
- data/node_modules/css-tree/lib/syntax/pseudo/nth-last-of-type.js +1 -0
- data/node_modules/css-tree/lib/syntax/pseudo/nth-of-type.js +1 -0
- data/node_modules/css-tree/lib/syntax/pseudo/slotted.js +7 -0
- data/node_modules/css-tree/lib/syntax/scope/atrulePrelude.js +3 -0
- data/node_modules/css-tree/lib/syntax/scope/default.js +87 -0
- data/node_modules/css-tree/lib/syntax/scope/index.js +5 -0
- data/node_modules/css-tree/lib/syntax/scope/selector.js +80 -0
- data/node_modules/css-tree/lib/syntax/scope/value.js +5 -0
- data/node_modules/css-tree/lib/tokenizer/char-code-definitions.js +249 -0
- data/node_modules/css-tree/lib/tokenizer/const.js +40 -0
- data/node_modules/css-tree/lib/tokenizer/index.js +591 -0
- data/node_modules/css-tree/lib/tokenizer/utils.js +243 -0
- data/node_modules/css-tree/lib/utils/clone.js +21 -0
- data/node_modules/css-tree/lib/utils/createCustomError.js +17 -0
- data/node_modules/css-tree/lib/utils/names.js +104 -0
- data/node_modules/css-tree/lib/walker/create.js +284 -0
- data/node_modules/css-tree/lib/walker/index.js +4 -0
- data/node_modules/css-tree/package.json +60 -0
- data/node_modules/csstype/LICENSE +19 -0
- data/node_modules/csstype/README.md +273 -0
- data/node_modules/csstype/index.d.ts +20553 -0
- data/node_modules/csstype/index.js.flow +6278 -0
- data/node_modules/csstype/package.json +62 -0
- data/node_modules/error-stack-parser/CHANGELOG.md +53 -0
- data/node_modules/error-stack-parser/LICENSE +19 -0
- data/node_modules/error-stack-parser/README.md +44 -0
- data/node_modules/error-stack-parser/dist/error-stack-parser.js +202 -0
- data/node_modules/error-stack-parser/dist/error-stack-parser.min.js +2 -0
- data/node_modules/error-stack-parser/dist/error-stack-parser.min.js.map +1 -0
- data/node_modules/error-stack-parser/error-stack-parser.d.ts +66 -0
- data/node_modules/error-stack-parser/error-stack-parser.js +202 -0
- data/node_modules/error-stack-parser/package.json +63 -0
- data/node_modules/fastest-stable-stringify/.eslintrc.yml +26 -0
- data/node_modules/fastest-stable-stringify/.travis.yml +7 -0
- data/node_modules/fastest-stable-stringify/LICENSE +18 -0
- data/node_modules/fastest-stable-stringify/README.md +44 -0
- data/node_modules/fastest-stable-stringify/benchmark/index.js +32 -0
- data/node_modules/fastest-stable-stringify/benchmark/test.json +215 -0
- data/node_modules/fastest-stable-stringify/example/key_cmp.js +7 -0
- data/node_modules/fastest-stable-stringify/example/nested.js +3 -0
- data/node_modules/fastest-stable-stringify/example/str.js +3 -0
- data/node_modules/fastest-stable-stringify/example/value_cmp.js +7 -0
- data/node_modules/fastest-stable-stringify/index.js +60 -0
- data/node_modules/fastest-stable-stringify/package.json +54 -0
- data/node_modules/fastest-stable-stringify/test/bench.js +20 -0
- data/node_modules/fastest-stable-stringify/test/nested.js +24 -0
- data/node_modules/fastest-stable-stringify/test/str.js +52 -0
- data/node_modules/fastest-stable-stringify/test/to-json.js +22 -0
- data/node_modules/hyphenate-style-name/LICENSE +28 -0
- data/node_modules/hyphenate-style-name/README.md +28 -0
- data/node_modules/hyphenate-style-name/index.cjs.js +21 -0
- data/node_modules/hyphenate-style-name/index.js +19 -0
- data/node_modules/hyphenate-style-name/package.json +42 -0
- data/node_modules/inline-style-prefixer/CHANGELOG.md +195 -0
- data/node_modules/inline-style-prefixer/LICENSE +22 -0
- data/node_modules/inline-style-prefixer/README.md +100 -0
- data/node_modules/inline-style-prefixer/es/createPrefixer.js +47 -0
- data/node_modules/inline-style-prefixer/es/data.js +12 -0
- data/node_modules/inline-style-prefixer/es/generator/generatePluginList.js +21 -0
- data/node_modules/inline-style-prefixer/es/generator/generatePrefixMap.js +75 -0
- data/node_modules/inline-style-prefixer/es/generator/index.js +69 -0
- data/node_modules/inline-style-prefixer/es/generator/maps/pluginMap.js +108 -0
- data/node_modules/inline-style-prefixer/es/generator/maps/propertyMap.js +38 -0
- data/node_modules/inline-style-prefixer/es/index.js +26 -0
- data/node_modules/inline-style-prefixer/es/plugins/backgroundClip.js +7 -0
- data/node_modules/inline-style-prefixer/es/plugins/calc.js +11 -0
- data/node_modules/inline-style-prefixer/es/plugins/crossFade.js +12 -0
- data/node_modules/inline-style-prefixer/es/plugins/cursor.js +16 -0
- data/node_modules/inline-style-prefixer/es/plugins/filter.js +12 -0
- data/node_modules/inline-style-prefixer/es/plugins/flex.js +10 -0
- data/node_modules/inline-style-prefixer/es/plugins/flexboxIE.js +67 -0
- data/node_modules/inline-style-prefixer/es/plugins/flexboxOld.js +33 -0
- data/node_modules/inline-style-prefixer/es/plugins/gradient.js +14 -0
- data/node_modules/inline-style-prefixer/es/plugins/grid.js +129 -0
- data/node_modules/inline-style-prefixer/es/plugins/imageSet.js +12 -0
- data/node_modules/inline-style-prefixer/es/plugins/index.js +17 -0
- data/node_modules/inline-style-prefixer/es/plugins/logical.js +35 -0
- data/node_modules/inline-style-prefixer/es/plugins/position.js +5 -0
- data/node_modules/inline-style-prefixer/es/plugins/sizing.js +26 -0
- data/node_modules/inline-style-prefixer/es/plugins/transition.js +75 -0
- data/node_modules/inline-style-prefixer/es/utils/addNewValuesOnly.js +15 -0
- data/node_modules/inline-style-prefixer/es/utils/capitalizeString.js +3 -0
- data/node_modules/inline-style-prefixer/es/utils/isObject.js +3 -0
- data/node_modules/inline-style-prefixer/es/utils/prefixProperty.js +22 -0
- data/node_modules/inline-style-prefixer/es/utils/prefixValue.js +11 -0
- data/node_modules/inline-style-prefixer/lib/createPrefixer.js +66 -0
- data/node_modules/inline-style-prefixer/lib/data.js +17 -0
- data/node_modules/inline-style-prefixer/lib/generator/generatePluginList.js +32 -0
- data/node_modules/inline-style-prefixer/lib/generator/generatePrefixMap.js +86 -0
- data/node_modules/inline-style-prefixer/lib/generator/index.js +85 -0
- data/node_modules/inline-style-prefixer/lib/generator/maps/pluginMap.js +113 -0
- data/node_modules/inline-style-prefixer/lib/generator/maps/propertyMap.js +43 -0
- data/node_modules/inline-style-prefixer/lib/index.js +78 -0
- data/node_modules/inline-style-prefixer/lib/plugins/backgroundClip.js +13 -0
- data/node_modules/inline-style-prefixer/lib/plugins/calc.js +21 -0
- data/node_modules/inline-style-prefixer/lib/plugins/crossFade.js +22 -0
- data/node_modules/inline-style-prefixer/lib/plugins/cursor.js +22 -0
- data/node_modules/inline-style-prefixer/lib/plugins/filter.js +22 -0
- data/node_modules/inline-style-prefixer/lib/plugins/flex.js +16 -0
- data/node_modules/inline-style-prefixer/lib/plugins/flexboxIE.js +73 -0
- data/node_modules/inline-style-prefixer/lib/plugins/flexboxOld.js +39 -0
- data/node_modules/inline-style-prefixer/lib/plugins/gradient.js +26 -0
- data/node_modules/inline-style-prefixer/lib/plugins/grid.js +136 -0
- data/node_modules/inline-style-prefixer/lib/plugins/imageSet.js +22 -0
- data/node_modules/inline-style-prefixer/lib/plugins/index.js +69 -0
- data/node_modules/inline-style-prefixer/lib/plugins/logical.js +41 -0
- data/node_modules/inline-style-prefixer/lib/plugins/position.js +11 -0
- data/node_modules/inline-style-prefixer/lib/plugins/sizing.js +32 -0
- data/node_modules/inline-style-prefixer/lib/plugins/transition.js +92 -0
- data/node_modules/inline-style-prefixer/lib/utils/addNewValuesOnly.js +21 -0
- data/node_modules/inline-style-prefixer/lib/utils/capitalizeString.js +9 -0
- data/node_modules/inline-style-prefixer/lib/utils/isObject.js +9 -0
- data/node_modules/inline-style-prefixer/lib/utils/prefixProperty.js +32 -0
- data/node_modules/inline-style-prefixer/lib/utils/prefixValue.js +17 -0
- data/node_modules/inline-style-prefixer/package.json +79 -0
- data/node_modules/isobject/LICENSE +21 -0
- data/node_modules/isobject/README.md +122 -0
- data/node_modules/isobject/index.d.ts +5 -0
- data/node_modules/isobject/index.js +12 -0
- data/node_modules/isobject/package.json +74 -0
- data/node_modules/js-tokens/CHANGELOG.md +151 -0
- data/node_modules/js-tokens/LICENSE +21 -0
- data/node_modules/js-tokens/README.md +240 -0
- data/node_modules/js-tokens/index.js +23 -0
- data/node_modules/js-tokens/package.json +30 -0
- data/node_modules/loose-envify/LICENSE +21 -0
- data/node_modules/loose-envify/README.md +45 -0
- data/node_modules/loose-envify/cli.js +16 -0
- data/node_modules/loose-envify/custom.js +4 -0
- data/node_modules/loose-envify/index.js +3 -0
- data/node_modules/loose-envify/loose-envify.js +36 -0
- data/node_modules/loose-envify/package.json +36 -0
- data/node_modules/loose-envify/replace.js +65 -0
- data/node_modules/mdn-data/LICENSE +116 -0
- data/node_modules/mdn-data/README.md +56 -0
- data/node_modules/mdn-data/api/index.js +3 -0
- data/node_modules/mdn-data/api/inheritance.json +2681 -0
- data/node_modules/mdn-data/api/inheritance.schema.json +31 -0
- data/node_modules/mdn-data/css/at-rules.json +560 -0
- data/node_modules/mdn-data/css/at-rules.schema.json +132 -0
- data/node_modules/mdn-data/css/definitions.json +77 -0
- data/node_modules/mdn-data/css/index.js +8 -0
- data/node_modules/mdn-data/css/properties.json +9163 -0
- data/node_modules/mdn-data/css/properties.schema.json +402 -0
- data/node_modules/mdn-data/css/selectors.json +927 -0
- data/node_modules/mdn-data/css/selectors.schema.json +36 -0
- data/node_modules/mdn-data/css/syntaxes.json +761 -0
- data/node_modules/mdn-data/css/syntaxes.schema.json +15 -0
- data/node_modules/mdn-data/css/types.json +265 -0
- data/node_modules/mdn-data/css/types.schema.json +32 -0
- data/node_modules/mdn-data/css/units.json +199 -0
- data/node_modules/mdn-data/css/units.schema.json +28 -0
- data/node_modules/mdn-data/index.js +5 -0
- data/node_modules/mdn-data/l10n/css.json +1567 -0
- data/node_modules/mdn-data/l10n/index.js +3 -0
- data/node_modules/mdn-data/package.json +39 -0
- data/node_modules/nano-css/.circleci/config.yml +85 -0
- data/node_modules/nano-css/.eslintrc.yml +27 -0
- data/node_modules/nano-css/.github/FUNDING.yml +3 -0
- data/node_modules/nano-css/.github/workflows/nodejs.yml +23 -0
- data/node_modules/nano-css/CHANGELOG.md +362 -0
- data/node_modules/nano-css/LICENSE +24 -0
- data/node_modules/nano-css/README.md +70 -0
- data/node_modules/nano-css/addon/__dev__/warnOnMissingDependencies.js +25 -0
- data/node_modules/nano-css/addon/__tests__/__snapshots__/reset.test.js.snap +407 -0
- data/node_modules/nano-css/addon/__tests__/__snapshots__/tachyons.test.js.snap +43 -0
- data/node_modules/nano-css/addon/__tests__/amp.server.dev.test.js +6 -0
- data/node_modules/nano-css/addon/__tests__/amp.server.test.js +223 -0
- data/node_modules/nano-css/addon/__tests__/atoms.dev.test.js +5 -0
- data/node_modules/nano-css/addon/__tests__/atoms.server.dev.test.js +8 -0
- data/node_modules/nano-css/addon/__tests__/atoms.server.test.js +6 -0
- data/node_modules/nano-css/addon/__tests__/atoms.test.js +49 -0
- data/node_modules/nano-css/addon/__tests__/cssom.server.test.js +12 -0
- data/node_modules/nano-css/addon/__tests__/emmet/emmet.dev.test.js +5 -0
- data/node_modules/nano-css/addon/__tests__/emmet/emmet.server.dev.test.js +8 -0
- data/node_modules/nano-css/addon/__tests__/emmet/emmet.server.test.js +6 -0
- data/node_modules/nano-css/addon/__tests__/emmet/emmet.test.js +219 -0
- data/node_modules/nano-css/addon/__tests__/env.js +6 -0
- data/node_modules/nano-css/addon/__tests__/extract.server.test.js +159 -0
- data/node_modules/nano-css/addon/__tests__/index.server.dev.test.js +6 -0
- data/node_modules/nano-css/addon/__tests__/index.server.test.js +4 -0
- data/node_modules/nano-css/addon/__tests__/index.test.js +257 -0
- data/node_modules/nano-css/addon/__tests__/jsx.dev.test.js +5 -0
- data/node_modules/nano-css/addon/__tests__/jsx.server.dev.test.js +6 -0
- data/node_modules/nano-css/addon/__tests__/jsx.server.test.js +4 -0
- data/node_modules/nano-css/addon/__tests__/jsx.test.js +33 -0
- data/node_modules/nano-css/addon/__tests__/keyframes.dev.test.js +5 -0
- data/node_modules/nano-css/addon/__tests__/keyframes.server.dev.test.js +6 -0
- data/node_modules/nano-css/addon/__tests__/keyframes.server.test.js +4 -0
- data/node_modules/nano-css/addon/__tests__/keyframes.test.js +131 -0
- data/node_modules/nano-css/addon/__tests__/limit.server.test.js +54 -0
- data/node_modules/nano-css/addon/__tests__/nesting.test.js +85 -0
- data/node_modules/nano-css/addon/__tests__/prefixer.test.js +121 -0
- data/node_modules/nano-css/addon/__tests__/put.dev.test.js +5 -0
- data/node_modules/nano-css/addon/__tests__/put.server.dev.test.js +6 -0
- data/node_modules/nano-css/addon/__tests__/put.server.test.js +4 -0
- data/node_modules/nano-css/addon/__tests__/put.test.js +75 -0
- data/node_modules/nano-css/addon/__tests__/reset.test.js +38 -0
- data/node_modules/nano-css/addon/__tests__/rule.dev.test.js +5 -0
- data/node_modules/nano-css/addon/__tests__/rule.server.dev.test.js +7 -0
- data/node_modules/nano-css/addon/__tests__/rule.server.test.js +5 -0
- data/node_modules/nano-css/addon/__tests__/rule.test.js +57 -0
- data/node_modules/nano-css/addon/__tests__/setup.js +7 -0
- data/node_modules/nano-css/addon/__tests__/sheet.test.js +74 -0
- data/node_modules/nano-css/addon/__tests__/snake.test.js +124 -0
- data/node_modules/nano-css/addon/__tests__/tachyons.test.js +45 -0
- data/node_modules/nano-css/addon/__tests__/units.dev.test.js +5 -0
- data/node_modules/nano-css/addon/__tests__/units.server.dev.test.js +6 -0
- data/node_modules/nano-css/addon/__tests__/units.server.test.js +4 -0
- data/node_modules/nano-css/addon/__tests__/units.test.js +41 -0
- data/node_modules/nano-css/addon/__tests__/validate.dev.test.js +5 -0
- data/node_modules/nano-css/addon/__tests__/validate.test.js +69 -0
- data/node_modules/nano-css/addon/__tests__/vcssom.server.test.js +14 -0
- data/node_modules/nano-css/addon/__tests__/virtual.dev.test.js +5 -0
- data/node_modules/nano-css/addon/__tests__/virtual.server.dev.test.js +6 -0
- data/node_modules/nano-css/addon/__tests__/virtual.server.test.js +4 -0
- data/node_modules/nano-css/addon/__tests__/virtual.test.js +225 -0
- data/node_modules/nano-css/addon/amp.d.ts +5 -0
- data/node_modules/nano-css/addon/amp.js +156 -0
- data/node_modules/nano-css/addon/animate/fadeIn.js +22 -0
- data/node_modules/nano-css/addon/animate/fadeInDown.js +25 -0
- data/node_modules/nano-css/addon/animate/fadeInScale.js +25 -0
- data/node_modules/nano-css/addon/animate/fadeOut.js +23 -0
- data/node_modules/nano-css/addon/animate/fadeOutScale.js +21 -0
- data/node_modules/nano-css/addon/array.d.ts +5 -0
- data/node_modules/nano-css/addon/array.js +33 -0
- data/node_modules/nano-css/addon/atoms.d.ts +243 -0
- data/node_modules/nano-css/addon/atoms.js +63 -0
- data/node_modules/nano-css/addon/cache.d.ts +8 -0
- data/node_modules/nano-css/addon/cache.js +17 -0
- data/node_modules/nano-css/addon/component.d.ts +7 -0
- data/node_modules/nano-css/addon/component.js +26 -0
- data/node_modules/nano-css/addon/cssom.d.ts +17 -0
- data/node_modules/nano-css/addon/cssom.js +36 -0
- data/node_modules/nano-css/addon/decorator.d.ts +7 -0
- data/node_modules/nano-css/addon/decorator.js +43 -0
- data/node_modules/nano-css/addon/drule.d.ts +8 -0
- data/node_modules/nano-css/addon/drule.js +27 -0
- data/node_modules/nano-css/addon/dsheet.d.ts +8 -0
- data/node_modules/nano-css/addon/dsheet.js +36 -0
- data/node_modules/nano-css/addon/emmet.d.ts +614 -0
- data/node_modules/nano-css/addon/emmet.js +177 -0
- data/node_modules/nano-css/addon/extract.d.ts +5 -0
- data/node_modules/nano-css/addon/extract.js +59 -0
- data/node_modules/nano-css/addon/global.d.ts +8 -0
- data/node_modules/nano-css/addon/global.js +19 -0
- data/node_modules/nano-css/addon/googleFont.d.ts +8 -0
- data/node_modules/nano-css/addon/googleFont.js +43 -0
- data/node_modules/nano-css/addon/hydrate.d.ts +7 -0
- data/node_modules/nano-css/addon/hydrate.js +28 -0
- data/node_modules/nano-css/addon/hyperstyle.js +27 -0
- data/node_modules/nano-css/addon/important.js +38 -0
- data/node_modules/nano-css/addon/jsx.js +60 -0
- data/node_modules/nano-css/addon/keyframes.d.ts +34 -0
- data/node_modules/nano-css/addon/keyframes.js +61 -0
- data/node_modules/nano-css/addon/limit.js +26 -0
- data/node_modules/nano-css/addon/nesting.js +37 -0
- data/node_modules/nano-css/addon/pipe.js +57 -0
- data/node_modules/nano-css/addon/prefixer.js +79 -0
- data/node_modules/nano-css/addon/ref.js +87 -0
- data/node_modules/nano-css/addon/reset/EricMeyer.js +48 -0
- data/node_modules/nano-css/addon/reset/EricMeyerCondensed.js +44 -0
- data/node_modules/nano-css/addon/reset/Minimalistic.js +16 -0
- data/node_modules/nano-css/addon/reset/Minimalistic2.js +17 -0
- data/node_modules/nano-css/addon/reset/Minimalistic3.js +18 -0
- data/node_modules/nano-css/addon/reset/Normalize.js +83 -0
- data/node_modules/nano-css/addon/reset/PoorMan.js +25 -0
- data/node_modules/nano-css/addon/reset/ShaunInman.js +42 -0
- data/node_modules/nano-css/addon/reset/Siolon.js +34 -0
- data/node_modules/nano-css/addon/reset/Tantek.js +31 -0
- data/node_modules/nano-css/addon/reset/Tripoli.js +75 -0
- data/node_modules/nano-css/addon/reset/Universal.js +23 -0
- data/node_modules/nano-css/addon/reset/Yahoo.js +43 -0
- data/node_modules/nano-css/addon/reset-font.js +24 -0
- data/node_modules/nano-css/addon/rtl.js +15 -0
- data/node_modules/nano-css/addon/rule.d.ts +26 -0
- data/node_modules/nano-css/addon/rule.js +39 -0
- data/node_modules/nano-css/addon/sheet.d.ts +22 -0
- data/node_modules/nano-css/addon/sheet.js +45 -0
- data/node_modules/nano-css/addon/snake.js +141 -0
- data/node_modules/nano-css/addon/sourcemaps.js +96 -0
- data/node_modules/nano-css/addon/spread.js +23 -0
- data/node_modules/nano-css/addon/stable.js +7 -0
- data/node_modules/nano-css/addon/style.js +33 -0
- data/node_modules/nano-css/addon/styled.js +161 -0
- data/node_modules/nano-css/addon/stylis/plugin-onRule.js +43 -0
- data/node_modules/nano-css/addon/stylis.js +28 -0
- data/node_modules/nano-css/addon/tachyons.js +215 -0
- data/node_modules/nano-css/addon/unitless.js +78 -0
- data/node_modules/nano-css/addon/units.d.ts +89 -0
- data/node_modules/nano-css/addon/units.js +27 -0
- data/node_modules/nano-css/addon/useStyles.js +24 -0
- data/node_modules/nano-css/addon/util/cloneElement.js +11 -0
- data/node_modules/nano-css/addon/util/transformComponentDynamic.js +50 -0
- data/node_modules/nano-css/addon/util/transformComponentStatic.js +26 -0
- data/node_modules/nano-css/addon/validate.js +82 -0
- data/node_modules/nano-css/addon/vcssom/__tests__/cssToTree.test.js +159 -0
- data/node_modules/nano-css/addon/vcssom/cssToTree.d.ts +15 -0
- data/node_modules/nano-css/addon/vcssom/cssToTree.js +42 -0
- data/node_modules/nano-css/addon/vcssom/removeRule.d.ts +3 -0
- data/node_modules/nano-css/addon/vcssom/removeRule.js +15 -0
- data/node_modules/nano-css/addon/vcssom.d.ts +72 -0
- data/node_modules/nano-css/addon/vcssom.js +97 -0
- data/node_modules/nano-css/addon/virtual.js +107 -0
- data/node_modules/nano-css/addon/withStyles.js +32 -0
- data/node_modules/nano-css/index.d.ts +4 -0
- data/node_modules/nano-css/index.js +138 -0
- data/node_modules/nano-css/package.json +145 -0
- data/node_modules/nano-css/preset/react.js +43 -0
- data/node_modules/nano-css/preset/sheet.d.ts +5 -0
- data/node_modules/nano-css/preset/sheet.js +27 -0
- data/node_modules/nano-css/preset/vdom.js +40 -0
- data/node_modules/nano-css/prettier.config.js +13 -0
- data/node_modules/nano-css/renovate.json +3 -0
- data/node_modules/nano-css/types/common.d.ts +14 -0
- data/node_modules/nano-css/types/demo.ts +7 -0
- data/node_modules/nano-css/types/nano.d.ts +171 -0
- data/node_modules/object-assign/index.js +90 -0
- data/node_modules/object-assign/license +21 -0
- data/node_modules/object-assign/package.json +42 -0
- data/node_modules/object-assign/readme.md +61 -0
- data/node_modules/preact/LICENSE +21 -0
- data/node_modules/preact/README.md +187 -0
- data/node_modules/preact/compat/LICENSE +21 -0
- data/node_modules/preact/compat/dist/compat.js +2 -0
- data/node_modules/preact/compat/dist/compat.js.map +1 -0
- data/node_modules/preact/compat/dist/compat.mjs +2 -0
- data/node_modules/preact/compat/dist/compat.mjs.map +1 -0
- data/node_modules/preact/compat/dist/compat.modern.js +2 -0
- data/node_modules/preact/compat/dist/compat.modern.js.map +1 -0
- data/node_modules/preact/compat/dist/compat.module.js +2 -0
- data/node_modules/preact/compat/dist/compat.module.js.map +1 -0
- data/node_modules/preact/compat/dist/compat.umd.js +2 -0
- data/node_modules/preact/compat/dist/compat.umd.js.map +1 -0
- data/node_modules/preact/compat/jsx-dev-runtime.js +1 -0
- data/node_modules/preact/compat/jsx-dev-runtime.mjs +1 -0
- data/node_modules/preact/compat/jsx-runtime.js +1 -0
- data/node_modules/preact/compat/jsx-runtime.mjs +1 -0
- data/node_modules/preact/compat/package.json +19 -0
- data/node_modules/preact/compat/scheduler.js +15 -0
- data/node_modules/preact/compat/scheduler.mjs +23 -0
- data/node_modules/preact/compat/server.js +15 -0
- data/node_modules/preact/compat/server.mjs +4 -0
- data/node_modules/preact/compat/src/Children.js +21 -0
- data/node_modules/preact/compat/src/PureComponent.js +15 -0
- data/node_modules/preact/compat/src/forwardRef.js +51 -0
- data/node_modules/preact/compat/src/index.d.ts +140 -0
- data/node_modules/preact/compat/src/index.js +187 -0
- data/node_modules/preact/compat/src/internal.d.ts +47 -0
- data/node_modules/preact/compat/src/memo.js +34 -0
- data/node_modules/preact/compat/src/portals.js +80 -0
- data/node_modules/preact/compat/src/render.js +219 -0
- data/node_modules/preact/compat/src/suspense-list.d.ts +14 -0
- data/node_modules/preact/compat/src/suspense-list.js +126 -0
- data/node_modules/preact/compat/src/suspense.d.ts +15 -0
- data/node_modules/preact/compat/src/suspense.js +270 -0
- data/node_modules/preact/compat/src/util.js +28 -0
- data/node_modules/preact/compat/test-utils.js +1 -0
- data/node_modules/preact/debug/LICENSE +21 -0
- data/node_modules/preact/debug/dist/debug.js +2 -0
- data/node_modules/preact/debug/dist/debug.js.map +1 -0
- data/node_modules/preact/debug/dist/debug.mjs +2 -0
- data/node_modules/preact/debug/dist/debug.mjs.map +1 -0
- data/node_modules/preact/debug/dist/debug.modern.js +2 -0
- data/node_modules/preact/debug/dist/debug.modern.js.map +1 -0
- data/node_modules/preact/debug/dist/debug.module.js +2 -0
- data/node_modules/preact/debug/dist/debug.module.js.map +1 -0
- data/node_modules/preact/debug/dist/debug.umd.js +2 -0
- data/node_modules/preact/debug/dist/debug.umd.js.map +1 -0
- data/node_modules/preact/debug/package.json +18 -0
- data/node_modules/preact/debug/src/check-props.js +54 -0
- data/node_modules/preact/debug/src/component-stack.js +146 -0
- data/node_modules/preact/debug/src/constants.js +3 -0
- data/node_modules/preact/debug/src/debug.js +442 -0
- data/node_modules/preact/debug/src/index.js +6 -0
- data/node_modules/preact/debug/src/internal.d.ts +82 -0
- data/node_modules/preact/debug/src/util.js +11 -0
- data/node_modules/preact/devtools/LICENSE +21 -0
- data/node_modules/preact/devtools/dist/devtools.js +2 -0
- data/node_modules/preact/devtools/dist/devtools.js.map +1 -0
- data/node_modules/preact/devtools/dist/devtools.mjs +2 -0
- data/node_modules/preact/devtools/dist/devtools.mjs.map +1 -0
- data/node_modules/preact/devtools/dist/devtools.modern.js +2 -0
- data/node_modules/preact/devtools/dist/devtools.modern.js.map +1 -0
- data/node_modules/preact/devtools/dist/devtools.module.js +2 -0
- data/node_modules/preact/devtools/dist/devtools.module.js.map +1 -0
- data/node_modules/preact/devtools/dist/devtools.umd.js +2 -0
- data/node_modules/preact/devtools/dist/devtools.umd.js.map +1 -0
- data/node_modules/preact/devtools/package.json +16 -0
- data/node_modules/preact/devtools/src/devtools.js +10 -0
- data/node_modules/preact/devtools/src/index.d.ts +8 -0
- data/node_modules/preact/devtools/src/index.js +15 -0
- data/node_modules/preact/dist/preact.js +2 -0
- data/node_modules/preact/dist/preact.js.map +1 -0
- data/node_modules/preact/dist/preact.min.js +2 -0
- data/node_modules/preact/dist/preact.min.js.map +1 -0
- data/node_modules/preact/dist/preact.mjs +2 -0
- data/node_modules/preact/dist/preact.mjs.map +1 -0
- data/node_modules/preact/dist/preact.module.js +2 -0
- data/node_modules/preact/dist/preact.module.js.map +1 -0
- data/node_modules/preact/dist/preact.umd.js +2 -0
- data/node_modules/preact/dist/preact.umd.js.map +1 -0
- data/node_modules/preact/hooks/LICENSE +21 -0
- data/node_modules/preact/hooks/dist/hooks.js +2 -0
- data/node_modules/preact/hooks/dist/hooks.js.map +1 -0
- data/node_modules/preact/hooks/dist/hooks.mjs +2 -0
- data/node_modules/preact/hooks/dist/hooks.mjs.map +1 -0
- data/node_modules/preact/hooks/dist/hooks.modern.js +2 -0
- data/node_modules/preact/hooks/dist/hooks.modern.js.map +1 -0
- data/node_modules/preact/hooks/dist/hooks.module.js +2 -0
- data/node_modules/preact/hooks/dist/hooks.module.js.map +1 -0
- data/node_modules/preact/hooks/dist/hooks.umd.js +2 -0
- data/node_modules/preact/hooks/dist/hooks.umd.js.map +1 -0
- data/node_modules/preact/hooks/package.json +26 -0
- data/node_modules/preact/hooks/src/index.d.ts +133 -0
- data/node_modules/preact/hooks/src/index.js +386 -0
- data/node_modules/preact/hooks/src/internal.d.ts +75 -0
- data/node_modules/preact/jsx-runtime/LICENSE +21 -0
- data/node_modules/preact/jsx-runtime/dist/jsxRuntime.js +2 -0
- data/node_modules/preact/jsx-runtime/dist/jsxRuntime.js.map +1 -0
- data/node_modules/preact/jsx-runtime/dist/jsxRuntime.mjs +2 -0
- data/node_modules/preact/jsx-runtime/dist/jsxRuntime.modern.js +2 -0
- data/node_modules/preact/jsx-runtime/dist/jsxRuntime.modern.js.map +1 -0
- data/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js +2 -0
- data/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js.map +1 -0
- data/node_modules/preact/jsx-runtime/dist/jsxRuntime.umd.js +2 -0
- data/node_modules/preact/jsx-runtime/dist/jsxRuntime.umd.js.map +1 -0
- data/node_modules/preact/jsx-runtime/package.json +19 -0
- data/node_modules/preact/jsx-runtime/src/index.d.ts +50 -0
- data/node_modules/preact/jsx-runtime/src/index.js +77 -0
- data/node_modules/preact/package.json +270 -0
- data/node_modules/preact/src/cjs.js +3 -0
- data/node_modules/preact/src/clone-element.js +34 -0
- data/node_modules/preact/src/component.js +225 -0
- data/node_modules/preact/src/constants.js +3 -0
- data/node_modules/preact/src/create-context.js +68 -0
- data/node_modules/preact/src/create-element.js +97 -0
- data/node_modules/preact/src/diff/catch-error.js +38 -0
- data/node_modules/preact/src/diff/children.js +347 -0
- data/node_modules/preact/src/diff/index.js +514 -0
- data/node_modules/preact/src/diff/props.js +158 -0
- data/node_modules/preact/src/index.d.ts +310 -0
- data/node_modules/preact/src/index.js +13 -0
- data/node_modules/preact/src/internal.d.ts +146 -0
- data/node_modules/preact/src/jsx.d.ts +962 -0
- data/node_modules/preact/src/options.js +16 -0
- data/node_modules/preact/src/render.js +75 -0
- data/node_modules/preact/src/util.js +27 -0
- data/node_modules/preact/test-utils/dist/testUtils.js +2 -0
- data/node_modules/preact/test-utils/dist/testUtils.js.map +1 -0
- data/node_modules/preact/test-utils/dist/testUtils.mjs +2 -0
- data/node_modules/preact/test-utils/dist/testUtils.mjs.map +1 -0
- data/node_modules/preact/test-utils/dist/testUtils.modern.js +2 -0
- data/node_modules/preact/test-utils/dist/testUtils.modern.js.map +1 -0
- data/node_modules/preact/test-utils/dist/testUtils.module.js +2 -0
- data/node_modules/preact/test-utils/dist/testUtils.module.js.map +1 -0
- data/node_modules/preact/test-utils/dist/testUtils.umd.js +2 -0
- data/node_modules/preact/test-utils/dist/testUtils.umd.js.map +1 -0
- data/node_modules/preact/test-utils/package.json +19 -0
- data/node_modules/preact/test-utils/src/index.d.ts +3 -0
- data/node_modules/preact/test-utils/src/index.js +117 -0
- data/node_modules/preact-deep-force-update/.babelrc +8 -0
- data/node_modules/preact-deep-force-update/.eslintrc +66 -0
- data/node_modules/preact-deep-force-update/.npmignore +2 -0
- data/node_modules/preact-deep-force-update/.travis.yml +3 -0
- data/node_modules/preact-deep-force-update/LICENSE +21 -0
- data/node_modules/preact-deep-force-update/README.md +53 -0
- data/node_modules/preact-deep-force-update/dist/deep-force-update.js +36 -0
- data/node_modules/preact-deep-force-update/dist/deep-force-update.js.map +1 -0
- data/node_modules/preact-deep-force-update/dist/deep-force-update.min.js +2 -0
- data/node_modules/preact-deep-force-update/dist/deep-force-update.min.js.map +1 -0
- data/node_modules/preact-deep-force-update/karma.conf.js +32 -0
- data/node_modules/preact-deep-force-update/package.json +80 -0
- data/node_modules/preact-deep-force-update/rollup.config.js +17 -0
- data/node_modules/preact-deep-force-update/src/index.js +27 -0
- data/node_modules/preact-deep-force-update/test/index.js +50 -0
- data/node_modules/preact-render-to-string/LICENSE +21 -0
- data/node_modules/preact-render-to-string/README.md +102 -0
- data/node_modules/preact-render-to-string/dist/commonjs.js +2 -0
- data/node_modules/preact-render-to-string/dist/commonjs.js.map +1 -0
- data/node_modules/preact-render-to-string/dist/index.d.ts +16 -0
- data/node_modules/preact-render-to-string/dist/index.js +1 -0
- data/node_modules/preact-render-to-string/dist/index.js.map +1 -0
- data/node_modules/preact-render-to-string/dist/index.mjs +2 -0
- data/node_modules/preact-render-to-string/dist/index.module.js +2 -0
- data/node_modules/preact-render-to-string/dist/index.module.js.map +1 -0
- data/node_modules/preact-render-to-string/dist/jsx-entry.js +2 -0
- data/node_modules/preact-render-to-string/dist/jsx-entry.js.map +1 -0
- data/node_modules/preact-render-to-string/dist/jsx.d.ts +13 -0
- data/node_modules/preact-render-to-string/dist/jsx.js +1 -0
- data/node_modules/preact-render-to-string/dist/jsx.js.map +1 -0
- data/node_modules/preact-render-to-string/dist/jsx.mjs +2 -0
- data/node_modules/preact-render-to-string/dist/jsx.modern.js +2 -0
- data/node_modules/preact-render-to-string/dist/jsx.modern.js.map +1 -0
- data/node_modules/preact-render-to-string/dist/jsx.module.js +2 -0
- data/node_modules/preact-render-to-string/dist/jsx.module.js.map +1 -0
- data/node_modules/preact-render-to-string/dist/preact-render-to-string-tests.d.ts +1 -0
- data/node_modules/preact-render-to-string/jsx.js +1 -0
- data/node_modules/preact-render-to-string/package.json +139 -0
- data/node_modules/preact-render-to-string/src/index.d.ts +16 -0
- data/node_modules/preact-render-to-string/src/index.js +438 -0
- data/node_modules/preact-render-to-string/src/jsx.d.ts +13 -0
- data/node_modules/preact-render-to-string/src/jsx.js +76 -0
- data/node_modules/preact-render-to-string/src/polyfills.js +8 -0
- data/node_modules/preact-render-to-string/src/preact-render-to-string-tests.d.ts +1 -0
- data/node_modules/preact-render-to-string/src/util.js +78 -0
- data/node_modules/preact-render-to-string/typings.json +5 -0
- data/node_modules/pretty-format/.npmignore +3 -0
- data/node_modules/pretty-format/LICENSE.md +15 -0
- data/node_modules/pretty-format/README.md +94 -0
- data/node_modules/pretty-format/index.js +343 -0
- data/node_modules/pretty-format/package.json +26 -0
- data/node_modules/pretty-format/plugins/ReactElement.js +74 -0
- data/node_modules/pretty-format/plugins/ReactTestComponent.js +58 -0
- data/node_modules/pretty-format/printString.js +7 -0
- data/node_modules/react/LICENSE +21 -0
- data/node_modules/react/README.md +13 -0
- data/node_modules/react/build-info.json +8 -0
- data/node_modules/react/cjs/react-jsx-dev-runtime.development.js +1203 -0
- data/node_modules/react/cjs/react-jsx-dev-runtime.production.min.js +9 -0
- data/node_modules/react/cjs/react-jsx-dev-runtime.profiling.min.js +9 -0
- data/node_modules/react/cjs/react-jsx-runtime.development.js +1221 -0
- data/node_modules/react/cjs/react-jsx-runtime.production.min.js +10 -0
- data/node_modules/react/cjs/react-jsx-runtime.profiling.min.js +10 -0
- data/node_modules/react/cjs/react.development.js +2333 -0
- data/node_modules/react/cjs/react.production.min.js +23 -0
- data/node_modules/react/index.js +7 -0
- data/node_modules/react/jsx-dev-runtime.js +7 -0
- data/node_modules/react/jsx-runtime.js +7 -0
- data/node_modules/react/package.json +39 -0
- data/node_modules/react/umd/react.development.js +3357 -0
- data/node_modules/react/umd/react.production.min.js +31 -0
- data/node_modules/react/umd/react.profiling.min.js +36 -0
- data/node_modules/react-dom/LICENSE +21 -0
- data/node_modules/react-dom/README.md +54 -0
- data/node_modules/react-dom/build-info.json +8 -0
- data/node_modules/react-dom/cjs/react-dom-server.browser.development.js +4342 -0
- data/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js +51 -0
- data/node_modules/react-dom/cjs/react-dom-server.node.development.js +4383 -0
- data/node_modules/react-dom/cjs/react-dom-server.node.production.min.js +52 -0
- data/node_modules/react-dom/cjs/react-dom-test-utils.development.js +2118 -0
- data/node_modules/react-dom/cjs/react-dom-test-utils.production.min.js +43 -0
- data/node_modules/react-dom/cjs/react-dom.development.js +26262 -0
- data/node_modules/react-dom/cjs/react-dom.production.min.js +297 -0
- data/node_modules/react-dom/cjs/react-dom.profiling.min.js +310 -0
- data/node_modules/react-dom/index.js +38 -0
- data/node_modules/react-dom/package.json +49 -0
- data/node_modules/react-dom/profiling.js +38 -0
- data/node_modules/react-dom/server.browser.js +7 -0
- data/node_modules/react-dom/server.js +3 -0
- data/node_modules/react-dom/server.node.js +7 -0
- data/node_modules/react-dom/test-utils.js +7 -0
- data/node_modules/react-dom/umd/react-dom-server.browser.development.js +4341 -0
- data/node_modules/react-dom/umd/react-dom-server.browser.production.min.js +46 -0
- data/node_modules/react-dom/umd/react-dom-test-utils.development.js +2136 -0
- data/node_modules/react-dom/umd/react-dom-test-utils.production.min.js +35 -0
- data/node_modules/react-dom/umd/react-dom.development.js +26292 -0
- data/node_modules/react-dom/umd/react-dom.production.min.js +245 -0
- data/node_modules/react-dom/umd/react-dom.profiling.min.js +252 -0
- data/node_modules/regenerator-runtime/LICENSE +21 -0
- data/node_modules/regenerator-runtime/README.md +31 -0
- data/node_modules/regenerator-runtime/package.json +19 -0
- data/node_modules/regenerator-runtime/path.js +11 -0
- data/node_modules/regenerator-runtime/runtime.js +754 -0
- data/node_modules/rtl-css-js/CHANGELOG.md +5 -0
- data/node_modules/rtl-css-js/LICENSE +20 -0
- data/node_modules/rtl-css-js/README.md +205 -0
- data/node_modules/rtl-css-js/core/package.json +6 -0
- data/node_modules/rtl-css-js/core.d.ts +163 -0
- data/node_modules/rtl-css-js/core.esm.d.ts +1 -0
- data/node_modules/rtl-css-js/core.esm.js +9 -0
- data/node_modules/rtl-css-js/dist/cjs/convert-a10c80e3.js +509 -0
- data/node_modules/rtl-css-js/dist/cjs/core.js +30 -0
- data/node_modules/rtl-css-js/dist/cjs/index.js +7 -0
- data/node_modules/rtl-css-js/dist/esm/convert-09159978.js +487 -0
- data/node_modules/rtl-css-js/dist/esm/core.js +1 -0
- data/node_modules/rtl-css-js/dist/esm/index.js +5 -0
- data/node_modules/rtl-css-js/dist/rtl-css-js.core.umd.js +519 -0
- data/node_modules/rtl-css-js/dist/rtl-css-js.core.umd.js.map +1 -0
- data/node_modules/rtl-css-js/dist/rtl-css-js.core.umd.min.js +2 -0
- data/node_modules/rtl-css-js/dist/rtl-css-js.core.umd.min.js.map +1 -0
- data/node_modules/rtl-css-js/dist/rtl-css-js.umd.js +496 -0
- data/node_modules/rtl-css-js/dist/rtl-css-js.umd.js.map +1 -0
- data/node_modules/rtl-css-js/dist/rtl-css-js.umd.min.js +2 -0
- data/node_modules/rtl-css-js/dist/rtl-css-js.umd.min.js.map +1 -0
- data/node_modules/rtl-css-js/package.json +66 -0
- data/node_modules/rtl-css-js/types.d.ts +8 -0
- data/node_modules/scheduler/LICENSE +21 -0
- data/node_modules/scheduler/README.md +9 -0
- data/node_modules/scheduler/build-info.json +8 -0
- data/node_modules/scheduler/cjs/scheduler-tracing.development.js +347 -0
- data/node_modules/scheduler/cjs/scheduler-tracing.production.min.js +9 -0
- data/node_modules/scheduler/cjs/scheduler-tracing.profiling.min.js +16 -0
- data/node_modules/scheduler/cjs/scheduler-unstable_mock.development.js +665 -0
- data/node_modules/scheduler/cjs/scheduler-unstable_mock.production.min.js +19 -0
- data/node_modules/scheduler/cjs/scheduler-unstable_post_task.development.js +206 -0
- data/node_modules/scheduler/cjs/scheduler-unstable_post_task.production.min.js +13 -0
- data/node_modules/scheduler/cjs/scheduler.development.js +646 -0
- data/node_modules/scheduler/cjs/scheduler.production.min.js +20 -0
- data/node_modules/scheduler/index.js +7 -0
- data/node_modules/scheduler/package.json +40 -0
- data/node_modules/scheduler/tracing-profiling.js +7 -0
- data/node_modules/scheduler/tracing.js +7 -0
- data/node_modules/scheduler/umd/scheduler-tracing.development.js +80 -0
- data/node_modules/scheduler/umd/scheduler-tracing.production.min.js +80 -0
- data/node_modules/scheduler/umd/scheduler-tracing.profiling.min.js +80 -0
- data/node_modules/scheduler/umd/scheduler-unstable_mock.development.js +664 -0
- data/node_modules/scheduler/umd/scheduler-unstable_mock.production.min.js +18 -0
- data/node_modules/scheduler/umd/scheduler.development.js +152 -0
- data/node_modules/scheduler/umd/scheduler.production.min.js +146 -0
- data/node_modules/scheduler/umd/scheduler.profiling.min.js +146 -0
- data/node_modules/scheduler/unstable_mock.js +7 -0
- data/node_modules/scheduler/unstable_post_task.js +7 -0
- data/node_modules/source-map/CHANGELOG.md +301 -0
- data/node_modules/source-map/LICENSE +28 -0
- data/node_modules/source-map/README.md +742 -0
- data/node_modules/source-map/dist/source-map.debug.js +3234 -0
- data/node_modules/source-map/dist/source-map.js +3233 -0
- data/node_modules/source-map/dist/source-map.min.js +2 -0
- data/node_modules/source-map/dist/source-map.min.js.map +1 -0
- data/node_modules/source-map/lib/array-set.js +121 -0
- data/node_modules/source-map/lib/base64-vlq.js +140 -0
- data/node_modules/source-map/lib/base64.js +67 -0
- data/node_modules/source-map/lib/binary-search.js +111 -0
- data/node_modules/source-map/lib/mapping-list.js +79 -0
- data/node_modules/source-map/lib/quick-sort.js +114 -0
- data/node_modules/source-map/lib/source-map-consumer.js +1145 -0
- data/node_modules/source-map/lib/source-map-generator.js +425 -0
- data/node_modules/source-map/lib/source-node.js +413 -0
- data/node_modules/source-map/lib/util.js +488 -0
- data/node_modules/source-map/package.json +73 -0
- data/node_modules/source-map/source-map.d.ts +98 -0
- data/node_modules/source-map/source-map.js +8 -0
- data/node_modules/sourcemap-codec/CHANGELOG.md +64 -0
- data/node_modules/sourcemap-codec/LICENSE +21 -0
- data/node_modules/sourcemap-codec/README.md +63 -0
- data/node_modules/sourcemap-codec/dist/sourcemap-codec.es.js +124 -0
- data/node_modules/sourcemap-codec/dist/sourcemap-codec.es.js.map +1 -0
- data/node_modules/sourcemap-codec/dist/sourcemap-codec.umd.js +135 -0
- data/node_modules/sourcemap-codec/dist/sourcemap-codec.umd.js.map +1 -0
- data/node_modules/sourcemap-codec/dist/types/sourcemap-codec.d.ts +5 -0
- data/node_modules/sourcemap-codec/package.json +53 -0
- data/node_modules/stack-generator/.eslintrc.yml +32 -0
- data/node_modules/stack-generator/CHANGELOG.md +18 -0
- data/node_modules/stack-generator/CONTRIBUTING.md +27 -0
- data/node_modules/stack-generator/LICENSE +19 -0
- data/node_modules/stack-generator/README.md +28 -0
- data/node_modules/stack-generator/bower.json +33 -0
- data/node_modules/stack-generator/component.json +17 -0
- data/node_modules/stack-generator/dist/stack-generator.js +45 -0
- data/node_modules/stack-generator/dist/stack-generator.min.js +2 -0
- data/node_modules/stack-generator/dist/stack-generator.min.js.map +1 -0
- data/node_modules/stack-generator/karma.conf.ci.js +108 -0
- data/node_modules/stack-generator/karma.conf.js +26 -0
- data/node_modules/stack-generator/package.json +53 -0
- data/node_modules/stack-generator/stack-generator.js +45 -0
- data/node_modules/stackframe/.eslintrc.yml +29 -0
- data/node_modules/stackframe/CHANGELOG.md +39 -0
- data/node_modules/stackframe/CONTRIBUTING.md +28 -0
- data/node_modules/stackframe/LICENSE +19 -0
- data/node_modules/stackframe/README.md +78 -0
- data/node_modules/stackframe/bower.json +31 -0
- data/node_modules/stackframe/component.json +16 -0
- data/node_modules/stackframe/dist/stackframe.js +143 -0
- data/node_modules/stackframe/dist/stackframe.min.js +2 -0
- data/node_modules/stackframe/dist/stackframe.min.js.map +1 -0
- data/node_modules/stackframe/karma.conf.ci.js +105 -0
- data/node_modules/stackframe/karma.conf.js +23 -0
- data/node_modules/stackframe/package.json +51 -0
- data/node_modules/stackframe/stackframe-tests.ts +47 -0
- data/node_modules/stackframe/stackframe.d.ts +74 -0
- data/node_modules/stackframe/stackframe.js +143 -0
- data/node_modules/stacktrace-gps/CHANGELOG.md +60 -0
- data/node_modules/stacktrace-gps/LICENSE +19 -0
- data/node_modules/stacktrace-gps/README.md +89 -0
- data/node_modules/stacktrace-gps/dist/polyfills.js +5 -0
- data/node_modules/stacktrace-gps/dist/stacktrace-gps-with-polyfills.min.js +2 -0
- data/node_modules/stacktrace-gps/dist/stacktrace-gps-with-polyfills.min.js.map +1 -0
- data/node_modules/stacktrace-gps/dist/stacktrace-gps.js +342 -0
- data/node_modules/stacktrace-gps/dist/stacktrace-gps.min.js +2 -0
- data/node_modules/stacktrace-gps/dist/stacktrace-gps.min.js.map +1 -0
- data/node_modules/stacktrace-gps/node_modules/source-map/CHANGELOG.md +301 -0
- data/node_modules/stacktrace-gps/node_modules/source-map/LICENSE +28 -0
- data/node_modules/stacktrace-gps/node_modules/source-map/README.md +729 -0
- data/node_modules/stacktrace-gps/node_modules/source-map/dist/source-map.debug.js +3056 -0
- data/node_modules/stacktrace-gps/node_modules/source-map/dist/source-map.js +3055 -0
- data/node_modules/stacktrace-gps/node_modules/source-map/dist/source-map.min.js +2 -0
- data/node_modules/stacktrace-gps/node_modules/source-map/dist/source-map.min.js.map +1 -0
- data/node_modules/stacktrace-gps/node_modules/source-map/lib/array-set.js +104 -0
- data/node_modules/stacktrace-gps/node_modules/source-map/lib/base64-vlq.js +140 -0
- data/node_modules/stacktrace-gps/node_modules/source-map/lib/base64.js +67 -0
- data/node_modules/stacktrace-gps/node_modules/source-map/lib/binary-search.js +111 -0
- data/node_modules/stacktrace-gps/node_modules/source-map/lib/mapping-list.js +79 -0
- data/node_modules/stacktrace-gps/node_modules/source-map/lib/quick-sort.js +114 -0
- data/node_modules/stacktrace-gps/node_modules/source-map/lib/source-map-consumer.js +1082 -0
- data/node_modules/stacktrace-gps/node_modules/source-map/lib/source-map-generator.js +404 -0
- data/node_modules/stacktrace-gps/node_modules/source-map/lib/source-node.js +407 -0
- data/node_modules/stacktrace-gps/node_modules/source-map/lib/util.js +417 -0
- data/node_modules/stacktrace-gps/node_modules/source-map/package.json +71 -0
- data/node_modules/stacktrace-gps/node_modules/source-map/source-map.js +8 -0
- data/node_modules/stacktrace-gps/package.json +66 -0
- data/node_modules/stacktrace-gps/stacktrace-gps.js +342 -0
- data/node_modules/stacktrace-js/CHANGELOG.md +97 -0
- data/node_modules/stacktrace-js/LICENSE +19 -0
- data/node_modules/stacktrace-js/README.md +186 -0
- data/node_modules/stacktrace-js/dist/stacktrace-with-promises-and-json-polyfills.js +5405 -0
- data/node_modules/stacktrace-js/dist/stacktrace-with-promises-and-json-polyfills.min.js +3 -0
- data/node_modules/stacktrace-js/dist/stacktrace-with-promises-and-json-polyfills.min.js.map +1 -0
- data/node_modules/stacktrace-js/dist/stacktrace.js +3025 -0
- data/node_modules/stacktrace-js/dist/stacktrace.min.js +2 -0
- data/node_modules/stacktrace-js/dist/stacktrace.min.js.map +1 -0
- data/node_modules/stacktrace-js/package.json +82 -0
- data/node_modules/stacktrace-js/stacktrace-js.d.ts +134 -0
- data/node_modules/stacktrace-js/stacktrace.js +227 -0
- data/node_modules/stylis/LICENSE +21 -0
- data/node_modules/stylis/README.md +152 -0
- data/node_modules/stylis/dist/stylis.mjs +2 -0
- data/node_modules/stylis/dist/stylis.mjs.map +1 -0
- data/node_modules/stylis/dist/umd/package.json +1 -0
- data/node_modules/stylis/dist/umd/stylis.js +2 -0
- data/node_modules/stylis/dist/umd/stylis.js.map +1 -0
- data/node_modules/stylis/index.js +7 -0
- data/node_modules/stylis/package.json +164 -0
- data/node_modules/stylis/src/Enum.js +20 -0
- data/node_modules/stylis/src/Middleware.js +107 -0
- data/node_modules/stylis/src/Parser.js +184 -0
- data/node_modules/stylis/src/Prefixer.js +119 -0
- data/node_modules/stylis/src/Serializer.js +34 -0
- data/node_modules/stylis/src/Tokenizer.js +244 -0
- data/node_modules/stylis/src/Utility.js +109 -0
- data/node_modules/wouter-preact/cjs/index.js +180 -0
- data/node_modules/wouter-preact/cjs/matcher.js +72 -0
- data/node_modules/wouter-preact/cjs/package.json +1 -0
- data/node_modules/wouter-preact/cjs/react-deps.js +75 -0
- data/node_modules/wouter-preact/cjs/static-location.js +21 -0
- data/node_modules/wouter-preact/cjs/use-location.js +94 -0
- data/node_modules/wouter-preact/index.d.ts +110 -0
- data/node_modules/wouter-preact/index.js +178 -0
- data/node_modules/wouter-preact/matcher.d.ts +30 -0
- data/node_modules/wouter-preact/matcher.js +66 -0
- data/node_modules/wouter-preact/package.json +33 -0
- data/node_modules/wouter-preact/react-deps.js +15 -0
- data/node_modules/wouter-preact/static-location.d.ts +16 -0
- data/node_modules/wouter-preact/static-location.js +17 -0
- data/node_modules/wouter-preact/use-location.d.ts +43 -0
- data/node_modules/wouter-preact/use-location.js +86 -0
- data/package.json +10 -0
- metadata +1097 -24
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"rtl-css-js.core.umd.js","sources":["../src/internal/utils.js","../src/internal/property-value-converters.js","../src/internal/convert.js"],"sourcesContent":["/**\n * Takes an array of [keyValue1, keyValue2] pairs and creates an object of {keyValue1: keyValue2, keyValue2: keyValue1}\n * @param {Array} array the array of pairs\n * @return {Object} the {key, value} pair object\n */\nfunction arrayToObject(array) {\n return array.reduce((obj, [prop1, prop2]) => {\n obj[prop1] = prop2\n obj[prop2] = prop1\n return obj\n }, {})\n}\n\nfunction isBoolean(val) {\n return typeof val === 'boolean'\n}\n\nfunction isFunction(val) {\n return typeof val === 'function'\n}\n\nfunction isNumber(val) {\n return typeof val === 'number'\n}\n\nfunction isNullOrUndefined(val) {\n return val === null || typeof val === 'undefined'\n}\n\nfunction isObject(val) {\n return val && typeof val === 'object'\n}\n\nfunction isString(val) {\n return typeof val === 'string'\n}\n\nfunction includes(inclusive, inclusee) {\n return inclusive.indexOf(inclusee) !== -1\n}\n\n/**\n * Flip the sign of a CSS value, possibly with a unit.\n *\n * We can't just negate the value with unary minus due to the units.\n *\n * @private\n * @param {String} value - the original value (for example 77%)\n * @return {String} the result (for example -77%)\n */\nfunction flipSign(value) {\n if (parseFloat(value) === 0) {\n // Don't mangle zeroes\n return value\n }\n\n if (value[0] === '-') {\n return value.slice(1)\n }\n\n return `-${value}`\n}\n\nfunction flipTransformSign(match, prefix, offset, suffix) {\n return prefix + flipSign(offset) + suffix\n}\n\n/**\n * Takes a percentage for background position and inverts it.\n * This was copied and modified from CSSJanus:\n * https://github.com/cssjanus/cssjanus/blob/4245f834365f6cfb0239191a151432fb85abab23/src/cssjanus.js#L152-L175\n * @param {String} value - the original value (for example 77%)\n * @return {String} the result (for example 23%)\n */\nfunction calculateNewBackgroundPosition(value) {\n const idx = value.indexOf('.')\n if (idx === -1) {\n value = `${100 - parseFloat(value)}%`\n } else {\n // Two off, one for the \"%\" at the end, one for the dot itself\n const len = value.length - idx - 2\n value = 100 - parseFloat(value)\n value = `${value.toFixed(len)}%`\n }\n return value\n}\n\n/**\n * This takes a list of CSS values and converts it to an array\n * @param {String} value - something like `1px`, `1px 2em`, or `3pt rgb(150, 230, 550) 40px calc(100% - 5px)`\n * @return {Array} the split values (for example: `['3pt', 'rgb(150, 230, 550)', '40px', 'calc(100% - 5px)']`)\n */\nfunction getValuesAsList(value) {\n return (\n value\n .replace(/ +/g, ' ') // remove all extraneous spaces\n .split(' ')\n .map(i => i.trim()) // get rid of extra space before/after each item\n .filter(Boolean) // get rid of empty strings\n // join items which are within parenthese\n // luckily `calc (100% - 5px)` is invalid syntax and it must be `calc(100% - 5px)`, otherwise this would be even more complex\n .reduce(\n ({list, state}, item) => {\n const openParansCount = (item.match(/\\(/g) || []).length\n const closedParansCount = (item.match(/\\)/g) || []).length\n if (state.parensDepth > 0) {\n list[list.length - 1] = `${list[list.length - 1]} ${item}`\n } else {\n list.push(item)\n }\n state.parensDepth += openParansCount - closedParansCount\n return {list, state}\n },\n {list: [], state: {parensDepth: 0}},\n ).list\n )\n}\n\n/**\n * This is intended for properties that are `top right bottom left` and will switch them to `top left bottom right`\n * @param {String} value - `1px 2px 3px 4px` for example, but also handles cases where there are too few/too many and\n * simply returns the value in those cases (which is the correct behavior)\n * @return {String} the result - `1px 4px 3px 2px` for example.\n */\nfunction handleQuartetValues(value) {\n const splitValues = getValuesAsList(value)\n if (splitValues.length <= 3 || splitValues.length > 4) {\n return value\n }\n const [top, right, bottom, left] = splitValues\n return [top, left, bottom, right].join(' ')\n}\n\nexport {\n arrayToObject,\n calculateNewBackgroundPosition,\n flipTransformSign as calculateNewTranslate,\n flipTransformSign,\n flipSign,\n handleQuartetValues,\n includes,\n isBoolean,\n isFunction,\n isNullOrUndefined,\n isNumber,\n isObject,\n isString,\n getValuesAsList,\n}\n","import {\n includes,\n isNumber,\n calculateNewBackgroundPosition,\n flipTransformSign,\n handleQuartetValues,\n getValuesAsList,\n} from './utils'\n\n// some values require a little fudging, that fudging goes here.\nconst propertyValueConverters = {\n padding({value}) {\n if (isNumber(value)) {\n return value\n }\n return handleQuartetValues(value)\n },\n textShadow({value}) {\n // intentionally leaving off the `g` flag here because we only want to change the first number (which is the offset-x)\n return value.replace(/(-*)([.|\\d]+)/, (match, negative, number) => {\n if (number === '0') {\n return match\n }\n const doubleNegative = negative === '' ? '-' : ''\n return `${doubleNegative}${number}`\n })\n },\n borderColor({value}) {\n return handleQuartetValues(value)\n },\n borderRadius({value}) {\n if (isNumber(value)) {\n return value\n }\n if (includes(value, '/')) {\n const [radius1, radius2] = value.split('/')\n const convertedRadius1 = propertyValueConverters.borderRadius({\n value: radius1.trim(),\n })\n const convertedRadius2 = propertyValueConverters.borderRadius({\n value: radius2.trim(),\n })\n return `${convertedRadius1} / ${convertedRadius2}`\n }\n const splitValues = getValuesAsList(value)\n switch (splitValues.length) {\n case 2: {\n return splitValues.reverse().join(' ')\n }\n case 4: {\n const [topLeft, topRight, bottomRight, bottomLeft] = splitValues\n return [topRight, topLeft, bottomLeft, bottomRight].join(' ')\n }\n default: {\n return value\n }\n }\n },\n background({\n value,\n valuesToConvert,\n isRtl,\n bgImgDirectionRegex,\n bgPosDirectionRegex,\n }) {\n if (isNumber(value)) {\n return value\n }\n\n // Yeah, this is in need of a refactor 🙃...\n // but this property is a tough cookie 🍪\n // get the backgroundPosition out of the string by removing everything that couldn't be the backgroundPosition value\n const backgroundPositionValue = value\n .replace(\n /(url\\(.*?\\))|(rgba?\\(.*?\\))|(hsl\\(.*?\\))|(#[a-fA-F0-9]+)|((^| )(\\D)+( |$))/g,\n '',\n )\n .trim()\n // replace that backgroundPosition value with the converted version\n value = value.replace(\n backgroundPositionValue,\n propertyValueConverters.backgroundPosition({\n value: backgroundPositionValue,\n valuesToConvert,\n isRtl,\n bgPosDirectionRegex,\n }),\n )\n // do the backgroundImage value replacing on the whole value (because why not?)\n return propertyValueConverters.backgroundImage({\n value,\n valuesToConvert,\n bgImgDirectionRegex,\n })\n },\n backgroundImage({value, valuesToConvert, bgImgDirectionRegex}) {\n if (!includes(value, 'url(') && !includes(value, 'linear-gradient(')) {\n return value\n }\n return value.replace(bgImgDirectionRegex, (match, g1, group2) => {\n return match.replace(group2, valuesToConvert[group2])\n })\n },\n backgroundPosition({value, valuesToConvert, isRtl, bgPosDirectionRegex}) {\n return (\n value\n // intentionally only grabbing the first instance of this because that represents `left`\n .replace(isRtl ? /^((-|\\d|\\.)+%)/ : null, (match, group) =>\n calculateNewBackgroundPosition(group),\n )\n .replace(bgPosDirectionRegex, match => valuesToConvert[match])\n )\n },\n backgroundPositionX({value, valuesToConvert, isRtl, bgPosDirectionRegex}) {\n if (isNumber(value)) {\n return value\n }\n return propertyValueConverters.backgroundPosition({\n value,\n valuesToConvert,\n isRtl,\n bgPosDirectionRegex,\n })\n },\n transition({value, propertiesToConvert}) {\n return value\n .split(/,\\s*/g)\n .map(transition => {\n const values = transition.split(' ')\n\n // Property is always defined first\n values[0] = propertiesToConvert[values[0]] || values[0]\n\n return values.join(' ')\n })\n .join(', ')\n },\n transitionProperty({value, propertiesToConvert}) {\n return value\n .split(/,\\s*/g)\n .map(prop => propertiesToConvert[prop] || prop)\n .join(', ')\n },\n transform({value}) {\n // This was copied and modified from CSSJanus:\n // https://github.com/cssjanus/cssjanus/blob/4a40f001b1ba35567112d8b8e1d9d95eda4234c3/src/cssjanus.js#L152-L153\n const nonAsciiPattern = '[^\\\\u0020-\\\\u007e]'\n const unicodePattern = '(?:(?:\\\\[0-9a-f]{1,6})(?:\\\\r\\\\n|\\\\s)?)'\n const numPattern = '(?:[0-9]*\\\\.[0-9]+|[0-9]+)'\n const unitPattern = '(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)'\n const escapePattern = `(?:${unicodePattern}|\\\\\\\\[^\\\\r\\\\n\\\\f0-9a-f])`\n const nmstartPattern = `(?:[_a-z]|${nonAsciiPattern}|${escapePattern})`\n const nmcharPattern = `(?:[_a-z0-9-]|${nonAsciiPattern}|${escapePattern})`\n const identPattern = `-?${nmstartPattern}${nmcharPattern}*`\n const quantPattern = `${numPattern}(?:\\\\s*${unitPattern}|${identPattern})?`\n const signedQuantPattern = `((?:-?${quantPattern})|(?:inherit|auto))`\n const translateXRegExp = new RegExp(\n `(translateX\\\\s*\\\\(\\\\s*)${signedQuantPattern}(\\\\s*\\\\))`,\n 'gi',\n )\n const translateRegExp = new RegExp(\n `(translate\\\\s*\\\\(\\\\s*)${signedQuantPattern}((?:\\\\s*,\\\\s*${signedQuantPattern}){0,1}\\\\s*\\\\))`,\n 'gi',\n )\n const translate3dRegExp = new RegExp(\n `(translate3d\\\\s*\\\\(\\\\s*)${signedQuantPattern}((?:\\\\s*,\\\\s*${signedQuantPattern}){0,2}\\\\s*\\\\))`,\n 'gi',\n )\n const rotateRegExp = new RegExp(\n `(rotate[ZY]?\\\\s*\\\\(\\\\s*)${signedQuantPattern}(\\\\s*\\\\))`,\n 'gi',\n )\n return value\n .replace(translateXRegExp, flipTransformSign)\n .replace(translateRegExp, flipTransformSign)\n .replace(translate3dRegExp, flipTransformSign)\n .replace(rotateRegExp, flipTransformSign)\n },\n}\n\npropertyValueConverters.objectPosition =\n propertyValueConverters.backgroundPosition\npropertyValueConverters.margin = propertyValueConverters.padding\npropertyValueConverters.borderWidth = propertyValueConverters.padding\npropertyValueConverters.boxShadow = propertyValueConverters.textShadow\npropertyValueConverters.webkitBoxShadow = propertyValueConverters.boxShadow\npropertyValueConverters.mozBoxShadow = propertyValueConverters.boxShadow\npropertyValueConverters.WebkitBoxShadow = propertyValueConverters.boxShadow\npropertyValueConverters.MozBoxShadow = propertyValueConverters.boxShadow\npropertyValueConverters.borderStyle = propertyValueConverters.borderColor\npropertyValueConverters.webkitTransform = propertyValueConverters.transform\npropertyValueConverters.mozTransform = propertyValueConverters.transform\npropertyValueConverters.WebkitTransform = propertyValueConverters.transform\npropertyValueConverters.MozTransform = propertyValueConverters.transform\npropertyValueConverters.transformOrigin =\n propertyValueConverters.backgroundPosition\npropertyValueConverters.webkitTransformOrigin =\n propertyValueConverters.transformOrigin\npropertyValueConverters.mozTransformOrigin =\n propertyValueConverters.transformOrigin\npropertyValueConverters.WebkitTransformOrigin =\n propertyValueConverters.transformOrigin\npropertyValueConverters.MozTransformOrigin =\n propertyValueConverters.transformOrigin\npropertyValueConverters.webkitTransition = propertyValueConverters.transition\npropertyValueConverters.mozTransition = propertyValueConverters.transition\npropertyValueConverters.WebkitTransition = propertyValueConverters.transition\npropertyValueConverters.MozTransition = propertyValueConverters.transition\npropertyValueConverters.webkitTransitionProperty =\n propertyValueConverters.transitionProperty\npropertyValueConverters.mozTransitionProperty =\n propertyValueConverters.transitionProperty\npropertyValueConverters.WebkitTransitionProperty =\n propertyValueConverters.transitionProperty\npropertyValueConverters.MozTransitionProperty =\n propertyValueConverters.transitionProperty\n\n// kebab-case versions\n\npropertyValueConverters['text-shadow'] = propertyValueConverters.textShadow\npropertyValueConverters['border-color'] = propertyValueConverters.borderColor\npropertyValueConverters['border-radius'] = propertyValueConverters.borderRadius\npropertyValueConverters['background-image'] =\n propertyValueConverters.backgroundImage\npropertyValueConverters['background-position'] =\n propertyValueConverters.backgroundPosition\npropertyValueConverters['background-position-x'] =\n propertyValueConverters.backgroundPositionX\npropertyValueConverters['object-position'] =\n propertyValueConverters.objectPosition\npropertyValueConverters['border-width'] = propertyValueConverters.padding\npropertyValueConverters['box-shadow'] = propertyValueConverters.textShadow\npropertyValueConverters['-webkit-box-shadow'] =\n propertyValueConverters.textShadow\npropertyValueConverters['-moz-box-shadow'] = propertyValueConverters.textShadow\npropertyValueConverters['border-style'] = propertyValueConverters.borderColor\npropertyValueConverters['-webkit-transform'] = propertyValueConverters.transform\npropertyValueConverters['-moz-transform'] = propertyValueConverters.transform\npropertyValueConverters['transform-origin'] =\n propertyValueConverters.transformOrigin\npropertyValueConverters['-webkit-transform-origin'] =\n propertyValueConverters.transformOrigin\npropertyValueConverters['-moz-transform-origin'] =\n propertyValueConverters.transformOrigin\npropertyValueConverters['-webkit-transition'] =\n propertyValueConverters.transition\npropertyValueConverters['-moz-transition'] = propertyValueConverters.transition\npropertyValueConverters['transition-property'] =\n propertyValueConverters.transitionProperty\npropertyValueConverters['-webkit-transition-property'] =\n propertyValueConverters.transitionProperty\npropertyValueConverters['-moz-transition-property'] =\n propertyValueConverters.transitionProperty\n\nexport default propertyValueConverters\n","import {\n includes,\n arrayToObject,\n isBoolean,\n isFunction,\n isNumber,\n isObject,\n isString,\n isNullOrUndefined,\n} from './utils'\nimport propertyValueConverters from './property-value-converters'\n\n// this will be an object of properties that map to their corresponding rtl property (their doppelganger)\nexport const propertiesToConvert = arrayToObject([\n ['paddingLeft', 'paddingRight'],\n ['marginLeft', 'marginRight'],\n ['left', 'right'],\n ['borderLeft', 'borderRight'],\n ['borderLeftColor', 'borderRightColor'],\n ['borderLeftStyle', 'borderRightStyle'],\n ['borderLeftWidth', 'borderRightWidth'],\n ['borderTopLeftRadius', 'borderTopRightRadius'],\n ['borderBottomLeftRadius', 'borderBottomRightRadius'],\n // kebab-case versions\n ['padding-left', 'padding-right'],\n ['margin-left', 'margin-right'],\n ['border-left', 'border-right'],\n ['border-left-color', 'border-right-color'],\n ['border-left-style', 'border-right-style'],\n ['border-left-width', 'border-right-width'],\n ['border-top-left-radius', 'border-top-right-radius'],\n ['border-bottom-left-radius', 'border-bottom-right-radius'],\n])\n\nexport const propsToIgnore = ['content']\n\n// this is the same as the propertiesToConvert except for values\nexport const valuesToConvert = arrayToObject([\n ['ltr', 'rtl'],\n ['left', 'right'],\n ['w-resize', 'e-resize'],\n ['sw-resize', 'se-resize'],\n ['nw-resize', 'ne-resize'],\n])\n\n// Sorry for the regex 😞, but basically thisis used to replace _every_ instance of\n// `ltr`, `rtl`, `right`, and `left` in `backgroundimage` with the corresponding opposite.\n// A situation we're accepting here:\n// url('/left/right/rtl/ltr.png') will be changed to url('/right/left/ltr/rtl.png')\n// Definite trade-offs here, but I think it's a good call.\nconst bgImgDirectionRegex = new RegExp(\n '(^|\\\\W|_)((ltr)|(rtl)|(left)|(right))(\\\\W|_|$)',\n 'g',\n)\nconst bgPosDirectionRegex = new RegExp('(left)|(right)')\n\n/**\n * converts properties and values in the CSS in JS object to their corresponding RTL values\n * @param {Object} object the CSS in JS object\n * @return {Object} the RTL converted object\n */\nexport function convert(object) {\n return Object.keys(object).reduce(\n (newObj, originalKey) => {\n let originalValue = object[originalKey]\n if (isString(originalValue)) {\n // you're welcome to later code 😺\n originalValue = originalValue.trim()\n }\n\n // Some properties should never be transformed\n if (includes(propsToIgnore, originalKey)) {\n newObj[originalKey] = originalValue\n return newObj\n }\n\n const {key, value} = convertProperty(originalKey, originalValue)\n newObj[key] = value\n return newObj\n },\n Array.isArray(object) ? [] : {},\n )\n}\n\n/**\n * Converts a property and its value to the corresponding RTL key and value\n * @param {String} originalKey the original property key\n * @param {Number|String|Object} originalValue the original css property value\n * @return {Object} the new {key, value} pair\n */\nexport function convertProperty(originalKey, originalValue) {\n const isNoFlip = /\\/\\*\\s?@noflip\\s?\\*\\//.test(originalValue)\n const key = isNoFlip ? originalKey : getPropertyDoppelganger(originalKey)\n const value = isNoFlip\n ? originalValue\n : getValueDoppelganger(key, originalValue)\n return {key, value}\n}\n\n/**\n * This gets the RTL version of the given property if it has a corresponding RTL property\n * @param {String} property the name of the property\n * @return {String} the name of the RTL property\n */\nexport function getPropertyDoppelganger(property) {\n return propertiesToConvert[property] || property\n}\n\n/**\n * This converts the given value to the RTL version of that value based on the key\n * @param {String} key this is the key (note: this should be the RTL version of the originalKey)\n * @param {String|Number|Object} originalValue the original css property value. If it's an object, then we'll convert that as well\n * @return {String|Number|Object} the converted value\n */\nexport function getValueDoppelganger(key, originalValue) {\n /* eslint complexity:[2, 10] */ // let's try to keep the complexity down... If we have to do this much more, let's break this up\n if (isNullOrUndefined(originalValue) || isBoolean(originalValue)) {\n return originalValue\n }\n\n if (isObject(originalValue)) {\n return convert(originalValue) // recurssion 🌀\n }\n const isNum = isNumber(originalValue)\n const isFunc = isFunction(originalValue)\n\n const importantlessValue =\n isNum || isFunc\n ? originalValue\n : originalValue.replace(/ !important.*?$/, '')\n const isImportant =\n !isNum && importantlessValue.length !== originalValue.length\n const valueConverter = propertyValueConverters[key]\n let newValue\n if (valueConverter) {\n newValue = valueConverter({\n value: importantlessValue,\n valuesToConvert,\n propertiesToConvert,\n isRtl: true,\n bgImgDirectionRegex,\n bgPosDirectionRegex,\n })\n } else {\n newValue = valuesToConvert[importantlessValue] || importantlessValue\n }\n if (isImportant) {\n return `${newValue} !important`\n }\n return newValue\n}\n"],"names":["arrayToObject","array","reduce","obj","prop1","prop2","isBoolean","val","isFunction","isNumber","isNullOrUndefined","isObject","isString","includes","inclusive","inclusee","indexOf","flipSign","value","parseFloat","slice","flipTransformSign","match","prefix","offset","suffix","calculateNewBackgroundPosition","idx","len","length","toFixed","getValuesAsList","replace","split","map","i","trim","filter","Boolean","item","list","state","openParansCount","closedParansCount","parensDepth","push","handleQuartetValues","splitValues","top","right","bottom","left","join","propertyValueConverters","padding","textShadow","negative","number","doubleNegative","borderColor","borderRadius","radius1","radius2","convertedRadius1","convertedRadius2","reverse","topLeft","topRight","bottomRight","bottomLeft","background","valuesToConvert","isRtl","bgImgDirectionRegex","bgPosDirectionRegex","backgroundPositionValue","backgroundPosition","backgroundImage","g1","group2","group","backgroundPositionX","transition","propertiesToConvert","values","transitionProperty","prop","transform","nonAsciiPattern","escapePattern","signedQuantPattern","translateXRegExp","RegExp","translateRegExp","translate3dRegExp","rotateRegExp","objectPosition","margin","borderWidth","boxShadow","webkitBoxShadow","mozBoxShadow","WebkitBoxShadow","MozBoxShadow","borderStyle","webkitTransform","mozTransform","WebkitTransform","MozTransform","transformOrigin","webkitTransformOrigin","mozTransformOrigin","WebkitTransformOrigin","MozTransformOrigin","webkitTransition","mozTransition","WebkitTransition","MozTransition","webkitTransitionProperty","mozTransitionProperty","WebkitTransitionProperty","MozTransitionProperty","propsToIgnore","convert","object","Object","keys","newObj","originalKey","originalValue","convertProperty","key","Array","isArray","isNoFlip","test","getPropertyDoppelganger","getValueDoppelganger","property","isNum","isFunc","importantlessValue","isImportant","valueConverter","newValue"],"mappings":";;;;;;EAAA;EACA;EACA;EACA;EACA;EACA,SAASA,aAAT,CAAuBC,KAAvB,EAA8B;EAC5B,SAAOA,KAAK,CAACC,MAAN,CAAa,UAACC,GAAD,QAAyB;EAAA,QAAlBC,KAAkB;EAAA,QAAXC,KAAW;EAC3CF,IAAAA,GAAG,CAACC,KAAD,CAAH,GAAaC,KAAb;EACAF,IAAAA,GAAG,CAACE,KAAD,CAAH,GAAaD,KAAb;EACA,WAAOD,GAAP;EACD,GAJM,EAIJ,EAJI,CAAP;EAKD;;EAED,SAASG,SAAT,CAAmBC,GAAnB,EAAwB;EACtB,SAAO,OAAOA,GAAP,KAAe,SAAtB;EACD;;EAED,SAASC,UAAT,CAAoBD,GAApB,EAAyB;EACvB,SAAO,OAAOA,GAAP,KAAe,UAAtB;EACD;;EAED,SAASE,QAAT,CAAkBF,GAAlB,EAAuB;EACrB,SAAO,OAAOA,GAAP,KAAe,QAAtB;EACD;;EAED,SAASG,iBAAT,CAA2BH,GAA3B,EAAgC;EAC9B,SAAOA,GAAG,KAAK,IAAR,IAAgB,OAAOA,GAAP,KAAe,WAAtC;EACD;;EAED,SAASI,QAAT,CAAkBJ,GAAlB,EAAuB;EACrB,SAAOA,GAAG,IAAI,OAAOA,GAAP,KAAe,QAA7B;EACD;;EAED,SAASK,QAAT,CAAkBL,GAAlB,EAAuB;EACrB,SAAO,OAAOA,GAAP,KAAe,QAAtB;EACD;;EAED,SAASM,QAAT,CAAkBC,SAAlB,EAA6BC,QAA7B,EAAuC;EACrC,SAAOD,SAAS,CAACE,OAAV,CAAkBD,QAAlB,MAAgC,CAAC,CAAxC;EACD;EAED;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;EACA,SAASE,QAAT,CAAkBC,KAAlB,EAAyB;EACvB,MAAIC,UAAU,CAACD,KAAD,CAAV,KAAsB,CAA1B,EAA6B;EAC3B;EACA,WAAOA,KAAP;EACD;;EAED,MAAIA,KA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eAFwB;EAGxBY,MAAAA,mBAAmB,EAAnBA,mBAHwB;EAIxBX,MAAAA,KAAK,EAAE,IAJiB;EAKxBC,MAAAA,mBAAmB,EAAnBA,mBALwB;EAMxBC,MAAAA,mBAAmB,EAAnBA;EANwB,KAAD,CAAzB;EAQD,GATD,MASO;EACLsE,IAAAA,QAAQ,GAAGzE,eAAe,CAACsE,kBAAD,CAAf,IAAuCA,kBAAlD;EACD;;EACD,MAAIC,WAAJ,EAAiB;EACf,WAAUE,QAAV;EACD;;EACD,SAAOA,QAAP;EACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
!function(r,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((r=r||self).rtlCSSJSCore={})}(this,(function(r){"use strict";function t(r){return r.reduce((function(r,t){var e=t[0],o=t[1];return r[e]=o,r[o]=e,r}),{})}function e(r){return"boolean"==typeof r}function o(r){return"function"==typeof r}function n(r){return"number"==typeof r}function i(r){return null==r}function a(r){return r&&"object"==typeof r}function s(r){return"string"==typeof r}function u(r,t){return-1!==r.indexOf(t)}function l(r){return 0===parseFloat(r)?r:"-"===r[0]?r.slice(1):"-"+r}function d(r,t,e,o){return t+l(e)+o}function g(r){var t=r.indexOf(".");if(-1===t)r=100-parseFloat(r)+"%";else{var e=r.length-t-2;r=(r=100-parseFloat(r)).toFixed(e)+"%"}return r}function f(r){return r.replace(/ +/g," ").split(" ").map((function(r){return r.trim()})).filter(Boolean).reduce((function(r,t){var e=r.list,o=r.state,n=(t.match(/\(/g)||[]).length,i=(t.match(/\)/g)||[]).length;return o.parensDepth>0?e[e.length-1]=e[e.length-1]+" "+t:e.push(t),o.parensDepth+=n-i,{list:e,state:o}}),{list:[],state:{parensDepth:0}}).list}function c(r){var t=f(r);if(t.length<=3||t.length>4)return r;var e=t[0],o=t[1],n=t[2];return[e,t[3],n,o].join(" ")}var p={padding:function(r){var t=r.value;return n(t)?t:c(t)},textShadow:function(r){return r.value.replace(/(-*)([.|\d]+)/,(function(r,t,e){return"0"===e?r:""+(""===t?"-":"")+e}))},borderColor:function(r){return c(r.value)},borderRadius:function(r){var t=r.value;if(n(t))return t;if(u(t,"/")){var e=t.split("/"),o=e[0],i=e[1];return p.borderRadius({value:o.trim()})+" / "+p.borderRadius({value:i.trim()})}var a=f(t);switch(a.length){case 2:return a.reverse().join(" ");case 4:var s=a[0],l=a[1],d=a[2];return[l,s,a[3],d].join(" ");default:return t}},background:function(r){var t=r.value,e=r.valuesToConvert,o=r.isRtl,i=r.bgImgDirectionRegex,a=r.bgPosDirectionRegex;if(n(t))return t;var s=t.replace(/(url\(.*?\))|(rgba?\(.*?\))|(hsl\(.*?\))|(#[a-fA-F0-9]+)|((^| )(\D)+( |$))/g,"").trim();return t=t.replace(s,p.backgroundPosition({value:s,valuesToConvert:e,isRtl:o,bgPosDirectionRegex:a})),p.backgroundImage({value:t,valuesToConvert:e,bgImgDirectionRegex:i})},backgroundImage:function(r){var t=r.value,e=r.valuesToConvert,o=r.bgImgDirectionRegex;return u(t,"url(")||u(t,"linear-gradient(")?t.replace(o,(function(r,t,o){return r.replace(o,e[o])})):t},backgroundPosition:function(r){var t=r.value,e=r.valuesToConvert,o=r.isRtl,n=r.bgPosDirectionRegex;return t.replace(o?/^((-|\d|\.)+%)/:null,(function(r,t){return g(t)})).replace(n,(function(r){return e[r]}))},backgroundPositionX:function(r){var t=r.value,e=r.valuesToConvert,o=r.isRtl,i=r.bgPosDirectionRegex;return n(t)?t:p.backgroundPosition({value:t,valuesToConvert:e,isRtl:o,bgPosDirectionRegex:i})},transition:function(r){var t=r.value,e=r.propertiesToConvert;return t.split(/,\s*/g).map((function(r){var t=r.split(" ");return t[0]=e[t[0]]||t[0],t.join(" ")})).join(", ")},transitionProperty:function(r){var t=r.value,e=r.propertiesToConvert;return t.split(/,\s*/g).map((function(r){return e[r]||r})).join(", ")},transform:function(r){var t=r.value,e="(?:(?:(?:\\[0-9a-f]{1,6})(?:\\r\\n|\\s)?)|\\\\[^\\r\\n\\f0-9a-f])",o="((?:-?(?:[0-9]*\\.[0-9]+|[0-9]+)(?:\\s*(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)|-?(?:[_a-z]|[^\\u0020-\\u007e]|"+e+")(?:[_a-z0-9-]|[^\\u0020-\\u007e]|"+e+")*)?)|(?:inherit|auto))",n=new RegExp("(translateX\\s*\\(\\s*)"+o+"(\\s*\\))","gi"),i=new RegExp("(translate\\s*\\(\\s*)"+o+"((?:\\s*,\\s*"+o+"){0,1}\\s*\\))","gi"),a=new RegExp("(translate3d\\s*\\(\\s*)"+o+"((?:\\s*,\\s*"+o+"){0,2}\\s*\\))","gi"),s=new RegExp("(rotate[ZY]?\\s*\\(\\s*)"+o+"(\\s*\\))","gi");return t.replace(n,d).replace(i,d).replace(a,d).replace(s,d)}};p.objectPosition=p.backgroundPosition,p.margin=p.padding,p.borderWidth=p.padding,p.boxShadow=p.textShadow,p.webkitBoxShadow=p.boxShadow,p.mozBoxShadow=p.boxShadow,p.WebkitBoxShadow=p.boxShadow,p.MozBoxShadow=p.boxShadow,p.borderStyle=p.borderColor,p.webkitTransform=p.transform,p.mozTransform=p.transform,p.WebkitTransform=p.transform,p.MozTransform=p.transform,p.transformOrigin=p.backgroundPosition,p.webkitTransformOrigin=p.transformOrigin,p.mozTransformOrigin=p.transformOrigin,p.WebkitTransformOrigin=p.transformOrigin,p.MozTransformOrigin=p.transformOrigin,p.webkitTransition=p.transition,p.mozTransition=p.transition,p.WebkitTransition=p.transition,p.MozTransition=p.transition,p.webkitTransitionProperty=p.transitionProperty,p.mozTransitionProperty=p.transitionProperty,p.WebkitTransitionProperty=p.transitionProperty,p.MozTransitionProperty=p.transitionProperty,p["text-shadow"]=p.textShadow,p["border-color"]=p.borderColor,p["border-radius"]=p.borderRadius,p["background-image"]=p.backgroundImage,p["background-position"]=p.backgroundPosition,p["background-position-x"]=p.backgroundPositionX,p["object-position"]=p.objectPosition,p["border-width"]=p.padding,p["box-shadow"]=p.textShadow,p["-webkit-box-shadow"]=p.textShadow,p["-moz-box-shadow"]=p.textShadow,p["border-style"]=p.borderColor,p["-webkit-transform"]=p.transform,p["-moz-transform"]=p.transform,p["transform-origin"]=p.transformOrigin,p["-webkit-transform-origin"]=p.transformOrigin,p["-moz-transform-origin"]=p.transformOrigin,p["-webkit-transition"]=p.transition,p["-moz-transition"]=p.transition,p["transition-property"]=p.transitionProperty,p["-webkit-transition-property"]=p.transitionProperty,p["-moz-transition-property"]=p.transitionProperty;var b=t([["paddingLeft","paddingRight"],["marginLeft","marginRight"],["left","right"],["borderLeft","borderRight"],["borderLeftColor","borderRightColor"],["borderLeftStyle","borderRightStyle"],["borderLeftWidth","borderRightWidth"],["borderTopLeftRadius","borderTopRightRadius"],["borderBottomLeftRadius","borderBottomRightRadius"],["padding-left","padding-right"],["margin-left","margin-right"],["border-left","border-right"],["border-left-color","border-right-color"],["border-left-style","border-right-style"],["border-left-width","border-right-width"],["border-top-left-radius","border-top-right-radius"],["border-bottom-left-radius","border-bottom-right-radius"]]),m=["content"],v=t([["ltr","rtl"],["left","right"],["w-resize","e-resize"],["sw-resize","se-resize"],["nw-resize","ne-resize"]]),h=new RegExp("(^|\\W|_)((ltr)|(rtl)|(left)|(right))(\\W|_|$)","g"),w=new RegExp("(left)|(right)");function x(r){return Object.keys(r).reduce((function(t,e){var o=r[e];if(s(o)&&(o=o.trim()),u(m,e))return t[e]=o,t;var n=y(e,o),i=n.key,a=n.value;return t[i]=a,t}),Array.isArray(r)?[]:{})}function y(r,t){var e=/\/\*\s?@noflip\s?\*\//.test(t),o=e?r:R(r);return{key:o,value:e?t:k(o,t)}}function R(r){return b[r]||r}function k(r,t){if(i(t)||e(t))return t;if(a(t))return x(t);var s,u=n(t),l=o(t),d=u||l?t:t.replace(/ !important.*?$/,""),g=!u&&d.length!==t.length,f=p[r];return s=f?f({value:d,valuesToConvert:v,propertiesToConvert:b,isRtl:!0,bgImgDirectionRegex:h,bgPosDirectionRegex:w}):v[d]||d,g?s+" !important":s}r.arrayToObject=t,r.calculateNewBackgroundPosition=g,r.calculateNewTranslate=d,r.convert=x,r.convertProperty=y,r.flipSign=l,r.flipTransformSign=d,r.getPropertyDoppelganger=R,r.getValueDoppelganger=k,r.getValuesAsList=f,r.handleQuartetValues=c,r.includes=u,r.isBoolean=e,r.isFunction=o,r.isNullOrUndefined=i,r.isNumber=n,r.isObject=a,r.isString=s,r.propertiesToConvert=b,r.propertyValueConverters=p,r.propsToIgnore=m,r.valuesToConvert=v,Object.defineProperty(r,"__esModule",{value:!0})}));
|
2
|
+
//# sourceMappingURL=rtl-css-js.core.umd.min.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"rtl-css-js.core.umd.min.js","sources":["../src/internal/utils.js","../src/internal/property-value-converters.js","../src/internal/convert.js"],"sourcesContent":["/**\n * Takes an array of [keyValue1, keyValue2] pairs and creates an object of {keyValue1: keyValue2, keyValue2: keyValue1}\n * @param {Array} array the array of pairs\n * @return {Object} the {key, value} pair object\n */\nfunction arrayToObject(array) {\n return array.reduce((obj, [prop1, prop2]) => {\n obj[prop1] = prop2\n obj[prop2] = prop1\n return obj\n }, {})\n}\n\nfunction isBoolean(val) {\n return typeof val === 'boolean'\n}\n\nfunction isFunction(val) {\n return typeof val === 'function'\n}\n\nfunction isNumber(val) {\n return typeof val === 'number'\n}\n\nfunction isNullOrUndefined(val) {\n return val === null || typeof val === 'undefined'\n}\n\nfunction isObject(val) {\n return val && typeof val === 'object'\n}\n\nfunction isString(val) {\n return typeof val === 'string'\n}\n\nfunction includes(inclusive, inclusee) {\n return inclusive.indexOf(inclusee) !== -1\n}\n\n/**\n * Flip the sign of a CSS value, possibly with a unit.\n *\n * We can't just negate the value with unary minus due to the units.\n *\n * @private\n * @param {String} value - the original value (for example 77%)\n * @return {String} the result (for example -77%)\n */\nfunction flipSign(value) {\n if (parseFloat(value) === 0) {\n // Don't mangle zeroes\n return value\n }\n\n if (value[0] === '-') {\n return value.slice(1)\n }\n\n return `-${value}`\n}\n\nfunction flipTransformSign(match, prefix, offset, suffix) {\n return prefix + flipSign(offset) + suffix\n}\n\n/**\n * Takes a percentage for background position and inverts it.\n * This was copied and modified from CSSJanus:\n * https://github.com/cssjanus/cssjanus/blob/4245f834365f6cfb0239191a151432fb85abab23/src/cssjanus.js#L152-L175\n * @param {String} value - the original value (for example 77%)\n * @return {String} the result (for example 23%)\n */\nfunction calculateNewBackgroundPosition(value) {\n const idx = value.indexOf('.')\n if (idx === -1) {\n value = `${100 - parseFloat(value)}%`\n } else {\n // Two off, one for the \"%\" at the end, one for the dot itself\n const len = value.length - idx - 2\n value = 100 - parseFloat(value)\n value = `${value.toFixed(len)}%`\n }\n return value\n}\n\n/**\n * This takes a list of CSS values and converts it to an array\n * @param {String} value - something like `1px`, `1px 2em`, or `3pt rgb(150, 230, 550) 40px calc(100% - 5px)`\n * @return {Array} the split values (for example: `['3pt', 'rgb(150, 230, 550)', '40px', 'calc(100% - 5px)']`)\n */\nfunction getValuesAsList(value) {\n return (\n value\n .replace(/ +/g, ' ') // remove all extraneous spaces\n .split(' ')\n .map(i => i.trim()) // get rid of extra space before/after each item\n .filter(Boolean) // get rid of empty strings\n // join items which are within parenthese\n // luckily `calc (100% - 5px)` is invalid syntax and it must be `calc(100% - 5px)`, otherwise this would be even more complex\n .reduce(\n ({list, state}, item) => {\n const openParansCount = (item.match(/\\(/g) || []).length\n const closedParansCount = (item.match(/\\)/g) || []).length\n if (state.parensDepth > 0) {\n list[list.length - 1] = `${list[list.length - 1]} ${item}`\n } else {\n list.push(item)\n }\n state.parensDepth += openParansCount - closedParansCount\n return {list, state}\n },\n {list: [], state: {parensDepth: 0}},\n ).list\n )\n}\n\n/**\n * This is intended for properties that are `top right bottom left` and will switch them to `top left bottom right`\n * @param {String} value - `1px 2px 3px 4px` for example, but also handles cases where there are too few/too many and\n * simply returns the value in those cases (which is the correct behavior)\n * @return {String} the result - `1px 4px 3px 2px` for example.\n */\nfunction handleQuartetValues(value) {\n const splitValues = getValuesAsList(value)\n if (splitValues.length <= 3 || splitValues.length > 4) {\n return value\n }\n const [top, right, bottom, left] = splitValues\n return [top, left, bottom, right].join(' ')\n}\n\nexport {\n arrayToObject,\n calculateNewBackgroundPosition,\n flipTransformSign as calculateNewTranslate,\n flipTransformSign,\n flipSign,\n handleQuartetValues,\n includes,\n isBoolean,\n isFunction,\n isNullOrUndefined,\n isNumber,\n isObject,\n isString,\n getValuesAsList,\n}\n","import {\n includes,\n isNumber,\n calculateNewBackgroundPosition,\n flipTransformSign,\n handleQuartetValues,\n getValuesAsList,\n} from './utils'\n\n// some values require a little fudging, that fudging goes here.\nconst propertyValueConverters = {\n padding({value}) {\n if (isNumber(value)) {\n return value\n }\n return handleQuartetValues(value)\n },\n textShadow({value}) {\n // intentionally leaving off the `g` flag here because we only want to change the first number (which is the offset-x)\n return value.replace(/(-*)([.|\\d]+)/, (match, negative, number) => {\n if (number === '0') {\n return match\n }\n const doubleNegative = negative === '' ? '-' : ''\n return `${doubleNegative}${number}`\n })\n },\n borderColor({value}) {\n return handleQuartetValues(value)\n },\n borderRadius({value}) {\n if (isNumber(value)) {\n return value\n }\n if (includes(value, '/')) {\n const [radius1, radius2] = value.split('/')\n const convertedRadius1 = propertyValueConverters.borderRadius({\n value: radius1.trim(),\n })\n const convertedRadius2 = propertyValueConverters.borderRadius({\n value: radius2.trim(),\n })\n return `${convertedRadius1} / ${convertedRadius2}`\n }\n const splitValues = getValuesAsList(value)\n switch (splitValues.length) {\n case 2: {\n return splitValues.reverse().join(' ')\n }\n case 4: {\n const [topLeft, topRight, bottomRight, bottomLeft] = splitValues\n return [topRight, topLeft, bottomLeft, bottomRight].join(' ')\n }\n default: {\n return value\n }\n }\n },\n background({\n value,\n valuesToConvert,\n isRtl,\n bgImgDirectionRegex,\n bgPosDirectionRegex,\n }) {\n if (isNumber(value)) {\n return value\n }\n\n // Yeah, this is in need of a refactor 🙃...\n // but this property is a tough cookie 🍪\n // get the backgroundPosition out of the string by removing everything that couldn't be the backgroundPosition value\n const backgroundPositionValue = value\n .replace(\n /(url\\(.*?\\))|(rgba?\\(.*?\\))|(hsl\\(.*?\\))|(#[a-fA-F0-9]+)|((^| )(\\D)+( |$))/g,\n '',\n )\n .trim()\n // replace that backgroundPosition value with the converted version\n value = value.replace(\n backgroundPositionValue,\n propertyValueConverters.backgroundPosition({\n value: backgroundPositionValue,\n valuesToConvert,\n isRtl,\n bgPosDirectionRegex,\n }),\n )\n // do the backgroundImage value replacing on the whole value (because why not?)\n return propertyValueConverters.backgroundImage({\n value,\n valuesToConvert,\n bgImgDirectionRegex,\n })\n },\n backgroundImage({value, valuesToConvert, bgImgDirectionRegex}) {\n if (!includes(value, 'url(') && !includes(value, 'linear-gradient(')) {\n return value\n }\n return value.replace(bgImgDirectionRegex, (match, g1, group2) => {\n return match.replace(group2, valuesToConvert[group2])\n })\n },\n backgroundPosition({value, valuesToConvert, isRtl, bgPosDirectionRegex}) {\n return (\n value\n // intentionally only grabbing the first instance of this because that represents `left`\n .replace(isRtl ? /^((-|\\d|\\.)+%)/ : null, (match, group) =>\n calculateNewBackgroundPosition(group),\n )\n .replace(bgPosDirectionRegex, match => valuesToConvert[match])\n )\n },\n backgroundPositionX({value, valuesToConvert, isRtl, bgPosDirectionRegex}) {\n if (isNumber(value)) {\n return value\n }\n return propertyValueConverters.backgroundPosition({\n value,\n valuesToConvert,\n isRtl,\n bgPosDirectionRegex,\n })\n },\n transition({value, propertiesToConvert}) {\n return value\n .split(/,\\s*/g)\n .map(transition => {\n const values = transition.split(' ')\n\n // Property is always defined first\n values[0] = propertiesToConvert[values[0]] || values[0]\n\n return values.join(' ')\n })\n .join(', ')\n },\n transitionProperty({value, propertiesToConvert}) {\n return value\n .split(/,\\s*/g)\n .map(prop => propertiesToConvert[prop] || prop)\n .join(', ')\n },\n transform({value}) {\n // This was copied and modified from CSSJanus:\n // https://github.com/cssjanus/cssjanus/blob/4a40f001b1ba35567112d8b8e1d9d95eda4234c3/src/cssjanus.js#L152-L153\n const nonAsciiPattern = '[^\\\\u0020-\\\\u007e]'\n const unicodePattern = '(?:(?:\\\\[0-9a-f]{1,6})(?:\\\\r\\\\n|\\\\s)?)'\n const numPattern = '(?:[0-9]*\\\\.[0-9]+|[0-9]+)'\n const unitPattern = '(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)'\n const escapePattern = `(?:${unicodePattern}|\\\\\\\\[^\\\\r\\\\n\\\\f0-9a-f])`\n const nmstartPattern = `(?:[_a-z]|${nonAsciiPattern}|${escapePattern})`\n const nmcharPattern = `(?:[_a-z0-9-]|${nonAsciiPattern}|${escapePattern})`\n const identPattern = `-?${nmstartPattern}${nmcharPattern}*`\n const quantPattern = `${numPattern}(?:\\\\s*${unitPattern}|${identPattern})?`\n const signedQuantPattern = `((?:-?${quantPattern})|(?:inherit|auto))`\n const translateXRegExp = new RegExp(\n `(translateX\\\\s*\\\\(\\\\s*)${signedQuantPattern}(\\\\s*\\\\))`,\n 'gi',\n )\n const translateRegExp = new RegExp(\n `(translate\\\\s*\\\\(\\\\s*)${signedQuantPattern}((?:\\\\s*,\\\\s*${signedQuantPattern}){0,1}\\\\s*\\\\))`,\n 'gi',\n )\n const translate3dRegExp = new RegExp(\n `(translate3d\\\\s*\\\\(\\\\s*)${signedQuantPattern}((?:\\\\s*,\\\\s*${signedQuantPattern}){0,2}\\\\s*\\\\))`,\n 'gi',\n )\n const rotateRegExp = new RegExp(\n `(rotate[ZY]?\\\\s*\\\\(\\\\s*)${signedQuantPattern}(\\\\s*\\\\))`,\n 'gi',\n )\n return value\n .replace(translateXRegExp, flipTransformSign)\n .replace(translateRegExp, flipTransformSign)\n .replace(translate3dRegExp, flipTransformSign)\n .replace(rotateRegExp, flipTransformSign)\n },\n}\n\npropertyValueConverters.objectPosition =\n propertyValueConverters.backgroundPosition\npropertyValueConverters.margin = propertyValueConverters.padding\npropertyValueConverters.borderWidth = propertyValueConverters.padding\npropertyValueConverters.boxShadow = propertyValueConverters.textShadow\npropertyValueConverters.webkitBoxShadow = propertyValueConverters.boxShadow\npropertyValueConverters.mozBoxShadow = propertyValueConverters.boxShadow\npropertyValueConverters.WebkitBoxShadow = propertyValueConverters.boxShadow\npropertyValueConverters.MozBoxShadow = propertyValueConverters.boxShadow\npropertyValueConverters.borderStyle = propertyValueConverters.borderColor\npropertyValueConverters.webkitTransform = propertyValueConverters.transform\npropertyValueConverters.mozTransform = propertyValueConverters.transform\npropertyValueConverters.WebkitTransform = propertyValueConverters.transform\npropertyValueConverters.MozTransform = propertyValueConverters.transform\npropertyValueConverters.transformOrigin =\n propertyValueConverters.backgroundPosition\npropertyValueConverters.webkitTransformOrigin =\n propertyValueConverters.transformOrigin\npropertyValueConverters.mozTransformOrigin =\n propertyValueConverters.transformOrigin\npropertyValueConverters.WebkitTransformOrigin =\n propertyValueConverters.transformOrigin\npropertyValueConverters.MozTransformOrigin =\n propertyValueConverters.transformOrigin\npropertyValueConverters.webkitTransition = propertyValueConverters.transition\npropertyValueConverters.mozTransition = propertyValueConverters.transition\npropertyValueConverters.WebkitTransition = propertyValueConverters.transition\npropertyValueConverters.MozTransition = propertyValueConverters.transition\npropertyValueConverters.webkitTransitionProperty =\n propertyValueConverters.transitionProperty\npropertyValueConverters.mozTransitionProperty =\n propertyValueConverters.transitionProperty\npropertyValueConverters.WebkitTransitionProperty =\n propertyValueConverters.transitionProperty\npropertyValueConverters.MozTransitionProperty =\n propertyValueConverters.transitionProperty\n\n// kebab-case versions\n\npropertyValueConverters['text-shadow'] = propertyValueConverters.textShadow\npropertyValueConverters['border-color'] = propertyValueConverters.borderColor\npropertyValueConverters['border-radius'] = propertyValueConverters.borderRadius\npropertyValueConverters['background-image'] =\n propertyValueConverters.backgroundImage\npropertyValueConverters['background-position'] =\n propertyValueConverters.backgroundPosition\npropertyValueConverters['background-position-x'] =\n propertyValueConverters.backgroundPositionX\npropertyValueConverters['object-position'] =\n propertyValueConverters.objectPosition\npropertyValueConverters['border-width'] = propertyValueConverters.padding\npropertyValueConverters['box-shadow'] = propertyValueConverters.textShadow\npropertyValueConverters['-webkit-box-shadow'] =\n propertyValueConverters.textShadow\npropertyValueConverters['-moz-box-shadow'] = propertyValueConverters.textShadow\npropertyValueConverters['border-style'] = propertyValueConverters.borderColor\npropertyValueConverters['-webkit-transform'] = propertyValueConverters.transform\npropertyValueConverters['-moz-transform'] = propertyValueConverters.transform\npropertyValueConverters['transform-origin'] =\n propertyValueConverters.transformOrigin\npropertyValueConverters['-webkit-transform-origin'] =\n propertyValueConverters.transformOrigin\npropertyValueConverters['-moz-transform-origin'] =\n propertyValueConverters.transformOrigin\npropertyValueConverters['-webkit-transition'] =\n propertyValueConverters.transition\npropertyValueConverters['-moz-transition'] = propertyValueConverters.transition\npropertyValueConverters['transition-property'] =\n propertyValueConverters.transitionProperty\npropertyValueConverters['-webkit-transition-property'] =\n propertyValueConverters.transitionProperty\npropertyValueConverters['-moz-transition-property'] =\n propertyValueConverters.transitionProperty\n\nexport default propertyValueConverters\n","import {\n includes,\n arrayToObject,\n isBoolean,\n isFunction,\n isNumber,\n isObject,\n isString,\n isNullOrUndefined,\n} from './utils'\nimport propertyValueConverters from './property-value-converters'\n\n// this will be an object of properties that map to their corresponding rtl property (their doppelganger)\nexport const propertiesToConvert = arrayToObject([\n ['paddingLeft', 'paddingRight'],\n ['marginLeft', 'marginRight'],\n ['left', 'right'],\n ['borderLeft', 'borderRight'],\n ['borderLeftColor', 'borderRightColor'],\n ['borderLeftStyle', 'borderRightStyle'],\n ['borderLeftWidth', 'borderRightWidth'],\n ['borderTopLeftRadius', 'borderTopRightRadius'],\n ['borderBottomLeftRadius', 'borderBottomRightRadius'],\n // kebab-case versions\n ['padding-left', 'padding-right'],\n ['margin-left', 'margin-right'],\n ['border-left', 'border-right'],\n ['border-left-color', 'border-right-color'],\n ['border-left-style', 'border-right-style'],\n ['border-left-width', 'border-right-width'],\n ['border-top-left-radius', 'border-top-right-radius'],\n ['border-bottom-left-radius', 'border-bottom-right-radius'],\n])\n\nexport const propsToIgnore = ['content']\n\n// this is the same as the propertiesToConvert except for values\nexport const valuesToConvert = arrayToObject([\n ['ltr', 'rtl'],\n ['left', 'right'],\n ['w-resize', 'e-resize'],\n ['sw-resize', 'se-resize'],\n ['nw-resize', 'ne-resize'],\n])\n\n// Sorry for the regex 😞, but basically thisis used to replace _every_ instance of\n// `ltr`, `rtl`, `right`, and `left` in `backgroundimage` with the corresponding opposite.\n// A situation we're accepting here:\n// url('/left/right/rtl/ltr.png') will be changed to url('/right/left/ltr/rtl.png')\n// Definite trade-offs here, but I think it's a good call.\nconst bgImgDirectionRegex = new RegExp(\n '(^|\\\\W|_)((ltr)|(rtl)|(left)|(right))(\\\\W|_|$)',\n 'g',\n)\nconst bgPosDirectionRegex = new RegExp('(left)|(right)')\n\n/**\n * converts properties and values in the CSS in JS object to their corresponding RTL values\n * @param {Object} object the CSS in JS object\n * @return {Object} the RTL converted object\n */\nexport function convert(object) {\n return Object.keys(object).reduce(\n (newObj, originalKey) => {\n let originalValue = object[originalKey]\n if (isString(originalValue)) {\n // you're welcome to later code 😺\n originalValue = originalValue.trim()\n }\n\n // Some properties should never be transformed\n if (includes(propsToIgnore, originalKey)) {\n newObj[originalKey] = originalValue\n return newObj\n }\n\n const {key, value} = convertProperty(originalKey, originalValue)\n newObj[key] = value\n return newObj\n },\n Array.isArray(object) ? [] : {},\n )\n}\n\n/**\n * Converts a property and its value to the corresponding RTL key and value\n * @param {String} originalKey the original property key\n * @param {Number|String|Object} originalValue the original css property value\n * @return {Object} the new {key, value} pair\n */\nexport function convertProperty(originalKey, originalValue) {\n const isNoFlip = /\\/\\*\\s?@noflip\\s?\\*\\//.test(originalValue)\n const key = isNoFlip ? originalKey : getPropertyDoppelganger(originalKey)\n const value = isNoFlip\n ? originalValue\n : getValueDoppelganger(key, originalValue)\n return {key, value}\n}\n\n/**\n * This gets the RTL version of the given property if it has a corresponding RTL property\n * @param {String} property the name of the property\n * @return {String} the name of the RTL property\n */\nexport function getPropertyDoppelganger(property) {\n return propertiesToConvert[property] || property\n}\n\n/**\n * This converts the given value to the RTL version of that value based on the key\n * @param {String} key this is the key (note: this should be the RTL version of the originalKey)\n * @param {String|Number|Object} originalValue the original css property value. If it's an object, then we'll convert that as well\n * @return {String|Number|Object} the converted value\n */\nexport function getValueDoppelganger(key, originalValue) {\n /* eslint complexity:[2, 10] */ // let's try to keep the complexity down... If we have to do this much more, let's break this up\n if (isNullOrUndefined(originalValue) || isBoolean(originalValue)) {\n return originalValue\n }\n\n if (isObject(originalValue)) {\n return convert(originalValue) // recurssion 🌀\n }\n const isNum = isNumber(originalValue)\n const isFunc = isFunction(originalValue)\n\n const importantlessValue =\n isNum || isFunc\n ? originalValue\n : originalValue.replace(/ !important.*?$/, '')\n const isImportant =\n !isNum && importantlessValue.length !== originalValue.length\n const valueConverter = propertyValueConverters[key]\n let newValue\n if (valueConverter) {\n newValue = valueConverter({\n value: importantlessValue,\n valuesToConvert,\n propertiesToConvert,\n isRtl: true,\n bgImgDirectionRegex,\n bgPosDirectionRegex,\n })\n } else {\n newValue = valuesToConvert[importantlessValue] || importantlessValue\n }\n if (isImportant) {\n return `${newValue} !important`\n }\n return newValue\n}\n"],"names":["arrayToObject","array","reduce","obj","prop1","prop2","isBoolean","val","isFunction","isNumber","isNullOrUndefined","isObject","isString","includes","inclusive","inclusee","indexOf","flipSign","value","parseFloat","slice","flipTransformSign","match","prefix","offset","suffix","calculateNewBackgroundPosition","idx","len","length","toFixed","getValuesAsList","replace","split","map","i","trim","filter","Boolean","item","list","state","openParansCount","closedParansCount","parensDepth","push","handleQuartetValues","splitValues","top","right","bottom","join","propertyValueConverters","padding","textShadow","negative","number","borderColor","borderRadius","radius1","radius2","reverse","topLeft","topRight","bottomRight","background","valuesToConvert","isRtl","bgImgDirectionRegex","bgPosDirectionRegex","backgroundPositionValue","backgroundPosition","backgroundImage","g1","group2","group","backgroundPositionX","transition","propertiesToConvert","values","transitionProperty","prop","transform","escapePattern","signedQuantPattern","translateXRegExp","RegExp","translateRegExp","translate3dRegExp","rotateRegExp","objectPosition","margin","borderWidth","boxShadow","webkitBoxShadow","mozBoxShadow","WebkitBoxShadow","MozBoxShadow","borderStyle","webkitTransform","mozTransform","WebkitTransform","MozTransform","transformOrigin","webkitTransformOrigin","mozTransformOrigin","WebkitTransformOrigin","MozTransformOrigin","webkitTransition","mozTransition","WebkitTransition","MozTransition","webkitTransitionProperty","mozTransitionProperty","WebkitTransitionProperty","MozTransitionProperty","propsToIgnore","convert","object","Object","keys","newObj","originalKey","originalValue","convertProperty","key","Array","isArray","isNoFlip","test","getPropertyDoppelganger","getValueDoppelganger","property","newValue","isNum","isFunc","importantlessValue","isImportant","valueConverter"],"mappings":"0MAKA,SAASA,EAAcC,UACdA,EAAMC,QAAO,SAACC,SAAMC,OAAOC,cAChCF,EAAIC,GAASC,EACbF,EAAIE,GAASD,EACND,IACN,IAGL,SAASG,EAAUC,SACK,kBAARA,EAGhB,SAASC,EAAWD,SACI,mBAARA,EAGhB,SAASE,EAASF,SACM,iBAARA,EAGhB,SAASG,EAAkBH,UAClBA,MAAAA,EAGT,SAASI,EAASJ,UACTA,GAAsB,iBAARA,EAGvB,SAASK,EAASL,SACM,iBAARA,EAGhB,SAASM,EAASC,EAAWC,UACa,IAAjCD,EAAUE,QAAQD,GAY3B,SAASE,EAASC,UACU,IAAtBC,WAAWD,GAENA,EAGQ,MAAbA,EAAM,GACDA,EAAME,MAAM,OAGVF,EAGb,SAASG,EAAkBC,EAAOC,EAAQC,EAAQC,UACzCF,EAASN,EAASO,GAAUC,EAUrC,SAASC,EAA+BR,OAChCS,EAAMT,EAAMF,QAAQ,SACb,IAATW,EACFT,EAAW,IAAMC,WAAWD,WACvB,KAECU,EAAMV,EAAMW,OAASF,EAAM,EAEjCT,GADAA,EAAQ,IAAMC,WAAWD,IACRY,QAAQF,cAEpBV,EAQT,SAASa,EAAg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
(function (global, factory) {
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
3
|
+
typeof define === 'function' && define.amd ? define(factory) :
|
4
|
+
(global = global || self, global.RtlCssJs = factory());
|
5
|
+
}(this, (function () { 'use strict';
|
6
|
+
|
7
|
+
/**
|
8
|
+
* Takes an array of [keyValue1, keyValue2] pairs and creates an object of {keyValue1: keyValue2, keyValue2: keyValue1}
|
9
|
+
* @param {Array} array the array of pairs
|
10
|
+
* @return {Object} the {key, value} pair object
|
11
|
+
*/
|
12
|
+
function arrayToObject(array) {
|
13
|
+
return array.reduce(function (obj, _ref) {
|
14
|
+
var prop1 = _ref[0],
|
15
|
+
prop2 = _ref[1];
|
16
|
+
obj[prop1] = prop2;
|
17
|
+
obj[prop2] = prop1;
|
18
|
+
return obj;
|
19
|
+
}, {});
|
20
|
+
}
|
21
|
+
|
22
|
+
function isBoolean(val) {
|
23
|
+
return typeof val === 'boolean';
|
24
|
+
}
|
25
|
+
|
26
|
+
function isFunction(val) {
|
27
|
+
return typeof val === 'function';
|
28
|
+
}
|
29
|
+
|
30
|
+
function isNumber(val) {
|
31
|
+
return typeof val === 'number';
|
32
|
+
}
|
33
|
+
|
34
|
+
function isNullOrUndefined(val) {
|
35
|
+
return val === null || typeof val === 'undefined';
|
36
|
+
}
|
37
|
+
|
38
|
+
function isObject(val) {
|
39
|
+
return val && typeof val === 'object';
|
40
|
+
}
|
41
|
+
|
42
|
+
function isString(val) {
|
43
|
+
return typeof val === 'string';
|
44
|
+
}
|
45
|
+
|
46
|
+
function includes(inclusive, inclusee) {
|
47
|
+
return inclusive.indexOf(inclusee) !== -1;
|
48
|
+
}
|
49
|
+
/**
|
50
|
+
* Flip the sign of a CSS value, possibly with a unit.
|
51
|
+
*
|
52
|
+
* We can't just negate the value with unary minus due to the units.
|
53
|
+
*
|
54
|
+
* @private
|
55
|
+
* @param {String} value - the original value (for example 77%)
|
56
|
+
* @return {String} the result (for example -77%)
|
57
|
+
*/
|
58
|
+
|
59
|
+
|
60
|
+
function flipSign(value) {
|
61
|
+
if (parseFloat(value) === 0) {
|
62
|
+
// Don't mangle zeroes
|
63
|
+
return value;
|
64
|
+
}
|
65
|
+
|
66
|
+
if (value[0] === '-') {
|
67
|
+
return value.slice(1);
|
68
|
+
}
|
69
|
+
|
70
|
+
return "-" + value;
|
71
|
+
}
|
72
|
+
|
73
|
+
function flipTransformSign(match, prefix, offset, suffix) {
|
74
|
+
return prefix + flipSign(offset) + suffix;
|
75
|
+
}
|
76
|
+
/**
|
77
|
+
* Takes a percentage for background position and inverts it.
|
78
|
+
* This was copied and modified from CSSJanus:
|
79
|
+
* https://github.com/cssjanus/cssjanus/blob/4245f834365f6cfb0239191a151432fb85abab23/src/cssjanus.js#L152-L175
|
80
|
+
* @param {String} value - the original value (for example 77%)
|
81
|
+
* @return {String} the result (for example 23%)
|
82
|
+
*/
|
83
|
+
|
84
|
+
|
85
|
+
function calculateNewBackgroundPosition(value) {
|
86
|
+
var idx = value.indexOf('.');
|
87
|
+
|
88
|
+
if (idx === -1) {
|
89
|
+
value = 100 - parseFloat(value) + "%";
|
90
|
+
} else {
|
91
|
+
// Two off, one for the "%" at the end, one for the dot itself
|
92
|
+
var len = value.length - idx - 2;
|
93
|
+
value = 100 - parseFloat(value);
|
94
|
+
value = value.toFixed(len) + "%";
|
95
|
+
}
|
96
|
+
|
97
|
+
return value;
|
98
|
+
}
|
99
|
+
/**
|
100
|
+
* This takes a list of CSS values and converts it to an array
|
101
|
+
* @param {String} value - something like `1px`, `1px 2em`, or `3pt rgb(150, 230, 550) 40px calc(100% - 5px)`
|
102
|
+
* @return {Array} the split values (for example: `['3pt', 'rgb(150, 230, 550)', '40px', 'calc(100% - 5px)']`)
|
103
|
+
*/
|
104
|
+
|
105
|
+
|
106
|
+
function getValuesAsList(value) {
|
107
|
+
return value.replace(/ +/g, ' ') // remove all extraneous spaces
|
108
|
+
.split(' ').map(function (i) {
|
109
|
+
return i.trim();
|
110
|
+
}) // get rid of extra space before/after each item
|
111
|
+
.filter(Boolean) // get rid of empty strings
|
112
|
+
// join items which are within parenthese
|
113
|
+
// luckily `calc (100% - 5px)` is invalid syntax and it must be `calc(100% - 5px)`, otherwise this would be even more complex
|
114
|
+
.reduce(function (_ref2, item) {
|
115
|
+
var list = _ref2.list,
|
116
|
+
state = _ref2.state;
|
117
|
+
var openParansCount = (item.match(/\(/g) || []).length;
|
118
|
+
var closedParansCount = (item.match(/\)/g) || []).length;
|
119
|
+
|
120
|
+
if (state.parensDepth > 0) {
|
121
|
+
list[list.length - 1] = list[list.length - 1] + " " + item;
|
122
|
+
} else {
|
123
|
+
list.push(item);
|
124
|
+
}
|
125
|
+
|
126
|
+
state.parensDepth += openParansCount - closedParansCount;
|
127
|
+
return {
|
128
|
+
list: list,
|
129
|
+
state: state
|
130
|
+
};
|
131
|
+
}, {
|
132
|
+
list: [],
|
133
|
+
state: {
|
134
|
+
parensDepth: 0
|
135
|
+
}
|
136
|
+
}).list;
|
137
|
+
}
|
138
|
+
/**
|
139
|
+
* This is intended for properties that are `top right bottom left` and will switch them to `top left bottom right`
|
140
|
+
* @param {String} value - `1px 2px 3px 4px` for example, but also handles cases where there are too few/too many and
|
141
|
+
* simply returns the value in those cases (which is the correct behavior)
|
142
|
+
* @return {String} the result - `1px 4px 3px 2px` for example.
|
143
|
+
*/
|
144
|
+
|
145
|
+
|
146
|
+
function handleQuartetValues(value) {
|
147
|
+
var splitValues = getValuesAsList(value);
|
148
|
+
|
149
|
+
if (splitValues.length <= 3 || splitValues.length > 4) {
|
150
|
+
return value;
|
151
|
+
}
|
152
|
+
|
153
|
+
var top = splitValues[0],
|
154
|
+
right = splitValues[1],
|
155
|
+
bottom = splitValues[2],
|
156
|
+
left = splitValues[3];
|
157
|
+
return [top, left, bottom, right].join(' ');
|
158
|
+
}
|
159
|
+
|
160
|
+
var propertyValueConverters = {
|
161
|
+
padding: function padding(_ref) {
|
162
|
+
var value = _ref.value;
|
163
|
+
|
164
|
+
if (isNumber(value)) {
|
165
|
+
return value;
|
166
|
+
}
|
167
|
+
|
168
|
+
return handleQuartetValues(value);
|
169
|
+
},
|
170
|
+
textShadow: function textShadow(_ref2) {
|
171
|
+
var value = _ref2.value;
|
172
|
+
// intentionally leaving off the `g` flag here because we only want to change the first number (which is the offset-x)
|
173
|
+
return value.replace(/(-*)([.|\d]+)/, function (match, negative, number) {
|
174
|
+
if (number === '0') {
|
175
|
+
return match;
|
176
|
+
}
|
177
|
+
|
178
|
+
var doubleNegative = negative === '' ? '-' : '';
|
179
|
+
return "" + doubleNegative + number;
|
180
|
+
});
|
181
|
+
},
|
182
|
+
borderColor: function borderColor(_ref3) {
|
183
|
+
var value = _ref3.value;
|
184
|
+
return handleQuartetValues(value);
|
185
|
+
},
|
186
|
+
borderRadius: function borderRadius(_ref4) {
|
187
|
+
var value = _ref4.value;
|
188
|
+
|
189
|
+
if (isNumber(value)) {
|
190
|
+
return value;
|
191
|
+
}
|
192
|
+
|
193
|
+
if (includes(value, '/')) {
|
194
|
+
var _value$split = value.split('/'),
|
195
|
+
radius1 = _value$split[0],
|
196
|
+
radius2 = _value$split[1];
|
197
|
+
|
198
|
+
var convertedRadius1 = propertyValueConverters.borderRadius({
|
199
|
+
value: radius1.trim()
|
200
|
+
});
|
201
|
+
var convertedRadius2 = propertyValueConverters.borderRadius({
|
202
|
+
value: radius2.trim()
|
203
|
+
});
|
204
|
+
return convertedRadius1 + " / " + convertedRadius2;
|
205
|
+
}
|
206
|
+
|
207
|
+
var splitValues = getValuesAsList(value);
|
208
|
+
|
209
|
+
switch (splitValues.length) {
|
210
|
+
case 2:
|
211
|
+
{
|
212
|
+
return splitValues.reverse().join(' ');
|
213
|
+
}
|
214
|
+
|
215
|
+
case 4:
|
216
|
+
{
|
217
|
+
var topLeft = splitValues[0],
|
218
|
+
topRight = splitValues[1],
|
219
|
+
bottomRight = splitValues[2],
|
220
|
+
bottomLeft = splitValues[3];
|
221
|
+
return [topRight, topLeft, bottomLeft, bottomRight].join(' ');
|
222
|
+
}
|
223
|
+
|
224
|
+
default:
|
225
|
+
{
|
226
|
+
return value;
|
227
|
+
}
|
228
|
+
}
|
229
|
+
},
|
230
|
+
background: function background(_ref5) {
|
231
|
+
var value = _ref5.value,
|
232
|
+
valuesToConvert = _ref5.valuesToConvert,
|
233
|
+
isRtl = _ref5.isRtl,
|
234
|
+
bgImgDirectionRegex = _ref5.bgImgDirectionRegex,
|
235
|
+
bgPosDirectionRegex = _ref5.bgPosDirectionRegex;
|
236
|
+
|
237
|
+
if (isNumber(value)) {
|
238
|
+
return value;
|
239
|
+
} // Yeah, this is in need of a refactor 🙃...
|
240
|
+
// but this property is a tough cookie 🍪
|
241
|
+
// get the backgroundPosition out of the string by removing everything that couldn't be the backgroundPosition value
|
242
|
+
|
243
|
+
|
244
|
+
var backgroundPositionValue = value.replace(/(url\(.*?\))|(rgba?\(.*?\))|(hsl\(.*?\))|(#[a-fA-F0-9]+)|((^| )(\D)+( |$))/g, '').trim(); // replace that backgroundPosition value with the converted version
|
245
|
+
|
246
|
+
value = value.replace(backgroundPositionValue, propertyValueConverters.backgroundPosition({
|
247
|
+
value: backgroundPositionValue,
|
248
|
+
valuesToConvert: valuesToConvert,
|
249
|
+
isRtl: isRtl,
|
250
|
+
bgPosDirectionRegex: bgPosDirectionRegex
|
251
|
+
})); // do the backgroundImage value replacing on the whole value (because why not?)
|
252
|
+
|
253
|
+
return propertyValueConverters.backgroundImage({
|
254
|
+
value: value,
|
255
|
+
valuesToConvert: valuesToConvert,
|
256
|
+
bgImgDirectionRegex: bgImgDirectionRegex
|
257
|
+
});
|
258
|
+
},
|
259
|
+
backgroundImage: function backgroundImage(_ref6) {
|
260
|
+
var value = _ref6.value,
|
261
|
+
valuesToConvert = _ref6.valuesToConvert,
|
262
|
+
bgImgDirectionRegex = _ref6.bgImgDirectionRegex;
|
263
|
+
|
264
|
+
if (!includes(value, 'url(') && !includes(value, 'linear-gradient(')) {
|
265
|
+
return value;
|
266
|
+
}
|
267
|
+
|
268
|
+
return value.replace(bgImgDirectionRegex, function (match, g1, group2) {
|
269
|
+
return match.replace(group2, valuesToConvert[group2]);
|
270
|
+
});
|
271
|
+
},
|
272
|
+
backgroundPosition: function backgroundPosition(_ref7) {
|
273
|
+
var value = _ref7.value,
|
274
|
+
valuesToConvert = _ref7.valuesToConvert,
|
275
|
+
isRtl = _ref7.isRtl,
|
276
|
+
bgPosDirectionRegex = _ref7.bgPosDirectionRegex;
|
277
|
+
return value // intentionally only grabbing the first instance of this because that represents `left`
|
278
|
+
.replace(isRtl ? /^((-|\d|\.)+%)/ : null, function (match, group) {
|
279
|
+
return calculateNewBackgroundPosition(group);
|
280
|
+
}).replace(bgPosDirectionRegex, function (match) {
|
281
|
+
return valuesToConvert[match];
|
282
|
+
});
|
283
|
+
},
|
284
|
+
backgroundPositionX: function backgroundPositionX(_ref8) {
|
285
|
+
var value = _ref8.value,
|
286
|
+
valuesToConvert = _ref8.valuesToConvert,
|
287
|
+
isRtl = _ref8.isRtl,
|
288
|
+
bgPosDirectionRegex = _ref8.bgPosDirectionRegex;
|
289
|
+
|
290
|
+
if (isNumber(value)) {
|
291
|
+
return value;
|
292
|
+
}
|
293
|
+
|
294
|
+
return propertyValueConverters.backgroundPosition({
|
295
|
+
value: value,
|
296
|
+
valuesToConvert: valuesToConvert,
|
297
|
+
isRtl: isRtl,
|
298
|
+
bgPosDirectionRegex: bgPosDirectionRegex
|
299
|
+
});
|
300
|
+
},
|
301
|
+
transition: function transition(_ref9) {
|
302
|
+
var value = _ref9.value,
|
303
|
+
propertiesToConvert = _ref9.propertiesToConvert;
|
304
|
+
return value.split(/,\s*/g).map(function (transition) {
|
305
|
+
var values = transition.split(' '); // Property is always defined first
|
306
|
+
|
307
|
+
values[0] = propertiesToConvert[values[0]] || values[0];
|
308
|
+
return values.join(' ');
|
309
|
+
}).join(', ');
|
310
|
+
},
|
311
|
+
transitionProperty: function transitionProperty(_ref10) {
|
312
|
+
var value = _ref10.value,
|
313
|
+
propertiesToConvert = _ref10.propertiesToConvert;
|
314
|
+
return value.split(/,\s*/g).map(function (prop) {
|
315
|
+
return propertiesToConvert[prop] || prop;
|
316
|
+
}).join(', ');
|
317
|
+
},
|
318
|
+
transform: function transform(_ref11) {
|
319
|
+
var value = _ref11.value;
|
320
|
+
// This was copied and modified from CSSJanus:
|
321
|
+
// https://github.com/cssjanus/cssjanus/blob/4a40f001b1ba35567112d8b8e1d9d95eda4234c3/src/cssjanus.js#L152-L153
|
322
|
+
var nonAsciiPattern = "[^\\u0020-\\u007e]";
|
323
|
+
var escapePattern = "(?:" + '(?:(?:\\[0-9a-f]{1,6})(?:\\r\\n|\\s)?)' + "|\\\\[^\\r\\n\\f0-9a-f])";
|
324
|
+
var signedQuantPattern = "((?:-?" + ('(?:[0-9]*\\.[0-9]+|[0-9]+)' + "(?:\\s*" + '(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)' + "|" + ("-?" + ("(?:[_a-z]|" + nonAsciiPattern + "|" + escapePattern + ")") + ("(?:[_a-z0-9-]|" + nonAsciiPattern + "|" + escapePattern + ")") + "*") + ")?") + ")|(?:inherit|auto))";
|
325
|
+
var translateXRegExp = new RegExp("(translateX\\s*\\(\\s*)" + signedQuantPattern + "(\\s*\\))", 'gi');
|
326
|
+
var translateRegExp = new RegExp("(translate\\s*\\(\\s*)" + signedQuantPattern + "((?:\\s*,\\s*" + signedQuantPattern + "){0,1}\\s*\\))", 'gi');
|
327
|
+
var translate3dRegExp = new RegExp("(translate3d\\s*\\(\\s*)" + signedQuantPattern + "((?:\\s*,\\s*" + signedQuantPattern + "){0,2}\\s*\\))", 'gi');
|
328
|
+
var rotateRegExp = new RegExp("(rotate[ZY]?\\s*\\(\\s*)" + signedQuantPattern + "(\\s*\\))", 'gi');
|
329
|
+
return value.replace(translateXRegExp, flipTransformSign).replace(translateRegExp, flipTransformSign).replace(translate3dRegExp, flipTransformSign).replace(rotateRegExp, flipTransformSign);
|
330
|
+
}
|
331
|
+
};
|
332
|
+
propertyValueConverters.objectPosition = propertyValueConverters.backgroundPosition;
|
333
|
+
propertyValueConverters.margin = propertyValueConverters.padding;
|
334
|
+
propertyValueConverters.borderWidth = propertyValueConverters.padding;
|
335
|
+
propertyValueConverters.boxShadow = propertyValueConverters.textShadow;
|
336
|
+
propertyValueConverters.webkitBoxShadow = propertyValueConverters.boxShadow;
|
337
|
+
propertyValueConverters.mozBoxShadow = propertyValueConverters.boxShadow;
|
338
|
+
propertyValueConverters.WebkitBoxShadow = propertyValueConverters.boxShadow;
|
339
|
+
propertyValueConverters.MozBoxShadow = propertyValueConverters.boxShadow;
|
340
|
+
propertyValueConverters.borderStyle = propertyValueConverters.borderColor;
|
341
|
+
propertyValueConverters.webkitTransform = propertyValueConverters.transform;
|
342
|
+
propertyValueConverters.mozTransform = propertyValueConverters.transform;
|
343
|
+
propertyValueConverters.WebkitTransform = propertyValueConverters.transform;
|
344
|
+
propertyValueConverters.MozTransform = propertyValueConverters.transform;
|
345
|
+
propertyValueConverters.transformOrigin = propertyValueConverters.backgroundPosition;
|
346
|
+
propertyValueConverters.webkitTransformOrigin = propertyValueConverters.transformOrigin;
|
347
|
+
propertyValueConverters.mozTransformOrigin = propertyValueConverters.transformOrigin;
|
348
|
+
propertyValueConverters.WebkitTransformOrigin = propertyValueConverters.transformOrigin;
|
349
|
+
propertyValueConverters.MozTransformOrigin = propertyValueConverters.transformOrigin;
|
350
|
+
propertyValueConverters.webkitTransition = propertyValueConverters.transition;
|
351
|
+
propertyValueConverters.mozTransition = propertyValueConverters.transition;
|
352
|
+
propertyValueConverters.WebkitTransition = propertyValueConverters.transition;
|
353
|
+
propertyValueConverters.MozTransition = propertyValueConverters.transition;
|
354
|
+
propertyValueConverters.webkitTransitionProperty = propertyValueConverters.transitionProperty;
|
355
|
+
propertyValueConverters.mozTransitionProperty = propertyValueConverters.transitionProperty;
|
356
|
+
propertyValueConverters.WebkitTransitionProperty = propertyValueConverters.transitionProperty;
|
357
|
+
propertyValueConverters.MozTransitionProperty = propertyValueConverters.transitionProperty; // kebab-case versions
|
358
|
+
|
359
|
+
propertyValueConverters['text-shadow'] = propertyValueConverters.textShadow;
|
360
|
+
propertyValueConverters['border-color'] = propertyValueConverters.borderColor;
|
361
|
+
propertyValueConverters['border-radius'] = propertyValueConverters.borderRadius;
|
362
|
+
propertyValueConverters['background-image'] = propertyValueConverters.backgroundImage;
|
363
|
+
propertyValueConverters['background-position'] = propertyValueConverters.backgroundPosition;
|
364
|
+
propertyValueConverters['background-position-x'] = propertyValueConverters.backgroundPositionX;
|
365
|
+
propertyValueConverters['object-position'] = propertyValueConverters.objectPosition;
|
366
|
+
propertyValueConverters['border-width'] = propertyValueConverters.padding;
|
367
|
+
propertyValueConverters['box-shadow'] = propertyValueConverters.textShadow;
|
368
|
+
propertyValueConverters['-webkit-box-shadow'] = propertyValueConverters.textShadow;
|
369
|
+
propertyValueConverters['-moz-box-shadow'] = propertyValueConverters.textShadow;
|
370
|
+
propertyValueConverters['border-style'] = propertyValueConverters.borderColor;
|
371
|
+
propertyValueConverters['-webkit-transform'] = propertyValueConverters.transform;
|
372
|
+
propertyValueConverters['-moz-transform'] = propertyValueConverters.transform;
|
373
|
+
propertyValueConverters['transform-origin'] = propertyValueConverters.transformOrigin;
|
374
|
+
propertyValueConverters['-webkit-transform-origin'] = propertyValueConverters.transformOrigin;
|
375
|
+
propertyValueConverters['-moz-transform-origin'] = propertyValueConverters.transformOrigin;
|
376
|
+
propertyValueConverters['-webkit-transition'] = propertyValueConverters.transition;
|
377
|
+
propertyValueConverters['-moz-transition'] = propertyValueConverters.transition;
|
378
|
+
propertyValueConverters['transition-property'] = propertyValueConverters.transitionProperty;
|
379
|
+
propertyValueConverters['-webkit-transition-property'] = propertyValueConverters.transitionProperty;
|
380
|
+
propertyValueConverters['-moz-transition-property'] = propertyValueConverters.transitionProperty;
|
381
|
+
|
382
|
+
var propertiesToConvert = arrayToObject([['paddingLeft', 'paddingRight'], ['marginLeft', 'marginRight'], ['left', 'right'], ['borderLeft', 'borderRight'], ['borderLeftColor', 'borderRightColor'], ['borderLeftStyle', 'borderRightStyle'], ['borderLeftWidth', 'borderRightWidth'], ['borderTopLeftRadius', 'borderTopRightRadius'], ['borderBottomLeftRadius', 'borderBottomRightRadius'], // kebab-case versions
|
383
|
+
['padding-left', 'padding-right'], ['margin-left', 'margin-right'], ['border-left', 'border-right'], ['border-left-color', 'border-right-color'], ['border-left-style', 'border-right-style'], ['border-left-width', 'border-right-width'], ['border-top-left-radius', 'border-top-right-radius'], ['border-bottom-left-radius', 'border-bottom-right-radius']]);
|
384
|
+
var propsToIgnore = ['content']; // this is the same as the propertiesToConvert except for values
|
385
|
+
|
386
|
+
var valuesToConvert = arrayToObject([['ltr', 'rtl'], ['left', 'right'], ['w-resize', 'e-resize'], ['sw-resize', 'se-resize'], ['nw-resize', 'ne-resize']]); // Sorry for the regex 😞, but basically thisis used to replace _every_ instance of
|
387
|
+
// `ltr`, `rtl`, `right`, and `left` in `backgroundimage` with the corresponding opposite.
|
388
|
+
// A situation we're accepting here:
|
389
|
+
// url('/left/right/rtl/ltr.png') will be changed to url('/right/left/ltr/rtl.png')
|
390
|
+
// Definite trade-offs here, but I think it's a good call.
|
391
|
+
|
392
|
+
var bgImgDirectionRegex = new RegExp('(^|\\W|_)((ltr)|(rtl)|(left)|(right))(\\W|_|$)', 'g');
|
393
|
+
var bgPosDirectionRegex = new RegExp('(left)|(right)');
|
394
|
+
/**
|
395
|
+
* converts properties and values in the CSS in JS object to their corresponding RTL values
|
396
|
+
* @param {Object} object the CSS in JS object
|
397
|
+
* @return {Object} the RTL converted object
|
398
|
+
*/
|
399
|
+
|
400
|
+
function convert(object) {
|
401
|
+
return Object.keys(object).reduce(function (newObj, originalKey) {
|
402
|
+
var originalValue = object[originalKey];
|
403
|
+
|
404
|
+
if (isString(originalValue)) {
|
405
|
+
// you're welcome to later code 😺
|
406
|
+
originalValue = originalValue.trim();
|
407
|
+
} // Some properties should never be transformed
|
408
|
+
|
409
|
+
|
410
|
+
if (includes(propsToIgnore, originalKey)) {
|
411
|
+
newObj[originalKey] = originalValue;
|
412
|
+
return newObj;
|
413
|
+
}
|
414
|
+
|
415
|
+
var _convertProperty = convertProperty(originalKey, originalValue),
|
416
|
+
key = _convertProperty.key,
|
417
|
+
value = _convertProperty.value;
|
418
|
+
|
419
|
+
newObj[key] = value;
|
420
|
+
return newObj;
|
421
|
+
}, Array.isArray(object) ? [] : {});
|
422
|
+
}
|
423
|
+
/**
|
424
|
+
* Converts a property and its value to the corresponding RTL key and value
|
425
|
+
* @param {String} originalKey the original property key
|
426
|
+
* @param {Number|String|Object} originalValue the original css property value
|
427
|
+
* @return {Object} the new {key, value} pair
|
428
|
+
*/
|
429
|
+
|
430
|
+
function convertProperty(originalKey, originalValue) {
|
431
|
+
var isNoFlip = /\/\*\s?@noflip\s?\*\//.test(originalValue);
|
432
|
+
var key = isNoFlip ? originalKey : getPropertyDoppelganger(originalKey);
|
433
|
+
var value = isNoFlip ? originalValue : getValueDoppelganger(key, originalValue);
|
434
|
+
return {
|
435
|
+
key: key,
|
436
|
+
value: value
|
437
|
+
};
|
438
|
+
}
|
439
|
+
/**
|
440
|
+
* This gets the RTL version of the given property if it has a corresponding RTL property
|
441
|
+
* @param {String} property the name of the property
|
442
|
+
* @return {String} the name of the RTL property
|
443
|
+
*/
|
444
|
+
|
445
|
+
function getPropertyDoppelganger(property) {
|
446
|
+
return propertiesToConvert[property] || property;
|
447
|
+
}
|
448
|
+
/**
|
449
|
+
* This converts the given value to the RTL version of that value based on the key
|
450
|
+
* @param {String} key this is the key (note: this should be the RTL version of the originalKey)
|
451
|
+
* @param {String|Number|Object} originalValue the original css property value. If it's an object, then we'll convert that as well
|
452
|
+
* @return {String|Number|Object} the converted value
|
453
|
+
*/
|
454
|
+
|
455
|
+
function getValueDoppelganger(key, originalValue) {
|
456
|
+
/* eslint complexity:[2, 10] */
|
457
|
+
// let's try to keep the complexity down... If we have to do this much more, let's break this up
|
458
|
+
if (isNullOrUndefined(originalValue) || isBoolean(originalValue)) {
|
459
|
+
return originalValue;
|
460
|
+
}
|
461
|
+
|
462
|
+
if (isObject(originalValue)) {
|
463
|
+
return convert(originalValue); // recurssion 🌀
|
464
|
+
}
|
465
|
+
|
466
|
+
var isNum = isNumber(originalValue);
|
467
|
+
var isFunc = isFunction(originalValue);
|
468
|
+
var importantlessValue = isNum || isFunc ? originalValue : originalValue.replace(/ !important.*?$/, '');
|
469
|
+
var isImportant = !isNum && importantlessValue.length !== originalValue.length;
|
470
|
+
var valueConverter = propertyValueConverters[key];
|
471
|
+
var newValue;
|
472
|
+
|
473
|
+
if (valueConverter) {
|
474
|
+
newValue = valueConverter({
|
475
|
+
value: importantlessValue,
|
476
|
+
valuesToConvert: valuesToConvert,
|
477
|
+
propertiesToConvert: propertiesToConvert,
|
478
|
+
isRtl: true,
|
479
|
+
bgImgDirectionRegex: bgImgDirectionRegex,
|
480
|
+
bgPosDirectionRegex: bgPosDirectionRegex
|
481
|
+
});
|
482
|
+
} else {
|
483
|
+
newValue = valuesToConvert[importantlessValue] || importantlessValue;
|
484
|
+
}
|
485
|
+
|
486
|
+
if (isImportant) {
|
487
|
+
return newValue + " !important";
|
488
|
+
}
|
489
|
+
|
490
|
+
return newValue;
|
491
|
+
}
|
492
|
+
|
493
|
+
return convert;
|
494
|
+
|
495
|
+
})));
|
496
|
+
//# sourceMappingURL=rtl-css-js.umd.js.map
|