@universityofmaryland/web-model-library 1.0.7 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +5 -0
- package/README.md +1 -1
- package/dist/_types.d.ts +43 -0
- package/dist/_types.d.ts.map +1 -1
- package/dist/_virtual/index.js +1 -1
- package/dist/_virtual/postcss.js +1 -1
- package/dist/attributes/change-detection.d.ts +21 -0
- package/dist/attributes/change-detection.d.ts.map +1 -0
- package/dist/attributes/change-detection.js +60 -0
- package/dist/attributes/change-detection.js.map +1 -0
- package/dist/attributes/checks.d.ts.map +1 -1
- package/dist/attributes/checks.js +15 -8
- package/dist/attributes/checks.js.map +1 -1
- package/dist/attributes/config.d.ts +29 -0
- package/dist/attributes/config.d.ts.map +1 -0
- package/dist/attributes/config.js +57 -0
- package/dist/attributes/config.js.map +1 -0
- package/dist/attributes/converters.d.ts +14 -0
- package/dist/attributes/converters.d.ts.map +1 -0
- package/dist/attributes/converters.js +84 -0
- package/dist/attributes/converters.js.map +1 -0
- package/dist/attributes/errors.d.ts +16 -0
- package/dist/attributes/errors.d.ts.map +1 -0
- package/dist/attributes/errors.js +51 -0
- package/dist/attributes/errors.js.map +1 -0
- package/dist/attributes/index.d.ts +4 -0
- package/dist/attributes/index.d.ts.map +1 -1
- package/dist/attributes.js +18 -0
- package/dist/attributes.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/model/controllers.d.ts +22 -0
- package/dist/model/controllers.d.ts.map +1 -0
- package/dist/model/controllers.js +53 -0
- package/dist/model/controllers.js.map +1 -0
- package/dist/model/errors.d.ts +13 -0
- package/dist/model/errors.d.ts.map +1 -0
- package/dist/model/errors.js +23 -0
- package/dist/model/errors.js.map +1 -0
- package/dist/model/index.d.ts +54 -3
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/registration.d.ts +13 -0
- package/dist/model/registration.d.ts.map +1 -0
- package/dist/model/registration.js +83 -0
- package/dist/model/registration.js.map +1 -0
- package/dist/model/update-cycle.d.ts +12 -0
- package/dist/model/update-cycle.d.ts.map +1 -0
- package/dist/model/update-cycle.js +41 -0
- package/dist/model/update-cycle.js.map +1 -0
- package/dist/model.js +335 -55
- package/dist/model.js.map +1 -1
- package/dist/node_modules/.pnpm/nanoid@3.3.11/node_modules/nanoid/non-secure/index.js.map +1 -0
- package/dist/node_modules/{picocolors → .pnpm/picocolors@1.1.1/node_modules/picocolors}/picocolors.browser.js +1 -1
- package/dist/node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.browser.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss-discard-duplicates@5.1.0_postcss@8.5.8/node_modules/postcss-discard-duplicates/src/index.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/at-rule.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/comment.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/container.js.map +1 -0
- package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/css-syntax-error.js +2 -2
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/css-syntax-error.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/declaration.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/document.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/fromJSON.js.map +1 -0
- package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/input.js +2 -2
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/input.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/lazy-result.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/list.js.map +1 -0
- package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/map-generator.js +1 -1
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/map-generator.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/no-work-result.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/node.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/parse.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/parser.js.map +1 -0
- package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/postcss.js +1 -1
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/postcss.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/postcss2.js.map +1 -0
- package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/previous-map.js +1 -1
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/previous-map.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/processor.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/result.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/root.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/rule.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/stringifier.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/stringify.js.map +1 -0
- package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/symbols.js +1 -1
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/symbols.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/tokenize.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/warning.js.map +1 -0
- package/dist/slots/index.d.ts +6 -0
- package/dist/slots/index.d.ts.map +1 -1
- package/dist/slots/slot-events.d.ts +32 -0
- package/dist/slots/slot-events.d.ts.map +1 -0
- package/dist/slots/slot-events.js +83 -0
- package/dist/slots/slot-events.js.map +1 -0
- package/dist/slots/slot-query.d.ts +18 -0
- package/dist/slots/slot-query.d.ts.map +1 -0
- package/dist/slots/slot-query.js +59 -0
- package/dist/slots/slot-query.js.map +1 -0
- package/dist/slots/slot-validation.d.ts +5 -0
- package/dist/slots/slot-validation.d.ts.map +1 -0
- package/dist/slots/slot-validation.js +89 -0
- package/dist/slots/slot-validation.js.map +1 -0
- package/dist/slots.js +15 -1
- package/dist/slots.js.map +1 -1
- package/dist/testing/console.d.ts +8 -0
- package/dist/testing/console.d.ts.map +1 -0
- package/dist/testing/console.js +39 -0
- package/dist/testing/console.js.map +1 -0
- package/dist/testing/events.d.ts +11 -0
- package/dist/testing/events.d.ts.map +1 -0
- package/dist/testing/events.js +47 -0
- package/dist/testing/events.js.map +1 -0
- package/dist/testing/fixture.d.ts +10 -0
- package/dist/testing/fixture.d.ts.map +1 -0
- package/dist/testing/fixture.js +36 -0
- package/dist/testing/fixture.js.map +1 -0
- package/dist/testing/index.d.ts +8 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/shadow.d.ts +6 -0
- package/dist/testing/shadow.d.ts.map +1 -0
- package/dist/testing/shadow.js +27 -0
- package/dist/testing/shadow.js.map +1 -0
- package/dist/testing/slots.d.ts +10 -0
- package/dist/testing/slots.d.ts.map +1 -0
- package/dist/testing/slots.js +62 -0
- package/dist/testing/slots.js.map +1 -0
- package/dist/testing.d.ts +2 -0
- package/dist/testing.js +26 -0
- package/dist/testing.js.map +1 -0
- package/dist/utilities/debug.d.ts +365 -0
- package/dist/utilities/debug.d.ts.map +1 -0
- package/dist/utilities/debug.js +71 -0
- package/dist/utilities/debug.js.map +1 -0
- package/dist/utilities/dom.d.ts +11 -0
- package/dist/utilities/dom.d.ts.map +1 -0
- package/dist/utilities/dom.js +57 -0
- package/dist/utilities/dom.js.map +1 -0
- package/dist/utilities/events.d.ts +22 -0
- package/dist/utilities/events.d.ts.map +1 -0
- package/dist/utilities/events.js +49 -0
- package/dist/utilities/events.js.map +1 -0
- package/dist/utilities/index.d.ts +7 -0
- package/dist/utilities/index.d.ts.map +1 -1
- package/dist/utilities/register.d.ts.map +1 -1
- package/dist/utilities/register.js +16 -4
- package/dist/utilities/register.js.map +1 -1
- package/dist/utilities/styles.js +1 -1
- package/dist/utilities/types.d.ts +10 -0
- package/dist/utilities/types.d.ts.map +1 -0
- package/dist/utilities/types.js +45 -0
- package/dist/utilities/types.js.map +1 -0
- package/dist/utilities.js +27 -1
- package/dist/utilities.js.map +1 -1
- package/package.json +21 -15
- package/dist/node_modules/nanoid/non-secure/index.js.map +0 -1
- package/dist/node_modules/picocolors/picocolors.browser.js.map +0 -1
- package/dist/node_modules/postcss/lib/at-rule.js.map +0 -1
- package/dist/node_modules/postcss/lib/comment.js.map +0 -1
- package/dist/node_modules/postcss/lib/container.js.map +0 -1
- package/dist/node_modules/postcss/lib/css-syntax-error.js.map +0 -1
- package/dist/node_modules/postcss/lib/declaration.js.map +0 -1
- package/dist/node_modules/postcss/lib/document.js.map +0 -1
- package/dist/node_modules/postcss/lib/fromJSON.js.map +0 -1
- package/dist/node_modules/postcss/lib/input.js.map +0 -1
- package/dist/node_modules/postcss/lib/lazy-result.js.map +0 -1
- package/dist/node_modules/postcss/lib/list.js.map +0 -1
- package/dist/node_modules/postcss/lib/map-generator.js.map +0 -1
- package/dist/node_modules/postcss/lib/no-work-result.js.map +0 -1
- package/dist/node_modules/postcss/lib/node.js.map +0 -1
- package/dist/node_modules/postcss/lib/parse.js.map +0 -1
- package/dist/node_modules/postcss/lib/parser.js.map +0 -1
- package/dist/node_modules/postcss/lib/postcss.js.map +0 -1
- package/dist/node_modules/postcss/lib/postcss2.js.map +0 -1
- package/dist/node_modules/postcss/lib/previous-map.js.map +0 -1
- package/dist/node_modules/postcss/lib/processor.js.map +0 -1
- package/dist/node_modules/postcss/lib/result.js.map +0 -1
- package/dist/node_modules/postcss/lib/root.js.map +0 -1
- package/dist/node_modules/postcss/lib/rule.js.map +0 -1
- package/dist/node_modules/postcss/lib/stringifier.js.map +0 -1
- package/dist/node_modules/postcss/lib/stringify.js.map +0 -1
- package/dist/node_modules/postcss/lib/symbols.js.map +0 -1
- package/dist/node_modules/postcss/lib/tokenize.js.map +0 -1
- package/dist/node_modules/postcss/lib/warning.js.map +0 -1
- package/dist/packages/model/node_modules/postcss-discard-duplicates/src/index.js.map +0 -1
- /package/dist/node_modules/{nanoid → .pnpm/nanoid@3.3.11/node_modules/nanoid}/non-secure/index.js +0 -0
- /package/dist/{packages/model → node_modules/.pnpm/postcss-discard-duplicates@5.1.0_postcss@8.5.8}/node_modules/postcss-discard-duplicates/src/index.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/at-rule.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/comment.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/container.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/declaration.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/document.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/fromJSON.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/lazy-result.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/list.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/no-work-result.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/node.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/parse.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/parser.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/postcss2.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/processor.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/result.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/root.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/rule.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/stringifier.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/stringify.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/tokenize.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/warning.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postcss.js","sources":["../../../../../../../../../node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/postcss.mjs"],"sourcesContent":["import postcss from './postcss.js'\n\nexport default postcss\n\nexport const stringify = postcss.stringify\nexport const fromJSON = postcss.fromJSON\nexport const plugin = postcss.plugin\nexport const parse = postcss.parse\nexport const list = postcss.list\n\nexport const document = postcss.document\nexport const comment = postcss.comment\nexport const atRule = postcss.atRule\nexport const rule = postcss.rule\nexport const decl = postcss.decl\nexport const root = postcss.root\n\nexport const CssSyntaxError = postcss.CssSyntaxError\nexport const Declaration = postcss.Declaration\nexport const Container = postcss.Container\nexport const Processor = postcss.Processor\nexport const Document = postcss.Document\nexport const Comment = postcss.Comment\nexport const Warning = postcss.Warning\nexport const AtRule = postcss.AtRule\nexport const Result = postcss.Result\nexport const Input = postcss.Input\nexport const Rule = postcss.Rule\nexport const Root = postcss.Root\nexport const Node = postcss.Node\n"],"names":[],"mappings":";AAIyB,QAAQ;AACT,QAAQ;AACV,QAAQ;AACT,QAAQ;AACT,QAAQ;AAEJ,QAAQ;AACT,QAAQ;AACT,QAAQ;AACV,QAAQ;AACR,QAAQ;AACR,QAAQ;AAEE,QAAQ;AACX,QAAQ;AACV,QAAQ;AACR,QAAQ;AACT,QAAQ;AACT,QAAQ;AACR,QAAQ;AACT,QAAQ;AACR,QAAQ;AACT,QAAQ;AACT,QAAQ;AACR,QAAQ;AACR,QAAQ;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postcss2.js","sources":["../../../../../../../../../node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/postcss.js"],"sourcesContent":["'use strict'\n\nlet AtRule = require('./at-rule')\nlet Comment = require('./comment')\nlet Container = require('./container')\nlet CssSyntaxError = require('./css-syntax-error')\nlet Declaration = require('./declaration')\nlet Document = require('./document')\nlet fromJSON = require('./fromJSON')\nlet Input = require('./input')\nlet LazyResult = require('./lazy-result')\nlet list = require('./list')\nlet Node = require('./node')\nlet parse = require('./parse')\nlet Processor = require('./processor')\nlet Result = require('./result.js')\nlet Root = require('./root')\nlet Rule = require('./rule')\nlet stringify = require('./stringify')\nlet Warning = require('./warning')\n\nfunction postcss(...plugins) {\n if (plugins.length === 1 && Array.isArray(plugins[0])) {\n plugins = plugins[0]\n }\n return new Processor(plugins)\n}\n\npostcss.plugin = function plugin(name, initializer) {\n let warningPrinted = false\n function creator(...args) {\n // eslint-disable-next-line no-console\n if (console && console.warn && !warningPrinted) {\n warningPrinted = true\n // eslint-disable-next-line no-console\n console.warn(\n name +\n ': postcss.plugin was deprecated. Migration guide:\\n' +\n 'https://evilmartians.com/chronicles/postcss-8-plugin-migration'\n )\n if (process.env.LANG && process.env.LANG.startsWith('cn')) {\n /* c8 ignore next 7 */\n // eslint-disable-next-line no-console\n console.warn(\n name +\n ': 里面 postcss.plugin 被弃用. 迁移指南:\\n' +\n 'https://www.w3ctech.com/topic/2226'\n )\n }\n }\n let transformer = initializer(...args)\n transformer.postcssPlugin = name\n transformer.postcssVersion = new Processor().version\n return transformer\n }\n\n let cache\n Object.defineProperty(creator, 'postcss', {\n get() {\n if (!cache) cache = creator()\n return cache\n }\n })\n\n creator.process = function (css, processOpts, pluginOpts) {\n return postcss([creator(pluginOpts)]).process(css, processOpts)\n }\n\n return creator\n}\n\npostcss.stringify = stringify\npostcss.parse = parse\npostcss.fromJSON = fromJSON\npostcss.list = list\n\npostcss.comment = defaults => new Comment(defaults)\npostcss.atRule = defaults => new AtRule(defaults)\npostcss.decl = defaults => new Declaration(defaults)\npostcss.rule = defaults => new Rule(defaults)\npostcss.root = defaults => new Root(defaults)\npostcss.document = defaults => new Document(defaults)\n\npostcss.CssSyntaxError = CssSyntaxError\npostcss.Declaration = Declaration\npostcss.Container = Container\npostcss.Processor = Processor\npostcss.Document = Document\npostcss.Comment = Comment\npostcss.Warning = Warning\npostcss.AtRule = AtRule\npostcss.Result = Result\npostcss.Input = Input\npostcss.Rule = Rule\npostcss.Root = Root\npostcss.Node = Node\n\nLazyResult.registerPostcss(postcss)\n\nmodule.exports = postcss\npostcss.default = postcss\n"],"names":["require$$0","require$$1","require$$2","require$$3","require$$4","require$$5","require$$6","require$$7","require$$8","require$$9","require$$10","require$$11","require$$12","require$$13","require$$14","require$$15","require$$16","require$$17"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEA,MAAI,SAASA,cAAA;AACb,MAAI,UAAUC,eAAA;AACd,MAAI,YAAYC,iBAAA;AAChB,M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AAK,WAAW;AAAA,IAClE;AAEE,WAAO;AAAA,EACT;AAEA,UAAQ,YAAY;AACpB,UAAQ,QAAQ;AAChB,UAAQ,WAAW;AACnB,UAAQ,OAAO;AAEf,UAAQ,UAAU,cAAY,IAAI,QAAQ,QAAQ;AAClD,UAAQ,SAAS,cAAY,IAAI,OAAO,QAAQ;AAChD,UAAQ,OAAO,cAAY,IAAI,YAAY,QAAQ;AACnD,UAAQ,OAAO,cAAY,IAAI,KAAK,QAAQ;AAC5C,UAAQ,OAAO,cAAY,IAAI,KAAK,QAAQ;AAC5C,UAAQ,WAAW,cAAY,IAAI,SAAS,QAAQ;AAEpD,UAAQ,iBAAiB;AACzB,UAAQ,cAAc;AACtB,UAAQ,YAAY;AACpB,UAAQ,YAAY;AACpB,UAAQ,WAAW;AACnB,UAAQ,UAAU;AAClB,UAAQ,UAAU;AAClB,UAAQ,SAAS;AACjB,UAAQ,SAAS;AACjB,UAAQ,QAAQ;AAChB,UAAQ,OAAO;AACf,UAAQ,OAAO;AACf,UAAQ,OAAO;AAEf,aAAW,gBAAgB,OAAO;AAElC,cAAiB;AACjB,UAAQ,UAAU;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"previous-map.js","sources":["../../../../../../../../../node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/previous-map.js"],"sourcesContent":["'use strict'\n\nlet { existsSync, readFileSync } = require('fs')\nlet { dirname, join } = require('path')\nlet { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')\n\nfunction fromBase64(str) {\n if (Buffer) {\n return Buffer.from(str, 'base64').toString()\n } else {\n /* c8 ignore next 2 */\n return window.atob(str)\n }\n}\n\nclass PreviousMap {\n constructor(css, opts) {\n if (opts.map === false) return\n this.loadAnnotation(css)\n this.inline = this.startWith(this.annotation, 'data:')\n\n let prev = opts.map ? opts.map.prev : undefined\n let text = this.loadMap(opts.from, prev)\n if (!this.mapFile && opts.from) {\n this.mapFile = opts.from\n }\n if (this.mapFile) this.root = dirname(this.mapFile)\n if (text) this.text = text\n }\n\n consumer() {\n if (!this.consumerCache) {\n this.consumerCache = new SourceMapConsumer(this.text)\n }\n return this.consumerCache\n }\n\n decodeInline(text) {\n let baseCharsetUri = /^data:application\\/json;charset=utf-?8;base64,/\n let baseUri = /^data:application\\/json;base64,/\n let charsetUri = /^data:application\\/json;charset=utf-?8,/\n let uri = /^data:application\\/json,/\n\n let uriMatch = text.match(charsetUri) || text.match(uri)\n if (uriMatch) {\n return decodeURIComponent(text.substr(uriMatch[0].length))\n }\n\n let baseUriMatch = text.match(baseCharsetUri) || text.match(baseUri)\n if (baseUriMatch) {\n return fromBase64(text.substr(baseUriMatch[0].length))\n }\n\n let encoding = text.match(/data:application\\/json;([^,]+),/)[1]\n throw new Error('Unsupported source map encoding ' + encoding)\n }\n\n getAnnotationURL(sourceMapString) {\n return sourceMapString.replace(/^\\/\\*\\s*# sourceMappingURL=/, '').trim()\n }\n\n isMap(map) {\n if (typeof map !== 'object') return false\n return (\n typeof map.mappings === 'string' ||\n typeof map._mappings === 'string' ||\n Array.isArray(map.sections)\n )\n }\n\n loadAnnotation(css) {\n let comments = css.match(/\\/\\*\\s*# sourceMappingURL=/g)\n if (!comments) return\n\n // sourceMappingURLs from comments, strings, etc.\n let start = css.lastIndexOf(comments.pop())\n let end = css.indexOf('*/', start)\n\n if (start > -1 && end > -1) {\n // Locate the last sourceMappingURL to avoid pickin\n this.annotation = this.getAnnotationURL(css.substring(start, end))\n }\n }\n\n loadFile(path) {\n this.root = dirname(path)\n if (existsSync(path)) {\n this.mapFile = path\n return readFileSync(path, 'utf-8').toString().trim()\n }\n }\n\n loadMap(file, prev) {\n if (prev === false) return false\n\n if (prev) {\n if (typeof prev === 'string') {\n return prev\n } else if (typeof prev === 'function') {\n let prevPath = prev(file)\n if (prevPath) {\n let map = this.loadFile(prevPath)\n if (!map) {\n throw new Error(\n 'Unable to load previous source map: ' + prevPath.toString()\n )\n }\n return map\n }\n } else if (prev instanceof SourceMapConsumer) {\n return SourceMapGenerator.fromSourceMap(prev).toString()\n } else if (prev instanceof SourceMapGenerator) {\n return prev.toString()\n } else if (this.isMap(prev)) {\n return JSON.stringify(prev)\n } else {\n throw new Error(\n 'Unsupported previous source map format: ' + prev.toString()\n )\n }\n } else if (this.inline) {\n return this.decodeInline(this.annotation)\n } else if (this.annotation) {\n let map = this.annotation\n if (file) map = join(dirname(file), map)\n return this.loadFile(map)\n }\n }\n\n startWith(string, start) {\n if (!string) return false\n return string.substr(0, start.length) === start\n }\n\n withContent() {\n return !!(\n this.consumer().sourcesContent &&\n this.consumer().sourcesContent.length > 0\n )\n }\n}\n\nmodule.exports = PreviousMap\nPreviousMap.default = PreviousMap\n"],"names":["require$$0","require$$1"],"mappings":";;;;;;AAEA,MAAI,EAAE,YAAY,iBAAiBA;AACnC,MAAI,EAAE,SAAS,SAASC;AACxB,MAAI,EAAE,mBAAmB,uBAAuB;AAEhD,WAAS,WAAW,KAAK;AACvB,QAAI,QAAQ;AACV,aAAO,OAAO,KAAK,KAAK,QAAQ,EAAE,SAAQ;AAAA,IAC9C,OAAS;AAEL,aAAO,OAAO,KAAK,GAAG;AAAA,IAC1B;AAAA,EACA;AAAA,EAEA,MAAM,YAAY;AAAA,IAChB,YAAY,KAAK,MAAM;AACrB,UAAI,KAAK,QAAQ,MAAO;AACxB,WAAK,eAAe,GAAG;AACvB,WAAK,SAAS,KAAK,UAAU,KAAK,YAAY,OAAO;AAErD,UAAI,OAAO,KAAK,MAAM,KAAK,IAAI,OAAO;AACtC,UAAI,OAAO,KAAK,QAAQ,KAAK,MAAM,IAAI;AACvC,UAAI,CAAC,KAAK,WAAW,KAAK,MAAM;AAC9B,aAAK,UAAU,KAAK;AAAA,MAC1B;AACI,UAAI,KAAK,QAAS,MAAK,OAAO,QAAQ,KAAK,OAAO;AAClD,UAAI,KAAM,MAAK,OAAO;AAAA,IAC1B;AAAA,IAEE,WAAW;AACT,UAAI,CAAC,KAAK,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EAAG,eAAe,SAAS;AAAA,IAE9C;AAAA,EACA;AAEA,gBAAiB;AACjB,cAAY,UAAU;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"processor.js","sources":["../../../../../../../../../node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/processor.js"],"sourcesContent":["'use strict'\n\nlet Document = require('./document')\nlet LazyResult = require('./lazy-result')\nlet NoWorkResult = require('./no-work-result')\nlet Root = require('./root')\n\nclass Processor {\n constructor(plugins = []) {\n this.version = '8.5.8'\n this.plugins = this.normalize(plugins)\n }\n\n normalize(plugins) {\n let normalized = []\n for (let i of plugins) {\n if (i.postcss === true) {\n i = i()\n } else if (i.postcss) {\n i = i.postcss\n }\n\n if (typeof i === 'object' && Array.isArray(i.plugins)) {\n normalized = normalized.concat(i.plugins)\n } else if (typeof i === 'object' && i.postcssPlugin) {\n normalized.push(i)\n } else if (typeof i === 'function') {\n normalized.push(i)\n } else if (typeof i === 'object' && (i.parse || i.stringify)) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(\n 'PostCSS syntaxes cannot be used as plugins. Instead, please use ' +\n 'one of the syntax/parser/stringifier options as outlined ' +\n 'in your PostCSS runner documentation.'\n )\n }\n } else {\n throw new Error(i + ' is not a PostCSS plugin')\n }\n }\n return normalized\n }\n\n process(css, opts = {}) {\n if (\n !this.plugins.length &&\n !opts.parser &&\n !opts.stringifier &&\n !opts.syntax\n ) {\n return new NoWorkResult(this, css, opts)\n } else {\n return new LazyResult(this, css, opts)\n }\n }\n\n use(plugin) {\n this.plugins = this.plugins.concat(this.normalize([plugin]))\n return this\n }\n}\n\nmodule.exports = Processor\nProcessor.default = Processor\n\nRoot.registerProcessor(Processor)\nDocument.registerProcessor(Processor)\n"],"names":["require$$0","require$$1","require$$2","require$$3"],"mappings":";;;;;;;;;AAEA,MAAI,WAAWA,gBAAA;AACf,MAAI,aAAaC,kBAAA;AACjB,MAAI,eAAeC,oBAAA;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
1
|
+
{"version":3,"file":"result.js","sources":["../../../../../../../../../node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/result.js"],"sourcesContent":["'use strict'\n\nlet Warning = require('./warning')\n\nclass Result {\n get content() {\n return this.css\n }\n\n constructor(processor, root, opts) {\n this.processor = processor\n this.messages = []\n this.root = root\n this.opts = opts\n this.css = ''\n this.map = undefined\n }\n\n toString() {\n return this.css\n }\n\n warn(text, opts = {}) {\n if (!opts.plugin) {\n if (this.lastPlugin && this.lastPlugin.postcssPlugin) {\n opts.plugin = this.lastPlugin.postcssPlugin\n }\n }\n\n let warning = new Warning(text, opts)\n this.messages.push(warning)\n\n return warning\n }\n\n warnings() {\n return this.messages.filter(i => i.type === 'warning')\n }\n}\n\nmodule.exports = Result\nResult.default = Result\n"],"names":["require$$0"],"mappings":";;;;;;AAEA,MAAI,UAAUA,eAAA;AAAA,EAEd,MAAM,OAAO;AAAA,IACX,IAAI,UAAU;AACZ,aAAO,KAAK;AAAA,IAChB;AAAA,IAEE,YAAY,WAAW,MAAM,MAAM;AACjC,WAAK,YAAY;AACjB,WAAK,WAAW,CAAA;AAChB,WAAK,OAAO;AACZ,WAAK,OAAO;AACZ,WAAK,MAAM;AACX,WAAK,MAAM;AAAA,IACf;AAAA,IAEE,WAAW;AACT,aAAO,KAAK;AAAA,IAChB;AAAA,IAEE,KAAK,MAAM,OAAO,IAAI;AACpB,UAAI,CAAC,KAAK,QAAQ;AAChB,YAAI,KAAK,cAAc,KAAK,WAAW,eAAe;AACpD,eAAK,SAAS,KAAK,WAAW;AAAA,QACtC;AAAA,MACA;AAEI,UAAI,UAAU,IAAI,QAAQ,MAAM,IAAI;AACpC,WAAK,SAAS,KAAK,OAAO;AAE1B,aAAO;AAAA,IACX;AAAA,IAEE,WAAW;AACT,aAAO,KAAK,SAAS,OAAO,OAAK,EAAE,SAAS,SAAS;AAAA,IACzD;AAAA,EACA;AAEA,WAAiB;AACjB,SAAO,UAAU;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root.js","sources":["../../../../../../../../../node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/root.js"],"sourcesContent":["'use strict'\n\nlet Container = require('./container')\n\nlet LazyResult, Processor\n\nclass Root extends Container {\n constructor(defaults) {\n super(defaults)\n this.type = 'root'\n if (!this.nodes) this.nodes = []\n }\n\n normalize(child, sample, type) {\n let nodes = super.normalize(child)\n\n if (sample) {\n if (type === 'prepend') {\n if (this.nodes.length > 1) {\n sample.raws.before = this.nodes[1].raws.before\n } else {\n delete sample.raws.before\n }\n } else if (this.first !== sample) {\n for (let node of nodes) {\n node.raws.before = sample.raws.before\n }\n }\n }\n\n return nodes\n }\n\n removeChild(child, ignore) {\n let index = this.index(child)\n\n if (!ignore && index === 0 && this.nodes.length > 1) {\n this.nodes[1].raws.before = this.nodes[index].raws.before\n }\n\n return super.removeChild(child)\n }\n\n toResult(opts = {}) {\n let lazy = new LazyResult(new Processor(), this, opts)\n return lazy.stringify()\n }\n}\n\nRoot.registerLazyResult = dependant => {\n LazyResult = dependant\n}\n\nRoot.registerProcessor = dependant => {\n Processor = dependant\n}\n\nmodule.exports = Root\nRoot.default = Root\n\nContainer.registerRoot(Root)\n"],"names":["require$$0"],"mappings":";;;;;;AAEA,MAAI,YAAYA,iBAAA;AAEhB,MAAI,YAAY;AAAA,EAEhB,MAAM,aAAa,UAAU;AAAA,IAC3B,YAAY,UAAU;AACpB,YAAM,QAAQ;AACd,WAAK,OAAO;AACZ,UAAI,CAAC,KAAK,MAAO,MAAK,QAAQ,CAAA;AAAA,IAClC;AAAA,IAEE,UAAU,OAAO,QAAQ,MAAM;AAC7B,UAAI,QAAQ,MAAM,UAAU,KAAK;AAEjC,UAAI,QAAQ;AACV,YAAI,SAAS,WAAW;AACtB,cAAI,KAAK,MAAM,SAAS,GAAG;AACzB,mBAAO,KAAK,SAAS,KAAK,MAAM,CAAC,EAAE,KAAK;AAAA,UAClD,OAAe;AACL,mBAAO,OAAO,KAAK;AAAA,UAC7B;AAAA,QACA,WAAiB,KAAK,UAAU,QAAQ;AAChC,mBAAS,QAAQ,OAAO;AACtB,iBAAK,KAAK,SAAS,OAAO,KAAK;AAAA,UACzC;AAAA,QACA;AAAA,MACA;AAEI,aAAO;AAAA,IACX;AAAA,IAEE,YAAY,OAAO,QAAQ;AACzB,UAAI,QAAQ,KAAK,MAAM,KAAK;AAE5B,UAAI,CAAC,UAAU,UAAU,KAAK,KAAK,MAAM,SAAS,GAAG;AACnD,aAAK,MAAM,CAAC,EAAE,KAAK,SAAS,KAAK,MAAM,KAAK,EAAE,KAAK;AAAA,MACzD;AAEI,aAAO,MAAM,YAAY,KAAK;AAAA,IAClC;AAAA,IAEE,SAAS,OAAO,IAAI;AAClB,UAAI,OAAO,IAAI,WAAW,IAAI,UAAS,GAAI,MAAM,IAAI;AACrD,aAAO,KAAK,UAAS;AAAA,IACzB;AAAA,EACA;AAEA,OAAK,qBAAqB,eAAa;AACrC,iBAAa;AAAA,EACf;AAEA,OAAK,oBAAoB,eAAa;AACpC,gBAAY;AAAA,EACd;AAEA,SAAiB;AACjB,OAAK,UAAU;AAEf,YAAU,aAAa,IAAI;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule.js","sources":["../../../../../../../../../node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/rule.js"],"sourcesContent":["'use strict'\n\nlet Container = require('./container')\nlet list = require('./list')\n\nclass Rule extends Container {\n get selectors() {\n return list.comma(this.selector)\n }\n\n set selectors(values) {\n let match = this.selector ? this.selector.match(/,\\s*/) : null\n let sep = match ? match[0] : ',' + this.raw('between', 'beforeOpen')\n this.selector = values.join(sep)\n }\n\n constructor(defaults) {\n super(defaults)\n this.type = 'rule'\n if (!this.nodes) this.nodes = []\n }\n}\n\nmodule.exports = Rule\nRule.default = Rule\n\nContainer.registerRule(Rule)\n"],"names":["require$$0","require$$1"],"mappings":";;;;;;;AAEA,MAAI,YAAYA,iBAAA;AAChB,MAAI,OAAOC,YAAA;AAAA,EAEX,MAAM,aAAa,UAAU;AAAA,IAC3B,IAAI,YAAY;AACd,aAAO,KAAK,MAAM,KAAK,QAAQ;AAAA,IACnC;AAAA,IAEE,IAAI,UAAU,QAAQ;AACpB,UAAI,QAAQ,KAAK,WAAW,KAAK,SAAS,MAAM,MAAM,IAAI;AAC1D,UAAI,MAAM,QAAQ,MAAM,CAAC,IAAI,MAAM,KAAK,IAAI,WAAW,YAAY;AACnE,WAAK,WAAW,OAAO,KAAK,GAAG;AAAA,IACnC;AAAA,IAEE,YAAY,UAAU;AACpB,YAAM,QAAQ;AACd,WAAK,OAAO;AACZ,UAAI,CAAC,KAAK,MAAO,MAAK,QAAQ,CAAA;AAAA,IAClC;AAAA,EACA;AAEA,SAAiB;AACjB,OAAK,UAAU;AAEf,YAAU,aAAa,IAAI;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stringifier.js","sources":["../../../../../../../../../node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/stringifier.js"],"sourcesContent":["'use strict'\n\nconst DEFAULT_RAW = {\n after: '\\n',\n beforeClose: '\\n',\n beforeComment: '\\n',\n beforeDecl: '\\n',\n beforeOpen: ' ',\n beforeRule: '\\n',\n colon: ': ',\n commentLeft: ' ',\n commentRight: ' ',\n emptyBody: '',\n indent: ' ',\n semicolon: false\n}\n\nfunction capitalize(str) {\n return str[0].toUpperCase() + str.slice(1)\n}\n\nclass Stringifier {\n constructor(builder) {\n this.builder = builder\n }\n\n atrule(node, semicolon) {\n let name = '@' + node.name\n let params = node.params ? this.rawValue(node, 'params') : ''\n\n if (typeof node.raws.afterName !== 'undefined') {\n name += node.raws.afterName\n } else if (params) {\n name += ' '\n }\n\n if (node.nodes) {\n this.block(node, name + params)\n } else {\n let end = (node.raws.between || '') + (semicolon ? ';' : '')\n this.builder(name + params + end, node)\n }\n }\n\n beforeAfter(node, detect) {\n let value\n if (node.type === 'decl') {\n value = this.raw(node, null, 'beforeDecl')\n } else if (node.type === 'comment') {\n value = this.raw(node, null, 'beforeComment')\n } else if (detect === 'before') {\n value = this.raw(node, null, 'beforeRule')\n } else {\n value = this.raw(node, null, 'beforeClose')\n }\n\n let buf = node.parent\n let depth = 0\n while (buf && buf.type !== 'root') {\n depth += 1\n buf = buf.parent\n }\n\n if (value.includes('\\n')) {\n let indent = this.raw(node, null, 'indent')\n if (indent.length) {\n for (let step = 0; step < depth; step++) value += indent\n }\n }\n\n return value\n }\n\n block(node, start) {\n let between = this.raw(node, 'between', 'beforeOpen')\n this.builder(start + between + '{', node, 'start')\n\n let after\n if (node.nodes && node.nodes.length) {\n this.body(node)\n after = this.raw(node, 'after')\n } else {\n after = this.raw(node, 'after', 'emptyBody')\n }\n\n if (after) this.builder(after)\n this.builder('}', node, 'end')\n }\n\n body(node) {\n let last = node.nodes.length - 1\n while (last > 0) {\n if (node.nodes[last].type !== 'comment') break\n last -= 1\n }\n\n let semicolon = this.raw(node, 'semicolon')\n for (let i = 0; i < node.nodes.length; i++) {\n let child = node.nodes[i]\n let before = this.raw(child, 'before')\n if (before) this.builder(before)\n this.stringify(child, last !== i || semicolon)\n }\n }\n\n comment(node) {\n let left = this.raw(node, 'left', 'commentLeft')\n let right = this.raw(node, 'right', 'commentRight')\n this.builder('/*' + left + node.text + right + '*/', node)\n }\n\n decl(node, semicolon) {\n let between = this.raw(node, 'between', 'colon')\n let string = node.prop + between + this.rawValue(node, 'value')\n\n if (node.important) {\n string += node.raws.important || ' !important'\n }\n\n if (semicolon) string += ';'\n this.builder(string, node)\n }\n\n document(node) {\n this.body(node)\n }\n\n raw(node, own, detect) {\n let value\n if (!detect) detect = own\n\n // Already had\n if (own) {\n value = node.raws[own]\n if (typeof value !== 'undefined') return value\n }\n\n let parent = node.parent\n\n if (detect === 'before') {\n // Hack for first rule in CSS\n if (!parent || (parent.type === 'root' && parent.first === node)) {\n return ''\n }\n\n // `root` nodes in `document` should use only their own raws\n if (parent && parent.type === 'document') {\n return ''\n }\n }\n\n // Floating child without parent\n if (!parent) return DEFAULT_RAW[detect]\n\n // Detect style by other nodes\n let root = node.root()\n if (!root.rawCache) root.rawCache = {}\n if (typeof root.rawCache[detect] !== 'undefined') {\n return root.rawCache[detect]\n }\n\n if (detect === 'before' || detect === 'after') {\n return this.beforeAfter(node, detect)\n } else {\n let method = 'raw' + capitalize(detect)\n if (this[method]) {\n value = this[method](root, node)\n } else {\n root.walk(i => {\n value = i.raws[own]\n if (typeof value !== 'undefined') return false\n })\n }\n }\n\n if (typeof value === 'undefined') value = DEFAULT_RAW[detect]\n\n root.rawCache[detect] = value\n return value\n }\n\n rawBeforeClose(root) {\n let value\n root.walk(i => {\n if (i.nodes && i.nodes.length > 0) {\n if (typeof i.raws.after !== 'undefined') {\n value = i.raws.after\n if (value.includes('\\n')) {\n value = value.replace(/[^\\n]+$/, '')\n }\n return false\n }\n }\n })\n if (value) value = value.replace(/\\S/g, '')\n return value\n }\n\n rawBeforeComment(root, node) {\n let value\n root.walkComments(i => {\n if (typeof i.raws.before !== 'undefined') {\n value = i.raws.before\n if (value.includes('\\n')) {\n value = value.replace(/[^\\n]+$/, '')\n }\n return false\n }\n })\n if (typeof value === 'undefined') {\n value = this.raw(node, null, 'beforeDecl')\n } else if (value) {\n value = value.replace(/\\S/g, '')\n }\n return value\n }\n\n rawBeforeDecl(root, node) {\n let value\n root.walkDecls(i => {\n if (typeof i.raws.before !== 'undefined') {\n value = i.raws.before\n if (value.includes('\\n')) {\n value = value.replace(/[^\\n]+$/, '')\n }\n return false\n }\n })\n if (typeof value === 'undefined') {\n value = this.raw(node, null, 'beforeRule')\n } else if (value) {\n value = value.replace(/\\S/g, '')\n }\n return value\n }\n\n rawBeforeOpen(root) {\n let value\n root.walk(i => {\n if (i.type !== 'decl') {\n value = i.raws.between\n if (typeof value !== 'undefined') return false\n }\n })\n return value\n }\n\n rawBeforeRule(root) {\n let value\n root.walk(i => {\n if (i.nodes && (i.parent !== root || root.first !== i)) {\n if (typeof i.raws.before !== 'undefined') {\n value = i.raws.before\n if (value.includes('\\n')) {\n value = value.replace(/[^\\n]+$/, '')\n }\n return false\n }\n }\n })\n if (value) value = value.replace(/\\S/g, '')\n return value\n }\n\n rawColon(root) {\n let value\n root.walkDecls(i => {\n if (typeof i.raws.between !== 'undefined') {\n value = i.raws.between.replace(/[^\\s:]/g, '')\n return false\n }\n })\n return value\n }\n\n rawEmptyBody(root) {\n let value\n root.walk(i => {\n if (i.nodes && i.nodes.length === 0) {\n value = i.raws.after\n if (typeof value !== 'undefined') return false\n }\n })\n return value\n }\n\n rawIndent(root) {\n if (root.raws.indent) return root.raws.indent\n let value\n root.walk(i => {\n let p = i.parent\n if (p && p !== root && p.parent && p.parent === root) {\n if (typeof i.raws.before !== 'undefined') {\n let parts = i.raws.before.split('\\n')\n value = parts[parts.length - 1]\n value = value.replace(/\\S/g, '')\n return false\n }\n }\n })\n return value\n }\n\n rawSemicolon(root) {\n let value\n root.walk(i => {\n if (i.nodes && i.nodes.length && i.last.type === 'decl') {\n value = i.raws.semicolon\n if (typeof value !== 'undefined') return false\n }\n })\n return value\n }\n\n rawValue(node, prop) {\n let value = node[prop]\n let raw = node.raws[prop]\n if (raw && raw.value === value) {\n return raw.raw\n }\n\n return value\n }\n\n root(node) {\n this.body(node)\n if (node.raws.after) this.builder(node.raws.after)\n }\n\n rule(node) {\n this.block(node, this.rawValue(node, 'selector'))\n if (node.raws.ownSemicolon) {\n this.builder(node.raws.ownSemicolon, node, 'end')\n }\n }\n\n stringify(node, semicolon) {\n /* c8 ignore start */\n if (!this[node.type]) {\n throw new Error(\n 'Unknown AST node type ' +\n node.type +\n '. ' +\n 'Maybe you need to change PostCSS stringifier.'\n )\n }\n /* c8 ignore stop */\n this[node.type](node, semicolon)\n }\n}\n\nmodule.exports = Stringifier\nStringifier.default = Stringifier\n"],"names":[],"mappings":";;;;;AAEA,QAAM,cAAc;AAAA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AM,KAAK;AAAA,MACtD;AAAA,IACA;AAAA,IAEE,UAAU,MAAM,WAAW;AAEzB,UAAI,CAAC,KAAK,KAAK,IAAI,GAAG;AACpB,cAAM,IAAI;AAAA,UACR,2BACE,KAAK,OACL;AAAA,QAEV;AAAA,MACA;AAEI,WAAK,KAAK,IAAI,EAAE,MAAM,SAAS;AAAA,IACnC;AAAA,EACA;AAEA,gBAAiB;AACjB,cAAY,UAAU;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stringify.js","sources":["../../../../../../../../../node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/stringify.js"],"sourcesContent":["'use strict'\n\nlet Stringifier = require('./stringifier')\n\nfunction stringify(node, builder) {\n let str = new Stringifier(builder)\n str.stringify(node)\n}\n\nmodule.exports = stringify\nstringify.default = stringify\n"],"names":["require$$0"],"mappings":";;;;;;AAEA,MAAI,cAAcA,mBAAA;AAElB,WAAS,UAAU,MAAM,SAAS;AAChC,QAAI,MAAM,IAAI,YAAY,OAAO;AACjC,QAAI,UAAU,IAAI;AAAA,EACpB;AAEA,gBAAiB;AACjB,YAAU,UAAU;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"symbols.js","sources":["../../../../../../../../../node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/symbols.js"],"sourcesContent":["'use strict'\n\nmodule.exports.isClean = Symbol('isClean')\n\nmodule.exports.my = Symbol('my')\n"],"names":[],"mappings":";;;;;AAEA,UAAA,UAAyB,uBAAO,SAAS;AAEzC,UAAA,KAAoB,uBAAO,IAAI;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokenize.js","sources":["../../../../../../../../../node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/tokenize.js"],"sourcesContent":["'use strict'\n\nconst SINGLE_QUOTE = \"'\".charCodeAt(0)\nconst DOUBLE_QUOTE = '\"'.charCodeAt(0)\nconst BACKSLASH = '\\\\'.charCodeAt(0)\nconst SLASH = '/'.charCodeAt(0)\nconst NEWLINE = '\\n'.charCodeAt(0)\nconst SPACE = ' '.charCodeAt(0)\nconst FEED = '\\f'.charCodeAt(0)\nconst TAB = '\\t'.charCodeAt(0)\nconst CR = '\\r'.charCodeAt(0)\nconst OPEN_SQUARE = '['.charCodeAt(0)\nconst CLOSE_SQUARE = ']'.charCodeAt(0)\nconst OPEN_PARENTHESES = '('.charCodeAt(0)\nconst CLOSE_PARENTHESES = ')'.charCodeAt(0)\nconst OPEN_CURLY = '{'.charCodeAt(0)\nconst CLOSE_CURLY = '}'.charCodeAt(0)\nconst SEMICOLON = ';'.charCodeAt(0)\nconst ASTERISK = '*'.charCodeAt(0)\nconst COLON = ':'.charCodeAt(0)\nconst AT = '@'.charCodeAt(0)\n\nconst RE_AT_END = /[\\t\\n\\f\\r \"#'()/;[\\\\\\]{}]/g\nconst RE_WORD_END = /[\\t\\n\\f\\r !\"#'():;@[\\\\\\]{}]|\\/(?=\\*)/g\nconst RE_BAD_BRACKET = /.[\\r\\n\"'(/\\\\]/\nconst RE_HEX_ESCAPE = /[\\da-f]/i\n\nmodule.exports = function tokenizer(input, options = {}) {\n let css = input.css.valueOf()\n let ignore = options.ignoreErrors\n\n let code, content, escape, next, quote\n let currentToken, escaped, escapePos, n, prev\n\n let length = css.length\n let pos = 0\n let buffer = []\n let returned = []\n\n function position() {\n return pos\n }\n\n function unclosed(what) {\n throw input.error('Unclosed ' + what, pos)\n }\n\n function endOfFile() {\n return returned.length === 0 && pos >= length\n }\n\n function nextToken(opts) {\n if (returned.length) return returned.pop()\n if (pos >= length) return\n\n let ignoreUnclosed = opts ? opts.ignoreUnclosed : false\n\n code = css.charCodeAt(pos)\n\n switch (code) {\n case NEWLINE:\n case SPACE:\n case TAB:\n case CR:\n case FEED: {\n next = pos\n do {\n next += 1\n code = css.charCodeAt(next)\n } while (\n code === SPACE ||\n code === NEWLINE ||\n code === TAB ||\n code === CR ||\n code === FEED\n )\n\n currentToken = ['space', css.slice(pos, next)]\n pos = next - 1\n break\n }\n\n case OPEN_SQUARE:\n case CLOSE_SQUARE:\n case OPEN_CURLY:\n case CLOSE_CURLY:\n case COLON:\n case SEMICOLON:\n case CLOSE_PARENTHESES: {\n let controlChar = String.fromCharCode(code)\n currentToken = [controlChar, controlChar, pos]\n break\n }\n\n case OPEN_PARENTHESES: {\n prev = buffer.length ? buffer.pop()[1] : ''\n n = css.charCodeAt(pos + 1)\n if (\n prev === 'url' &&\n n !== SINGLE_QUOTE &&\n n !== DOUBLE_QUOTE &&\n n !== SPACE &&\n n !== NEWLINE &&\n n !== TAB &&\n n !== FEED &&\n n !== CR\n ) {\n next = pos\n do {\n escaped = false\n next = css.indexOf(')', next + 1)\n if (next === -1) {\n if (ignore || ignoreUnclosed) {\n next = pos\n break\n } else {\n unclosed('bracket')\n }\n }\n escapePos = next\n while (css.charCodeAt(escapePos - 1) === BACKSLASH) {\n escapePos -= 1\n escaped = !escaped\n }\n } while (escaped)\n\n currentToken = ['brackets', css.slice(pos, next + 1), pos, next]\n\n pos = next\n } else {\n next = css.indexOf(')', pos + 1)\n content = css.slice(pos, next + 1)\n\n if (next === -1 || RE_BAD_BRACKET.test(content)) {\n currentToken = ['(', '(', pos]\n } else {\n currentToken = ['brackets', content, pos, next]\n pos = next\n }\n }\n\n break\n }\n\n case SINGLE_QUOTE:\n case DOUBLE_QUOTE: {\n quote = code === SINGLE_QUOTE ? \"'\" : '\"'\n next = pos\n do {\n escaped = false\n next = css.indexOf(quote, next + 1)\n if (next === -1) {\n if (ignore || ignoreUnclosed) {\n next = pos + 1\n break\n } else {\n unclosed('string')\n }\n }\n escapePos = next\n while (css.charCodeAt(escapePos - 1) === BACKSLASH) {\n escapePos -= 1\n escaped = !escaped\n }\n } while (escaped)\n\n currentToken = ['string', css.slice(pos, next + 1), pos, next]\n pos = next\n break\n }\n\n case AT: {\n RE_AT_END.lastIndex = pos + 1\n RE_AT_END.test(css)\n if (RE_AT_END.lastIndex === 0) {\n next = css.length - 1\n } else {\n next = RE_AT_END.lastIndex - 2\n }\n\n currentToken = ['at-word', css.slice(pos, next + 1), pos, next]\n\n pos = next\n break\n }\n\n case BACKSLASH: {\n next = pos\n escape = true\n while (css.charCodeAt(next + 1) === BACKSLASH) {\n next += 1\n escape = !escape\n }\n code = css.charCodeAt(next + 1)\n if (\n escape &&\n code !== SLASH &&\n code !== SPACE &&\n code !== NEWLINE &&\n code !== TAB &&\n code !== CR &&\n code !== FEED\n ) {\n next += 1\n if (RE_HEX_ESCAPE.test(css.charAt(next))) {\n while (RE_HEX_ESCAPE.test(css.charAt(next + 1))) {\n next += 1\n }\n if (css.charCodeAt(next + 1) === SPACE) {\n next += 1\n }\n }\n }\n\n currentToken = ['word', css.slice(pos, next + 1), pos, next]\n\n pos = next\n break\n }\n\n default: {\n if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) {\n next = css.indexOf('*/', pos + 2) + 1\n if (next === 0) {\n if (ignore || ignoreUnclosed) {\n next = css.length\n } else {\n unclosed('comment')\n }\n }\n\n currentToken = ['comment', css.slice(pos, next + 1), pos, next]\n pos = next\n } else {\n RE_WORD_END.lastIndex = pos + 1\n RE_WORD_END.test(css)\n if (RE_WORD_END.lastIndex === 0) {\n next = css.length - 1\n } else {\n next = RE_WORD_END.lastIndex - 2\n }\n\n currentToken = ['word', css.slice(pos, next + 1), pos, next]\n buffer.push(currentToken)\n pos = next\n }\n\n break\n }\n }\n\n pos++\n return currentToken\n }\n\n function back(token) {\n returned.push(token)\n }\n\n return {\n back,\n endOfFile,\n nextToken,\n position\n }\n}\n"],"names":[],"mappings":";;;;;AAEA,QAAM,eAAe,IAAI,WAAW,CAAC;AACrC,QAAM,eAAe,IAAI,WAAW,CAAC;AACrC,QAAM,YAAY,KAAK,WAAW,CAAC;AACnC,QAAM,QAAQ,IAAI,WAAW,CAAC;AAC9B,QAAM,UAAU,KAAK,W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AAK;AAAA,IACvB;AAEE,WAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACA;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warning.js","sources":["../../../../../../../../../node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/warning.js"],"sourcesContent":["'use strict'\n\nclass Warning {\n constructor(text, opts = {}) {\n this.type = 'warning'\n this.text = text\n\n if (opts.node && opts.node.source) {\n let range = opts.node.rangeBy(opts)\n this.line = range.start.line\n this.column = range.start.column\n this.endLine = range.end.line\n this.endColumn = range.end.column\n }\n\n for (let opt in opts) this[opt] = opts[opt]\n }\n\n toString() {\n if (this.node) {\n return this.node.error(this.text, {\n index: this.index,\n plugin: this.plugin,\n word: this.word\n }).message\n }\n\n if (this.plugin) {\n return this.plugin + ': ' + this.text\n }\n\n return this.text\n }\n}\n\nmodule.exports = Warning\nWarning.default = Warning\n"],"names":[],"mappings":";;;;;EAEA,MAAM,QAAQ;AAAA,IACZ,YAAY,MAAM,OAAO,IAAI;AAC3B,WAAK,OAAO;AACZ,WAAK,OAAO;AAEZ,UAAI,KAAK,QAAQ,KAAK,KAAK,QAAQ;AACjC,YAAI,QAAQ,KAAK,KAAK,QAAQ,IAAI;AAClC,aAAK,OAAO,MAAM,MAAM;AACxB,aAAK,SAAS,MAAM,MAAM;AAC1B,aAAK,UAAU,MAAM,IAAI;AACzB,aAAK,YAAY,MAAM,IAAI;AAAA,MACjC;AAEI,eAAS,OAAO,KAAM,MAAK,GAAG,IAAI,KAAK,GAAG;AAAA,IAC9C;AAAA,IAEE,WAAW;AACT,UAAI,KAAK,MAAM;AACb,eAAO,KAAK,KAAK,MAAM,KAAK,MAAM;AAAA,UAChC,OAAO,KAAK;AAAA,UACZ,QAAQ,KAAK;AAAA,UACb,MAAM,KAAK;AAAA,QACnB,CAAO,EAAE;AAAA,MACT;AAEI,UAAI,KAAK,QAAQ;AACf,eAAO,KAAK,SAAS,OAAO,KAAK;AAAA,MACvC;AAEI,aAAO,KAAK;AAAA,IAChB;AAAA,EACA;AAEA,YAAiB;AACjB,UAAQ,UAAU;;;","x_google_ignoreList":[0]}
|
package/dist/slots/index.d.ts
CHANGED
|
@@ -148,4 +148,10 @@ export declare const Slots: {
|
|
|
148
148
|
};
|
|
149
149
|
};
|
|
150
150
|
export type { SlotName };
|
|
151
|
+
export { validateSlot, validateAllSlots, validateSlotElements, } from './slot-validation';
|
|
152
|
+
export type { SlotValidationError, SlotValidationResult, SlotErrorType, } from '../_types';
|
|
153
|
+
export { querySlottedElements, querySlottedNodes, querySlottedElement, hasSlottedContent, hasSlottedElement, SlotCache, } from './slot-query';
|
|
154
|
+
export { createSlotchangeHandler, SlotchangeController, } from './slot-events';
|
|
155
|
+
export type { SlotchangeEvent, SlotchangeOptions, SlotchangeHandler, } from './slot-events';
|
|
156
|
+
export type { ReactiveController, ReactiveControllerHost, } from '../_types';
|
|
151
157
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/slots/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAc,KAAK,SAAS,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAC1E,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAMrC,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AA8E3D,eAAO,MAAM,KAAK;;;kCA1ER,SAAS;;;gCAAT,SAAS;iCAAT,SAAS;gCAAT,SAAS;;;qCAAT,SAAS;kCAAT,SAAS;gCAAT,SAAS;mCAAT,SAAS;gCAAT,SAAS;;;kCAAT,SAAS;;;kCAAT,SAAS;;;qCAAT,SAAS;+BAAT,SAAS;uCAAT,SAAS;oCAAT,SAAS;+BAAT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;;;kCAAT,SAAS;mCAAT,SAAS;mCAAT,SAAS;;;kCAAT,SAAS;kCAAT,SAAS;+BAAT,SAAS;gCAAT,SAAS;kCAAT,SAAS;;CAyFT,CAAC;AAEX,YAAY,EAAE,QAAQ,EAAE,CAAC;AAEzB,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,aAAa,GACd,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,SAAS,GACV,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,eAAe,EACf,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ReactiveController, ReactiveControllerHost } from '../_types';
|
|
2
|
+
export interface SlotchangeEvent {
|
|
3
|
+
slot: HTMLSlotElement;
|
|
4
|
+
elements: Element[];
|
|
5
|
+
nodes: Node[];
|
|
6
|
+
slotName?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface SlotchangeOptions {
|
|
9
|
+
debounce?: number;
|
|
10
|
+
slotName?: string;
|
|
11
|
+
flatten?: boolean;
|
|
12
|
+
immediate?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface SlotchangeHandler {
|
|
15
|
+
connect(): void;
|
|
16
|
+
disconnect(): void;
|
|
17
|
+
}
|
|
18
|
+
export type { ReactiveController, ReactiveControllerHost } from '../_types';
|
|
19
|
+
export declare function createSlotchangeHandler(host: HTMLElement, callback: (event: SlotchangeEvent) => void, options?: SlotchangeOptions): SlotchangeHandler;
|
|
20
|
+
export declare class SlotchangeController implements ReactiveController {
|
|
21
|
+
private host;
|
|
22
|
+
private configs;
|
|
23
|
+
private handlers;
|
|
24
|
+
constructor(host: ReactiveControllerHost, configs: Array<{
|
|
25
|
+
slotName?: string;
|
|
26
|
+
callback: (event: SlotchangeEvent) => void;
|
|
27
|
+
options?: SlotchangeOptions;
|
|
28
|
+
}>);
|
|
29
|
+
hostConnected(): void;
|
|
30
|
+
hostDisconnected(): void;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=slot-events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slot-events.d.ts","sourceRoot":"","sources":["../../source/slots/slot-events.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,eAAe,CAAC;IACtB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAEhC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,IAAI,IAAI,CAAC;IAChB,UAAU,IAAI,IAAI,CAAC;CACpB;AAED,YAAY,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAC5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAE5E,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,WAAW,EACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,EAC1C,OAAO,CAAC,EAAE,iBAAiB,GAC1B,iBAAiB,CAgEnB;AAED,qBAAa,oBAAqB,YAAW,kBAAkB;IAI3D,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,OAAO;IAJjB,OAAO,CAAC,QAAQ,CAA2B;gBAGjC,IAAI,EAAE,sBAAsB,EAC5B,OAAO,EAAE,KAAK,CAAC;QACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;QAC3C,OAAO,CAAC,EAAE,iBAAiB,CAAC;KAC7B,CAAC;IAKJ,aAAa;IAYb,gBAAgB;CAIjB"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
function createSlotchangeHandler(host, callback, options) {
|
|
2
|
+
let timeoutId = null;
|
|
3
|
+
const handler = (event) => {
|
|
4
|
+
const slot = event.target;
|
|
5
|
+
if (options?.slotName !== void 0) {
|
|
6
|
+
const name = slot.name || "";
|
|
7
|
+
if (name !== options.slotName) return;
|
|
8
|
+
}
|
|
9
|
+
const flatten = options?.flatten ?? false;
|
|
10
|
+
const elements = slot.assignedElements({ flatten });
|
|
11
|
+
const nodes = Array.from(slot.assignedNodes({ flatten }));
|
|
12
|
+
const invoke = () => {
|
|
13
|
+
callback({
|
|
14
|
+
slot,
|
|
15
|
+
elements,
|
|
16
|
+
nodes,
|
|
17
|
+
slotName: slot.name || void 0
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
if (options?.debounce && options.debounce > 0) {
|
|
21
|
+
if (timeoutId !== null) clearTimeout(timeoutId);
|
|
22
|
+
timeoutId = setTimeout(invoke, options.debounce);
|
|
23
|
+
} else {
|
|
24
|
+
invoke();
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
return {
|
|
28
|
+
connect() {
|
|
29
|
+
host.shadowRoot?.addEventListener("slotchange", handler);
|
|
30
|
+
if (options?.immediate) {
|
|
31
|
+
const flatten = options.flatten ?? false;
|
|
32
|
+
const slots = host.shadowRoot?.querySelectorAll("slot") ?? [];
|
|
33
|
+
slots.forEach((slot) => {
|
|
34
|
+
const name = slot.name || "";
|
|
35
|
+
if (options.slotName !== void 0 && name !== options.slotName) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
callback({
|
|
39
|
+
slot,
|
|
40
|
+
elements: slot.assignedElements({ flatten }),
|
|
41
|
+
nodes: Array.from(slot.assignedNodes({ flatten })),
|
|
42
|
+
slotName: slot.name || void 0
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
disconnect() {
|
|
48
|
+
host.shadowRoot?.removeEventListener("slotchange", handler);
|
|
49
|
+
if (timeoutId !== null) {
|
|
50
|
+
clearTimeout(timeoutId);
|
|
51
|
+
timeoutId = null;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
class SlotchangeController {
|
|
57
|
+
constructor(host, configs) {
|
|
58
|
+
this.host = host;
|
|
59
|
+
this.configs = configs;
|
|
60
|
+
this.handlers = [];
|
|
61
|
+
host.addController(this);
|
|
62
|
+
}
|
|
63
|
+
hostConnected() {
|
|
64
|
+
for (const config of this.configs) {
|
|
65
|
+
const handler = createSlotchangeHandler(
|
|
66
|
+
this.host,
|
|
67
|
+
config.callback,
|
|
68
|
+
{ ...config.options, slotName: config.slotName }
|
|
69
|
+
);
|
|
70
|
+
handler.connect();
|
|
71
|
+
this.handlers.push(handler);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
hostDisconnected() {
|
|
75
|
+
this.handlers.forEach((h) => h.disconnect());
|
|
76
|
+
this.handlers = [];
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
export {
|
|
80
|
+
SlotchangeController,
|
|
81
|
+
createSlotchangeHandler
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=slot-events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slot-events.js","sources":["../../source/slots/slot-events.ts"],"sourcesContent":["export interface SlotchangeEvent {\n slot: HTMLSlotElement;\n elements: Element[];\n nodes: Node[];\n slotName?: string;\n}\n\nexport interface SlotchangeOptions {\n /** Debounce delay in ms (default: 0) */\n debounce?: number;\n /** Slot name to listen to (undefined = all slots) */\n slotName?: string;\n /** Whether to flatten assigned nodes */\n flatten?: boolean;\n /** Fire callback immediately with current content */\n immediate?: boolean;\n}\n\nexport interface SlotchangeHandler {\n connect(): void;\n disconnect(): void;\n}\n\nexport type { ReactiveController, ReactiveControllerHost } from '../_types';\nimport type { ReactiveController, ReactiveControllerHost } from '../_types';\n\nexport function createSlotchangeHandler(\n host: HTMLElement,\n callback: (event: SlotchangeEvent) => void,\n options?: SlotchangeOptions,\n): SlotchangeHandler {\n let timeoutId: ReturnType<typeof setTimeout> | null = null;\n\n const handler = (event: Event) => {\n const slot = event.target as HTMLSlotElement;\n\n if (options?.slotName !== undefined) {\n const name = slot.name || '';\n if (name !== options.slotName) return;\n }\n\n const flatten = options?.flatten ?? false;\n const elements = slot.assignedElements({ flatten });\n const nodes = Array.from(slot.assignedNodes({ flatten }));\n\n const invoke = () => {\n callback({\n slot,\n elements,\n nodes,\n slotName: slot.name || undefined,\n });\n };\n\n if (options?.debounce && options.debounce > 0) {\n if (timeoutId !== null) clearTimeout(timeoutId);\n timeoutId = setTimeout(invoke, options.debounce);\n } else {\n invoke();\n }\n };\n\n return {\n connect() {\n host.shadowRoot?.addEventListener('slotchange', handler);\n\n if (options?.immediate) {\n const flatten = options.flatten ?? false;\n const slots =\n host.shadowRoot?.querySelectorAll<HTMLSlotElement>('slot') ?? [];\n\n slots.forEach((slot) => {\n const name = slot.name || '';\n if (options.slotName !== undefined && name !== options.slotName) {\n return;\n }\n\n callback({\n slot,\n elements: slot.assignedElements({ flatten }),\n nodes: Array.from(slot.assignedNodes({ flatten })),\n slotName: slot.name || undefined,\n });\n });\n }\n },\n disconnect() {\n host.shadowRoot?.removeEventListener('slotchange', handler);\n if (timeoutId !== null) {\n clearTimeout(timeoutId);\n timeoutId = null;\n }\n },\n };\n}\n\nexport class SlotchangeController implements ReactiveController {\n private handlers: SlotchangeHandler[] = [];\n\n constructor(\n private host: ReactiveControllerHost,\n private configs: Array<{\n slotName?: string;\n callback: (event: SlotchangeEvent) => void;\n options?: SlotchangeOptions;\n }>,\n ) {\n host.addController(this);\n }\n\n hostConnected() {\n for (const config of this.configs) {\n const handler = createSlotchangeHandler(\n this.host,\n config.callback,\n { ...config.options, slotName: config.slotName },\n );\n handler.connect();\n this.handlers.push(handler);\n }\n }\n\n hostDisconnected() {\n this.handlers.forEach((h) => h.disconnect());\n this.handlers = [];\n }\n}\n"],"names":[],"mappings":"AA0BO,SAAS,wBACd,MACA,UACA,SACmB;AACnB,MAAI,YAAkD;AAEtD,QAAM,UAAU,CAAC,UAAiB;AAChC,UAAM,OAAO,MAAM;AAEnB,QAAI,SAAS,aAAa,QAAW;AACnC,YAAM,OAAO,KAAK,QAAQ;AAC1B,UAAI,SAAS,QAAQ,SAAU;AAAA,IACjC;AAEA,UAAM,UAAU,SAAS,WAAW;AACpC,UAAM,WAAW,KAAK,iBAAiB,EAAE,SAAS;AAClD,UAAM,QAAQ,MAAM,KAAK,KAAK,cAAc,EAAE,QAAA,CAAS,CAAC;AAExD,UAAM,SAAS,MAAM;AACnB,eAAS;AAAA,QACP;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAU,KAAK,QAAQ;AAAA,MAAA,CACxB;AAAA,IACH;AAEA,QAAI,SAAS,YAAY,QAAQ,WAAW,GAAG;AAC7C,UAAI,cAAc,KAAM,cAAa,SAAS;AAC9C,kBAAY,WAAW,QAAQ,QAAQ,QAAQ;AAAA,IACjD,OAAO;AACL,aAAA;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AAAA,IACL,UAAU;AACR,WAAK,YAAY,iBAAiB,cAAc,OAAO;AAEvD,UAAI,SAAS,WAAW;AACtB,cAAM,UAAU,QAAQ,WAAW;AACnC,cAAM,QACJ,KAAK,YAAY,iBAAkC,MAAM,KAAK,CAAA;AAEhE,cAAM,QAAQ,CAAC,SAAS;AACtB,gBAAM,OAAO,KAAK,QAAQ;AAC1B,cAAI,QAAQ,aAAa,UAAa,SAAS,QAAQ,UAAU;AAC/D;AAAA,UACF;AAEA,mBAAS;AAAA,YACP;AAAA,YACA,UAAU,KAAK,iBAAiB,EAAE,SAAS;AAAA,YAC3C,OAAO,MAAM,KAAK,KAAK,cAAc,EAAE,QAAA,CAAS,CAAC;AAAA,YACjD,UAAU,KAAK,QAAQ;AAAA,UAAA,CACxB;AAAA,QACH,CAAC;AAAA,MACH;AAAA,IACF;AAAA,IACA,aAAa;AACX,WAAK,YAAY,oBAAoB,cAAc,OAAO;AAC1D,UAAI,cAAc,MAAM;AACtB,qBAAa,SAAS;AACtB,oBAAY;AAAA,MACd;AAAA,IACF;AAAA,EAAA;AAEJ;AAEO,MAAM,qBAAmD;AAAA,EAG9D,YACU,MACA,SAKR;AANQ,SAAA,OAAA;AACA,SAAA,UAAA;AAJV,SAAQ,WAAgC,CAAA;AAUtC,SAAK,cAAc,IAAI;AAAA,EACzB;AAAA,EAEA,gBAAgB;AACd,eAAW,UAAU,KAAK,SAAS;AACjC,YAAM,UAAU;AAAA,QACd,KAAK;AAAA,QACL,OAAO;AAAA,QACP,EAAE,GAAG,OAAO,SAAS,UAAU,OAAO,SAAA;AAAA,MAAS;AAEjD,cAAQ,QAAA;AACR,WAAK,SAAS,KAAK,OAAO;AAAA,IAC5B;AAAA,EACF;AAAA,EAEA,mBAAmB;AACjB,SAAK,SAAS,QAAQ,CAAC,MAAM,EAAE,YAAY;AAC3C,SAAK,WAAW,CAAA;AAAA,EAClB;AACF;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
interface QueryOptions {
|
|
2
|
+
flatten?: boolean;
|
|
3
|
+
selector?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function querySlottedElements(host: HTMLElement, slotName?: string, options?: QueryOptions): Element[];
|
|
6
|
+
export declare function querySlottedNodes(host: HTMLElement, slotName?: string, options?: Pick<QueryOptions, 'flatten'>): Node[];
|
|
7
|
+
export declare function querySlottedElement<T extends Element = Element>(host: HTMLElement, slotName?: string, selector?: string): T | null;
|
|
8
|
+
export declare function hasSlottedContent(host: HTMLElement, slotName?: string): boolean;
|
|
9
|
+
export declare function hasSlottedElement(host: HTMLElement, slotName: string, tagName: string): boolean;
|
|
10
|
+
export declare class SlotCache {
|
|
11
|
+
private host;
|
|
12
|
+
private cache;
|
|
13
|
+
constructor(host: HTMLElement);
|
|
14
|
+
getSlot(name?: string): HTMLSlotElement | null;
|
|
15
|
+
clear(): void;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=slot-query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slot-query.d.ts","sourceRoot":"","sources":["../../source/slots/slot-query.ts"],"names":[],"mappings":"AAAA,UAAU,YAAY;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAgBD,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,WAAW,EACjB,QAAQ,CAAC,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,EAAE,CAYX;AAED,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,WAAW,EACjB,QAAQ,CAAC,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,GACtC,IAAI,EAAE,CAMR;AAED,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO,EAC7D,IAAI,EAAE,WAAW,EACjB,QAAQ,CAAC,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,MAAM,GAChB,CAAC,GAAG,IAAI,CAGV;AAED,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,WAAW,EACjB,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAET;AAED,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,WAAW,EACjB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,GACd,OAAO,CAIT;AAED,qBAAa,SAAS;IACpB,OAAO,CAAC,IAAI,CAAc;IAC1B,OAAO,CAAC,KAAK,CAA6C;gBAE9C,IAAI,EAAE,WAAW;IAI7B,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI;IAS9C,KAAK,IAAI,IAAI;CAGd"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
function getSlotElement(host, slotName) {
|
|
2
|
+
const root = host.shadowRoot;
|
|
3
|
+
if (!root) return null;
|
|
4
|
+
const query = slotName ? `slot[name="${slotName}"]` : "slot:not([name])";
|
|
5
|
+
return root.querySelector(query);
|
|
6
|
+
}
|
|
7
|
+
function querySlottedElements(host, slotName, options) {
|
|
8
|
+
const slot = getSlotElement(host, slotName);
|
|
9
|
+
if (!slot) return [];
|
|
10
|
+
const flatten = options?.flatten ?? false;
|
|
11
|
+
const elements = slot.assignedElements({ flatten });
|
|
12
|
+
if (options?.selector) {
|
|
13
|
+
return elements.filter((el) => el.matches(options.selector));
|
|
14
|
+
}
|
|
15
|
+
return elements;
|
|
16
|
+
}
|
|
17
|
+
function querySlottedNodes(host, slotName, options) {
|
|
18
|
+
const slot = getSlotElement(host, slotName);
|
|
19
|
+
if (!slot) return [];
|
|
20
|
+
const flatten = options?.flatten ?? false;
|
|
21
|
+
return Array.from(slot.assignedNodes({ flatten }));
|
|
22
|
+
}
|
|
23
|
+
function querySlottedElement(host, slotName, selector) {
|
|
24
|
+
const elements = querySlottedElements(host, slotName, { selector });
|
|
25
|
+
return elements[0] ?? null;
|
|
26
|
+
}
|
|
27
|
+
function hasSlottedContent(host, slotName) {
|
|
28
|
+
return querySlottedElements(host, slotName, { flatten: true }).length > 0;
|
|
29
|
+
}
|
|
30
|
+
function hasSlottedElement(host, slotName, tagName) {
|
|
31
|
+
const elements = querySlottedElements(host, slotName, { flatten: true });
|
|
32
|
+
const upper = tagName.toUpperCase();
|
|
33
|
+
return elements.some((el) => el.tagName === upper);
|
|
34
|
+
}
|
|
35
|
+
class SlotCache {
|
|
36
|
+
constructor(host) {
|
|
37
|
+
this.cache = /* @__PURE__ */ new Map();
|
|
38
|
+
this.host = host;
|
|
39
|
+
}
|
|
40
|
+
getSlot(name) {
|
|
41
|
+
const key = name ?? "";
|
|
42
|
+
if (this.cache.has(key)) return this.cache.get(key);
|
|
43
|
+
const slot = getSlotElement(this.host, name);
|
|
44
|
+
this.cache.set(key, slot);
|
|
45
|
+
return slot;
|
|
46
|
+
}
|
|
47
|
+
clear() {
|
|
48
|
+
this.cache.clear();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
export {
|
|
52
|
+
SlotCache,
|
|
53
|
+
hasSlottedContent,
|
|
54
|
+
hasSlottedElement,
|
|
55
|
+
querySlottedElement,
|
|
56
|
+
querySlottedElements,
|
|
57
|
+
querySlottedNodes
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=slot-query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slot-query.js","sources":["../../source/slots/slot-query.ts"],"sourcesContent":["interface QueryOptions {\n flatten?: boolean;\n selector?: string;\n}\n\nfunction getSlotElement(\n host: HTMLElement,\n slotName?: string,\n): HTMLSlotElement | null {\n const root = host.shadowRoot;\n if (!root) return null;\n\n const query = slotName\n ? `slot[name=\"${slotName}\"]`\n : 'slot:not([name])';\n\n return root.querySelector<HTMLSlotElement>(query);\n}\n\nexport function querySlottedElements(\n host: HTMLElement,\n slotName?: string,\n options?: QueryOptions,\n): Element[] {\n const slot = getSlotElement(host, slotName);\n if (!slot) return [];\n\n const flatten = options?.flatten ?? false;\n const elements = slot.assignedElements({ flatten });\n\n if (options?.selector) {\n return elements.filter((el) => el.matches(options.selector!));\n }\n\n return elements;\n}\n\nexport function querySlottedNodes(\n host: HTMLElement,\n slotName?: string,\n options?: Pick<QueryOptions, 'flatten'>,\n): Node[] {\n const slot = getSlotElement(host, slotName);\n if (!slot) return [];\n\n const flatten = options?.flatten ?? false;\n return Array.from(slot.assignedNodes({ flatten }));\n}\n\nexport function querySlottedElement<T extends Element = Element>(\n host: HTMLElement,\n slotName?: string,\n selector?: string,\n): T | null {\n const elements = querySlottedElements(host, slotName, { selector });\n return (elements[0] as T) ?? null;\n}\n\nexport function hasSlottedContent(\n host: HTMLElement,\n slotName?: string,\n): boolean {\n return querySlottedElements(host, slotName, { flatten: true }).length > 0;\n}\n\nexport function hasSlottedElement(\n host: HTMLElement,\n slotName: string,\n tagName: string,\n): boolean {\n const elements = querySlottedElements(host, slotName, { flatten: true });\n const upper = tagName.toUpperCase();\n return elements.some((el) => el.tagName === upper);\n}\n\nexport class SlotCache {\n private host: HTMLElement;\n private cache = new Map<string, HTMLSlotElement | null>();\n\n constructor(host: HTMLElement) {\n this.host = host;\n }\n\n getSlot(name?: string): HTMLSlotElement | null {\n const key = name ?? '';\n if (this.cache.has(key)) return this.cache.get(key)!;\n\n const slot = getSlotElement(this.host, name);\n this.cache.set(key, slot);\n return slot;\n }\n\n clear(): void {\n this.cache.clear();\n }\n}\n"],"names":[],"mappings":"AAKA,SAAS,eACP,MACA,UACwB;AACxB,QAAM,OAAO,KAAK;AAClB,MAAI,CAAC,KAAM,QAAO;AAElB,QAAM,QAAQ,WACV,cAAc,QAAQ,OACtB;AAEJ,SAAO,KAAK,cAA+B,KAAK;AAClD;AAEO,SAAS,qBACd,MACA,UACA,SACW;AACX,QAAM,OAAO,eAAe,MAAM,QAAQ;AAC1C,MAAI,CAAC,KAAM,QAAO,CAAA;AAElB,QAAM,UAAU,SAAS,WAAW;AACpC,QAAM,WAAW,KAAK,iBAAiB,EAAE,SAAS;AAElD,MAAI,SAAS,UAAU;AACrB,WAAO,SAAS,OAAO,CAAC,OAAO,GAAG,QAAQ,QAAQ,QAAS,CAAC;AAAA,EAC9D;AAEA,SAAO;AACT;AAEO,SAAS,kBACd,MACA,UACA,SACQ;AACR,QAAM,OAAO,eAAe,MAAM,QAAQ;AAC1C,MAAI,CAAC,KAAM,QAAO,CAAA;AAElB,QAAM,UAAU,SAAS,WAAW;AACpC,SAAO,MAAM,KAAK,KAAK,cAAc,EAAE,QAAA,CAAS,CAAC;AACnD;AAEO,SAAS,oBACd,MACA,UACA,UACU;AACV,QAAM,WAAW,qBAAqB,MAAM,UAAU,EAAE,UAAU;AAClE,SAAQ,SAAS,CAAC,KAAW;AAC/B;AAEO,SAAS,kBACd,MACA,UACS;AACT,SAAO,qBAAqB,MAAM,UAAU,EAAE,SAAS,KAAA,CAAM,EAAE,SAAS;AAC1E;AAEO,SAAS,kBACd,MACA,UACA,SACS;AACT,QAAM,WAAW,qBAAqB,MAAM,UAAU,EAAE,SAAS,MAAM;AACvE,QAAM,QAAQ,QAAQ,YAAA;AACtB,SAAO,SAAS,KAAK,CAAC,OAAO,GAAG,YAAY,KAAK;AACnD;AAEO,MAAM,UAAU;AAAA,EAIrB,YAAY,MAAmB;AAF/B,SAAQ,4BAAY,IAAA;AAGlB,SAAK,OAAO;AAAA,EACd;AAAA,EAEA,QAAQ,MAAuC;AAC7C,UAAM,MAAM,QAAQ;AACpB,QAAI,KAAK,MAAM,IAAI,GAAG,EAAG,QAAO,KAAK,MAAM,IAAI,GAAG;AAElD,UAAM,OAAO,eAAe,KAAK,MAAM,IAAI;AAC3C,SAAK,MAAM,IAAI,KAAK,IAAI;AACxB,WAAO;AAAA,EACT;AAAA,EAEA,QAAc;AACZ,SAAK,MAAM,MAAA;AAAA,EACb;AACF;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { SlotConfig, SlotValidationResult } from '../_types';
|
|
2
|
+
export declare const validateSlotElements: (slotName: string, elements: Element[], config: SlotConfig) => SlotValidationResult;
|
|
3
|
+
export declare const validateSlot: (host: Element, slotName: string, config: SlotConfig) => SlotValidationResult;
|
|
4
|
+
export declare const validateAllSlots: (host: Element, slots: Record<string, SlotConfig>) => SlotValidationResult;
|
|
5
|
+
//# sourceMappingURL=slot-validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slot-validation.d.ts","sourceRoot":"","sources":["../../source/slots/slot-validation.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,UAAU,EAEV,oBAAoB,EACrB,MAAM,WAAW,CAAC;AAUnB,eAAO,MAAM,oBAAoB,GAC/B,UAAU,MAAM,EAChB,UAAU,OAAO,EAAE,EACnB,QAAQ,UAAU,KACjB,oBA+EF,CAAC;AAKF,eAAO,MAAM,YAAY,GACvB,MAAM,OAAO,EACb,UAAU,MAAM,EAChB,QAAQ,UAAU,KACjB,oBAIF,CAAC;AAKF,eAAO,MAAM,gBAAgB,GAC3B,MAAM,OAAO,EACb,OAAO,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,KAChC,oBASF,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
const camelToKebab = (str) => str.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`).replace(/^-/, "");
|
|
2
|
+
const validateSlotElements = (slotName, elements, config) => {
|
|
3
|
+
const errors = [];
|
|
4
|
+
const kebab = camelToKebab(slotName);
|
|
5
|
+
if (config.required && elements.length === 0) {
|
|
6
|
+
errors.push({
|
|
7
|
+
slot: slotName,
|
|
8
|
+
error: "missing",
|
|
9
|
+
message: `Required slot "${kebab}" is missing`
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
if (config.deprecated && elements.length > 0) {
|
|
13
|
+
errors.push({
|
|
14
|
+
slot: slotName,
|
|
15
|
+
error: "deprecated",
|
|
16
|
+
message: `Slot "${kebab}" is deprecated. ${config.deprecated}`
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
if (config.allowedElements && elements.length > 0) {
|
|
20
|
+
const invalidElements = elements.filter(
|
|
21
|
+
(el) => !config.allowedElements.includes(el.tagName.toLowerCase())
|
|
22
|
+
);
|
|
23
|
+
if (invalidElements.length > 0) {
|
|
24
|
+
errors.push({
|
|
25
|
+
slot: slotName,
|
|
26
|
+
error: "invalid-elements",
|
|
27
|
+
message: `Slot "${kebab}" contains invalid elements. Allowed: ${config.allowedElements.join(", ")}`,
|
|
28
|
+
invalidElements
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (config.disallowedElements && elements.length > 0) {
|
|
33
|
+
const disallowed = elements.filter(
|
|
34
|
+
(el) => config.disallowedElements.includes(el.tagName.toLowerCase())
|
|
35
|
+
);
|
|
36
|
+
if (disallowed.length > 0) {
|
|
37
|
+
errors.push({
|
|
38
|
+
slot: slotName,
|
|
39
|
+
error: "disallowed-elements",
|
|
40
|
+
message: `Slot "${kebab}" contains disallowed elements: ${disallowed.map((el) => el.tagName.toLowerCase()).join(", ")}`,
|
|
41
|
+
invalidElements: disallowed
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
if (config.minItems !== void 0 && elements.length < config.minItems) {
|
|
46
|
+
errors.push({
|
|
47
|
+
slot: slotName,
|
|
48
|
+
error: "min-items",
|
|
49
|
+
message: `Slot "${kebab}" requires at least ${config.minItems} item(s), found ${elements.length}`
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
if (config.maxItems !== void 0 && elements.length > config.maxItems) {
|
|
53
|
+
errors.push({
|
|
54
|
+
slot: slotName,
|
|
55
|
+
error: "max-items",
|
|
56
|
+
message: `Slot "${kebab}" allows at most ${config.maxItems} item(s), found ${elements.length}`
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
if (config.validate && elements.length > 0) {
|
|
60
|
+
const result = config.validate(elements);
|
|
61
|
+
if (result !== true) {
|
|
62
|
+
errors.push({
|
|
63
|
+
slot: slotName,
|
|
64
|
+
error: "custom-validation",
|
|
65
|
+
message: typeof result === "string" ? result : `Slot "${kebab}" failed custom validation`
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return { isValid: errors.length === 0, errors };
|
|
70
|
+
};
|
|
71
|
+
const validateSlot = (host, slotName, config) => {
|
|
72
|
+
const kebab = camelToKebab(slotName);
|
|
73
|
+
const elements = Array.from(host.querySelectorAll(`[slot="${kebab}"]`));
|
|
74
|
+
return validateSlotElements(slotName, elements, config);
|
|
75
|
+
};
|
|
76
|
+
const validateAllSlots = (host, slots) => {
|
|
77
|
+
const allErrors = [];
|
|
78
|
+
for (const [name, config] of Object.entries(slots)) {
|
|
79
|
+
const result = validateSlot(host, name, config);
|
|
80
|
+
allErrors.push(...result.errors);
|
|
81
|
+
}
|
|
82
|
+
return { isValid: allErrors.length === 0, errors: allErrors };
|
|
83
|
+
};
|
|
84
|
+
export {
|
|
85
|
+
validateAllSlots,
|
|
86
|
+
validateSlot,
|
|
87
|
+
validateSlotElements
|
|
88
|
+
};
|
|
89
|
+
//# sourceMappingURL=slot-validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slot-validation.js","sources":["../../source/slots/slot-validation.ts"],"sourcesContent":["/**\n * Declarative Slot Validation Engine\n *\n * Pure functions for validating slotted content against SlotConfig rules.\n * Checks run in order: required → deprecated → allowedElements →\n * disallowedElements → minItems → maxItems → custom validate.\n */\nimport type {\n SlotConfig,\n SlotValidationError,\n SlotValidationResult,\n} from '../_types';\n\nconst camelToKebab = (str: string): string =>\n str\n .replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`)\n .replace(/^-/, '');\n\n/**\n * Validate a pre-queried array of elements against a single slot config.\n */\nexport const validateSlotElements = (\n slotName: string,\n elements: Element[],\n config: SlotConfig,\n): SlotValidationResult => {\n const errors: SlotValidationError[] = [];\n const kebab = camelToKebab(slotName);\n\n if (config.required && elements.length === 0) {\n errors.push({\n slot: slotName,\n error: 'missing',\n message: `Required slot \"${kebab}\" is missing`,\n });\n }\n\n if (config.deprecated && elements.length > 0) {\n errors.push({\n slot: slotName,\n error: 'deprecated',\n message: `Slot \"${kebab}\" is deprecated. ${config.deprecated}`,\n });\n }\n\n if (config.allowedElements && elements.length > 0) {\n const invalidElements = elements.filter(\n (el) => !config.allowedElements!.includes(el.tagName.toLowerCase()),\n );\n if (invalidElements.length > 0) {\n errors.push({\n slot: slotName,\n error: 'invalid-elements',\n message: `Slot \"${kebab}\" contains invalid elements. Allowed: ${config.allowedElements.join(', ')}`,\n invalidElements,\n });\n }\n }\n\n if (config.disallowedElements && elements.length > 0) {\n const disallowed = elements.filter((el) =>\n config.disallowedElements!.includes(el.tagName.toLowerCase()),\n );\n if (disallowed.length > 0) {\n errors.push({\n slot: slotName,\n error: 'disallowed-elements',\n message: `Slot \"${kebab}\" contains disallowed elements: ${disallowed.map((el) => el.tagName.toLowerCase()).join(', ')}`,\n invalidElements: disallowed,\n });\n }\n }\n\n if (config.minItems !== undefined && elements.length < config.minItems) {\n errors.push({\n slot: slotName,\n error: 'min-items',\n message: `Slot \"${kebab}\" requires at least ${config.minItems} item(s), found ${elements.length}`,\n });\n }\n\n if (config.maxItems !== undefined && elements.length > config.maxItems) {\n errors.push({\n slot: slotName,\n error: 'max-items',\n message: `Slot \"${kebab}\" allows at most ${config.maxItems} item(s), found ${elements.length}`,\n });\n }\n\n if (config.validate && elements.length > 0) {\n const result = config.validate(elements);\n if (result !== true) {\n errors.push({\n slot: slotName,\n error: 'custom-validation',\n message:\n typeof result === 'string'\n ? result\n : `Slot \"${kebab}\" failed custom validation`,\n });\n }\n }\n\n return { isValid: errors.length === 0, errors };\n};\n\n/**\n * Query a host element for slotted content and validate against config.\n */\nexport const validateSlot = (\n host: Element,\n slotName: string,\n config: SlotConfig,\n): SlotValidationResult => {\n const kebab = camelToKebab(slotName);\n const elements = Array.from(host.querySelectorAll(`[slot=\"${kebab}\"]`));\n return validateSlotElements(slotName, elements, config);\n};\n\n/**\n * Validate all slots defined in a config map against a host element.\n */\nexport const validateAllSlots = (\n host: Element,\n slots: Record<string, SlotConfig>,\n): SlotValidationResult => {\n const allErrors: SlotValidationError[] = [];\n\n for (const [name, config] of Object.entries(slots)) {\n const result = validateSlot(host, name, config);\n allErrors.push(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OAAO,MAAM;AAAA,EACjC;AAEA,SAAO,EAAE,SAAS,UAAU,WAAW,GAAG,QAAQ,UAAA;AACpD;"}
|
package/dist/slots.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { SlotNames } from "./slots/mapping.js";
|
|
2
2
|
import { createSlot } from "./slots/create.js";
|
|
3
3
|
import * as element from "./slots/element.js";
|
|
4
|
+
import { validateAllSlots, validateSlot, validateSlotElements } from "./slots/slot-validation.js";
|
|
5
|
+
import { SlotCache, hasSlottedContent, hasSlottedElement, querySlottedElement, querySlottedElements, querySlottedNodes } from "./slots/slot-query.js";
|
|
6
|
+
import { SlotchangeController, createSlotchangeHandler } from "./slots/slot-events.js";
|
|
4
7
|
const createSlotFactory = (type, config = {}) => (props) => createSlot({ ...props, type, ...config });
|
|
5
8
|
const actions = {
|
|
6
9
|
default: createSlotFactory(SlotNames.actions.default)
|
|
@@ -75,6 +78,17 @@ const Slots = {
|
|
|
75
78
|
...element
|
|
76
79
|
};
|
|
77
80
|
export {
|
|
78
|
-
|
|
81
|
+
SlotCache,
|
|
82
|
+
SlotchangeController,
|
|
83
|
+
Slots,
|
|
84
|
+
createSlotchangeHandler,
|
|
85
|
+
hasSlottedContent,
|
|
86
|
+
hasSlottedElement,
|
|
87
|
+
querySlottedElement,
|
|
88
|
+
querySlottedElements,
|
|
89
|
+
querySlottedNodes,
|
|
90
|
+
validateAllSlots,
|
|
91
|
+
validateSlot,
|
|
92
|
+
validateSlotElements
|
|
79
93
|
};
|
|
80
94
|
//# sourceMappingURL=slots.js.map
|
package/dist/slots.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slots.js","sources":["../source/slots/index.ts"],"sourcesContent":["import { SlotNames, type SlotName } from './mapping';\nimport { createSlot, type BaseProps, type OptionalProps } from './create';\nimport * as element from './element';\n\n/**\n * Properties for creating slot content\n * Combines base properties with optional configuration\n */\nexport type SlotProps = BaseProps & Partial<OptionalProps>;\n\nconst createSlotFactory =\n (type: SlotName, config: Partial<SlotProps> = {}) =>\n (props: SlotProps) =>\n createSlot({ ...props, type, ...config });\n\n// Defined common usage\n\nconst actions = {\n default: createSlotFactory(SlotNames.actions.default),\n} as const;\n\nconst assets = {\n image: createSlotFactory(SlotNames.assets.image),\n images: createSlotFactory(SlotNames.assets.images),\n video: createSlotFactory(SlotNames.assets.video),\n} as const;\n\nconst contact = {\n additional: createSlotFactory(SlotNames.contact.additional),\n address: createSlotFactory(SlotNames.contact.address),\n email: createSlotFactory(SlotNames.contact.email),\n location: createSlotFactory(SlotNames.contact.location),\n phone: createSlotFactory(SlotNames.contact.phone),\n} as const;\n\nconst content = {\n default: createSlotFactory(SlotNames.content.default),\n} as const;\n\nconst date = {\n default: createSlotFactory(SlotNames.date.default),\n} as const;\n\nconst eyebrow = {\n default: createSlotFactory(SlotNames.eyebrows.default),\n} as const;\n\nconst headline = {\n default: createSlotFactory(SlotNames.headline.default),\n} as const;\n\nconst person = {\n association: createSlotFactory(SlotNames.person.association),\n name: createSlotFactory(SlotNames.person.name),\n jobTitle: createSlotFactory(SlotNames.person.jobTitle),\n pronouns: createSlotFactory(SlotNames.person.pronouns),\n} as const;\n\nconst social = {\n bluesky: createSlotFactory(SlotNames.social.bluesky),\n linkedin: createSlotFactory(SlotNames.social.linkedin),\n substack: createSlotFactory(SlotNames.social.substack),\n} as const;\n\nconst text = {\n caption: createSlotFactory(SlotNames.text.caption),\n default: createSlotFactory(SlotNames.text.default),\n stat: createSlotFactory(SlotNames.text.stat),\n stats: createSlotFactory(SlotNames.text.stats),\n subText: createSlotFactory(SlotNames.text.sub),\n} as const;\n\n// Deprecated slots (marked for removal)\n/** @deprecated Use CommonSlots instead */\nconst deprecated = {\n ADDITIONAL: createSlotFactory(SlotNames.ADDITIONAL),\n body: createSlotFactory(SlotNames.deprecated.body),\n wrappingText: createSlotFactory(SlotNames.deprecated.wrappingText),\n plainText: createSlotFactory(SlotNames.deprecated.plainText),\n stat: createSlotFactory(SlotNames.deprecated.stat),\n backgroundImage: createSlotFactory(SlotNames.deprecated.backgroundImage),\n contactHeadline: createSlotFactory(SlotNames.deprecated.contactHeadline),\n contactAddress: createSlotFactory(SlotNames.deprecated.contactAddress),\n callToAction: createSlotFactory(SlotNames.deprecated.callToAction),\n} as const;\n\nexport const Slots = {\n actions,\n assets,\n contact,\n content,\n date,\n deprecated,\n element,\n eyebrow,\n person,\n name: SlotNames,\n headline,\n social,\n text,\n ...element,\n} as const;\n\nexport type { SlotName };\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"slots.js","sources":["../source/slots/index.ts"],"sourcesContent":["import { SlotNames, type SlotName } from './mapping';\nimport { createSlot, type BaseProps, type OptionalProps } from './create';\nimport * as element from './element';\n\n/**\n * Properties for creating slot content\n * Combines base properties with optional configuration\n */\nexport type SlotProps = BaseProps & Partial<OptionalProps>;\n\nconst createSlotFactory =\n (type: SlotName, config: Partial<SlotProps> = {}) =>\n (props: SlotProps) =>\n createSlot({ ...props, type, ...config });\n\n// Defined common usage\n\nconst actions = {\n default: createSlotFactory(SlotNames.actions.default),\n} as const;\n\nconst assets = {\n image: createSlotFactory(SlotNames.assets.image),\n images: createSlotFactory(SlotNames.assets.images),\n video: createSlotFactory(SlotNames.assets.video),\n} as const;\n\nconst contact = {\n additional: createSlotFactory(SlotNames.contact.additional),\n address: createSlotFactory(SlotNames.contact.address),\n email: createSlotFactory(SlotNames.contact.email),\n location: createSlotFactory(SlotNames.contact.location),\n phone: createSlotFactory(SlotNames.contact.phone),\n} as const;\n\nconst content = {\n default: createSlotFactory(SlotNames.content.default),\n} as const;\n\nconst date = {\n default: createSlotFactory(SlotNames.date.default),\n} as const;\n\nconst eyebrow = {\n default: createSlotFactory(SlotNames.eyebrows.default),\n} as const;\n\nconst headline = {\n default: createSlotFactory(SlotNames.headline.default),\n} as const;\n\nconst person = {\n association: createSlotFactory(SlotNames.person.association),\n name: createSlotFactory(SlotNames.person.name),\n jobTitle: createSlotFactory(SlotNames.person.jobTitle),\n pronouns: createSlotFactory(SlotNames.person.pronouns),\n} as const;\n\nconst social = {\n bluesky: createSlotFactory(SlotNames.social.bluesky),\n linkedin: createSlotFactory(SlotNames.social.linkedin),\n substack: createSlotFactory(SlotNames.social.substack),\n} as const;\n\nconst text = {\n caption: createSlotFactory(SlotNames.text.caption),\n default: createSlotFactory(SlotNames.text.default),\n stat: createSlotFactory(SlotNames.text.stat),\n stats: createSlotFactory(SlotNames.text.stats),\n subText: createSlotFactory(SlotNames.text.sub),\n} as const;\n\n// Deprecated slots (marked for removal)\n/** @deprecated Use CommonSlots instead */\nconst deprecated = {\n ADDITIONAL: createSlotFactory(SlotNames.ADDITIONAL),\n body: createSlotFactory(SlotNames.deprecated.body),\n wrappingText: createSlotFactory(SlotNames.deprecated.wrappingText),\n plainText: createSlotFactory(SlotNames.deprecated.plainText),\n stat: createSlotFactory(SlotNames.deprecated.stat),\n backgroundImage: createSlotFactory(SlotNames.deprecated.backgroundImage),\n contactHeadline: createSlotFactory(SlotNames.deprecated.contactHeadline),\n contactAddress: createSlotFactory(SlotNames.deprecated.contactAddress),\n callToAction: createSlotFactory(SlotNames.deprecated.callToAction),\n} as const;\n\nexport const Slots = {\n actions,\n assets,\n contact,\n content,\n date,\n deprecated,\n element,\n eyebrow,\n person,\n name: SlotNames,\n headline,\n social,\n text,\n ...element,\n} as const;\n\nexport type { SlotName };\n\nexport {\n validateSlot,\n validateAllSlots,\n validateSlotElements,\n} from './slot-validation';\nexport type {\n SlotValidationError,\n SlotValidationResult,\n SlotErrorType,\n} from '../_types';\n\nexport {\n querySlottedElements,\n querySlottedNodes,\n querySlottedElement,\n hasSlottedContent,\n hasSlottedElement,\n SlotCache,\n} from './slot-query';\n\nexport {\n createSlotchangeHandler,\n SlotchangeController,\n} from './slot-events';\nexport type {\n SlotchangeEvent,\n SlotchangeOptions,\n SlotchangeHandler,\n} from './slot-events';\nexport type {\n ReactiveController,\n ReactiveControllerHost,\n} from '../_types';\n"],"names":[],"mappings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