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,36 @@
|
|
1
|
+
(function (global, factory) {
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
3
|
+
typeof define === 'function' && define.amd ? define(factory) :
|
4
|
+
(global.preactDeepForceUpdate = factory());
|
5
|
+
}(this, function () {
|
6
|
+
|
7
|
+
/** Invoke `.forceUpdate()` on a component and all descendants. */
|
8
|
+
function deepForceUpdate(component) {
|
9
|
+
if (component.forceUpdate) {
|
10
|
+
component.forceUpdate();
|
11
|
+
}
|
12
|
+
|
13
|
+
// high-order child recursion
|
14
|
+
if (component._component) {
|
15
|
+
deepForceUpdate(component._component);
|
16
|
+
} else if (component.base) {
|
17
|
+
updateComponentsFromDom(component.base);
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
function updateComponentsFromDom(node, fn) {
|
22
|
+
var children = node.childNodes;
|
23
|
+
for (var i = children && children.length; i--;) {
|
24
|
+
var child = children[i];
|
25
|
+
if (child._component) {
|
26
|
+
deepForceUpdate(child._component);
|
27
|
+
} else {
|
28
|
+
updateComponentsFromDom(child, fn);
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
return deepForceUpdate;
|
34
|
+
|
35
|
+
}));
|
36
|
+
//# sourceMappingURL=deep-force-update.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":null,"sources":["../src/index.js"],"sourcesContent":["/** Invoke `.forceUpdate()` on a component and all descendants. */\nexport default function deepForceUpdate(component) {\n\tif (component.forceUpdate) {\n\t\tcomponent.forceUpdate();\n\t}\n\n\t// high-order child recursion\n\tif (component._component) {\n\t\tdeepForceUpdate(component._component);\n\t}\n\telse if (component.base) {\n\t\tupdateComponentsFromDom(component.base);\n\t}\n}\n\nfunction updateComponentsFromDom(node, fn) {\n\tlet children = node.childNodes;\n\tfor (let i=children && children.length; i--; ) {\n\t\tlet child = children[i];\n\t\tif (child._component) {\n\t\t\tdeepForceUpdate(child._component);\n\t\t}\n\t\telse {\n\t\t\tupdateComponentsFromDom(child, fn);\n\t\t}\n\t}\n}\n"],"names":[],"mappings":";;;;;;CAAA;AACA,AAAe,CAAA,SAAS,eAAT,CAAyB,SAAzB,EAAoC;AAClD,CAAA,KAAI,UAAU,WAAd,EAA2B;AAC1B,CAAA,YAAU,WAAV;AACA,CAAA;;AAED,CAAA;AACA,CAAA,KAAI,UAAU,UAAd,EAA0B;AACzB,CAAA,kBAAgB,UAAU,UAA1B;AACA,CAAA,EAFD,MAGK,IAAI,UAAU,IAAd,EAAoB;AACxB,CAAA,0BAAwB,UAAU,IAAlC;AACA,CAAA;AACD,CAAA;;AAED,CAAA,SAAS,uBAAT,CAAiC,IAAjC,EAAuC,EAAvC,EAA2C;AAC1C,CAAA,KAAI,WAAW,KAAK,UAApB;AACA,CAAA,MAAK,IAAI,IAAE,YAAY,SAAS,MAAhC,EAAwC,GAAxC,GAA+C;AAC9C,CAAA,MAAI,QAAQ,SAAS,CAAT,CAAZ;AACA,CAAA,MAAI,MAAM,UAAV,EAAsB;AACrB,CAAA,mBAAgB,MAAM,UAAtB;AACA,CAAA,GAFD,MAGK;AACJ,CAAA,2BAAwB,KAAxB,EAA+B,EAA/B;AACA,CAAA;AACD,CAAA;AACD,CAAA;;;;"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):e.preactDeepForceUpdate=o()}(this,function(){function e(n){n.forceUpdate&&n.forceUpdate(),n._component?e(n._component):n.base&&o(n.base)}function o(n,t){for(var c=n.childNodes,f=c&&c.length;f--;){var p=c[f];p._component?e(p._component):o(p,t)}}return e});
|
2
|
+
//# sourceMappingURL=deep-force-update.min.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/index.js"],"names":["deepForceUpdate","component","forceUpdate","_component","base","updateComponentsFromDom","node","fn","children","childNodes","i","length","child"],"mappings":"oLACe,QAASA,GAAgBC,GACnCA,EAAUC,aACbD,EAAUC,cAIPD,EAAUE,WACbH,EAAgBC,EAAUE,YAElBF,EAAUG,MAClBC,EAAwBJ,EAAUG,MAIpC,QAASC,GAAwBC,EAAMC,GAEtC,IAAK,GADDC,GAAWF,EAAKG,WACXC,EAAEF,GAAYA,EAASG,OAAQD,KAAO,CAC9C,GAAIE,GAAQJ,EAASE,EACjBE,GAAMT,WACTH,EAAgBY,EAAMT,YAGtBE,EAAwBO,EAAOL","file":"deep-force-update.min.js"}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module.exports = function(config) {
|
2
|
+
config.set({
|
3
|
+
frameworks: ['mocha', 'chai-sinon'],
|
4
|
+
reporters: ['mocha'],
|
5
|
+
browsers: ['PhantomJS'],
|
6
|
+
|
7
|
+
files: ['test/**/*.js'],
|
8
|
+
|
9
|
+
preprocessors: {
|
10
|
+
'{src,test}/**/*.js': ['webpack', 'sourcemap']
|
11
|
+
},
|
12
|
+
|
13
|
+
webpack: {
|
14
|
+
module: {
|
15
|
+
loaders: [{
|
16
|
+
test: /\.jsx?$/,
|
17
|
+
exclude: /node_modules/,
|
18
|
+
loader: 'babel'
|
19
|
+
}]
|
20
|
+
},
|
21
|
+
resolve: {
|
22
|
+
alias: {
|
23
|
+
src: __dirname+'/src'
|
24
|
+
}
|
25
|
+
}
|
26
|
+
},
|
27
|
+
|
28
|
+
webpackMiddleware: {
|
29
|
+
noInfo: true
|
30
|
+
}
|
31
|
+
});
|
32
|
+
};
|
@@ -0,0 +1,80 @@
|
|
1
|
+
{
|
2
|
+
"name": "preact-deep-force-update",
|
3
|
+
"amdName": "preactDeepForceUpdate",
|
4
|
+
"version": "0.1.0",
|
5
|
+
"description": "Recursively invoke forceUpdate() on a tree of components.",
|
6
|
+
"main": "dist/deep-force-update.js",
|
7
|
+
"jsnext:main": "src/index.js",
|
8
|
+
"minified:main": "dist/deep-force-update.min.js",
|
9
|
+
"scripts": {
|
10
|
+
"clean": "rimraf dist/",
|
11
|
+
"build": "npm-run-all clean transpile minify size",
|
12
|
+
"transpile": "rollup -c rollup.config.js -m ${npm_package_main}.map -f umd -n $npm_package_amdName $npm_package_jsnext_main -o $npm_package_main",
|
13
|
+
"minify": "uglifyjs $npm_package_main -cm -o $npm_package_minified_main -p relative --in-source-map ${npm_package_main}.map --source-map ${npm_package_minified_main}.map",
|
14
|
+
"size": "size=$(gzip-size $npm_package_minified_main) && echo \"gzip size: $size / $(pretty-bytes $size)\"",
|
15
|
+
"test": "npm-run-all lint build test:karma",
|
16
|
+
"lint": "eslint {src,test}",
|
17
|
+
"test:karma": "karma start --single-run",
|
18
|
+
"test:watch": "karma start",
|
19
|
+
"prepublish": "npm-run-all build test",
|
20
|
+
"release": "npm run build && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"
|
21
|
+
},
|
22
|
+
"keywords": [
|
23
|
+
"preact",
|
24
|
+
"update",
|
25
|
+
"force"
|
26
|
+
],
|
27
|
+
"author": "Jason Miller <jason@developit.ca>",
|
28
|
+
"license": "MIT",
|
29
|
+
"repository": {
|
30
|
+
"type": "git",
|
31
|
+
"url": "https://github.com/developit/preact-deep-force-update.git"
|
32
|
+
},
|
33
|
+
"bugs": {
|
34
|
+
"url": "https://github.com/developit/preact-deep-force-update/issues"
|
35
|
+
},
|
36
|
+
"homepage": "https://github.com/developit/preact-deep-force-update",
|
37
|
+
"peerDependencies": {
|
38
|
+
"preact": "*"
|
39
|
+
},
|
40
|
+
"devDependencies": {
|
41
|
+
"babel-cli": "^6.9.0",
|
42
|
+
"babel-core": "^6.9.1",
|
43
|
+
"babel-eslint": "^6.0.4",
|
44
|
+
"babel-loader": "^6.2.4",
|
45
|
+
"babel-plugin-transform-class-properties": "^6.9.1",
|
46
|
+
"babel-plugin-transform-es2015-classes": "^6.9.0",
|
47
|
+
"babel-plugin-transform-react-jsx": "^6.8.0",
|
48
|
+
"babel-preset-es2015": "^6.9.0",
|
49
|
+
"babel-preset-es2015-minimal": "^2.0.0",
|
50
|
+
"babel-preset-es2015-minimal-rollup": "^2.0.0",
|
51
|
+
"babel-preset-react": "^6.5.0",
|
52
|
+
"babel-preset-stage-0": "^6.5.0",
|
53
|
+
"chai": "^3.5.0",
|
54
|
+
"diff": "^2.2.3",
|
55
|
+
"eslint": "^3.0.0",
|
56
|
+
"eslint-plugin-react": "^5.1.1",
|
57
|
+
"gzip-size-cli": "^1.0.0",
|
58
|
+
"karma": "^1.0.0",
|
59
|
+
"karma-chai-sinon": "^0.1.5",
|
60
|
+
"karma-mocha": "^1.0.1",
|
61
|
+
"karma-mocha-reporter": "^2.0.3",
|
62
|
+
"karma-phantomjs-launcher": "^1.0.0",
|
63
|
+
"karma-sourcemap-loader": "^0.3.7",
|
64
|
+
"karma-webpack": "^1.7.0",
|
65
|
+
"mkdirp": "^0.5.1",
|
66
|
+
"mocha": "^2.5.0",
|
67
|
+
"npm-run-all": "^2.0.0",
|
68
|
+
"phantomjs-prebuilt": "^2.1.7",
|
69
|
+
"preact": "^5.3.1",
|
70
|
+
"pretty-bytes-cli": "^1.0.0",
|
71
|
+
"rimraf": "^2.5.1",
|
72
|
+
"rollup": "^0.34.1",
|
73
|
+
"rollup-plugin-babel": "^2.4.0",
|
74
|
+
"rollup-plugin-memory": "^1.0.0",
|
75
|
+
"sinon": "^1.17.4",
|
76
|
+
"sinon-chai": "^2.8.0",
|
77
|
+
"uglify-js": "^2.6.1",
|
78
|
+
"webpack": "^1.13.1"
|
79
|
+
}
|
80
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import fs from 'fs';
|
2
|
+
import babel from 'rollup-plugin-babel';
|
3
|
+
|
4
|
+
var babelRc = JSON.parse(fs.readFileSync('.babelrc','utf8')); // eslint-disable-line
|
5
|
+
|
6
|
+
export default {
|
7
|
+
exports: 'default',
|
8
|
+
useStrict: false,
|
9
|
+
plugins: [
|
10
|
+
babel({
|
11
|
+
babelrc: false,
|
12
|
+
presets: ['es2015-minimal-rollup'].concat(babelRc.presets.slice(1)),
|
13
|
+
plugins: babelRc.plugins,
|
14
|
+
exclude: 'node_modules/**'
|
15
|
+
})
|
16
|
+
]
|
17
|
+
};
|
@@ -0,0 +1,27 @@
|
|
1
|
+
/** Invoke `.forceUpdate()` on a component and all descendants. */
|
2
|
+
export default function deepForceUpdate(component) {
|
3
|
+
if (component.forceUpdate) {
|
4
|
+
component.forceUpdate();
|
5
|
+
}
|
6
|
+
|
7
|
+
// high-order child recursion
|
8
|
+
if (component._component) {
|
9
|
+
deepForceUpdate(component._component);
|
10
|
+
}
|
11
|
+
else if (component.base) {
|
12
|
+
updateComponentsFromDom(component.base);
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
function updateComponentsFromDom(node, fn) {
|
17
|
+
let children = node.childNodes;
|
18
|
+
for (let i=children && children.length; i--; ) {
|
19
|
+
let child = children[i];
|
20
|
+
if (child._component) {
|
21
|
+
deepForceUpdate(child._component);
|
22
|
+
}
|
23
|
+
else {
|
24
|
+
updateComponentsFromDom(child, fn);
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
import { h, Component, render } from 'preact';
|
2
|
+
import deepForceUpdate from 'src';
|
3
|
+
|
4
|
+
describe('deepForceUpdate', () => {
|
5
|
+
let scratch = document.createElement('div');
|
6
|
+
|
7
|
+
before( () => document.body.appendChild(scratch) );
|
8
|
+
afterEach( () => scratch.innerHTML = '' );
|
9
|
+
after( () => document.body.removeChild(scratch) );
|
10
|
+
|
11
|
+
it('should force updates', () => {
|
12
|
+
let renders = {
|
13
|
+
outer: 0,
|
14
|
+
inner: 0
|
15
|
+
};
|
16
|
+
|
17
|
+
class Outer extends Component {
|
18
|
+
render() {
|
19
|
+
renders.outer++;
|
20
|
+
return <div><Inner /></div>;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
class Inner extends Component {
|
25
|
+
render() {
|
26
|
+
renders.inner++;
|
27
|
+
let time = new Date().toTimeString();
|
28
|
+
return <span>{time}</span>;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
let outer;
|
33
|
+
let root = render(<Outer ref={c => outer=c } />, scratch);
|
34
|
+
|
35
|
+
expect(renders).to.have.property('outer', 1);
|
36
|
+
expect(renders).to.have.property('inner', 1);
|
37
|
+
|
38
|
+
// force an update to the whole tree:
|
39
|
+
deepForceUpdate(outer);
|
40
|
+
|
41
|
+
expect(renders).to.have.property('outer', 2);
|
42
|
+
expect(renders).to.have.property('inner', 3);
|
43
|
+
|
44
|
+
// you can also pass an Element:
|
45
|
+
deepForceUpdate(root);
|
46
|
+
|
47
|
+
expect(renders).to.have.property('outer', 3);
|
48
|
+
expect(renders).to.have.property('inner', 5);
|
49
|
+
});
|
50
|
+
});
|
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Jason Miller
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
@@ -0,0 +1,102 @@
|
|
1
|
+
# preact-render-to-string
|
2
|
+
|
3
|
+
[![NPM](http://img.shields.io/npm/v/preact-render-to-string.svg)](https://www.npmjs.com/package/preact-render-to-string)
|
4
|
+
[![travis-ci](https://travis-ci.org/preactjs/preact-render-to-string.svg)](https://travis-ci.org/preactjs/preact-render-to-string)
|
5
|
+
|
6
|
+
Render JSX and [Preact] components to an HTML string.
|
7
|
+
|
8
|
+
Works in Node & the browser, making it useful for universal/isomorphic rendering.
|
9
|
+
|
10
|
+
\>\> **[Cute Fox-Related Demo](http://codepen.io/developit/pen/dYZqjE?editors=001)** _(@ CodePen)_ <<
|
11
|
+
|
12
|
+
|
13
|
+
---
|
14
|
+
|
15
|
+
|
16
|
+
### Render JSX/VDOM to HTML
|
17
|
+
|
18
|
+
```js
|
19
|
+
import render from 'preact-render-to-string';
|
20
|
+
import { h } from 'preact';
|
21
|
+
/** @jsx h */
|
22
|
+
|
23
|
+
let vdom = <div class="foo">content</div>;
|
24
|
+
|
25
|
+
let html = render(vdom);
|
26
|
+
console.log(html);
|
27
|
+
// <div class="foo">content</div>
|
28
|
+
```
|
29
|
+
|
30
|
+
|
31
|
+
### Render Preact Components to HTML
|
32
|
+
|
33
|
+
```js
|
34
|
+
import render from 'preact-render-to-string';
|
35
|
+
import { h, Component } from 'preact';
|
36
|
+
/** @jsx h */
|
37
|
+
|
38
|
+
// Classical components work
|
39
|
+
class Fox extends Component {
|
40
|
+
render({ name }) {
|
41
|
+
return <span class="fox">{ name }</span>;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
// ... and so do pure functional components:
|
46
|
+
const Box = ({ type, children }) => (
|
47
|
+
<div class={`box box-${type}`}>{ children }</div>
|
48
|
+
);
|
49
|
+
|
50
|
+
let html = render(
|
51
|
+
<Box type="open">
|
52
|
+
<Fox name="Finn" />
|
53
|
+
</Box>
|
54
|
+
);
|
55
|
+
|
56
|
+
console.log(html);
|
57
|
+
// <div class="box box-open"><span class="fox">Finn</span></div>
|
58
|
+
```
|
59
|
+
|
60
|
+
|
61
|
+
---
|
62
|
+
|
63
|
+
|
64
|
+
### Render JSX / Preact / Whatever via Express!
|
65
|
+
|
66
|
+
```js
|
67
|
+
import express from 'express';
|
68
|
+
import { h } from 'preact';
|
69
|
+
import render from 'preact-render-to-string';
|
70
|
+
/** @jsx h */
|
71
|
+
|
72
|
+
// silly example component:
|
73
|
+
const Fox = ({ name }) => (
|
74
|
+
<div class="fox">
|
75
|
+
<h5>{ name }</h5>
|
76
|
+
<p>This page is all about {name}.</p>
|
77
|
+
</div>
|
78
|
+
);
|
79
|
+
|
80
|
+
// basic HTTP server via express:
|
81
|
+
const app = express();
|
82
|
+
app.listen(8080);
|
83
|
+
|
84
|
+
// on each request, render and return a component:
|
85
|
+
app.get('/:fox', (req, res) => {
|
86
|
+
let html = render(<Fox name={req.params.fox} />);
|
87
|
+
// send it back wrapped up as an HTML5 document:
|
88
|
+
res.send(`<!DOCTYPE html><html><body>${html}</body></html>`);
|
89
|
+
});
|
90
|
+
```
|
91
|
+
|
92
|
+
|
93
|
+
---
|
94
|
+
|
95
|
+
|
96
|
+
### License
|
97
|
+
|
98
|
+
[MIT]
|
99
|
+
|
100
|
+
|
101
|
+
[Preact]: https://github.com/developit/preact
|
102
|
+
[MIT]: http://choosealicense.com/licenses/mit/
|
@@ -0,0 +1,2 @@
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("preact")):"function"==typeof define&&define.amd?define(["exports","preact"],t):t((e||self).preactRenderToString={},e.preact)}(this,function(e,t){var n=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i,r=/[&<>"]/;function o(e){var t=String(e);return r.test(t)?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""):t}var i=function(e,t){return String(e).replace(/(\n+)/g,"$1"+(t||"\t"))},a=function(e,t,n){return String(e).length>(t||40)||!n&&-1!==String(e).indexOf("\n")||-1!==String(e).indexOf("<")},l={};function s(e){var t="";for(var r in e){var o=e[r];null!=o&&""!==o&&(t&&(t+=" "),t+="-"==r[0]?r:l[r]||(l[r]=r.replace(/([A-Z])/g,"-$1").toLowerCase()),t+=": ",t+=o,"number"==typeof o&&!1===n.test(r)&&(t+="px"),t+=";")}return t||void 0}function f(e,t){for(var n in t)e[n]=t[n];return e}function p(e,t){return Array.isArray(t)?t.reduce(p,e):null!=t&&!1!==t&&e.push(t),e}var u={shallow:!0},c=[],_=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,d=/[\s\n\\/='"\0<>]/,g=function(){};y.render=y;var v=function(e,t){return y(e,t,u)},h=[];function y(e,n,r){n=n||{},r=r||{};var o=t.options.__s;t.options.__s=!0;var i=m(e,n,r);return t.options.__c&&t.options.__c(e,h),h.length=0,t.options.__s=o,i}function m(e,n,r,l,u,v){if(null==e||"boolean"==typeof e)return"";if("object"!=typeof e)return o(e);var h=r.pretty,y=h&&"string"==typeof h?h:"\t";if(Array.isArray(e)){for(var x="",b=0;b<e.length;b++)h&&b>0&&(x+="\n"),x+=m(e[b],n,r,l,u,v);return x}var S,w=e.type,k=e.props,O=!1;if("function"==typeof w){if(O=!0,!r.shallow||!l&&!1!==r.renderRootComponent){if(w===t.Fragment){var T=[];return p(T,e.props.children),m(T,n,r,!1!==r.shallowHighOrder,u,v)}var C,A=e.__c={__v:e,context:n,props:e.props,setState:g,forceUpdate:g,__h:[]};if(t.options.__b&&t.options.__b(e),t.options.__r&&t.options.__r(e),w.prototype&&"function"==typeof w.prototype.render){var j=w.contextType,F=j&&n[j.__c],H=null!=j?F?F.props.value:j.__:n;(A=e.__c=new w(k,H)).__v=e,A._dirty=A.__d=!0,A.props=k,null==A.state&&(A.state={}),null==A._nextState&&null==A.__s&&(A._nextState=A.__s=A.state),A.context=H,w.getDerivedStateFromProps?A.state=f(f({},A.state),w.getDerivedStateFromProps(A.props,A.state)):A.componentWillMount&&(A.componentWillMount(),A.state=A._nextState!==A.state?A._nextState:A.__s!==A.state?A.__s:A.state),C=A.render(A.props,A.state,A.context)}else{var M=w.contextType,$=M&&n[M.__c];C=w.call(e.__c,k,null!=M?$?$.props.value:M.__:n)}return A.getChildContext&&(n=f(f({},n),A.getChildContext())),t.options.diffed&&t.options.diffed(e),m(C,n,r,!1!==r.shallowHighOrder,u,v)}w=(S=w).displayName||S!==Function&&S.name||function(e){var t=(Function.prototype.toString.call(e).match(/^\s*function\s+([^( ]+)/)||"")[1];if(!t){for(var n=-1,r=c.length;r--;)if(c[r]===e){n=r;break}n<0&&(n=c.push(e)-1),t="UnnamedComponent"+n}return t}(S)}var L,R,E="<"+w;if(k){var q=Object.keys(k);r&&!0===r.sortAttributes&&q.sort();for(var D=0;D<q.length;D++){var N=q[D],P=k[N];if("children"!==N){if(!d.test(N)&&(r&&r.allAttributes||"key"!==N&&"ref"!==N&&"__self"!==N&&"__source"!==N&&"defaultValue"!==N)){if("className"===N){if(k.class)continue;N="class"}else u&&N.match(/^xlink:?./)&&(N=N.toLowerCase().replace(/^xlink:?/,"xlink:"));if("htmlFor"===N){if(k.for)continue;N="for"}"style"===N&&P&&"object"==typeof P&&(P=s(P)),"a"===N[0]&&"r"===N[1]&&"boolean"==typeof P&&(P=String(P));var U=r.attributeHook&&r.attributeHook(N,P,n,r,O);if(U||""===U)E+=U;else if("dangerouslySetInnerHTML"===N)R=P&&P.__html;else if("textarea"===w&&"value"===N)L=P;else if((P||0===P||""===P)&&"function"!=typeof P){if(!(!0!==P&&""!==P||(P=N,r&&r.xml))){E+=" "+N;continue}if("value"===N){if("select"===w){v=P;continue}"option"===w&&v==P&&(E+=" selected")}E+=" "+N+'="'+o(P)+'"'}}}else L=P}}if(h){var W=E.replace(/\n\s*/," ");W===E||~W.indexOf("\n")?h&&~E.indexOf("\n")&&(E+="\n"):E=W}if(E+=">",d.test(w))throw new Error(w+" is not a valid HTML tag name in "+E);var z,I=_.test(w)||r.voidElements&&r.voidElements.test(w),V=[];if(R)h&&a(R)&&(R="\n"+y+i(R,y)),E+=R;else if(null!=L&&p(z=[],L).length){for(var Z=h&&~E.indexOf("\n"),B=!1,G=0;G<z.length;G++){var J=z[G];if(null!=J&&!1!==J){var K=m(J,n,r,!0,"svg"===w||"foreignObject"!==w&&u,v);if(h&&!Z&&a(K)&&(Z=!0),K)if(h){var Q=K.length>0&&"<"!=K[0];B&&Q?V[V.length-1]+=K:V.push(K),B=Q}else V.push(K)}}if(h&&Z)for(var X=V.length;X--;)V[X]="\n"+y+i(V[X],y)}if(V.length||R)E+=V.join("");else if(r&&r.xml)return E.substring(0,E.length-1)+" />";return!I||z||R?(h&&~E.indexOf("\n")&&(E+="\n"),E+="</"+w+">"):E=E.replace(/>$/," />"),E}y.shallowRender=v,e.default=y,e.render=y,e.renderToStaticMarkup=y,e.renderToString=y,e.shallowRender=v});
|
2
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/util.js","../src/index.js"],"sourcesContent":["// DOM properties that should NOT have \"px\" added when numeric\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i;\n\nconst ENCODED_ENTITIES = /[&<>\"]/;\n\nexport function encodeEntities(input) {\n\tconst s = String(input);\n\tif (!ENCODED_ENTITIES.test(s)) {\n\t\treturn s;\n\t}\n\treturn s\n\t\t.replace(/&/g, '&')\n\t\t.replace(/</g, '<')\n\t\t.replace(/>/g, '>')\n\t\t.replace(/\"/g, '"');\n}\n\nexport let indent = (s, char) =>\n\tString(s).replace(/(\\n+)/g, '$1' + (char || '\\t'));\n\nexport let isLargeString = (s, length, ignoreLines) =>\n\tString(s).length > (length || 40) ||\n\t(!ignoreLines && String(s).indexOf('\\n') !== -1) ||\n\tString(s).indexOf('<') !== -1;\n\nconst JS_TO_CSS = {};\n\n// Convert an Object style to a CSSText string\nexport function styleObjToCss(s) {\n\tlet str = '';\n\tfor (let prop in s) {\n\t\tlet val = s[prop];\n\t\tif (val != null && val !== '') {\n\t\t\tif (str) str += ' ';\n\t\t\t// str += jsToCss(prop);\n\t\t\tstr +=\n\t\t\t\tprop[0] == '-'\n\t\t\t\t\t? prop\n\t\t\t\t\t: JS_TO_CSS[prop] ||\n\t\t\t\t\t (JS_TO_CSS[prop] = prop.replace(/([A-Z])/g, '-$1').toLowerCase());\n\t\t\tstr += ': ';\n\t\t\tstr += val;\n\t\t\tif (typeof val === 'number' && IS_NON_DIMENSIONAL.test(prop) === false) {\n\t\t\t\tstr += 'px';\n\t\t\t}\n\t\t\tstr += ';';\n\t\t}\n\t}\n\treturn str || undefined;\n}\n\n/**\n * Copy all properties from `props` onto `obj`.\n * @param {object} obj Object onto which properties should be copied.\n * @param {object} props Object from which to copy properties.\n * @returns {object}\n * @private\n */\nexport function assign(obj, props) {\n\tfor (let i in props) obj[i] = props[i];\n\treturn obj;\n}\n\n/**\n * Get flattened children from the children prop\n * @param {Array} accumulator\n * @param {any} children A `props.children` opaque object.\n * @returns {Array} accumulator\n * @private\n */\nexport function getChildren(accumulator, children) {\n\tif (Array.isArray(children)) {\n\t\tchildren.reduce(getChildren, accumulator);\n\t} else if (children != null && children !== false) {\n\t\taccumulator.push(children);\n\t}\n\treturn accumulator;\n}\n","import {\n\tencodeEntities,\n\tindent,\n\tisLargeString,\n\tstyleObjToCss,\n\tassign,\n\tgetChildren\n} from './util';\nimport { options, Fragment } from 'preact';\n\n/** @typedef {import('preact').VNode} VNode */\n\nconst SHALLOW = { shallow: true };\n\n// components without names, kept as a hash for later comparison to return consistent UnnamedComponentXX names.\nconst UNNAMED = [];\n\nconst VOID_ELEMENTS = /^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/;\n\nconst UNSAFE_NAME = /[\\s\\n\\\\/='\"\\0<>]/;\n\nconst noop = () => {};\n\n/** Render Preact JSX + Components to an HTML string.\n *\t@name render\n *\t@function\n *\t@param {VNode} vnode\tJSX VNode to render.\n *\t@param {Object} [context={}]\tOptionally pass an initial context object through the render path.\n *\t@param {Object} [options={}]\tRendering options\n *\t@param {Boolean} [options.shallow=false]\tIf `true`, renders nested Components as HTML elements (`<Foo a=\"b\" />`).\n *\t@param {Boolean} [options.xml=false]\t\tIf `true`, uses self-closing tags for elements without children.\n *\t@param {Boolean} [options.pretty=false]\t\tIf `true`, adds whitespace for readability\n *\t@param {RegExp|undefined} [options.voidElements] RegeEx that matches elements that are considered void (self-closing)\n */\nrenderToString.render = renderToString;\n\n/** Only render elements, leaving Components inline as `<ComponentName ... />`.\n *\tThis method is just a convenience alias for `render(vnode, context, { shallow:true })`\n *\t@name shallow\n *\t@function\n *\t@param {VNode} vnode\tJSX VNode to render.\n *\t@param {Object} [context={}]\tOptionally pass an initial context object through the render path.\n */\nlet shallowRender = (vnode, context) => renderToString(vnode, context, SHALLOW);\n\nconst EMPTY_ARR = [];\nfunction renderToString(vnode, context, opts) {\n\tcontext = context || {};\n\topts = opts || {};\n\n\t// Performance optimization: `renderToString` is synchronous and we\n\t// therefore don't execute any effects. To do that we pass an empty\n\t// array to `options._commit` (`__c`). But we can go one step further\n\t// and avoid a lot of dirty checks and allocations by setting\n\t// `options._skipEffects` (`__s`) too.\n\tconst previousSkipEffects = options.__s;\n\toptions.__s = true;\n\n\tconst res = _renderToString(vnode, context, opts);\n\n\t// options._commit, we don't schedule any effects in this library right now,\n\t// so we can pass an empty queue to this hook.\n\tif (options.__c) options.__c(vnode, EMPTY_ARR);\n\tEMPTY_ARR.length = 0;\n\toptions.__s = previousSkipEffects;\n\treturn res;\n}\n\n/** The default export is an alias of `render()`. */\nfunction _renderToString(vnode, context, opts, inner, isSvgMode, selectValue) {\n\tif (vnode == null || typeof vnode === 'boolean') {\n\t\treturn '';\n\t}\n\n\t// #text nodes\n\tif (typeof vnode !== 'object') {\n\t\treturn encodeEntities(vnode);\n\t}\n\n\tlet pretty = opts.pretty,\n\t\tindentChar = pretty && typeof pretty === 'string' ? pretty : '\\t';\n\n\tif (Array.isArray(vnode)) {\n\t\tlet rendered = '';\n\t\tfor (let i = 0; i < vnode.length; i++) {\n\t\t\tif (pretty && i > 0) rendered += '\\n';\n\t\t\trendered += _renderToString(\n\t\t\t\tvnode[i],\n\t\t\t\tcontext,\n\t\t\t\topts,\n\t\t\t\tinner,\n\t\t\t\tisSvgMode,\n\t\t\t\tselectValue\n\t\t\t);\n\t\t}\n\t\treturn rendered;\n\t}\n\n\tlet nodeName = vnode.type,\n\t\tprops = vnode.props,\n\t\tisComponent = false;\n\n\t// components\n\tif (typeof nodeName === 'function') {\n\t\tisComponent = true;\n\t\tif (opts.shallow && (inner || opts.renderRootComponent === false)) {\n\t\t\tnodeName = getComponentName(nodeName);\n\t\t} else if (nodeName === Fragment) {\n\t\t\tconst children = [];\n\t\t\tgetChildren(children, vnode.props.children);\n\t\t\treturn _renderToString(\n\t\t\t\tchildren,\n\t\t\t\tcontext,\n\t\t\t\topts,\n\t\t\t\topts.shallowHighOrder !== false,\n\t\t\t\tisSvgMode,\n\t\t\t\tselectValue\n\t\t\t);\n\t\t} else {\n\t\t\tlet rendered;\n\n\t\t\tlet c = (vnode.__c = {\n\t\t\t\t__v: vnode,\n\t\t\t\tcontext,\n\t\t\t\tprops: vnode.props,\n\t\t\t\t// silently drop state updates\n\t\t\t\tsetState: noop,\n\t\t\t\tforceUpdate: noop,\n\t\t\t\t// hooks\n\t\t\t\t__h: []\n\t\t\t});\n\n\t\t\t// options._diff\n\t\t\tif (options.__b) options.__b(vnode);\n\n\t\t\t// options._render\n\t\t\tif (options.__r) options.__r(vnode);\n\n\t\t\tif (\n\t\t\t\t!nodeName.prototype ||\n\t\t\t\ttypeof nodeName.prototype.render !== 'function'\n\t\t\t) {\n\t\t\t\t// Necessary for createContext api. Setting this property will pass\n\t\t\t\t// the context value as `this.context` just for this component.\n\t\t\t\tlet cxType = nodeName.contextType;\n\t\t\t\tlet provider = cxType && context[cxType.__c];\n\t\t\t\tlet cctx =\n\t\t\t\t\tcxType != null\n\t\t\t\t\t\t? provider\n\t\t\t\t\t\t\t? provider.props.value\n\t\t\t\t\t\t\t: cxType.__\n\t\t\t\t\t\t: context;\n\n\t\t\t\t// stateless functional components\n\t\t\t\trendered = nodeName.call(vnode.__c, props, cctx);\n\t\t\t} else {\n\t\t\t\t// class-based components\n\t\t\t\tlet cxType = nodeName.contextType;\n\t\t\t\tlet provider = cxType && context[cxType.__c];\n\t\t\t\tlet cctx =\n\t\t\t\t\tcxType != null\n\t\t\t\t\t\t? provider\n\t\t\t\t\t\t\t? provider.props.value\n\t\t\t\t\t\t\t: cxType.__\n\t\t\t\t\t\t: context;\n\n\t\t\t\t// c = new nodeName(props, context);\n\t\t\t\tc = vnode.__c = new nodeName(props, cctx);\n\t\t\t\tc.__v = vnode;\n\t\t\t\t// turn off stateful re-rendering:\n\t\t\t\tc._dirty = c.__d = true;\n\t\t\t\tc.props = props;\n\t\t\t\tif (c.state == null) c.state = {};\n\n\t\t\t\tif (c._nextState == null && c.__s == null) {\n\t\t\t\t\tc._nextState = c.__s = c.state;\n\t\t\t\t}\n\n\t\t\t\tc.context = cctx;\n\t\t\t\tif (nodeName.getDerivedStateFromProps)\n\t\t\t\t\tc.state = assign(\n\t\t\t\t\t\tassign({}, c.state),\n\t\t\t\t\t\tnodeName.getDerivedStateFromProps(c.props, c.state)\n\t\t\t\t\t);\n\t\t\t\telse if (c.componentWillMount) {\n\t\t\t\t\tc.componentWillMount();\n\n\t\t\t\t\t// If the user called setState in cWM we need to flush pending,\n\t\t\t\t\t// state updates. This is the same behaviour in React.\n\t\t\t\t\tc.state =\n\t\t\t\t\t\tc._nextState !== c.state\n\t\t\t\t\t\t\t? c._nextState\n\t\t\t\t\t\t\t: c.__s !== c.state\n\t\t\t\t\t\t\t? c.__s\n\t\t\t\t\t\t\t: c.state;\n\t\t\t\t}\n\n\t\t\t\trendered = c.render(c.props, c.state, c.context);\n\t\t\t}\n\n\t\t\tif (c.getChildContext) {\n\t\t\t\tcontext = assign(assign({}, context), c.getChildContext());\n\t\t\t}\n\n\t\t\tif (options.diffed) options.diffed(vnode);\n\t\t\treturn _renderToString(\n\t\t\t\trendered,\n\t\t\t\tcontext,\n\t\t\t\topts,\n\t\t\t\topts.shallowHighOrder !== false,\n\t\t\t\tisSvgMode,\n\t\t\t\tselectValue\n\t\t\t);\n\t\t}\n\t}\n\n\t// render JSX to HTML\n\tlet s = '<' + nodeName,\n\t\tpropChildren,\n\t\thtml;\n\n\tif (props) {\n\t\tlet attrs = Object.keys(props);\n\n\t\t// allow sorting lexicographically for more determinism (useful for tests, such as via preact-jsx-chai)\n\t\tif (opts && opts.sortAttributes === true) attrs.sort();\n\n\t\tfor (let i = 0; i < attrs.length; i++) {\n\t\t\tlet name = attrs[i],\n\t\t\t\tv = props[name];\n\t\t\tif (name === 'children') {\n\t\t\t\tpropChildren = v;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (UNSAFE_NAME.test(name)) continue;\n\n\t\t\tif (\n\t\t\t\t!(opts && opts.allAttributes) &&\n\t\t\t\t(name === 'key' ||\n\t\t\t\t\tname === 'ref' ||\n\t\t\t\t\tname === '__self' ||\n\t\t\t\t\tname === '__source' ||\n\t\t\t\t\tname === 'defaultValue')\n\t\t\t)\n\t\t\t\tcontinue;\n\n\t\t\tif (name === 'className') {\n\t\t\t\tif (props.class) continue;\n\t\t\t\tname = 'class';\n\t\t\t} else if (isSvgMode && name.match(/^xlink:?./)) {\n\t\t\t\tname = name.toLowerCase().replace(/^xlink:?/, 'xlink:');\n\t\t\t}\n\n\t\t\tif (name === 'htmlFor') {\n\t\t\t\tif (props.for) continue;\n\t\t\t\tname = 'for';\n\t\t\t}\n\n\t\t\tif (name === 'style' && v && typeof v === 'object') {\n\t\t\t\tv = styleObjToCss(v);\n\t\t\t}\n\n\t\t\t// always use string values instead of booleans for aria attributes\n\t\t\t// also see https://github.com/preactjs/preact/pull/2347/files\n\t\t\tif (name[0] === 'a' && name['1'] === 'r' && typeof v === 'boolean') {\n\t\t\t\tv = String(v);\n\t\t\t}\n\n\t\t\tlet hooked =\n\t\t\t\topts.attributeHook &&\n\t\t\t\topts.attributeHook(name, v, context, opts, isComponent);\n\t\t\tif (hooked || hooked === '') {\n\t\t\t\ts += hooked;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (name === 'dangerouslySetInnerHTML') {\n\t\t\t\thtml = v && v.__html;\n\t\t\t} else if (nodeName === 'textarea' && name === 'value') {\n\t\t\t\t// <textarea value=\"a&b\"> --> <textarea>a&b</textarea>\n\t\t\t\tpropChildren = v;\n\t\t\t} else if ((v || v === 0 || v === '') && typeof v !== 'function') {\n\t\t\t\tif (v === true || v === '') {\n\t\t\t\t\tv = name;\n\t\t\t\t\t// in non-xml mode, allow boolean attributes\n\t\t\t\t\tif (!opts || !opts.xml) {\n\t\t\t\t\t\ts += ' ' + name;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (name === 'value') {\n\t\t\t\t\tif (nodeName === 'select') {\n\t\t\t\t\t\tselectValue = v;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if (nodeName === 'option' && selectValue == v) {\n\t\t\t\t\t\ts += ` selected`;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ts += ` ${name}=\"${encodeEntities(v)}\"`;\n\t\t\t}\n\t\t}\n\t}\n\n\t// account for >1 multiline attribute\n\tif (pretty) {\n\t\tlet sub = s.replace(/\\n\\s*/, ' ');\n\t\tif (sub !== s && !~sub.indexOf('\\n')) s = sub;\n\t\telse if (pretty && ~s.indexOf('\\n')) s += '\\n';\n\t}\n\n\ts += '>';\n\n\tif (UNSAFE_NAME.test(nodeName))\n\t\tthrow new Error(`${nodeName} is not a valid HTML tag name in ${s}`);\n\n\tlet isVoid =\n\t\tVOID_ELEMENTS.test(nodeName) ||\n\t\t(opts.voidElements && opts.voidElements.test(nodeName));\n\tlet pieces = [];\n\n\tlet children;\n\tif (html) {\n\t\t// if multiline, indent.\n\t\tif (pretty && isLargeString(html)) {\n\t\t\thtml = '\\n' + indentChar + indent(html, indentChar);\n\t\t}\n\t\ts += html;\n\t} else if (\n\t\tpropChildren != null &&\n\t\tgetChildren((children = []), propChildren).length\n\t) {\n\t\tlet hasLarge = pretty && ~s.indexOf('\\n');\n\t\tlet lastWasText = false;\n\n\t\tfor (let i = 0; i < children.length; i++) {\n\t\t\tlet child = children[i];\n\n\t\t\tif (child != null && child !== false) {\n\t\t\t\tlet childSvgMode =\n\t\t\t\t\t\tnodeName === 'svg'\n\t\t\t\t\t\t\t? true\n\t\t\t\t\t\t\t: nodeName === 'foreignObject'\n\t\t\t\t\t\t\t? false\n\t\t\t\t\t\t\t: isSvgMode,\n\t\t\t\t\tret = _renderToString(\n\t\t\t\t\t\tchild,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\topts,\n\t\t\t\t\t\ttrue,\n\t\t\t\t\t\tchildSvgMode,\n\t\t\t\t\t\tselectValue\n\t\t\t\t\t);\n\n\t\t\t\tif (pretty && !hasLarge && isLargeString(ret)) hasLarge = true;\n\n\t\t\t\t// Skip if we received an empty string\n\t\t\t\tif (ret) {\n\t\t\t\t\tif (pretty) {\n\t\t\t\t\t\tlet isText = ret.length > 0 && ret[0] != '<';\n\n\t\t\t\t\t\t// We merge adjacent text nodes, otherwise each piece would be printed\n\t\t\t\t\t\t// on a new line.\n\t\t\t\t\t\tif (lastWasText && isText) {\n\t\t\t\t\t\t\tpieces[pieces.length - 1] += ret;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpieces.push(ret);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlastWasText = isText;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpieces.push(ret);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (pretty && hasLarge) {\n\t\t\tfor (let i = pieces.length; i--; ) {\n\t\t\t\tpieces[i] = '\\n' + indentChar + indent(pieces[i], indentChar);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (pieces.length || html) {\n\t\ts += pieces.join('');\n\t} else if (opts && opts.xml) {\n\t\treturn s.substring(0, s.length - 1) + ' />';\n\t}\n\n\tif (isVoid && !children && !html) {\n\t\ts = s.replace(/>$/, ' />');\n\t} else {\n\t\tif (pretty && ~s.indexOf('\\n')) s += '\\n';\n\t\ts += `</${nodeName}>`;\n\t}\n\n\treturn s;\n}\n\nfunction getComponentName(component) {\n\treturn (\n\t\tcomponent.displayName ||\n\t\t(component !== Function && component.name) ||\n\t\tgetFallbackComponentName(component)\n\t);\n}\n\nfunction getFallbackComponentName(component) {\n\tlet str = Function.prototype.toString.call(component),\n\t\tname = (str.match(/^\\s*function\\s+([^( ]+)/) || '')[1];\n\tif (!name) {\n\t\t// search for an existing indexed name for the given component:\n\t\tlet index = -1;\n\t\tfor (let i = UNNAMED.length; i--; ) {\n\t\t\tif (UNNAMED[i] === component) {\n\t\t\t\tindex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// not found, create a new indexed name:\n\t\tif (index < 0) {\n\t\t\tindex = UNNAMED.push(component) - 1;\n\t\t}\n\t\tname = `UnnamedComponent${index}`;\n\t}\n\treturn name;\n}\nrenderToString.shallowRender = shallowRender;\n\nexport default renderToString;\n\nexport {\n\trenderToString as render,\n\trenderToString as renderToStaticMarkup,\n\trenderToString,\n\tshallowRender\n};\n"],"names":["IS_NON_DIMENSIONAL","ENCODED_ENTITIES","encodeEntities","input","s","String","test","replace","indent","char","isLargeString","length","ignoreLines","indexOf","JS_TO_CSS","styleObjToCss","str","prop","val","toLowerCase","undefined","assign","obj","props","i","getChildren","accumulator","children","Array","isArray","reduce","push","SHALLOW","shallow","UNNAMED","VOID_ELEMENTS","UNSAFE_NAME","noop","renderToString","render","shallowRender","vnode","context","EMPTY_ARR","opts","previousSkipEffects","options","__s","res","_renderToString","__c","inner","isSvgMode","selectValue","pretty","indentChar","rendered","component","nodeName","type","isComponent","renderRootComponent","Fragment","shallowHighOrder","c","__v","setState","forceUpdate","__h","__b","__r","prototype","cxType","contextType","provider","cctx","value","__","_dirty","__d","state","_nextState","getDerivedStateFromProps","componentWillMount","call","getChildContext","diffed","displayName","Function","name","toString","match","index","getFallbackComponentName","propChildren","html","attrs","Object","keys","sortAttributes","sort","v","allAttributes","hooked","attributeHook","__html","xml","sub","Error","isVoid","voidElements","pieces","hasLarge","lastWasText","child","ret","isText","join","substring"],"mappings":"wRACaA,EAAqB,kEAE5BC,EAAmB,kBAETC,EAAeC,GAC9B,IAAMC,EAAIC,OAAOF,GACjB,OAAKF,EAAiBK,KAAKF,GAGpBA,EACLG,QAAQ,KAAM,SACdA,QAAQ,KAAM,QACdA,QAAQ,KAAM,QACdA,QAAQ,KAAM,UANRH,MASEI,EAAS,SAACJ,EAAGK,UACvBJ,OAAOD,GAAGG,QAAQ,SAAU,MAAQE,GAAQ,QAElCC,EAAgB,SAACN,EAAGO,EAAQC,UACtCP,OAAOD,GAAGO,QAAUA,GAAU,MAC5BC,IAA4C,IAA7BP,OAAOD,GAAGS,QAAQ,QACP,IAA5BR,OAAOD,GAAGS,QAAQ,MAEbC,EAAY,YAGFC,EAAcX,GAC7B,IAAIY,EAAM,GACV,IAAK,IAAIC,KAAQb,EAAG,CACnB,IAAIc,EAAMd,EAAEa,GACD,MAAPC,GAAuB,KAARA,IACdF,IAAKA,GAAO,KAEhBA,GACY,KAAXC,EAAK,GACFA,EACAH,EAAUG,KACTH,EAAUG,GAAQA,EAAKV,QAAQ,WAAY,OAAOY,eACvDH,GAAO,KACPA,GAAOE,EACY,iBAARA,IAAsD,IAAlClB,EAAmBM,KAAKW,KACtDD,GAAO,MAERA,GAAO,KAGT,OAAOA,QAAOI,WAUCC,EAAOC,EAAKC,GAC3B,IAAK,IAAIC,KAAKD,EAAOD,EAAIE,GAAKD,EAAMC,GACpC,OAAOF,WAUQG,EAAYC,EAAaC,GAMxC,OALIC,MAAMC,QAAQF,GACjBA,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AcnF,OAC1C,CAID,IAHA,IAAIqG,EAAW1D,IAAWlD,EAAES,QAAQ,MAChCoG,GAAc,EAETzF,EAAI,EAAGA,EAAIG,EAAShB,OAAQa,IAAK,CACzC,IAAI0F,EAAQvF,EAASH,GAErB,GAAa,MAAT0F,IAA2B,IAAVA,EAAiB,CACrC,IAMCC,EAAMlE,EACLiE,EACAxE,EACAE,GACA,EATa,QAAbc,GAEgB,kBAAbA,GAEAN,EAOHC,GAMF,GAHIC,IAAW0D,GAAYtG,EAAcyG,KAAMH,GAAW,GAGtDG,EACH,GAAI7D,EAAQ,CACX,IAAI8D,EAASD,EAAIxG,OAAS,GAAe,KAAVwG,EAAI,GAI/BF,GAAeG,EAClBL,EAAOA,EAAOpG,OAAS,IAAMwG,EAE7BJ,EAAOhF,KAAKoF,GAGbF,EAAcG,OAEdL,EAAOhF,KAAKoF,IAKhB,GAAI7D,GAAU0D,EACb,IAAK,IAAIxF,EAAIuF,EAAOpG,OAAQa,KAC3BuF,EAAOvF,GAAK,KAAO+B,EAAa/C,EAAOuG,EAAOvF,GAAI+B,GAKrD,GAAIwD,EAAOpG,QAAUoF,EACpB3F,GAAK2G,EAAOM,KAAK,YACPzE,GAAQA,EAAK8D,IACvB,OAAOtG,EAAEkH,UAAU,EAAGlH,EAAEO,OAAS,GAAK,MAUvC,OAPIkG,GAAWlF,GAAaoE,GAGvBzC,IAAWlD,EAAES,QAAQ,QAAOT,GAAK,MACrCA,QAAUsD,OAHVtD,EAAIA,EAAEG,QAAQ,KAAM,OAMdH,EA+BRkC,EAAeE,cAAgBA"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { VNode } from 'preact';
|
2
|
+
|
3
|
+
interface Options {
|
4
|
+
shallow?: boolean;
|
5
|
+
xml?: boolean;
|
6
|
+
pretty?: boolean | string;
|
7
|
+
}
|
8
|
+
|
9
|
+
export function render(vnode: VNode, context?: any, options?: Options): string;
|
10
|
+
export function renderToString(
|
11
|
+
vnode: VNode,
|
12
|
+
context?: any,
|
13
|
+
options?: Options
|
14
|
+
): string;
|
15
|
+
export function shallowRender(vnode: VNode, context?: any): string;
|
16
|
+
export default render;
|
@@ -0,0 +1 @@
|
|
1
|
+
module.exports = require('./commonjs').default;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/util.js","../src/index.js"],"sourcesContent":["// DOM properties that should NOT have \"px\" added when numeric\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i;\n\nconst ENCODED_ENTITIES = /[&<>\"]/;\n\nexport function encodeEntities(input) {\n\tconst s = String(input);\n\tif (!ENCODED_ENTITIES.test(s)) {\n\t\treturn s;\n\t}\n\treturn s\n\t\t.replace(/&/g, '&')\n\t\t.replace(/</g, '<')\n\t\t.replace(/>/g, '>')\n\t\t.replace(/\"/g, '"');\n}\n\nexport let indent = (s, char) =>\n\tString(s).replace(/(\\n+)/g, '$1' + (char || '\\t'));\n\nexport let isLargeString = (s, length, ignoreLines) =>\n\tString(s).length > (length || 40) ||\n\t(!ignoreLines && String(s).indexOf('\\n') !== -1) ||\n\tString(s).indexOf('<') !== -1;\n\nconst JS_TO_CSS = {};\n\n// Convert an Object style to a CSSText string\nexport function styleObjToCss(s) {\n\tlet str = '';\n\tfor (let prop in s) {\n\t\tlet val = s[prop];\n\t\tif (val != null && val !== '') {\n\t\t\tif (str) str += ' ';\n\t\t\t// str += jsToCss(prop);\n\t\t\tstr +=\n\t\t\t\tprop[0] == '-'\n\t\t\t\t\t? prop\n\t\t\t\t\t: JS_TO_CSS[prop] ||\n\t\t\t\t\t (JS_TO_CSS[prop] = prop.replace(/([A-Z])/g, '-$1').toLowerCase());\n\t\t\tstr += ': ';\n\t\t\tstr += val;\n\t\t\tif (typeof val === 'number' && IS_NON_DIMENSIONAL.test(prop) === false) {\n\t\t\t\tstr += 'px';\n\t\t\t}\n\t\t\tstr += ';';\n\t\t}\n\t}\n\treturn str || undefined;\n}\n\n/**\n * Copy all properties from `props` onto `obj`.\n * @param {object} obj Object onto which properties should be copied.\n * @param {object} props Object from which to copy properties.\n * @returns {object}\n * @private\n */\nexport function assign(obj, props) {\n\tfor (let i in props) obj[i] = props[i];\n\treturn obj;\n}\n\n/**\n * Get flattened children from the children prop\n * @param {Array} accumulator\n * @param {any} children A `props.children` opaque object.\n * @returns {Array} accumulator\n * @private\n */\nexport function getChildren(accumulator, children) {\n\tif (Array.isArray(children)) {\n\t\tchildren.reduce(getChildren, accumulator);\n\t} else if (children != null && children !== false) {\n\t\taccumulator.push(children);\n\t}\n\treturn accumulator;\n}\n","import {\n\tencodeEntities,\n\tindent,\n\tisLargeString,\n\tstyleObjToCss,\n\tassign,\n\tgetChildren\n} from './util';\nimport { options, Fragment } from 'preact';\n\n/** @typedef {import('preact').VNode} VNode */\n\nconst SHALLOW = { shallow: true };\n\n// components without names, kept as a hash for later comparison to return consistent UnnamedComponentXX names.\nconst UNNAMED = [];\n\nconst VOID_ELEMENTS = /^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/;\n\nconst UNSAFE_NAME = /[\\s\\n\\\\/='\"\\0<>]/;\n\nconst noop = () => {};\n\n/** Render Preact JSX + Components to an HTML string.\n *\t@name render\n *\t@function\n *\t@param {VNode} vnode\tJSX VNode to render.\n *\t@param {Object} [context={}]\tOptionally pass an initial context object through the render path.\n *\t@param {Object} [options={}]\tRendering options\n *\t@param {Boolean} [options.shallow=false]\tIf `true`, renders nested Components as HTML elements (`<Foo a=\"b\" />`).\n *\t@param {Boolean} [options.xml=false]\t\tIf `true`, uses self-closing tags for elements without children.\n *\t@param {Boolean} [options.pretty=false]\t\tIf `true`, adds whitespace for readability\n *\t@param {RegExp|undefined} [options.voidElements] RegeEx that matches elements that are considered void (self-closing)\n */\nrenderToString.render = renderToString;\n\n/** Only render elements, leaving Components inline as `<ComponentName ... />`.\n *\tThis method is just a convenience alias for `render(vnode, context, { shallow:true })`\n *\t@name shallow\n *\t@function\n *\t@param {VNode} vnode\tJSX VNode to render.\n *\t@param {Object} [context={}]\tOptionally pass an initial context object through the render path.\n */\nlet shallowRender = (vnode, context) => renderToString(vnode, context, SHALLOW);\n\nconst EMPTY_ARR = [];\nfunction renderToString(vnode, context, opts) {\n\tcontext = context || {};\n\topts = opts || {};\n\n\t// Performance optimization: `renderToString` is synchronous and we\n\t// therefore don't execute any effects. To do that we pass an empty\n\t// array to `options._commit` (`__c`). But we can go one step further\n\t// and avoid a lot of dirty checks and allocations by setting\n\t// `options._skipEffects` (`__s`) too.\n\tconst previousSkipEffects = options.__s;\n\toptions.__s = true;\n\n\tconst res = _renderToString(vnode, context, opts);\n\n\t// options._commit, we don't schedule any effects in this library right now,\n\t// so we can pass an empty queue to this hook.\n\tif (options.__c) options.__c(vnode, EMPTY_ARR);\n\tEMPTY_ARR.length = 0;\n\toptions.__s = previousSkipEffects;\n\treturn res;\n}\n\n/** The default export is an alias of `render()`. */\nfunction _renderToString(vnode, context, opts, inner, isSvgMode, selectValue) {\n\tif (vnode == null || typeof vnode === 'boolean') {\n\t\treturn '';\n\t}\n\n\t// #text nodes\n\tif (typeof vnode !== 'object') {\n\t\treturn encodeEntities(vnode);\n\t}\n\n\tlet pretty = opts.pretty,\n\t\tindentChar = pretty && typeof pretty === 'string' ? pretty : '\\t';\n\n\tif (Array.isArray(vnode)) {\n\t\tlet rendered = '';\n\t\tfor (let i = 0; i < vnode.length; i++) {\n\t\t\tif (pretty && i > 0) rendered += '\\n';\n\t\t\trendered += _renderToString(\n\t\t\t\tvnode[i],\n\t\t\t\tcontext,\n\t\t\t\topts,\n\t\t\t\tinner,\n\t\t\t\tisSvgMode,\n\t\t\t\tselectValue\n\t\t\t);\n\t\t}\n\t\treturn rendered;\n\t}\n\n\tlet nodeName = vnode.type,\n\t\tprops = vnode.props,\n\t\tisComponent = false;\n\n\t// components\n\tif (typeof nodeName === 'function') {\n\t\tisComponent = true;\n\t\tif (opts.shallow && (inner || opts.renderRootComponent === false)) {\n\t\t\tnodeName = getComponentName(nodeName);\n\t\t} else if (nodeName === Fragment) {\n\t\t\tconst children = [];\n\t\t\tgetChildren(children, vnode.props.children);\n\t\t\treturn _renderToString(\n\t\t\t\tchildren,\n\t\t\t\tcontext,\n\t\t\t\topts,\n\t\t\t\topts.shallowHighOrder !== false,\n\t\t\t\tisSvgMode,\n\t\t\t\tselectValue\n\t\t\t);\n\t\t} else {\n\t\t\tlet rendered;\n\n\t\t\tlet c = (vnode.__c = {\n\t\t\t\t__v: vnode,\n\t\t\t\tcontext,\n\t\t\t\tprops: vnode.props,\n\t\t\t\t// silently drop state updates\n\t\t\t\tsetState: noop,\n\t\t\t\tforceUpdate: noop,\n\t\t\t\t// hooks\n\t\t\t\t__h: []\n\t\t\t});\n\n\t\t\t// options._diff\n\t\t\tif (options.__b) options.__b(vnode);\n\n\t\t\t// options._render\n\t\t\tif (options.__r) options.__r(vnode);\n\n\t\t\tif (\n\t\t\t\t!nodeName.prototype ||\n\t\t\t\ttypeof nodeName.prototype.render !== 'function'\n\t\t\t) {\n\t\t\t\t// Necessary for createContext api. Setting this property will pass\n\t\t\t\t// the context value as `this.context` just for this component.\n\t\t\t\tlet cxType = nodeName.contextType;\n\t\t\t\tlet provider = cxType && context[cxType.__c];\n\t\t\t\tlet cctx =\n\t\t\t\t\tcxType != null\n\t\t\t\t\t\t? provider\n\t\t\t\t\t\t\t? provider.props.value\n\t\t\t\t\t\t\t: cxType.__\n\t\t\t\t\t\t: context;\n\n\t\t\t\t// stateless functional components\n\t\t\t\trendered = nodeName.call(vnode.__c, props, cctx);\n\t\t\t} else {\n\t\t\t\t// class-based components\n\t\t\t\tlet cxType = nodeName.contextType;\n\t\t\t\tlet provider = cxType && context[cxType.__c];\n\t\t\t\tlet cctx =\n\t\t\t\t\tcxType != null\n\t\t\t\t\t\t? provider\n\t\t\t\t\t\t\t? provider.props.value\n\t\t\t\t\t\t\t: cxType.__\n\t\t\t\t\t\t: context;\n\n\t\t\t\t// c = new nodeName(props, context);\n\t\t\t\tc = vnode.__c = new nodeName(props, cctx);\n\t\t\t\tc.__v = vnode;\n\t\t\t\t// turn off stateful re-rendering:\n\t\t\t\tc._dirty = c.__d = true;\n\t\t\t\tc.props = props;\n\t\t\t\tif (c.state == null) c.state = {};\n\n\t\t\t\tif (c._nextState == null && c.__s == null) {\n\t\t\t\t\tc._nextState = c.__s = c.state;\n\t\t\t\t}\n\n\t\t\t\tc.context = cctx;\n\t\t\t\tif (nodeName.getDerivedStateFromProps)\n\t\t\t\t\tc.state = assign(\n\t\t\t\t\t\tassign({}, c.state),\n\t\t\t\t\t\tnodeName.getDerivedStateFromProps(c.props, c.state)\n\t\t\t\t\t);\n\t\t\t\telse if (c.componentWillMount) {\n\t\t\t\t\tc.componentWillMount();\n\n\t\t\t\t\t// If the user called setState in cWM we need to flush pending,\n\t\t\t\t\t// state updates. This is the same behaviour in React.\n\t\t\t\t\tc.state =\n\t\t\t\t\t\tc._nextState !== c.state\n\t\t\t\t\t\t\t? c._nextState\n\t\t\t\t\t\t\t: c.__s !== c.state\n\t\t\t\t\t\t\t? c.__s\n\t\t\t\t\t\t\t: c.state;\n\t\t\t\t}\n\n\t\t\t\trendered = c.render(c.props, c.state, c.context);\n\t\t\t}\n\n\t\t\tif (c.getChildContext) {\n\t\t\t\tcontext = assign(assign({}, context), c.getChildContext());\n\t\t\t}\n\n\t\t\tif (options.diffed) options.diffed(vnode);\n\t\t\treturn _renderToString(\n\t\t\t\trendered,\n\t\t\t\tcontext,\n\t\t\t\topts,\n\t\t\t\topts.shallowHighOrder !== false,\n\t\t\t\tisSvgMode,\n\t\t\t\tselectValue\n\t\t\t);\n\t\t}\n\t}\n\n\t// render JSX to HTML\n\tlet s = '<' + nodeName,\n\t\tpropChildren,\n\t\thtml;\n\n\tif (props) {\n\t\tlet attrs = Object.keys(props);\n\n\t\t// allow sorting lexicographically for more determinism (useful for tests, such as via preact-jsx-chai)\n\t\tif (opts && opts.sortAttributes === true) attrs.sort();\n\n\t\tfor (let i = 0; i < attrs.length; i++) {\n\t\t\tlet name = attrs[i],\n\t\t\t\tv = props[name];\n\t\t\tif (name === 'children') {\n\t\t\t\tpropChildren = v;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (UNSAFE_NAME.test(name)) continue;\n\n\t\t\tif (\n\t\t\t\t!(opts && opts.allAttributes) &&\n\t\t\t\t(name === 'key' ||\n\t\t\t\t\tname === 'ref' ||\n\t\t\t\t\tname === '__self' ||\n\t\t\t\t\tname === '__source' ||\n\t\t\t\t\tname === 'defaultValue')\n\t\t\t)\n\t\t\t\tcontinue;\n\n\t\t\tif (name === 'className') {\n\t\t\t\tif (props.class) continue;\n\t\t\t\tname = 'class';\n\t\t\t} else if (isSvgMode && name.match(/^xlink:?./)) {\n\t\t\t\tname = name.toLowerCase().replace(/^xlink:?/, 'xlink:');\n\t\t\t}\n\n\t\t\tif (name === 'htmlFor') {\n\t\t\t\tif (props.for) continue;\n\t\t\t\tname = 'for';\n\t\t\t}\n\n\t\t\tif (name === 'style' && v && typeof v === 'object') {\n\t\t\t\tv = styleObjToCss(v);\n\t\t\t}\n\n\t\t\t// always use string values instead of booleans for aria attributes\n\t\t\t// also see https://github.com/preactjs/preact/pull/2347/files\n\t\t\tif (name[0] === 'a' && name['1'] === 'r' && typeof v === 'boolean') {\n\t\t\t\tv = String(v);\n\t\t\t}\n\n\t\t\tlet hooked =\n\t\t\t\topts.attributeHook &&\n\t\t\t\topts.attributeHook(name, v, context, opts, isComponent);\n\t\t\tif (hooked || hooked === '') {\n\t\t\t\ts += hooked;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (name === 'dangerouslySetInnerHTML') {\n\t\t\t\thtml = v && v.__html;\n\t\t\t} else if (nodeName === 'textarea' && name === 'value') {\n\t\t\t\t// <textarea value=\"a&b\"> --> <textarea>a&b</textarea>\n\t\t\t\tpropChildren = v;\n\t\t\t} else if ((v || v === 0 || v === '') && typeof v !== 'function') {\n\t\t\t\tif (v === true || v === '') {\n\t\t\t\t\tv = name;\n\t\t\t\t\t// in non-xml mode, allow boolean attributes\n\t\t\t\t\tif (!opts || !opts.xml) {\n\t\t\t\t\t\ts += ' ' + name;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (name === 'value') {\n\t\t\t\t\tif (nodeName === 'select') {\n\t\t\t\t\t\tselectValue = v;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if (nodeName === 'option' && selectValue == v) {\n\t\t\t\t\t\ts += ` selected`;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ts += ` ${name}=\"${encodeEntities(v)}\"`;\n\t\t\t}\n\t\t}\n\t}\n\n\t// account for >1 multiline attribute\n\tif (pretty) {\n\t\tlet sub = s.replace(/\\n\\s*/, ' ');\n\t\tif (sub !== s && !~sub.indexOf('\\n')) s = sub;\n\t\telse if (pretty && ~s.indexOf('\\n')) s += '\\n';\n\t}\n\n\ts += '>';\n\n\tif (UNSAFE_NAME.test(nodeName))\n\t\tthrow new Error(`${nodeName} is not a valid HTML tag name in ${s}`);\n\n\tlet isVoid =\n\t\tVOID_ELEMENTS.test(nodeName) ||\n\t\t(opts.voidElements && opts.voidElements.test(nodeName));\n\tlet pieces = [];\n\n\tlet children;\n\tif (html) {\n\t\t// if multiline, indent.\n\t\tif (pretty && isLargeString(html)) {\n\t\t\thtml = '\\n' + indentChar + indent(html, indentChar);\n\t\t}\n\t\ts += html;\n\t} else if (\n\t\tpropChildren != null &&\n\t\tgetChildren((children = []), propChildren).length\n\t) {\n\t\tlet hasLarge = pretty && ~s.indexOf('\\n');\n\t\tlet lastWasText = false;\n\n\t\tfor (let i = 0; i < children.length; i++) {\n\t\t\tlet child = children[i];\n\n\t\t\tif (child != null && child !== false) {\n\t\t\t\tlet childSvgMode =\n\t\t\t\t\t\tnodeName === 'svg'\n\t\t\t\t\t\t\t? true\n\t\t\t\t\t\t\t: nodeName === 'foreignObject'\n\t\t\t\t\t\t\t? false\n\t\t\t\t\t\t\t: isSvgMode,\n\t\t\t\t\tret = _renderToString(\n\t\t\t\t\t\tchild,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\topts,\n\t\t\t\t\t\ttrue,\n\t\t\t\t\t\tchildSvgMode,\n\t\t\t\t\t\tselectValue\n\t\t\t\t\t);\n\n\t\t\t\tif (pretty && !hasLarge && isLargeString(ret)) hasLarge = true;\n\n\t\t\t\t// Skip if we received an empty string\n\t\t\t\tif (ret) {\n\t\t\t\t\tif (pretty) {\n\t\t\t\t\t\tlet isText = ret.length > 0 && ret[0] != '<';\n\n\t\t\t\t\t\t// We merge adjacent text nodes, otherwise each piece would be printed\n\t\t\t\t\t\t// on a new line.\n\t\t\t\t\t\tif (lastWasText && isText) {\n\t\t\t\t\t\t\tpieces[pieces.length - 1] += ret;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpieces.push(ret);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlastWasText = isText;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpieces.push(ret);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (pretty && hasLarge) {\n\t\t\tfor (let i = pieces.length; i--; ) {\n\t\t\t\tpieces[i] = '\\n' + indentChar + indent(pieces[i], indentChar);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (pieces.length || html) {\n\t\ts += pieces.join('');\n\t} else if (opts && opts.xml) {\n\t\treturn s.substring(0, s.length - 1) + ' />';\n\t}\n\n\tif (isVoid && !children && !html) {\n\t\ts = s.replace(/>$/, ' />');\n\t} else {\n\t\tif (pretty && ~s.indexOf('\\n')) s += '\\n';\n\t\ts += `</${nodeName}>`;\n\t}\n\n\treturn s;\n}\n\nfunction getComponentName(component) {\n\treturn (\n\t\tcomponent.displayName ||\n\t\t(component !== Function && component.name) ||\n\t\tgetFallbackComponentName(component)\n\t);\n}\n\nfunction getFallbackComponentName(component) {\n\tlet str = Function.prototype.toString.call(component),\n\t\tname = (str.match(/^\\s*function\\s+([^( ]+)/) || '')[1];\n\tif (!name) {\n\t\t// search for an existing indexed name for the given component:\n\t\tlet index = -1;\n\t\tfor (let i = UNNAMED.length; i--; ) {\n\t\t\tif (UNNAMED[i] === component) {\n\t\t\t\tindex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// not found, create a new indexed name:\n\t\tif (index < 0) {\n\t\t\tindex = UNNAMED.push(component) - 1;\n\t\t}\n\t\tname = `UnnamedComponent${index}`;\n\t}\n\treturn name;\n}\nrenderToString.shallowRender = shallowRender;\n\nexport default renderToString;\n\nexport {\n\trenderToString as render,\n\trenderToString as renderToStaticMarkup,\n\trenderToString,\n\tshallowRender\n};\n"],"names":["IS_NON_DIMENSIONAL","ENCODED_ENTITIES","encodeEntities","input","s","String","test","replace","indent","char","isLargeString","length","ignoreLines","indexOf","JS_TO_CSS","styleObjToCss","str","prop","val","toLowerCase","undefined","assign","obj","props","i","getChildren","accumulator","children","Array","isArray","reduce","push","SHALLOW","shallow","UNNAMED","VOID_ELEMENTS","UNSAFE_NAME","noop","renderToString","render","shallowRender","vnode","context","EMPTY_ARR","opts","previousSkipEffects","options","__s","res","_renderToString","__c","inner","isSvgMode","selectValue","pretty","indentChar","rendered","component","nodeName","type","isComponent","renderRootComponent","Fragment","shallowHighOrder","c","__v","setState","forceUpdate","__h","__b","__r","prototype","cxType","contextType","provider","cctx","value","__","_dirty","__d","state","_nextState","getDerivedStateFromProps","componentWillMount","call","getChildContext","diffed","displayName","Function","name","toString","match","index","getFallbackComponentName","propChildren","html","attrs","Object","keys","sortAttributes","sort","v","allAttributes","hooked","attributeHook","__html","xml","sub","Error","isVoid","voidElements","pieces","hasLarge","lastWasText","child","ret","isText","join","substring"],"mappings":"wRACaA,EAAqB,kEAE5BC,EAAmB,kBAETC,EAAeC,GAC9B,IAAMC,EAAIC,OAAOF,GACjB,OAAKF,EAAiBK,KAAKF,GAGpBA,EACLG,QAAQ,KAA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AAeG,EAClBL,EAAOA,EAAOpG,OAAS,IAAMwG,EAE7BJ,EAAOhF,KAAKoF,GAGbF,EAAcG,OAEdL,EAAOhF,KAAKoF,IAKhB,GAAI7D,GAAU0D,EACb,IAAK,IAAIxF,EAAIuF,EAAOpG,OAAQa,KAC3BuF,EAAOvF,GAAK,KAAO+B,EAAa/C,EAAOuG,EAAOvF,GAAI+B,GAKrD,GAAIwD,EAAOpG,QAAUoF,EACpB3F,GAAK2G,EAAOM,KAAK,YACPzE,GAAQA,EAAK8D,IACvB,OAAOtG,EAAEkH,UAAU,EAAGlH,EAAEO,OAAS,GAAK,MAUvC,OAPIkG,GAAWlF,GAAaoE,GAGvBzC,IAAWlD,EAAES,QAAQ,QAAOT,GAAK,MACrCA,QAAUsD,OAHVtD,EAAIA,EAAEG,QAAQ,KAAM,OAMdH,EA+BRkC,EAAeE,cAAgBA"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{options as e,Fragment as t}from"preact";var r=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i,n=/[&<>"]/;function o(e){var t=String(e);return n.test(t)?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""):t}var a=function(e,t){return String(e).replace(/(\n+)/g,"$1"+(t||"\t"))},i=function(e,t,r){return String(e).length>(t||40)||!r&&-1!==String(e).indexOf("\n")||-1!==String(e).indexOf("<")},l={};function s(e){var t="";for(var n in e){var o=e[n];null!=o&&""!==o&&(t&&(t+=" "),t+="-"==n[0]?n:l[n]||(l[n]=n.replace(/([A-Z])/g,"-$1").toLowerCase()),t+=": ",t+=o,"number"==typeof o&&!1===r.test(n)&&(t+="px"),t+=";")}return t||void 0}function f(e,t){for(var r in t)e[r]=t[r];return e}function u(e,t){return Array.isArray(t)?t.reduce(u,e):null!=t&&!1!==t&&e.push(t),e}var c={shallow:!0},p=[],_=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,v=/[\s\n\\/='"\0<>]/,d=function(){};m.render=m;var g=function(e,t){return m(e,t,c)},h=[];function m(t,r,n){r=r||{},n=n||{};var o=e.__s;e.__s=!0;var a=x(t,r,n);return e.__c&&e.__c(t,h),h.length=0,e.__s=o,a}function x(r,n,l,c,g,h){if(null==r||"boolean"==typeof r)return"";if("object"!=typeof r)return o(r);var m=l.pretty,y=m&&"string"==typeof m?m:"\t";if(Array.isArray(r)){for(var b="",S=0;S<r.length;S++)m&&S>0&&(b+="\n"),b+=x(r[S],n,l,c,g,h);return b}var w,k=r.type,O=r.props,C=!1;if("function"==typeof k){if(C=!0,!l.shallow||!c&&!1!==l.renderRootComponent){if(k===t){var A=[];return u(A,r.props.children),x(A,n,l,!1!==l.shallowHighOrder,g,h)}var H,j=r.__c={__v:r,context:n,props:r.props,setState:d,forceUpdate:d,__h:[]};if(e.__b&&e.__b(r),e.__r&&e.__r(r),k.prototype&&"function"==typeof k.prototype.render){var F=k.contextType,M=F&&n[F.__c],T=null!=F?M?M.props.value:F.__:n;(j=r.__c=new k(O,T)).__v=r,j._dirty=j.__d=!0,j.props=O,null==j.state&&(j.state={}),null==j._nextState&&null==j.__s&&(j._nextState=j.__s=j.state),j.context=T,k.getDerivedStateFromProps?j.state=f(f({},j.state),k.getDerivedStateFromProps(j.props,j.state)):j.componentWillMount&&(j.componentWillMount(),j.state=j._nextState!==j.state?j._nextState:j.__s!==j.state?j.__s:j.state),H=j.render(j.props,j.state,j.context)}else{var $=k.contextType,L=$&&n[$.__c];H=k.call(r.__c,O,null!=$?L?L.props.value:$.__:n)}return j.getChildContext&&(n=f(f({},n),j.getChildContext())),e.diffed&&e.diffed(r),x(H,n,l,!1!==l.shallowHighOrder,g,h)}k=(w=k).displayName||w!==Function&&w.name||function(e){var t=(Function.prototype.toString.call(e).match(/^\s*function\s+([^( ]+)/)||"")[1];if(!t){for(var r=-1,n=p.length;n--;)if(p[n]===e){r=n;break}r<0&&(r=p.push(e)-1),t="UnnamedComponent"+r}return t}(w)}var E,D,N="<"+k;if(O){var P=Object.keys(O);l&&!0===l.sortAttributes&&P.sort();for(var R=0;R<P.length;R++){var U=P[R],W=O[U];if("children"!==U){if(!v.test(U)&&(l&&l.allAttributes||"key"!==U&&"ref"!==U&&"__self"!==U&&"__source"!==U&&"defaultValue"!==U)){if("className"===U){if(O.class)continue;U="class"}else g&&U.match(/^xlink:?./)&&(U=U.toLowerCase().replace(/^xlink:?/,"xlink:"));if("htmlFor"===U){if(O.for)continue;U="for"}"style"===U&&W&&"object"==typeof W&&(W=s(W)),"a"===U[0]&&"r"===U[1]&&"boolean"==typeof W&&(W=String(W));var q=l.attributeHook&&l.attributeHook(U,W,n,l,C);if(q||""===q)N+=q;else if("dangerouslySetInnerHTML"===U)D=W&&W.__html;else if("textarea"===k&&"value"===U)E=W;else if((W||0===W||""===W)&&"function"!=typeof W){if(!(!0!==W&&""!==W||(W=U,l&&l.xml))){N+=" "+U;continue}if("value"===U){if("select"===k){h=W;continue}"option"===k&&h==W&&(N+=" selected")}N+=" "+U+'="'+o(W)+'"'}}}else E=W}}if(m){var z=N.replace(/\n\s*/," ");z===N||~z.indexOf("\n")?m&&~N.indexOf("\n")&&(N+="\n"):N=z}if(N+=">",v.test(k))throw new Error(k+" is not a valid HTML tag name in "+N);var I,V=_.test(k)||l.voidElements&&l.voidElements.test(k),Z=[];if(D)m&&i(D)&&(D="\n"+y+a(D,y)),N+=D;else if(null!=E&&u(I=[],E).length){for(var B=m&&~N.indexOf("\n"),G=!1,J=0;J<I.length;J++){var K=I[J];if(null!=K&&!1!==K){var Q=x(K,n,l,!0,"svg"===k||"foreignObject"!==k&&g,h);if(m&&!B&&i(Q)&&(B=!0),Q)if(m){var X=Q.length>0&&"<"!=Q[0];G&&X?Z[Z.length-1]+=Q:Z.push(Q),G=X}else Z.push(Q)}}if(m&&B)for(var Y=Z.length;Y--;)Z[Y]="\n"+y+a(Z[Y],y)}if(Z.length||D)N+=Z.join("");else if(l&&l.xml)return N.substring(0,N.length-1)+" />";return!V||I||D?(m&&~N.indexOf("\n")&&(N+="\n"),N+="</"+k+">"):N=N.replace(/>$/," />"),N}m.shallowRender=g;export default m;export{m as render,m as renderToStaticMarkup,m as renderToString,g as shallowRender};
|
2
|
+
//# sourceMappingURL=index.module.js.map
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{options as e,Fragment as t}from"preact";var r=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i,n=/[&<>"]/;function o(e){var t=String(e);return n.test(t)?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""):t}var a=function(e,t){return String(e).replace(/(\n+)/g,"$1"+(t||"\t"))},i=function(e,t,r){return String(e).length>(t||40)||!r&&-1!==String(e).indexOf("\n")||-1!==String(e).indexOf("<")},l={};function s(e){var t="";for(var n in e){var o=e[n];null!=o&&""!==o&&(t&&(t+=" "),t+="-"==n[0]?n:l[n]||(l[n]=n.replace(/([A-Z])/g,"-$1").toLowerCase()),t+=": ",t+=o,"number"==typeof o&&!1===r.test(n)&&(t+="px"),t+=";")}return t||void 0}function f(e,t){for(var r in t)e[r]=t[r];return e}function u(e,t){return Array.isArray(t)?t.reduce(u,e):null!=t&&!1!==t&&e.push(t),e}var c={shallow:!0},p=[],_=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,v=/[\s\n\\/='"\0<>]/,d=function(){};m.render=m;var g=function(e,t){return m(e,t,c)},h=[];function m(t,r,n){r=r||{},n=n||{};var o=e.__s;e.__s=!0;var a=x(t,r,n);return e.__c&&e.__c(t,h),h.length=0,e.__s=o,a}function x(r,n,l,c,g,h){if(null==r||"boolean"==typeof r)return"";if("object"!=typeof r)return o(r);var m=l.pretty,y=m&&"string"==typeof m?m:"\t";if(Array.isArray(r)){for(var b="",S=0;S<r.length;S++)m&&S>0&&(b+="\n"),b+=x(r[S],n,l,c,g,h);return b}var w,k=r.type,O=r.props,C=!1;if("function"==typeof k){if(C=!0,!l.shallow||!c&&!1!==l.renderRootComponent){if(k===t){var A=[];return u(A,r.props.children),x(A,n,l,!1!==l.shallowHighOrder,g,h)}var H,j=r.__c={__v:r,context:n,props:r.props,setState:d,forceUpdate:d,__h:[]};if(e.__b&&e.__b(r),e.__r&&e.__r(r),k.prototype&&"function"==typeof k.prototype.render){var F=k.contextType,M=F&&n[F.__c],T=null!=F?M?M.props.value:F.__:n;(j=r.__c=new k(O,T)).__v=r,j._dirty=j.__d=!0,j.props=O,null==j.state&&(j.state={}),null==j._nextState&&null==j.__s&&(j._nextState=j.__s=j.state),j.context=T,k.getDerivedStateFromProps?j.state=f(f({},j.state),k.getDerivedStateFromProps(j.props,j.state)):j.componentWillMount&&(j.componentWillMount(),j.state=j._nextState!==j.state?j._nextState:j.__s!==j.state?j.__s:j.state),H=j.render(j.props,j.state,j.context)}else{var $=k.contextType,L=$&&n[$.__c];H=k.call(r.__c,O,null!=$?L?L.props.value:$.__:n)}return j.getChildContext&&(n=f(f({},n),j.getChildContext())),e.diffed&&e.diffed(r),x(H,n,l,!1!==l.shallowHighOrder,g,h)}k=(w=k).displayName||w!==Function&&w.name||function(e){var t=(Function.prototype.toString.call(e).match(/^\s*function\s+([^( ]+)/)||"")[1];if(!t){for(var r=-1,n=p.length;n--;)if(p[n]===e){r=n;break}r<0&&(r=p.push(e)-1),t="UnnamedComponent"+r}return t}(w)}var E,D,N="<"+k;if(O){var P=Object.keys(O);l&&!0===l.sortAttributes&&P.sort();for(var R=0;R<P.length;R++){var U=P[R],W=O[U];if("children"!==U){if(!v.test(U)&&(l&&l.allAttributes||"key"!==U&&"ref"!==U&&"__self"!==U&&"__source"!==U&&"defaultValue"!==U)){if("className"===U){if(O.class)continue;U="class"}else g&&U.match(/^xlink:?./)&&(U=U.toLowerCase().replace(/^xlink:?/,"xlink:"));if("htmlFor"===U){if(O.for)continue;U="for"}"style"===U&&W&&"object"==typeof W&&(W=s(W)),"a"===U[0]&&"r"===U[1]&&"boolean"==typeof W&&(W=String(W));var q=l.attributeHook&&l.attributeHook(U,W,n,l,C);if(q||""===q)N+=q;else if("dangerouslySetInnerHTML"===U)D=W&&W.__html;else if("textarea"===k&&"value"===U)E=W;else if((W||0===W||""===W)&&"function"!=typeof W){if(!(!0!==W&&""!==W||(W=U,l&&l.xml))){N+=" "+U;continue}if("value"===U){if("select"===k){h=W;continue}"option"===k&&h==W&&(N+=" selected")}N+=" "+U+'="'+o(W)+'"'}}}else E=W}}if(m){var z=N.replace(/\n\s*/," ");z===N||~z.indexOf("\n")?m&&~N.indexOf("\n")&&(N+="\n"):N=z}if(N+=">",v.test(k))throw new Error(k+" is not a valid HTML tag name in "+N);var I,V=_.test(k)||l.voidElements&&l.voidElements.test(k),Z=[];if(D)m&&i(D)&&(D="\n"+y+a(D,y)),N+=D;else if(null!=E&&u(I=[],E).length){for(var B=m&&~N.indexOf("\n"),G=!1,J=0;J<I.length;J++){var K=I[J];if(null!=K&&!1!==K){var Q=x(K,n,l,!0,"svg"===k||"foreignObject"!==k&&g,h);if(m&&!B&&i(Q)&&(B=!0),Q)if(m){var X=Q.length>0&&"<"!=Q[0];G&&X?Z[Z.length-1]+=Q:Z.push(Q),G=X}else Z.push(Q)}}if(m&&B)for(var Y=Z.length;Y--;)Z[Y]="\n"+y+a(Z[Y],y)}if(Z.length||D)N+=Z.join("");else if(l&&l.xml)return N.substring(0,N.length-1)+" />";return!V||I||D?(m&&~N.indexOf("\n")&&(N+="\n"),N+="</"+k+">"):N=N.replace(/>$/," />"),N}m.shallowRender=g;export default m;export{m as render,m as renderToStaticMarkup,m as renderToString,g as shallowRender};
|
2
|
+
//# sourceMappingURL=index.module.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.module.js","sources":["../src/util.js","../src/index.js"],"sourcesContent":["// DOM properties that should NOT have \"px\" added when numeric\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i;\n\nconst ENCODED_ENTITIES = /[&<>\"]/;\n\nexport function encodeEntities(input) {\n\tconst s = String(input);\n\tif (!ENCODED_ENTITIES.test(s)) {\n\t\treturn s;\n\t}\n\treturn s\n\t\t.replace(/&/g, '&')\n\t\t.replace(/</g, '<')\n\t\t.replace(/>/g, '>')\n\t\t.replace(/\"/g, '"');\n}\n\nexport let indent = (s, char) =>\n\tString(s).replace(/(\\n+)/g, '$1' + (char || '\\t'));\n\nexport let isLargeString = (s, length, ignoreLines) =>\n\tString(s).length > (length || 40) ||\n\t(!ignoreLines && String(s).indexOf('\\n') !== -1) ||\n\tString(s).indexOf('<') !== -1;\n\nconst JS_TO_CSS = {};\n\n// Convert an Object style to a CSSText string\nexport function styleObjToCss(s) {\n\tlet str = '';\n\tfor (let prop in s) {\n\t\tlet val = s[prop];\n\t\tif (val != null && val !== '') {\n\t\t\tif (str) str += ' ';\n\t\t\t// str += jsToCss(prop);\n\t\t\tstr +=\n\t\t\t\tprop[0] == '-'\n\t\t\t\t\t? prop\n\t\t\t\t\t: JS_TO_CSS[prop] ||\n\t\t\t\t\t (JS_TO_CSS[prop] = prop.replace(/([A-Z])/g, '-$1').toLowerCase());\n\t\t\tstr += ': ';\n\t\t\tstr += val;\n\t\t\tif (typeof val === 'number' && IS_NON_DIMENSIONAL.test(prop) === false) {\n\t\t\t\tstr += 'px';\n\t\t\t}\n\t\t\tstr += ';';\n\t\t}\n\t}\n\treturn str || undefined;\n}\n\n/**\n * Copy all properties from `props` onto `obj`.\n * @param {object} obj Object onto which properties should be copied.\n * @param {object} props Object from which to copy properties.\n * @returns {object}\n * @private\n */\nexport function assign(obj, props) {\n\tfor (let i in props) obj[i] = props[i];\n\treturn obj;\n}\n\n/**\n * Get flattened children from the children prop\n * @param {Array} accumulator\n * @param {any} children A `props.children` opaque object.\n * @returns {Array} accumulator\n * @private\n */\nexport function getChildren(accumulator, children) {\n\tif (Array.isArray(children)) {\n\t\tchildren.reduce(getChildren, accumulator);\n\t} else if (children != null && children !== false) {\n\t\taccumulator.push(children);\n\t}\n\treturn accumulator;\n}\n","import {\n\tencodeEntities,\n\tindent,\n\tisLargeString,\n\tstyleObjToCss,\n\tassign,\n\tgetChildren\n} from './util';\nimport { options, Fragment } from 'preact';\n\n/** @typedef {import('preact').VNode} VNode */\n\nconst SHALLOW = { shallow: true };\n\n// components without names, kept as a hash for later comparison to return consistent UnnamedComponentXX names.\nconst UNNAMED = [];\n\nconst VOID_ELEMENTS = /^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/;\n\nconst UNSAFE_NAME = /[\\s\\n\\\\/='\"\\0<>]/;\n\nconst noop = () => {};\n\n/** Render Preact JSX + Components to an HTML string.\n *\t@name render\n *\t@function\n *\t@param {VNode} vnode\tJSX VNode to render.\n *\t@param {Object} [context={}]\tOptionally pass an initial context object through the render path.\n *\t@param {Object} [options={}]\tRendering options\n *\t@param {Boolean} [options.shallow=false]\tIf `true`, renders nested Components as HTML elements (`<Foo a=\"b\" />`).\n *\t@param {Boolean} [options.xml=false]\t\tIf `true`, uses self-closing tags for elements without children.\n *\t@param {Boolean} [options.pretty=false]\t\tIf `true`, adds whitespace for readability\n *\t@param {RegExp|undefined} [options.voidElements] RegeEx that matches elements that are considered void (self-closing)\n */\nrenderToString.render = renderToString;\n\n/** Only render elements, leaving Components inline as `<ComponentName ... />`.\n *\tThis method is just a convenience alias for `render(vnode, context, { shallow:true })`\n *\t@name shallow\n *\t@function\n *\t@param {VNode} vnode\tJSX VNode to render.\n *\t@param {Object} [context={}]\tOptionally pass an initial context object through the render path.\n */\nlet shallowRender = (vnode, context) => renderToString(vnode, context, SHALLOW);\n\nconst EMPTY_ARR = [];\nfunction renderToString(vnode, context, opts) {\n\tcontext = context || {};\n\topts = opts || {};\n\n\t// Performance optimization: `renderToString` is synchronous and we\n\t// therefore don't execute any effects. To do that we pass an empty\n\t// array to `options._commit` (`__c`). But we can go one step further\n\t// and avoid a lot of dirty checks and allocations by setting\n\t// `options._skipEffects` (`__s`) too.\n\tconst previousSkipEffects = options.__s;\n\toptions.__s = true;\n\n\tconst res = _renderToString(vnode, context, opts);\n\n\t// options._commit, we don't schedule any effects in this library right now,\n\t// so we can pass an empty queue to this hook.\n\tif (options.__c) options.__c(vnode, EMPTY_ARR);\n\tEMPTY_ARR.length = 0;\n\toptions.__s = previousSkipEffects;\n\treturn res;\n}\n\n/** The default export is an alias of `render()`. */\nfunction _renderToString(vnode, context, opts, inner, isSvgMode, selectValue) {\n\tif (vnode == null || typeof vnode === 'boolean') {\n\t\treturn '';\n\t}\n\n\t// #text nodes\n\tif (typeof vnode !== 'object') {\n\t\treturn encodeEntities(vnode);\n\t}\n\n\tlet pretty = opts.pretty,\n\t\tindentChar = pretty && typeof pretty === 'string' ? pretty : '\\t';\n\n\tif (Array.isArray(vnode)) {\n\t\tlet rendered = '';\n\t\tfor (let i = 0; i < vnode.length; i++) {\n\t\t\tif (pretty && i > 0) rendered += '\\n';\n\t\t\trendered += _renderToString(\n\t\t\t\tvnode[i],\n\t\t\t\tcontext,\n\t\t\t\topts,\n\t\t\t\tinner,\n\t\t\t\tisSvgMode,\n\t\t\t\tselectValue\n\t\t\t);\n\t\t}\n\t\treturn rendered;\n\t}\n\n\tlet nodeName = vnode.type,\n\t\tprops = vnode.props,\n\t\tisComponent = false;\n\n\t// components\n\tif (typeof nodeName === 'function') {\n\t\tisComponent = true;\n\t\tif (opts.shallow && (inner || opts.renderRootComponent === false)) {\n\t\t\tnodeName = getComponentName(nodeName);\n\t\t} else if (nodeName === Fragment) {\n\t\t\tconst children = [];\n\t\t\tgetChildren(children, vnode.props.children);\n\t\t\treturn _renderToString(\n\t\t\t\tchildren,\n\t\t\t\tcontext,\n\t\t\t\topts,\n\t\t\t\topts.shallowHighOrder !== false,\n\t\t\t\tisSvgMode,\n\t\t\t\tselectValue\n\t\t\t);\n\t\t} else {\n\t\t\tlet rendered;\n\n\t\t\tlet c = (vnode.__c = {\n\t\t\t\t__v: vnode,\n\t\t\t\tcontext,\n\t\t\t\tprops: vnode.props,\n\t\t\t\t// silently drop state updates\n\t\t\t\tsetState: noop,\n\t\t\t\tforceUpdate: noop,\n\t\t\t\t// hooks\n\t\t\t\t__h: []\n\t\t\t});\n\n\t\t\t// options._diff\n\t\t\tif (options.__b) options.__b(vnode);\n\n\t\t\t// options._render\n\t\t\tif (options.__r) options.__r(vnode);\n\n\t\t\tif (\n\t\t\t\t!nodeName.prototype ||\n\t\t\t\ttypeof nodeName.prototype.render !== 'function'\n\t\t\t) {\n\t\t\t\t// Necessary for createContext api. Setting this property will pass\n\t\t\t\t// the context value as `this.context` just for this component.\n\t\t\t\tlet cxType = nodeName.contextType;\n\t\t\t\tlet provider = cxType && context[cxType.__c];\n\t\t\t\tlet cctx =\n\t\t\t\t\tcxType != null\n\t\t\t\t\t\t? provider\n\t\t\t\t\t\t\t? provider.props.value\n\t\t\t\t\t\t\t: cxType.__\n\t\t\t\t\t\t: context;\n\n\t\t\t\t// stateless functional components\n\t\t\t\trendered = nodeName.call(vnode.__c, props, cctx);\n\t\t\t} else {\n\t\t\t\t// class-based components\n\t\t\t\tlet cxType = nodeName.contextType;\n\t\t\t\tlet provider = cxType && context[cxType.__c];\n\t\t\t\tlet cctx =\n\t\t\t\t\tcxType != null\n\t\t\t\t\t\t? provider\n\t\t\t\t\t\t\t? provider.props.value\n\t\t\t\t\t\t\t: cxType.__\n\t\t\t\t\t\t: context;\n\n\t\t\t\t// c = new nodeName(props, context);\n\t\t\t\tc = vnode.__c = new nodeName(props, cctx);\n\t\t\t\tc.__v = vnode;\n\t\t\t\t// turn off stateful re-rendering:\n\t\t\t\tc._dirty = c.__d = true;\n\t\t\t\tc.props = props;\n\t\t\t\tif (c.state == null) c.state = {};\n\n\t\t\t\tif (c._nextState == null && c.__s == null) {\n\t\t\t\t\tc._nextState = c.__s = c.state;\n\t\t\t\t}\n\n\t\t\t\tc.context = cctx;\n\t\t\t\tif (nodeName.getDerivedStateFromProps)\n\t\t\t\t\tc.state = assign(\n\t\t\t\t\t\tassign({}, c.state),\n\t\t\t\t\t\tnodeName.getDerivedStateFromProps(c.props, c.state)\n\t\t\t\t\t);\n\t\t\t\telse if (c.componentWillMount) {\n\t\t\t\t\tc.componentWillMount();\n\n\t\t\t\t\t// If the user called setState in cWM we need to flush pending,\n\t\t\t\t\t// state updates. This is the same behaviour in React.\n\t\t\t\t\tc.state =\n\t\t\t\t\t\tc._nextState !== c.state\n\t\t\t\t\t\t\t? c._nextState\n\t\t\t\t\t\t\t: c.__s !== c.state\n\t\t\t\t\t\t\t? c.__s\n\t\t\t\t\t\t\t: c.state;\n\t\t\t\t}\n\n\t\t\t\trendered = c.render(c.props, c.state, c.context);\n\t\t\t}\n\n\t\t\tif (c.getChildContext) {\n\t\t\t\tcontext = assign(assign({}, context), c.getChildContext());\n\t\t\t}\n\n\t\t\tif (options.diffed) options.diffed(vnode);\n\t\t\treturn _renderToString(\n\t\t\t\trendered,\n\t\t\t\tcontext,\n\t\t\t\topts,\n\t\t\t\topts.shallowHighOrder !== false,\n\t\t\t\tisSvgMode,\n\t\t\t\tselectValue\n\t\t\t);\n\t\t}\n\t}\n\n\t// render JSX to HTML\n\tlet s = '<' + nodeName,\n\t\tpropChildren,\n\t\thtml;\n\n\tif (props) {\n\t\tlet attrs = Object.keys(props);\n\n\t\t// allow sorting lexicographically for more determinism (useful for tests, such as via preact-jsx-chai)\n\t\tif (opts && opts.sortAttributes === true) attrs.sort();\n\n\t\tfor (let i = 0; i < attrs.length; i++) {\n\t\t\tlet name = attrs[i],\n\t\t\t\tv = props[name];\n\t\t\tif (name === 'children') {\n\t\t\t\tpropChildren = v;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (UNSAFE_NAME.test(name)) continue;\n\n\t\t\tif (\n\t\t\t\t!(opts && opts.allAttributes) &&\n\t\t\t\t(name === 'key' ||\n\t\t\t\t\tname === 'ref' ||\n\t\t\t\t\tname === '__self' ||\n\t\t\t\t\tname === '__source' ||\n\t\t\t\t\tname === 'defaultValue')\n\t\t\t)\n\t\t\t\tcontinue;\n\n\t\t\tif (name === 'className') {\n\t\t\t\tif (props.class) continue;\n\t\t\t\tname = 'class';\n\t\t\t} else if (isSvgMode && name.match(/^xlink:?./)) {\n\t\t\t\tname = name.toLowerCase().replace(/^xlink:?/, 'xlink:');\n\t\t\t}\n\n\t\t\tif (name === 'htmlFor') {\n\t\t\t\tif (props.for) continue;\n\t\t\t\tname = 'for';\n\t\t\t}\n\n\t\t\tif (name === 'style' && v && typeof v === 'object') {\n\t\t\t\tv = styleObjToCss(v);\n\t\t\t}\n\n\t\t\t// always use string values instead of booleans for aria attributes\n\t\t\t// also see https://github.com/preactjs/preact/pull/2347/files\n\t\t\tif (name[0] === 'a' && name['1'] === 'r' && typeof v === 'boolean') {\n\t\t\t\tv = String(v);\n\t\t\t}\n\n\t\t\tlet hooked =\n\t\t\t\topts.attributeHook &&\n\t\t\t\topts.attributeHook(name, v, context, opts, isComponent);\n\t\t\tif (hooked || hooked === '') {\n\t\t\t\ts += hooked;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (name === 'dangerouslySetInnerHTML') {\n\t\t\t\thtml = v && v.__html;\n\t\t\t} else if (nodeName === 'textarea' && name === 'value') {\n\t\t\t\t// <textarea value=\"a&b\"> --> <textarea>a&b</textarea>\n\t\t\t\tpropChildren = v;\n\t\t\t} else if ((v || v === 0 || v === '') && typeof v !== 'function') {\n\t\t\t\tif (v === true || v === '') {\n\t\t\t\t\tv = name;\n\t\t\t\t\t// in non-xml mode, allow boolean attributes\n\t\t\t\t\tif (!opts || !opts.xml) {\n\t\t\t\t\t\ts += ' ' + name;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (name === 'value') {\n\t\t\t\t\tif (nodeName === 'select') {\n\t\t\t\t\t\tselectValue = v;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if (nodeName === 'option' && selectValue == v) {\n\t\t\t\t\t\ts += ` selected`;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ts += ` ${name}=\"${encodeEntities(v)}\"`;\n\t\t\t}\n\t\t}\n\t}\n\n\t// account for >1 multiline attribute\n\tif (pretty) {\n\t\tlet sub = s.replace(/\\n\\s*/, ' ');\n\t\tif (sub !== s && !~sub.indexOf('\\n')) s = sub;\n\t\telse if (pretty && ~s.indexOf('\\n')) s += '\\n';\n\t}\n\n\ts += '>';\n\n\tif (UNSAFE_NAME.test(nodeName))\n\t\tthrow new Error(`${nodeName} is not a valid HTML tag name in ${s}`);\n\n\tlet isVoid =\n\t\tVOID_ELEMENTS.test(nodeName) ||\n\t\t(opts.voidElements && opts.voidElements.test(nodeName));\n\tlet pieces = [];\n\n\tlet children;\n\tif (html) {\n\t\t// if multiline, indent.\n\t\tif (pretty && isLargeString(html)) {\n\t\t\thtml = '\\n' + indentChar + indent(html, indentChar);\n\t\t}\n\t\ts += html;\n\t} else if (\n\t\tpropChildren != null &&\n\t\tgetChildren((children = []), propChildren).length\n\t) {\n\t\tlet hasLarge = pretty && ~s.indexOf('\\n');\n\t\tlet lastWasText = false;\n\n\t\tfor (let i = 0; i < children.length; i++) {\n\t\t\tlet child = children[i];\n\n\t\t\tif (child != null && child !== false) {\n\t\t\t\tlet childSvgMode =\n\t\t\t\t\t\tnodeName === 'svg'\n\t\t\t\t\t\t\t? true\n\t\t\t\t\t\t\t: nodeName === 'foreignObject'\n\t\t\t\t\t\t\t? false\n\t\t\t\t\t\t\t: isSvgMode,\n\t\t\t\t\tret = _renderToString(\n\t\t\t\t\t\tchild,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\topts,\n\t\t\t\t\t\ttrue,\n\t\t\t\t\t\tchildSvgMode,\n\t\t\t\t\t\tselectValue\n\t\t\t\t\t);\n\n\t\t\t\tif (pretty && !hasLarge && isLargeString(ret)) hasLarge = true;\n\n\t\t\t\t// Skip if we received an empty string\n\t\t\t\tif (ret) {\n\t\t\t\t\tif (pretty) {\n\t\t\t\t\t\tlet isText = ret.length > 0 && ret[0] != '<';\n\n\t\t\t\t\t\t// We merge adjacent text nodes, otherwise each piece would be printed\n\t\t\t\t\t\t// on a new line.\n\t\t\t\t\t\tif (lastWasText && isText) {\n\t\t\t\t\t\t\tpieces[pieces.length - 1] += ret;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpieces.push(ret);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlastWasText = isText;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpieces.push(ret);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (pretty && hasLarge) {\n\t\t\tfor (let i = pieces.length; i--; ) {\n\t\t\t\tpieces[i] = '\\n' + indentChar + indent(pieces[i], indentChar);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (pieces.length || html) {\n\t\ts += pieces.join('');\n\t} else if (opts && opts.xml) {\n\t\treturn s.substring(0, s.length - 1) + ' />';\n\t}\n\n\tif (isVoid && !children && !html) {\n\t\ts = s.replace(/>$/, ' />');\n\t} else {\n\t\tif (pretty && ~s.indexOf('\\n')) s += '\\n';\n\t\ts += `</${nodeName}>`;\n\t}\n\n\treturn s;\n}\n\nfunction getComponentName(component) {\n\treturn (\n\t\tcomponent.displayName ||\n\t\t(component !== Function && component.name) ||\n\t\tgetFallbackComponentName(component)\n\t);\n}\n\nfunction getFallbackComponentName(component) {\n\tlet str = Function.prototype.toString.call(component),\n\t\tname = (str.match(/^\\s*function\\s+([^( ]+)/) || '')[1];\n\tif (!name) {\n\t\t// search for an existing indexed name for the given component:\n\t\tlet index = -1;\n\t\tfor (let i = UNNAMED.length; i--; ) {\n\t\t\tif (UNNAMED[i] === component) {\n\t\t\t\tindex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// not found, create a new indexed name:\n\t\tif (index < 0) {\n\t\t\tindex = UNNAMED.push(component) - 1;\n\t\t}\n\t\tname = `UnnamedComponent${index}`;\n\t}\n\treturn name;\n}\nrenderToString.shallowRender = shallowRender;\n\nexport default renderToString;\n\nexport {\n\trenderToString as render,\n\trenderToString as renderToStaticMarkup,\n\trenderToString,\n\tshallowRender\n};\n"],"names":["IS_NON_DIMENSIONAL","ENCODED_ENTITIES","encodeEntities","input","s","String","test","replace","indent","char","isLargeString","length","ignoreLines","indexOf","JS_TO_CSS","styleObjToCss","str","prop","val","toLowerCase","undefined","assign","obj","props","i","getChildren","accumulator","children","Array","isArray","reduce","push","SHALLOW","shallow","UNNAMED","VOID_ELEMENTS","UNSAFE_NAME","noop","renderToString","render","shallowRender","vnode","context","EMPTY_ARR","opts","previousSkipEffects","options","__s","res","_renderToString","__c","inner","isSvgMode","selectValue","pretty","indentChar","rendered","component","nodeName","type","isComponent","renderRootComponent","Fragment","shallowHighOrder","c","__v","setState","forceUpdate","__h","__b","__r","prototype","cxType","contextType","provider","cctx","value","__","_dirty","__d","state","_nextState","getDerivedStateFromProps","componentWillMount","call","getChildContext","diffed","displayName","Function","name","toString","match","index","getFallbackComponentName","propChildren","html","attrs","Object","keys","sortAttributes","sort","v","allAttributes","hooked","attributeHook","__html","xml","sub","Error","isVoid","voidElements","pieces","hasLarge","lastWasText","child","ret","isText","join","substring"],"mappings":"mDACaA,EAAqB,kEAE5BC,EAAmB,kBAETC,EAAeC,GAC9B,IAAMC,EAAIC,OAAOF,GACjB,OAAKF,EAAiBK,KAAKF,GAGpBA,EACLG,QAAQ,KAAM,SACdA,QAAQ,KAAM,QACdA,QAAQ,KAAM,QACdA,QAAQ,KAAM,UANRH,MASEI,EAAS,SAACJ,EAAGK,UACvBJ,OAAOD,GAAGG,QAAQ,SAAU,MAAQE,GAAQ,QAElCC,EAAgB,SAACN,EAAGO,EAAQC,UACtCP,OAAOD,GAAGO,QAAUA,GAAU,MAC5BC,IAA4C,IAA7BP,OAAOD,GAAGS,QAAQ,QACP,IAA5BR,OAAOD,GAAGS,QAAQ,MAEbC,EAAY,YAGFC,EAAcX,GAC7B,IAAIY,EAAM,GACV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EkH,UAAU,EAAGlH,EAAEO,OAAS,GAAK,MAUvC,OAPIkG,GAAWlF,GAAaoE,GAGvBzC,IAAWlD,EAAES,QAAQ,QAAOT,GAAK,MACrCA,QAAUsD,OAHVtD,EAAIA,EAAEG,QAAQ,KAAM,OAMdH,EA+BRkC,EAAeE,cAAgBA"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
var t;t=function(t,n){if("function"!=typeof Symbol){var e=0;Symbol=function(t){return"@@"+t+ ++e},Symbol.for=function(t){return"@@"+t}}var r=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i,o=/[&<>"]/;function i(t){var n=String(t);return o.test(n)?n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""):n}var a=function(t,n){return String(t).replace(/(\n+)/g,"$1"+(n||"\t"))},u=function(t,n,e){return String(t).length>(n||40)||!e&&-1!==String(t).indexOf("\n")||-1!==String(t).indexOf("<")},c={};function f(t){var n="";for(var e in t){var o=t[e];null!=o&&""!==o&&(n&&(n+=" "),n+="-"==e[0]?e:c[e]||(c[e]=e.replace(/([A-Z])/g,"-$1").toLowerCase()),n+=": ",n+=o,"number"==typeof o&&!1===r.test(e)&&(n+="px"),n+=";")}return n||void 0}function l(t,n){for(var e in n)t[e]=n[e];return t}function s(t,n){return Array.isArray(n)?n.reduce(s,t):null!=n&&!1!==n&&t.push(n),t}var p={shallow:!0},y=[],g=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,v=/[\s\n\\/='"\0<>]/,d=function(){};m.render=m;var b=[];function m(t,e,r){e=e||{},r=r||{};var o=n.options.__s;n.options.__s=!0;var i=_(t,e,r);return n.options.__c&&n.options.__c(t,b),b.length=0,n.options.__s=o,i}function _(t,e,r,o,c,p){if(null==t||"boolean"==typeof t)return"";if("object"!=typeof t)return i(t);var b=r.pretty,m=b&&"string"==typeof b?b:"\t";if(Array.isArray(t)){for(var h="",x=0;x<t.length;x++)b&&x>0&&(h+="\n"),h+=_(t[x],e,r,o,c,p);return h}var j,S=t.type,A=t.props,O=!1;if("function"==typeof S){if(O=!0,!r.shallow||!o&&!1!==r.renderRootComponent){if(S===n.Fragment){var w=[];return s(w,t.props.children),_(w,e,r,!1!==r.shallowHighOrder,c,p)}var k,F=t.__c={__v:t,context:e,props:t.props,setState:d,forceUpdate:d,__h:[]};if(n.options.__b&&n.options.__b(t),n.options.__r&&n.options.__r(t),S.prototype&&"function"==typeof S.prototype.render){var E=S.contextType,C=E&&e[E.__c],M=null!=E?C?C.props.value:E.__:e;(F=t.__c=new S(A,M)).__v=t,F._dirty=F.__d=!0,F.props=A,null==F.state&&(F.state={}),null==F._nextState&&null==F.__s&&(F._nextState=F.__s=F.state),F.context=M,S.getDerivedStateFromProps?F.state=l(l({},F.state),S.getDerivedStateFromProps(F.props,F.state)):F.componentWillMount&&(F.componentWillMount(),F.state=F._nextState!==F.state?F._nextState:F.__s!==F.state?F.__s:F.state),k=F.render(F.props,F.state,F.context)}else{var N=S.contextType,D=N&&e[N.__c];k=S.call(t.__c,A,null!=N?D?D.props.value:N.__:e)}return F.getChildContext&&(e=l(l({},e),F.getChildContext())),n.options.diffed&&n.options.diffed(t),_(k,e,r,!1!==r.shallowHighOrder,c,p)}S=(j=S).displayName||j!==Function&&j.name||function(t){var n=(Function.prototype.toString.call(t).match(/^\s*function\s+([^( ]+)/)||"")[1];if(!n){for(var e=-1,r=y.length;r--;)if(y[r]===t){e=r;break}e<0&&(e=y.push(t)-1),n="UnnamedComponent"+e}return n}(j)}var H,I,$="<"+S;if(A){var T=Object.keys(A);r&&!0===r.sortAttributes&&T.sort();for(var U=0;U<T.length;U++){var W=T[U],L=A[W];if("children"!==W){if(!v.test(W)&&(r&&r.allAttributes||"key"!==W&&"ref"!==W&&"__self"!==W&&"__source"!==W&&"defaultValue"!==W)){if("className"===W){if(A.class)continue;W="class"}else c&&W.match(/^xlink:?./)&&(W=W.toLowerCase().replace(/^xlink:?/,"xlink:"));if("htmlFor"===W){if(A.for)continue;W="for"}"style"===W&&L&&"object"==typeof L&&(L=f(L)),"a"===W[0]&&"r"===W[1]&&"boolean"==typeof L&&(L=String(L));var P=r.attributeHook&&r.attributeHook(W,L,e,r,O);if(P||""===P)$+=P;else if("dangerouslySetInnerHTML"===W)I=L&&L.__html;else if("textarea"===S&&"value"===W)H=L;else if((L||0===L||""===L)&&"function"!=typeof L){if(!(!0!==L&&""!==L||(L=W,r&&r.xml))){$+=" "+W;continue}if("value"===W){if("select"===S){p=L;continue}"option"===S&&p==L&&($+=" selected")}$+=" "+W+'="'+i(L)+'"'}}}else H=L}}if(b){var R=$.replace(/\n\s*/," ");R===$||~R.indexOf("\n")?b&&~$.indexOf("\n")&&($+="\n"):$=R}if($+=">",v.test(S))throw new Error(S+" is not a valid HTML tag name in "+$);var J,q=g.test(S)||r.voidElements&&r.voidElements.test(S),V=[];if(I)b&&u(I)&&(I="\n"+m+a(I,m)),$+=I;else if(null!=H&&s(J=[],H).length){for(var z=b&&~$.indexOf("\n"),B=!1,G=0;G<J.length;G++){var Z=J[G];if(null!=Z&&!1!==Z){var K=_(Z,e,r,!0,"svg"===S||"foreignObject"!==S&&c,p);if(b&&!z&&u(K)&&(z=!0),K)if(b){var Q=K.length>0&&"<"!=K[0];B&&Q?V[V.length-1]+=K:V.push(K),B=Q}else V.push(K)}}if(b&&z)for(var X=V.length;X--;)V[X]="\n"+m+a(V[X],m)}if(V.length||I)$+=V.join("");else if(r&&r.xml)return $.substring(0,$.length-1)+" />";return!q||J||I?(b&&~$.indexOf("\n")&&($+="\n"),$+="</"+S+">"):$=$.replace(/>$/," />"),$}m.shallowRender=function(t,n){return m(t,n,p)};var h=/(\\|\"|\')/g,x=Object.prototype.toString,j=Date.prototype.toISOString,S=Error.prototype.toString,A=RegExp.prototype.toString,O=Symbol.prototype.toString,w=/^Symbol\((.*)\)(.*)$/,k=/\n/gi,F=Object.getOwnPropertySymbols||function(t){return[]};function E(t){return"[object Array]"===t||"[object ArrayBuffer]"===t||"[object DataView]"===t||"[object Float32Array]"===t||"[object Float64Array]"===t||"[object Int8Array]"===t||"[object Int16Array]"===t||"[object Int32Array]"===t||"[object Uint8Array]"===t||"[object Uint8ClampedArray]"===t||"[object Uint16Array]"===t||"[object Uint32Array]"===t}function C(t){return""===t.name?"[Function anonymous]":"[Function "+t.name+"]"}function M(t){return O.call(t).replace(w,"Symbol($1)")}function N(t){return"["+S.call(t)+"]"}function D(t){if(!0===t||!1===t)return""+t;if(void 0===t)return"undefined";if(null===t)return"null";var n=typeof t;if("number"===n)return function(t){return t!=+t?"NaN":0===t&&1/t<0?"-0":""+t}(t);if("string"===n)return'"'+function(t){return t.replace(h,"\\$1")}(t)+'"';if("function"===n)return C(t);if("symbol"===n)return M(t);var e=x.call(t);return"[object WeakMap]"===e?"WeakMap {}":"[object WeakSet]"===e?"WeakSet {}":"[object Function]"===e||"[object GeneratorFunction]"===e?C(t,min):"[object Symbol]"===e?M(t):"[object Date]"===e?j.call(t):"[object Error]"===e?N(t):"[object RegExp]"===e?A.call(t):"[object Arguments]"===e&&0===t.length?"Arguments []":E(e)&&0===t.length?t.constructor.name+" []":t instanceof Error&&N(t)}function H(t,n,e,r,o,i,a,u,c,f){var l="";if(t.length){l+=o;for(var s=e+n,p=0;p<t.length;p++)l+=s+T(t[p],n,s,r,o,i,a,u,c,f),p<t.length-1&&(l+=","+r);l+=o+e}return"["+l+"]"}function I(t,n,e,r,o,i,a,u,c,f){if((i=i.slice()).indexOf(t)>-1)return"[Circular]";i.push(t);var l=++u>a;if(!l&&t.toJSON&&"function"==typeof t.toJSON)return T(t.toJSON(),n,e,r,o,i,a,u,c,f);var s=x.call(t);return"[object Arguments]"===s?l?"[Arguments]":function(t,n,e,r,o,i,a,u,c,f){return(f?"":"Arguments ")+H(t,n,e,r,o,i,a,u,c,f)}(t,n,e,r,o,i,a,u,c,f):E(s)?l?"[Array]":function(t,n,e,r,o,i,a,u,c,f){return(f?"":t.constructor.name+" ")+H(t,n,e,r,o,i,a,u,c,f)}(t,n,e,r,o,i,a,u,c,f):"[object Map]"===s?l?"[Map]":function(t,n,e,r,o,i,a,u,c,f){var l="Map {",s=t.entries(),p=s.next();if(!p.done){l+=o;for(var y=e+n;!p.done;)l+=y+T(p.value[0],n,y,r,o,i,a,u,c,f)+" => "+T(p.value[1],n,y,r,o,i,a,u,c,f),(p=s.next()).done||(l+=","+r);l+=o+e}return l+"}"}(t,n,e,r,o,i,a,u,c,f):"[object Set]"===s?l?"[Set]":function(t,n,e,r,o,i,a,u,c,f){var l="Set {",s=t.entries(),p=s.next();if(!p.done){l+=o;for(var y=e+n;!p.done;)l+=y+T(p.value[1],n,y,r,o,i,a,u,c,f),(p=s.next()).done||(l+=","+r);l+=o+e}return l+"}"}(t,n,e,r,o,i,a,u,c,f):"object"==typeof t?l?"[Object]":function(t,n,e,r,o,i,a,u,c,f){var l=(f?"":t.constructor?t.constructor.name+" ":"Object ")+"{",s=Object.keys(t).sort(),p=F(t);if(p.length&&(s=s.filter(function(t){return!("symbol"==typeof t||"[object Symbol]"===x.call(t))}).concat(p)),s.length){l+=o;for(var y=e+n,g=0;g<s.length;g++){var v=s[g];l+=y+T(v,n,y,r,o,i,a,u,c,f)+": "+T(t[v],n,y,r,o,i,a,u,c,f),g<s.length-1&&(l+=","+r)}l+=o+e}return l+"}"}(t,n,e,r,o,i,a,u,c,f):void 0}function $(t,n,e,r,o,i,a,u,c,f){for(var l,s=!1,p=0;p<c.length;p++)if((l=c[p]).test(t)){s=!0;break}return!!s&&l.print(t,function(t){return T(t,n,e,r,o,i,a,u,c,f)},function(t){var r=e+n;return r+t.replace(k,"\n"+r)},{edgeSpacing:o,spacing:r})}function T(t,n,e,r,o,i,a,u,c,f){return D(t)||$(t,n,e,r,o,i,a,u,c,f)||I(t,n,e,r,o,i,a,u,c,f)}var U={indent:2,min:!1,maxDepth:Infinity,plugins:[]};function W(t){return new Array(t+1).join(" ")}var L={test:function(t){return t&&"object"==typeof t&&"type"in t&&"props"in t&&"key"in t},print:function(t,n,e){return m(t,L.context,L.opts)}},P={plugins:[L]},R={attributeHook:function(t,n,e,r,o){var u=typeof n;if("dangerouslySetInnerHTML"===t)return!1;if(null==n||"function"===u&&!r.functions)return"";if(r.skipFalseAttributes&&!o&&(!1===n||("class"===t||"style"===t)&&""===n))return"";var c="string"==typeof r.pretty?r.pretty:"\t";return"string"!==u?("function"!==u||r.functionNames?(L.context=e,L.opts=r,~(n=function(t,n){var e,r;n?(function(t){if(Object.keys(t).forEach(function(t){if(!U.hasOwnProperty(t))throw new Error("prettyFormat: Invalid option: "+t)}),t.min&&void 0!==t.indent&&0!==t.indent)throw new Error("prettyFormat: Cannot run with min option and indent")}(n),n=function(t){var n={};return Object.keys(U).forEach(function(e){return n[e]=t.hasOwnProperty(e)?t[e]:U[e]}),n.min&&(n.indent=0),n}(n)):n=U;var o=n.min?" ":"\n",i=n.min?"":"\n";if(n&&n.plugins.length){var a=$(t,e=W(n.indent),"",o,i,r=[],n.maxDepth,0,n.plugins,n.min);if(a)return a}return D(t)||(e||(e=W(n.indent)),r||(r=[]),I(t,e,"",o,i,r,n.maxDepth,0,n.plugins,n.min))}(n,P)).indexOf("\n")&&(n=a("\n"+n,c)+"\n")):n="Function",a("\n"+t+"={"+n+"}",c)):"\n"+c+t+'="'+i(n)+'"'},jsx:!0,xml:!1,functions:!0,functionNames:!0,skipFalseAttributes:!0,pretty:" "};function J(t,n,e,r){return m(t,n,e=l(l({},R),e||{}))}t.default=J,t.render=J},"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("preact")):"function"==typeof define&&define.amd?define(["exports","preact"],t):t(self.preactRenderToString={},(void 0).preact);
|
2
|
+
//# sourceMappingURL=jsx.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"jsx.js","sources":["jsx.js"],"sourcesContent":["!function(t,n){\"object\"==typeof exports&&\"undefined\"!=typeof module?n(exports,require(\"preact\")):\"function\"==typeof define&&define.amd?define([\"exports\",\"preact\"],n):n((t||self).preactRenderToString={},t.preact)}(this,function(t,n){if(\"function\"!=typeof Symbol){var e=0;Symbol=function(t){return\"@@\"+t+ ++e},Symbol.for=function(t){return\"@@\"+t}}var r=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i,o=/[&<>\"]/;function i(t){var n=String(t);return o.test(n)?n.replace(/&/g,\"&\").replace(/</g,\"<\").replace(/>/g,\">\").replace(/\"/g,\""\"):n}var a=function(t,n){return String(t).replace(/(\\n+)/g,\"$1\"+(n||\"\\t\"))},c=function(t,n,e){return String(t).length>(n||40)||!e&&-1!==String(t).indexOf(\"\\n\")||-1!==String(t).indexOf(\"<\")},u={};function l(t){var n=\"\";for(var e in t){var o=t[e];null!=o&&\"\"!==o&&(n&&(n+=\" \"),n+=\"-\"==e[0]?e:u[e]||(u[e]=e.replace(/([A-Z])/g,\"-$1\").toLowerCase()),n+=\": \",n+=o,\"number\"==typeof o&&!1===r.test(e)&&(n+=\"px\"),n+=\";\")}return n||void 0}function s(t,n){for(var e in n)t[e]=n[e];return t}function f(t,n){return Array.isArray(n)?n.reduce(f,t):null!=n&&!1!==n&&t.push(n),t}var p={shallow:!0},y=[],g=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,d=/[\\s\\n\\\\/='\"\\0<>]/,b=function(){};h.render=h;var m=[];function h(t,e,r){e=e||{},r=r||{};var o=n.options.__s;n.options.__s=!0;var i=_(t,e,r);return n.options.__c&&n.options.__c(t,m),m.length=0,n.options.__s=o,i}function _(t,e,r,o,u,p){if(null==t||\"boolean\"==typeof t)return\"\";if(\"object\"!=typeof t)return i(t);var m=r.pretty,h=m&&\"string\"==typeof m?m:\"\\t\";if(Array.isArray(t)){for(var v=\"\",x=0;x<t.length;x++)m&&x>0&&(v+=\"\\n\"),v+=_(t[x],e,r,o,u,p);return v}var j,S=t.type,A=t.props,O=!1;if(\"function\"==typeof S){if(O=!0,!r.shallow||!o&&!1!==r.renderRootComponent){if(S===n.Fragment){var w=[];return f(w,t.props.children),_(w,e,r,!1!==r.shallowHighOrder,u,p)}var k,F=t.__c={__v:t,context:e,props:t.props,setState:b,forceUpdate:b,__h:[]};if(n.options.__b&&n.options.__b(t),n.options.__r&&n.options.__r(t),S.prototype&&\"function\"==typeof S.prototype.render){var E=S.contextType,C=E&&e[E.__c],M=null!=E?C?C.props.value:E.__:e;(F=t.__c=new S(A,M)).__v=t,F._dirty=F.__d=!0,F.props=A,null==F.state&&(F.state={}),null==F._nextState&&null==F.__s&&(F._nextState=F.__s=F.state),F.context=M,S.getDerivedStateFromProps?F.state=s(s({},F.state),S.getDerivedStateFromProps(F.props,F.state)):F.componentWillMount&&(F.componentWillMount(),F.state=F._nextState!==F.state?F._nextState:F.__s!==F.state?F.__s:F.state),k=F.render(F.props,F.state,F.context)}else{var N=S.contextType,D=N&&e[N.__c];k=S.call(t.__c,A,null!=N?D?D.props.value:N.__:e)}return F.getChildContext&&(e=s(s({},e),F.getChildContext())),n.options.diffed&&n.options.diffed(t),_(k,e,r,!1!==r.shallowHighOrder,u,p)}S=(j=S).displayName||j!==Function&&j.name||function(t){var n=(Function.prototype.toString.call(t).match(/^\\s*function\\s+([^( ]+)/)||\"\")[1];if(!n){for(var e=-1,r=y.length;r--;)if(y[r]===t){e=r;break}e<0&&(e=y.push(t)-1),n=\"UnnamedComponent\"+e}return n}(j)}var H,I,T=\"<\"+S;if(A){var $=Object.keys(A);r&&!0===r.sortAttributes&&$.sort();for(var U=0;U<$.length;U++){var W=$[U],L=A[W];if(\"children\"!==W){if(!d.test(W)&&(r&&r.allAttributes||\"key\"!==W&&\"ref\"!==W&&\"__self\"!==W&&\"__source\"!==W&&\"defaultValue\"!==W)){if(\"className\"===W){if(A.class)continue;W=\"class\"}else u&&W.match(/^xlink:?./)&&(W=W.toLowerCase().replace(/^xlink:?/,\"xlink:\"));if(\"htmlFor\"===W){if(A.for)continue;W=\"for\"}\"style\"===W&&L&&\"object\"==typeof L&&(L=l(L)),\"a\"===W[0]&&\"r\"===W[1]&&\"boolean\"==typeof L&&(L=String(L));var P=r.attributeHook&&r.attributeHook(W,L,e,r,O);if(P||\"\"===P)T+=P;else if(\"dangerouslySetInnerHTML\"===W)I=L&&L.__html;else if(\"textarea\"===S&&\"value\"===W)H=L;else if((L||0===L||\"\"===L)&&\"function\"!=typeof L){if(!(!0!==L&&\"\"!==L||(L=W,r&&r.xml))){T+=\" \"+W;continue}if(\"value\"===W){if(\"select\"===S){p=L;continue}\"option\"===S&&p==L&&(T+=\" selected\")}T+=\" \"+W+'=\"'+i(L)+'\"'}}}else H=L}}if(m){var R=T.replace(/\\n\\s*/,\" \");R===T||~R.indexOf(\"\\n\")?m&&~T.indexOf(\"\\n\")&&(T+=\"\\n\"):T=R}if(T+=\">\",d.test(S))throw new Error(S+\" is not a valid HTML tag name in \"+T);var J,q=g.test(S)||r.voidElements&&r.voidElements.test(S),V=[];if(I)m&&c(I)&&(I=\"\\n\"+h+a(I,h)),T+=I;else if(null!=H&&f(J=[],H).length){for(var z=m&&~T.indexOf(\"\\n\"),B=!1,G=0;G<J.length;G++){var Z=J[G];if(null!=Z&&!1!==Z){var K=_(Z,e,r,!0,\"svg\"===S||\"foreignObject\"!==S&&u,p);if(m&&!z&&c(K)&&(z=!0),K)if(m){var Q=K.length>0&&\"<\"!=K[0];B&&Q?V[V.length-1]+=K:V.push(K),B=Q}else V.push(K)}}if(m&&z)for(var X=V.length;X--;)V[X]=\"\\n\"+h+a(V[X],h)}if(V.length||I)T+=V.join(\"\");else if(r&&r.xml)return T.substring(0,T.length-1)+\" />\";return!q||J||I?(m&&~T.indexOf(\"\\n\")&&(T+=\"\\n\"),T+=\"</\"+S+\">\"):T=T.replace(/>$/,\" />\"),T}h.shallowRender=function(t,n){return h(t,n,p)};const v=/(\\\\|\\\"|\\')/g,x=Object.prototype.toString,j=Date.prototype.toISOString,S=Error.prototype.toString,A=RegExp.prototype.toString,O=Symbol.prototype.toString,w=/^Symbol\\((.*)\\)(.*)$/,k=/\\n/gi,F=Object.getOwnPropertySymbols||(t=>[]);function E(t){return\"[object Array]\"===t||\"[object ArrayBuffer]\"===t||\"[object DataView]\"===t||\"[object Float32Array]\"===t||\"[object Float64Array]\"===t||\"[object Int8Array]\"===t||\"[object Int16Array]\"===t||\"[object Int32Array]\"===t||\"[object Uint8Array]\"===t||\"[object Uint8ClampedArray]\"===t||\"[object Uint16Array]\"===t||\"[object Uint32Array]\"===t}function C(t){return\"\"===t.name?\"[Function anonymous]\":\"[Function \"+t.name+\"]\"}function M(t){return O.call(t).replace(w,\"Symbol($1)\")}function N(t){return\"[\"+S.call(t)+\"]\"}function D(t){if(!0===t||!1===t)return\"\"+t;if(void 0===t)return\"undefined\";if(null===t)return\"null\";const n=typeof t;if(\"number\"===n)return function(t){return t!=+t?\"NaN\":0===t&&1/t<0?\"-0\":\"\"+t}(t);if(\"string\"===n)return'\"'+function(t){return t.replace(v,\"\\\\$1\")}(t)+'\"';if(\"function\"===n)return C(t);if(\"symbol\"===n)return M(t);const e=x.call(t);return\"[object WeakMap]\"===e?\"WeakMap {}\":\"[object WeakSet]\"===e?\"WeakSet {}\":\"[object Function]\"===e||\"[object GeneratorFunction]\"===e?C(t,min):\"[object Symbol]\"===e?M(t):\"[object Date]\"===e?j.call(t):\"[object Error]\"===e?N(t):\"[object RegExp]\"===e?A.call(t):\"[object Arguments]\"===e&&0===t.length?\"Arguments []\":E(e)&&0===t.length?t.constructor.name+\" []\":t instanceof Error&&N(t)}function H(t,n,e,r,o,i,a,c,u,l){let s=\"\";if(t.length){s+=o;const f=e+n;for(let e=0;e<t.length;e++)s+=f+$(t[e],n,f,r,o,i,a,c,u,l),e<t.length-1&&(s+=\",\"+r);s+=o+e}return\"[\"+s+\"]\"}function I(t,n,e,r,o,i,a,c,u,l){if((i=i.slice()).indexOf(t)>-1)return\"[Circular]\";i.push(t);const s=++c>a;if(!s&&t.toJSON&&\"function\"==typeof t.toJSON)return $(t.toJSON(),n,e,r,o,i,a,c,u,l);const f=x.call(t);return\"[object Arguments]\"===f?s?\"[Arguments]\":function(t,n,e,r,o,i,a,c,u,l){return(l?\"\":\"Arguments \")+H(t,n,e,r,o,i,a,c,u,l)}(t,n,e,r,o,i,a,c,u,l):E(f)?s?\"[Array]\":function(t,n,e,r,o,i,a,c,u,l){return(l?\"\":t.constructor.name+\" \")+H(t,n,e,r,o,i,a,c,u,l)}(t,n,e,r,o,i,a,c,u,l):\"[object Map]\"===f?s?\"[Map]\":function(t,n,e,r,o,i,a,c,u,l){let s=\"Map {\";const f=t.entries();let p=f.next();if(!p.done){s+=o;const t=e+n;for(;!p.done;)s+=t+$(p.value[0],n,t,r,o,i,a,c,u,l)+\" => \"+$(p.value[1],n,t,r,o,i,a,c,u,l),p=f.next(),p.done||(s+=\",\"+r);s+=o+e}return s+\"}\"}(t,n,e,r,o,i,a,c,u,l):\"[object Set]\"===f?s?\"[Set]\":function(t,n,e,r,o,i,a,c,u,l){let s=\"Set {\";const f=t.entries();let p=f.next();if(!p.done){s+=o;const t=e+n;for(;!p.done;)s+=t+$(p.value[1],n,t,r,o,i,a,c,u,l),p=f.next(),p.done||(s+=\",\"+r);s+=o+e}return s+\"}\"}(t,n,e,r,o,i,a,c,u,l):\"object\"==typeof t?s?\"[Object]\":function(t,n,e,r,o,i,a,c,u,l){let s=(l?\"\":t.constructor?t.constructor.name+\" \":\"Object \")+\"{\",f=Object.keys(t).sort();const p=F(t);if(p.length&&(f=f.filter(t=>!(\"symbol\"==typeof t||\"[object Symbol]\"===x.call(t))).concat(p)),f.length){s+=o;const p=e+n;for(let e=0;e<f.length;e++){const y=f[e];s+=p+$(y,n,p,r,o,i,a,c,u,l)+\": \"+$(t[y],n,p,r,o,i,a,c,u,l),e<f.length-1&&(s+=\",\"+r)}s+=o+e}return s+\"}\"}(t,n,e,r,o,i,a,c,u,l):void 0}function T(t,n,e,r,o,i,a,c,u,l){let s,f=!1;for(let n=0;n<u.length;n++)if(s=u[n],s.test(t)){f=!0;break}return!!f&&s.print(t,function(t){return $(t,n,e,r,o,i,a,c,u,l)},function(t){const r=e+n;return r+t.replace(k,\"\\n\"+r)},{edgeSpacing:o,spacing:r})}function $(t,n,e,r,o,i,a,c,u,l){return D(t)||T(t,n,e,r,o,i,a,c,u,l)||I(t,n,e,r,o,i,a,c,u,l)}const U={indent:2,min:!1,maxDepth:Infinity,plugins:[]};function W(t){return new Array(t+1).join(\" \")}var L={test:function(t){return t&&\"object\"==typeof t&&\"type\"in t&&\"props\"in t&&\"key\"in t},print:function(t,n,e){return h(t,L.context,L.opts)}},P={plugins:[L]},R={attributeHook:function(t,n,e,r,o){var c=typeof n;if(\"dangerouslySetInnerHTML\"===t)return!1;if(null==n||\"function\"===c&&!r.functions)return\"\";if(r.skipFalseAttributes&&!o&&(!1===n||(\"class\"===t||\"style\"===t)&&\"\"===n))return\"\";var u=\"string\"==typeof r.pretty?r.pretty:\"\\t\";return\"string\"!==c?(\"function\"!==c||r.functionNames?(L.context=e,L.opts=r,~(n=function(t,n){let e,r;n?(function(t){if(Object.keys(t).forEach(t=>{if(!U.hasOwnProperty(t))throw new Error(\"prettyFormat: Invalid option: \"+t)}),t.min&&void 0!==t.indent&&0!==t.indent)throw new Error(\"prettyFormat: Cannot run with min option and indent\")}(n),n=function(t){const n={};return Object.keys(U).forEach(e=>n[e]=t.hasOwnProperty(e)?t[e]:U[e]),n.min&&(n.indent=0),n}(n)):n=U;const o=n.min?\" \":\"\\n\",i=n.min?\"\":\"\\n\";if(n&&n.plugins.length){e=W(n.indent),r=[];var a=T(t,e,\"\",o,i,r,n.maxDepth,0,n.plugins,n.min);if(a)return a}return D(t)||(e||(e=W(n.indent)),r||(r=[]),I(t,e,\"\",o,i,r,n.maxDepth,0,n.plugins,n.min))}(n,P)).indexOf(\"\\n\")&&(n=a(\"\\n\"+n,u)+\"\\n\")):n=\"Function\",a(\"\\n\"+t+\"={\"+n+\"}\",u)):\"\\n\"+u+t+'=\"'+i(n)+'\"'},jsx:!0,xml:!1,functions:!0,functionNames:!0,skipFalseAttributes:!0,pretty:\" \"};function J(t,n,e,r){return h(t,n,e=s(s({},R),e||{}))}t.default=J,t.render=J});\n//# sourceMappingURL=jsx.js.map\n"],"names":["t","Symbol","e","s","c"],"mappings":"mEAAA,SAAsBA,GAAA,MAAXC,KAAAA,KAAuBC,GACjCD,WAEAA,SAASD,GAAUG,MAClB,KAAAH,OAAkBI,EAAAA"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { VNode } from 'preact';
|
2
|
+
|
3
|
+
interface Options {
|
4
|
+
jsx?: boolean;
|
5
|
+
xml?: boolean;
|
6
|
+
functions?: boolean;
|
7
|
+
functionNames?: boolean;
|
8
|
+
skipFalseAttributes?: boolean;
|
9
|
+
pretty?: boolean | string;
|
10
|
+
}
|
11
|
+
|
12
|
+
export function render(vnode: VNode, context?: any, options?: Options): string;
|
13
|
+
export default render;
|