@wrrdev/fenix-ui 1.1.6 → 1.1.7
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/README.md +7 -2
- package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
- package/dist/components/autocomplete/autocomplete.js +9 -6
- package/dist/components/autocomplete/autocomplete.js.map +1 -1
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/button.js +5 -3
- package/dist/components/button/button.js.map +1 -1
- package/dist/components/datepicker/datepicker.d.ts.map +1 -1
- package/dist/components/datepicker/datepicker.js +11 -6
- package/dist/components/datepicker/datepicker.js.map +1 -1
- package/dist/components/fileupload/fileupload.d.ts +1 -1
- package/dist/components/fileupload/fileupload.d.ts.map +1 -1
- package/dist/components/fileupload/fileupload.js +5 -3
- package/dist/components/fileupload/fileupload.js.map +1 -1
- package/dist/components/icon/icon.d.ts +40 -0
- package/dist/components/icon/icon.d.ts.map +1 -0
- package/dist/components/icon/index.d.ts +8 -0
- package/dist/components/icon/index.d.ts.map +1 -0
- package/dist/components/input/input.d.ts.map +1 -1
- package/dist/components/input/input.js +12 -6
- package/dist/components/input/input.js.map +1 -1
- package/dist/components/knob/knob.d.ts +1 -1
- package/dist/components/knob/knob.d.ts.map +1 -1
- package/dist/components/knob/knob.js +3 -1
- package/dist/components/knob/knob.js.map +1 -1
- package/dist/components/multiselect/multiselect.d.ts.map +1 -1
- package/dist/components/multiselect/multiselect.js +8 -3
- package/dist/components/multiselect/multiselect.js.map +1 -1
- package/dist/components/orderlist/orderlist.js +2 -2
- package/dist/components/orderlist/orderlist.js.map +1 -1
- package/dist/components/picklist/picklist.js +2 -2
- package/dist/components/picklist/picklist.js.map +1 -1
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/select/select.js +9 -3
- package/dist/components/select/select.js.map +1 -1
- package/dist/components/textarea/textarea.d.ts.map +1 -1
- package/dist/components/textarea/textarea.js +7 -3
- package/dist/components/textarea/textarea.js.map +1 -1
- package/dist/components/toggle-button-group/toggle-button-group.d.ts.map +1 -1
- package/dist/components/toggle-button-group/toggle-button-group.js +3 -1
- package/dist/components/toggle-button-group/toggle-button-group.js.map +1 -1
- package/dist/core/jsx.d.ts +22 -0
- package/dist/core/jsx.d.ts.map +1 -1
- package/dist/core/jsx.js.map +1 -1
- package/dist/core/theme.d.ts.map +1 -1
- package/dist/core/theme.js +12 -0
- package/dist/core/theme.js.map +1 -1
- package/dist/core/tokens.d.ts +4 -0
- package/dist/core/tokens.d.ts.map +1 -1
- package/dist/core/tokens.js +9 -1
- package/dist/core/tokens.js.map +1 -1
- package/dist/core/vue.d.ts +3 -1
- package/dist/core/vue.d.ts.map +1 -1
- package/dist/core/vue.js.map +1 -1
- package/dist/docs/app.d.ts.map +1 -1
- package/dist/docs/componentes/icon.doc.d.ts +9 -0
- package/dist/docs/componentes/icon.doc.d.ts.map +1 -0
- package/dist/docs/componentes/index.d.ts.map +1 -1
- package/dist/fenix-ui.umd.min.js +168 -131
- package/dist/fenix-ui2.esm.js.map +1 -1
- package/dist/fenix-ui3.esm.js +32 -5
- package/dist/fenix-ui3.esm.js.map +1 -1
- package/dist/fenix-ui4.esm.js +97 -40
- package/dist/fenix-ui4.esm.js.map +1 -1
- package/dist/fenix-ui5.esm.js +1 -0
- package/dist/fenix-ui5.esm.js.map +1 -1
- package/dist/icons/font.d.ts +26 -0
- package/dist/icons/font.d.ts.map +1 -0
- package/dist/icons/font.js +42 -0
- package/dist/icons/font.js.map +1 -0
- package/dist/icons/index.d.ts +3 -1
- package/dist/icons/index.d.ts.map +1 -1
- package/dist/icons/index.js +11 -13
- package/dist/icons/index.js.map +1 -1
- package/dist/icons/name-union.d.ts +11 -0
- package/dist/icons/name-union.d.ts.map +1 -0
- package/dist/icons/names.d.ts +0 -1
- package/dist/icons/names.d.ts.map +1 -1
- package/dist/icons/names.js.map +1 -1
- package/dist/icons/types.d.ts +14 -0
- package/dist/icons/types.d.ts.map +1 -0
- package/dist/plugins/auto-import.d.ts.map +1 -1
- package/dist/plugins/auto-import.js +1 -0
- package/dist/plugins/auto-import.js.map +1 -1
- package/package.json +5 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tipos da biblioteca de ícones (separados do runtime e da lista gerada).
|
|
3
|
+
*
|
|
4
|
+
* `FenixIconName` aceita TODOS os nomes da fonte (a união literal gerada em
|
|
5
|
+
* ./name-union.ts) e, ao mesmo tempo, continua aceitando qualquer string —
|
|
6
|
+
* é a escotilha `(string & {})`, que faz o editor sugerir os ~4.200 nomes
|
|
7
|
+
* conhecidos sem quebrar código que monta o nome dinamicamente.
|
|
8
|
+
*/
|
|
9
|
+
import type { FenixIconKnownName } from './name-union';
|
|
10
|
+
/** Nome de glifo da Fenix Icons (autocomplete com os nomes conhecidos). */
|
|
11
|
+
export type FenixIconName = FenixIconKnownName | (string & {});
|
|
12
|
+
/** Exporta a união gerada (útil para asserts de tipo e para a doc). */
|
|
13
|
+
export type { FenixIconKnownName };
|
|
14
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/icons/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,2EAA2E;AAC3E,MAAM,MAAM,aAAa,GAAG,kBAAkB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAE/D,uEAAuE;AACvE,YAAY,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-import.d.ts","sourceRoot":"","sources":["../../src/plugins/auto-import.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"auto-import.d.ts","sourceRoot":"","sources":["../../src/plugins/auto-import.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAoDpD,CAAC;AAIF,oFAAoF;AACpF,eAAO,MAAM,mBAAmB,QAAgC,CAAC;AAEjE,MAAM,WAAW,iBAAiB;IAChC,qDAAqD;IACrD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAsB,GAAG,MAAM,CAuCrF;AAED,mDAAmD;AACnD,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAOnD"}
|
|
@@ -19,6 +19,7 @@ const fenixComponentMap = {
|
|
|
19
19
|
"fx-slider": "@wrrdev/fenix-ui/slider",
|
|
20
20
|
"fx-chip": "@wrrdev/fenix-ui/chip",
|
|
21
21
|
"fx-avatar": "@wrrdev/fenix-ui/avatar",
|
|
22
|
+
"fx-icon": "@wrrdev/fenix-ui/icon",
|
|
22
23
|
"fx-card": "@wrrdev/fenix-ui/card",
|
|
23
24
|
"fx-breadcrumb": "@wrrdev/fenix-ui/breadcrumb",
|
|
24
25
|
"fx-popover": "@wrrdev/fenix-ui/popover",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-import.js","sources":["../../src/plugins/auto-import.ts"],"sourcesContent":["/**\n * Registro de tags → subpaths para o auto-import.\n * Mantido em um módulo próprio (sem depender de DOM) para ser usado\n * também no build do cliente via plugin.\n */\nexport const fenixComponentMap: Record<string, string> = {\n 'fx-button': '@wrrdev/fenix-ui/button',\n 'fx-badge': '@wrrdev/fenix-ui/badge',\n 'fx-spinner': '@wrrdev/fenix-ui/spinner',\n 'fx-select': '@wrrdev/fenix-ui/select',\n 'fx-multiselect': '@wrrdev/fenix-ui/multiselect',\n 'fx-input': '@wrrdev/fenix-ui/input',\n 'fx-switch': '@wrrdev/fenix-ui/switch',\n 'fx-calendar': '@wrrdev/fenix-ui/calendar',\n 'fx-datepicker': '@wrrdev/fenix-ui/datepicker',\n 'fx-checkbox': '@wrrdev/fenix-ui/checkbox',\n 'fx-radio': '@wrrdev/fenix-ui/radio',\n 'fx-table': '@wrrdev/fenix-ui/table',\n 'fx-floatlabel': '@wrrdev/fenix-ui/floatlabel',\n 'fx-textarea': '@wrrdev/fenix-ui/textarea',\n 'fx-dialog': '@wrrdev/fenix-ui/dialog',\n 'fx-confirmpopup': '@wrrdev/fenix-ui/confirmpopup',\n 'fx-fileupload': '@wrrdev/fenix-ui/fileupload',\n 'fx-slider': '@wrrdev/fenix-ui/slider',\n 'fx-chip': '@wrrdev/fenix-ui/chip',\n 'fx-avatar': '@wrrdev/fenix-ui/avatar',\n 'fx-card': '@wrrdev/fenix-ui/card',\n 'fx-breadcrumb': '@wrrdev/fenix-ui/breadcrumb',\n 'fx-popover': '@wrrdev/fenix-ui/popover',\n 'fx-stepper': '@wrrdev/fenix-ui/stepper',\n 'fx-rating': '@wrrdev/fenix-ui/rating',\n 'fx-menu': '@wrrdev/fenix-ui/menu',\n 'fx-toggle-button-group': '@wrrdev/fenix-ui/toggle-button-group',\n 'fx-empty-state': '@wrrdev/fenix-ui/empty-state',\n 'fx-password-strength': '@wrrdev/fenix-ui/password-strength',\n 'fx-timeline': '@wrrdev/fenix-ui/timeline',\n 'fx-carousel': '@wrrdev/fenix-ui/carousel',\n 'fx-tree': '@wrrdev/fenix-ui/tree',\n 'fx-drawer': '@wrrdev/fenix-ui/drawer',\n 'fx-toast': '@wrrdev/fenix-ui/toast',\n 'fx-tooltip': '@wrrdev/fenix-ui/tooltip',\n 'fx-tabs': '@wrrdev/fenix-ui/tabs',\n 'fx-tab-panel': '@wrrdev/fenix-ui/tabs',\n 'fx-progress': '@wrrdev/fenix-ui/progress',\n 'fx-skeleton': '@wrrdev/fenix-ui/skeleton',\n 'fx-alert': '@wrrdev/fenix-ui/alert',\n 'fx-dropdown': '@wrrdev/fenix-ui/dropdown',\n 'fx-dropdown-item': '@wrrdev/fenix-ui/dropdown',\n 'fx-pagination': '@wrrdev/fenix-ui/pagination',\n 'fx-autocomplete': '@wrrdev/fenix-ui/autocomplete',\n 'fx-knob': '@wrrdev/fenix-ui/knob',\n 'fx-accordion': '@wrrdev/fenix-ui/accordion',\n 'fx-accordion-panel': '@wrrdev/fenix-ui/accordion',\n 'fx-orderlist': '@wrrdev/fenix-ui/orderlist',\n 'fx-picklist': '@wrrdev/fenix-ui/picklist',\n 'fx-column': '@wrrdev/fenix-ui/table',\n};\n\nconst TAG_RE = /<(fx-[a-z][a-z-]*)(?=[\\s/>])/g;\n\n/** Detecta uso da biblioteca de ícones por classe (fx-icon / fx-icon-home etc.). */\nexport const FENIX_ICON_CLASS_RE = /\\bfx-icon(?:-[a-z0-9_]+)*\\b/;\n\nexport interface AutoImportOptions {\n /** Prefixo do pacote (padrão '@wrrdev/fenix-ui'). */\n packageName?: string;\n}\n\n/**\n * Injeta `import '<subpath>'` para cada componente fx-* usado no código\n * que ainda não foi importado. Retorna o código transformado ou o original.\n */\nexport function transformSource(code: string, options: AutoImportOptions = {}): string {\n const pkg = options.packageName ?? '@wrrdev/fenix-ui';\n // Subpaths do mapa são reescritos quando um pacote custom é informado.\n const resolve = (sub: string): string =>\n pkg === '@wrrdev/fenix-ui' ? sub : sub.replace('@wrrdev/fenix-ui', pkg);\n\n // Componentes usados e ainda não importados explicitamente.\n const needed = new Set<string>();\n for (const m of code.matchAll(TAG_RE)) {\n const sub = fenixComponentMap[m[1]];\n if (sub) {\n const target = resolve(sub);\n if (!code.includes(`'${target}'`) && !code.includes(`\"${target}\"`)) {\n needed.add(target);\n }\n }\n }\n // Biblioteca de ícones: classes fx-icon / fx-icon-<nome> injetam o subpath /icons.\n const iconsSub = resolve('@wrrdev/fenix-ui/icons');\n if (FENIX_ICON_CLASS_RE.test(code) && !code.includes(`'${iconsSub}'`) && !code.includes(`\"${iconsSub}\"`)) {\n needed.add(iconsSub);\n }\n if (!needed.size) return code;\n\n const lines = [...needed].map((s) => `import '${s}';`);\n\n // Arquivo único (.vue): injeta logo após a abertura do <script>.\n const vueScript = /(<script[^>]*>)\\n/.exec(code);\n if (vueScript) {\n return code.replace(vueScript[0], `${vueScript[1]}\\n${lines.join('\\n')}\\n`);\n }\n\n // TS/JS: injeta após o último import existente (ou no topo).\n let lastEnd = -1;\n for (const m of code.matchAll(/^[ \\t]*import\\b[^;]*?['\"][^'\"]+['\"];?[^\\S\\n]*$/gm)) {\n lastEnd = Math.max(lastEnd, m.index + m[0].length);\n }\n if (lastEnd === -1) return `${lines.join('\\n')}\\n${code}`;\n return `${code.slice(0, lastEnd)}\\n${lines.join('\\n')}${code.slice(lastEnd)}`;\n}\n\n/** Verifica se o arquivo deve ser transformado. */\nexport function shouldTransform(id: string): boolean {\n return (\n !id.includes('node_modules') &&\n !id.endsWith('.d.ts') &&\n !id.endsWith('.css') &&\n /\\.(ts|js|tsx|jsx|vue|html|svelte)$/.test(id)\n );\n}\n\n"],"names":[],"mappings":"AAKO,MAAM,oBAA4C;AAAA,EACvD,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,aAAa;AAAA,EACb,kBAAkB;AAAA,EAClB,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,eAAe;AAAA,EACf,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,WAAW;AAAA,EACX,aAAa;AAAA,EACb,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,cAAc;AAAA,EACd,aAAa;AAAA,EACb,WAAW;AAAA,EACX,0BAA0B;AAAA,EAC1B,kBAAkB;AAAA,EAClB,wBAAwB;AAAA,EACxB,eAAe;AAAA,EACf,eAA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AACb,WAAO,KAAK,QAAQ,UAAU,CAAC,GAAG,GAAG,UAAU,CAAC,CAAC;AAAA,EAAK,MAAM,KAAK,IAAI,CAAC;AAAA,CAAI;AAAA,EAC5E;AAGA,MAAI,UAAU;AACd,aAAW,KAAK,KAAK,SAAS,kDAAkD,GAAG;AACjF,cAAU,KAAK,IAAI,SAAS,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM;AAAA,EACnD;AACA,MAAI,YAAY,GAAI,QAAO,GAAG,MAAM,KAAK,IAAI,CAAC;AAAA,EAAK,IAAI;AACvD,SAAO,GAAG,KAAK,MAAM,GAAG,OAAO,CAAC;AAAA,EAAK,MAAM,KAAK,IAAI,CAAC,GAAG,KAAK,MAAM,OAAO,CAAC;AAC7E;AAGO,SAAS,gBAAgB,IAAqB;AACnD,SACE,CAAC,GAAG,SAAS,cAAc,KAC3B,CAAC,GAAG,SAAS,OAAO,KACpB,CAAC,GAAG,SAAS,MAAM,KACnB,qCAAqC,KAAK,EAAE;AAEhD;"}
|
|
1
|
+
{"version":3,"file":"auto-import.js","sources":["../../src/plugins/auto-import.ts"],"sourcesContent":["/**\n * Registro de tags → subpaths para o auto-import.\n * Mantido em um módulo próprio (sem depender de DOM) para ser usado\n * também no build do cliente via plugin.\n */\nexport const fenixComponentMap: Record<string, string> = {\n 'fx-button': '@wrrdev/fenix-ui/button',\n 'fx-badge': '@wrrdev/fenix-ui/badge',\n 'fx-spinner': '@wrrdev/fenix-ui/spinner',\n 'fx-select': '@wrrdev/fenix-ui/select',\n 'fx-multiselect': '@wrrdev/fenix-ui/multiselect',\n 'fx-input': '@wrrdev/fenix-ui/input',\n 'fx-switch': '@wrrdev/fenix-ui/switch',\n 'fx-calendar': '@wrrdev/fenix-ui/calendar',\n 'fx-datepicker': '@wrrdev/fenix-ui/datepicker',\n 'fx-checkbox': '@wrrdev/fenix-ui/checkbox',\n 'fx-radio': '@wrrdev/fenix-ui/radio',\n 'fx-table': '@wrrdev/fenix-ui/table',\n 'fx-floatlabel': '@wrrdev/fenix-ui/floatlabel',\n 'fx-textarea': '@wrrdev/fenix-ui/textarea',\n 'fx-dialog': '@wrrdev/fenix-ui/dialog',\n 'fx-confirmpopup': '@wrrdev/fenix-ui/confirmpopup',\n 'fx-fileupload': '@wrrdev/fenix-ui/fileupload',\n 'fx-slider': '@wrrdev/fenix-ui/slider',\n 'fx-chip': '@wrrdev/fenix-ui/chip',\n 'fx-avatar': '@wrrdev/fenix-ui/avatar',\n 'fx-icon': '@wrrdev/fenix-ui/icon',\n 'fx-card': '@wrrdev/fenix-ui/card',\n 'fx-breadcrumb': '@wrrdev/fenix-ui/breadcrumb',\n 'fx-popover': '@wrrdev/fenix-ui/popover',\n 'fx-stepper': '@wrrdev/fenix-ui/stepper',\n 'fx-rating': '@wrrdev/fenix-ui/rating',\n 'fx-menu': '@wrrdev/fenix-ui/menu',\n 'fx-toggle-button-group': '@wrrdev/fenix-ui/toggle-button-group',\n 'fx-empty-state': '@wrrdev/fenix-ui/empty-state',\n 'fx-password-strength': '@wrrdev/fenix-ui/password-strength',\n 'fx-timeline': '@wrrdev/fenix-ui/timeline',\n 'fx-carousel': '@wrrdev/fenix-ui/carousel',\n 'fx-tree': '@wrrdev/fenix-ui/tree',\n 'fx-drawer': '@wrrdev/fenix-ui/drawer',\n 'fx-toast': '@wrrdev/fenix-ui/toast',\n 'fx-tooltip': '@wrrdev/fenix-ui/tooltip',\n 'fx-tabs': '@wrrdev/fenix-ui/tabs',\n 'fx-tab-panel': '@wrrdev/fenix-ui/tabs',\n 'fx-progress': '@wrrdev/fenix-ui/progress',\n 'fx-skeleton': '@wrrdev/fenix-ui/skeleton',\n 'fx-alert': '@wrrdev/fenix-ui/alert',\n 'fx-dropdown': '@wrrdev/fenix-ui/dropdown',\n 'fx-dropdown-item': '@wrrdev/fenix-ui/dropdown',\n 'fx-pagination': '@wrrdev/fenix-ui/pagination',\n 'fx-autocomplete': '@wrrdev/fenix-ui/autocomplete',\n 'fx-knob': '@wrrdev/fenix-ui/knob',\n 'fx-accordion': '@wrrdev/fenix-ui/accordion',\n 'fx-accordion-panel': '@wrrdev/fenix-ui/accordion',\n 'fx-orderlist': '@wrrdev/fenix-ui/orderlist',\n 'fx-picklist': '@wrrdev/fenix-ui/picklist',\n 'fx-column': '@wrrdev/fenix-ui/table',\n};\n\nconst TAG_RE = /<(fx-[a-z][a-z-]*)(?=[\\s/>])/g;\n\n/** Detecta uso da biblioteca de ícones por classe (fx-icon / fx-icon-home etc.). */\nexport const FENIX_ICON_CLASS_RE = /\\bfx-icon(?:-[a-z0-9_]+)*\\b/;\n\nexport interface AutoImportOptions {\n /** Prefixo do pacote (padrão '@wrrdev/fenix-ui'). */\n packageName?: string;\n}\n\n/**\n * Injeta `import '<subpath>'` para cada componente fx-* usado no código\n * que ainda não foi importado. Retorna o código transformado ou o original.\n */\nexport function transformSource(code: string, options: AutoImportOptions = {}): string {\n const pkg = options.packageName ?? '@wrrdev/fenix-ui';\n // Subpaths do mapa são reescritos quando um pacote custom é informado.\n const resolve = (sub: string): string =>\n pkg === '@wrrdev/fenix-ui' ? sub : sub.replace('@wrrdev/fenix-ui', pkg);\n\n // Componentes usados e ainda não importados explicitamente.\n const needed = new Set<string>();\n for (const m of code.matchAll(TAG_RE)) {\n const sub = fenixComponentMap[m[1]];\n if (sub) {\n const target = resolve(sub);\n if (!code.includes(`'${target}'`) && !code.includes(`\"${target}\"`)) {\n needed.add(target);\n }\n }\n }\n // Biblioteca de ícones: classes fx-icon / fx-icon-<nome> injetam o subpath /icons.\n const iconsSub = resolve('@wrrdev/fenix-ui/icons');\n if (FENIX_ICON_CLASS_RE.test(code) && !code.includes(`'${iconsSub}'`) && !code.includes(`\"${iconsSub}\"`)) {\n needed.add(iconsSub);\n }\n if (!needed.size) return code;\n\n const lines = [...needed].map((s) => `import '${s}';`);\n\n // Arquivo único (.vue): injeta logo após a abertura do <script>.\n const vueScript = /(<script[^>]*>)\\n/.exec(code);\n if (vueScript) {\n return code.replace(vueScript[0], `${vueScript[1]}\\n${lines.join('\\n')}\\n`);\n }\n\n // TS/JS: injeta após o último import existente (ou no topo).\n let lastEnd = -1;\n for (const m of code.matchAll(/^[ \\t]*import\\b[^;]*?['\"][^'\"]+['\"];?[^\\S\\n]*$/gm)) {\n lastEnd = Math.max(lastEnd, m.index + m[0].length);\n }\n if (lastEnd === -1) return `${lines.join('\\n')}\\n${code}`;\n return `${code.slice(0, lastEnd)}\\n${lines.join('\\n')}${code.slice(lastEnd)}`;\n}\n\n/** Verifica se o arquivo deve ser transformado. */\nexport function shouldTransform(id: string): boolean {\n return (\n !id.includes('node_modules') &&\n !id.endsWith('.d.ts') &&\n !id.endsWith('.css') &&\n /\\.(ts|js|tsx|jsx|vue|html|svelte)$/.test(id)\n );\n}\n\n"],"names":[],"mappings":"AAKO,MAAM,oBAA4C;AAAA,EACvD,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,aAAa;AAAA,EACb,kBAAkB;AAAA,EAClB,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,eAAe;AAAA,EACf,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,WAAW;AAAA,EACX,aAAa;AAAA,EACb,WAAW;AAAA,EACX,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,cAAc;AAAA,EACd,aAAa;AAAA,EACb,WAAW;AAAA,EACX,0BAA0B;AAAA,EAC1B,kBAAkB;AAAA,EAClB,wBAAwB;AAAA,EACxB,eAAe;AAAA,EACf,eAAe;AAAA,EACf,WAAW;AAAA,EACX,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,WAAW;AAAA,EACX,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,eAAe;AA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;AACd,aAAW,KAAK,KAAK,SAAS,kDAAkD,GAAG;AACjF,cAAU,KAAK,IAAI,SAAS,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM;AAAA,EACnD;AACA,MAAI,YAAY,GAAI,QAAO,GAAG,MAAM,KAAK,IAAI,CAAC;AAAA,EAAK,IAAI;AACvD,SAAO,GAAG,KAAK,MAAM,GAAG,OAAO,CAAC;AAAA,EAAK,MAAM,KAAK,IAAI,CAAC,GAAG,KAAK,MAAM,OAAO,CAAC;AAC7E;AAGO,SAAS,gBAAgB,IAAqB;AACnD,SACE,CAAC,GAAG,SAAS,cAAc,KAC3B,CAAC,GAAG,SAAS,OAAO,KACpB,CAAC,GAAG,SAAS,MAAM,KACnB,qCAAqC,KAAK,EAAE;AAEhD;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wrrdev/fenix-ui",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"description": "FenixUI Design System Web nativo (Web Components + Shadow DOM + Design Tokens) com tree-shaking por componente.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "ISC",
|
|
@@ -261,6 +261,10 @@
|
|
|
261
261
|
"types": "./dist/icons/index.d.ts",
|
|
262
262
|
"import": "./dist/icons/index.js"
|
|
263
263
|
},
|
|
264
|
+
"./icon": {
|
|
265
|
+
"types": "./dist/components/icon/index.d.ts",
|
|
266
|
+
"import": "./dist/components/icon/index.js"
|
|
267
|
+
},
|
|
264
268
|
"./auto-import": {
|
|
265
269
|
"types": "./dist/plugins/index.d.ts",
|
|
266
270
|
"import": "./dist/plugins/index.js"
|