(extensions: FormKitSectionsSchema)
| 95 | > |
| 96 | ) => { |
| 97 | const extendable = (extensions: FormKitSectionsSchema) => { |
| 98 | const node = !el || typeof el === 'string' ? { $el: el } : el() |
| 99 | if (isDOM(node) || isComponent(node)) { |
| 100 | if (!node.meta) { |
| 101 | node.meta = { section } |
| 102 | } else { |
| 103 | node.meta.section = section |
| 104 | } |
| 105 | if (children.length && !node.children) { |
| 106 | node.children = [ |
| 107 | ...children.map((child) => |
| 108 | typeof child === 'function' ? child(extensions) : child |
| 109 | ), |
| 110 | ] |
| 111 | } |
| 112 | if (isDOM(node)) { |
| 113 | node.attrs = { |
| 114 | class: `$classes.${section}`, |
| 115 | ...(node.attrs || {}), |
| 116 | } |
| 117 | } |
| 118 | } |
| 119 | return { |
| 120 | if: `$slots.${section}`, |
| 121 | then: `$slots.${section}`, |
| 122 | else: |
| 123 | section in extensions |
| 124 | ? extendSchema(node, extensions[section]) |
| 125 | : node, |
| 126 | } |
| 127 | } |
| 128 | extendable._s = section |
| 129 | return fragment ? createRoot(extendable) : extendable |
| 130 | } |
nothing calls this directly
no test coverage detected