@rotki/ui-library 2.8.2 → 2.8.3
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/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import dayjs from "dayjs";
|
|
2
|
-
import customParseFormat from "dayjs/plugin/customParseFormat";
|
|
3
|
-
import timezone from "dayjs/plugin/timezone";
|
|
4
|
-
import utc from "dayjs/plugin/utc";
|
|
2
|
+
import customParseFormat from "dayjs/plugin/customParseFormat.js";
|
|
3
|
+
import timezone from "dayjs/plugin/timezone.js";
|
|
4
|
+
import utc from "dayjs/plugin/utc.js";
|
|
5
5
|
import { createTableDefaults, TableSymbol } from "./composables/defaults/table.js";
|
|
6
6
|
import { createIconDefaults, IconsSymbol } from "./composables/icons.js";
|
|
7
7
|
import { useIcons } from "./composables/icons.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import type { App } from 'vue';\nimport type { InitThemeOptions } from '@/types/theme';\nimport dayjs from 'dayjs';\nimport customParseFormat from 'dayjs/plugin/customParseFormat';\nimport timezone from 'dayjs/plugin/timezone';\nimport utc from 'dayjs/plugin/utc';\nimport {\n createTableDefaults,\n type TableOptions,\n TableSymbol,\n} from '@/composables/defaults/table';\nimport { createIconDefaults, IconsSymbol } from '@/composables/icons';\nimport { useRotkiTheme } from '@/composables/theme';\nimport { RUI_I18N_INJECTION_KEY } from '@/composables/use-rui-i18n';\nimport { StepperState } from '@/types/stepper';\nimport '@/style.scss';\n\nexport * from '@/components';\n\nexport * from '@/composables';\n\nexport { contextColors, type ContextColorsType } from '@/consts/colors';\n\nexport { translationKeys } from '@/i18n/keys';\n\nexport * from '@/icons';\n\nexport {\n type InitThemeOptions,\n type ThemeConfig,\n type ThemeContent,\n type ThemeData,\n ThemeMode,\n} from '@/types/theme';\n\nexport { StepperState };\n\nexport { createBlockie } from '@/utils/blockie';\n\nexport interface RuiOptions {\n theme?: InitThemeOptions;\n defaults?: {\n table?: Partial<TableOptions>;\n };\n}\n\nexport function createRui(options: RuiOptions = {}) {\n const { theme } = options;\n\n const defaults = Object.freeze({\n icons: createIconDefaults({\n registeredIcons: options.theme?.icons,\n }),\n table: createTableDefaults(options.defaults?.table),\n });\n\n const install = (app: App) => {\n useRotkiTheme().init({ ...theme });\n\n app.provide(TableSymbol, defaults.table);\n app.provide(IconsSymbol, defaults.icons);\n dayjs.extend(utc);\n dayjs.extend(timezone);\n dayjs.extend(customParseFormat);\n };\n\n return {\n defaults,\n install,\n };\n}\n\nexport function createRuiI8nPlugin(i18nInstance: any) {\n if (!i18nInstance || typeof i18nInstance !== 'object') {\n throw new Error('i18nInstance must be an object');\n }\n\n if (!i18nInstance.global || typeof i18nInstance.global !== 'object') {\n throw new Error('i18nInstance must have a global property');\n }\n\n if (!i18nInstance.global.t || typeof i18nInstance.global.t !== 'function') {\n throw new Error('i18nInstance.global.t must be a function');\n }\n\n if (!i18nInstance.global.te || typeof i18nInstance.global.te !== 'function') {\n throw new Error('i18nInstance.global.te must be a function');\n }\n\n return {\n install: (app: App) => {\n app.provide(RUI_I18N_INJECTION_KEY, {\n t: i18nInstance.global.t.bind(i18nInstance.global),\n te: i18nInstance.global.te.bind(i18nInstance.global),\n });\n },\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CO,SAAS,UAAU,UAAsB,IAAI;AAClD,QAAM,EAAE,UAAU;AAElB,QAAM,WAAW,OAAO,OAAO;AAAA,IAC7B,OAAO,mBAAmB;AAAA,MACxB,iBAAiB,QAAQ,OAAO;AAAA,IAAA,CACjC;AAAA,IACD,OAAO,oBAAoB,QAAQ,UAAU,KAAK;AAAA,EAAA,CACnD;AAED,QAAM,UAAU,CAAC,QAAa;AAC5B,oBAAgB,KAAK,EAAE,GAAG,OAAO;AAEjC,QAAI,QAAQ,aAAa,SAAS,KAAK;AACvC,QAAI,QAAQ,aAAa,SAAS,KAAK;AACvC,UAAM,OAAO,GAAG;AAChB,UAAM,OAAO,QAAQ;AACrB,UAAM,OAAO,iBAAiB;AAAA,EAChC;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,EAAA;AAEJ;AAEO,SAAS,mBAAmB,cAAmB;AACpD,MAAI,CAAC,gBAAgB,OAAO,iBAAiB,UAAU;AACrD,UAAM,IAAI,MAAM,gCAAgC;AAAA,EAClD;AAEA,MAAI,CAAC,aAAa,UAAU,OAAO,aAAa,WAAW,UAAU;AACnE,UAAM,IAAI,MAAM,0CAA0C;AAAA,EAC5D;AAEA,MAAI,CAAC,aAAa,OAAO,KAAK,OAAO,aAAa,OAAO,MAAM,YAAY;AACzE,UAAM,IAAI,MAAM,0CAA0C;AAAA,EAC5D;AAEA,MAAI,CAAC,aAAa,OAAO,MAAM,OAAO,aAAa,OAAO,OAAO,YAAY;AAC3E,UAAM,IAAI,MAAM,2CAA2C;AAAA,EAC7D;AAEA,SAAO;AAAA,IACL,SAAS,CAAC,QAAa;AACrB,UAAI,QAAQ,wBAAwB;AAAA,QAClC,GAAG,aAAa,OAAO,EAAE,KAAK,aAAa,MAAM;AAAA,QACjD,IAAI,aAAa,OAAO,GAAG,KAAK,aAAa,MAAM;AAAA,MAAA,CACpD;AAAA,IACH;AAAA,EAAA;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import type { App } from 'vue';\nimport type { InitThemeOptions } from '@/types/theme';\nimport dayjs from 'dayjs';\nimport customParseFormat from 'dayjs/plugin/customParseFormat.js';\nimport timezone from 'dayjs/plugin/timezone.js';\nimport utc from 'dayjs/plugin/utc.js';\nimport {\n createTableDefaults,\n type TableOptions,\n TableSymbol,\n} from '@/composables/defaults/table';\nimport { createIconDefaults, IconsSymbol } from '@/composables/icons';\nimport { useRotkiTheme } from '@/composables/theme';\nimport { RUI_I18N_INJECTION_KEY } from '@/composables/use-rui-i18n';\nimport { StepperState } from '@/types/stepper';\nimport '@/style.scss';\n\nexport * from '@/components';\n\nexport * from '@/composables';\n\nexport { contextColors, type ContextColorsType } from '@/consts/colors';\n\nexport { translationKeys } from '@/i18n/keys';\n\nexport * from '@/icons';\n\nexport {\n type InitThemeOptions,\n type ThemeConfig,\n type ThemeContent,\n type ThemeData,\n ThemeMode,\n} from '@/types/theme';\n\nexport { StepperState };\n\nexport { createBlockie } from '@/utils/blockie';\n\nexport interface RuiOptions {\n theme?: InitThemeOptions;\n defaults?: {\n table?: Partial<TableOptions>;\n };\n}\n\nexport function createRui(options: RuiOptions = {}) {\n const { theme } = options;\n\n const defaults = Object.freeze({\n icons: createIconDefaults({\n registeredIcons: options.theme?.icons,\n }),\n table: createTableDefaults(options.defaults?.table),\n });\n\n const install = (app: App) => {\n useRotkiTheme().init({ ...theme });\n\n app.provide(TableSymbol, defaults.table);\n app.provide(IconsSymbol, defaults.icons);\n dayjs.extend(utc);\n dayjs.extend(timezone);\n dayjs.extend(customParseFormat);\n };\n\n return {\n defaults,\n install,\n };\n}\n\nexport function createRuiI8nPlugin(i18nInstance: any) {\n if (!i18nInstance || typeof i18nInstance !== 'object') {\n throw new Error('i18nInstance must be an object');\n }\n\n if (!i18nInstance.global || typeof i18nInstance.global !== 'object') {\n throw new Error('i18nInstance must have a global property');\n }\n\n if (!i18nInstance.global.t || typeof i18nInstance.global.t !== 'function') {\n throw new Error('i18nInstance.global.t must be a function');\n }\n\n if (!i18nInstance.global.te || typeof i18nInstance.global.te !== 'function') {\n throw new Error('i18nInstance.global.te must be a function');\n }\n\n return {\n install: (app: App) => {\n app.provide(RUI_I18N_INJECTION_KEY, {\n t: i18nInstance.global.t.bind(i18nInstance.global),\n te: i18nInstance.global.te.bind(i18nInstance.global),\n });\n },\n };\n}\n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