@hanzogui/static 4.4.0 → 7.0.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.
Files changed (101) hide show
  1. package/dist/check-dep-versions.cjs +1 -1
  2. package/dist/checkDeps.cjs +11 -11
  3. package/dist/constants.cjs +2 -2
  4. package/dist/exports.cjs +2 -2
  5. package/dist/extractor/bundle.cjs +20 -39
  6. package/dist/extractor/bundleConfig.cjs +46 -46
  7. package/dist/extractor/createExtractor.cjs +39 -39
  8. package/dist/extractor/createLogger.cjs +1 -1
  9. package/dist/extractor/extractHelpers.cjs +1 -1
  10. package/dist/extractor/extractMediaStyle.cjs +7 -7
  11. package/dist/extractor/extractToClassNames.cjs +9 -9
  12. package/dist/extractor/extractToNative.cjs +7 -7
  13. package/dist/extractor/{getGuiConfigPathFromOptionsConfig.cjs → getHanzoguiConfigPathFromOptionsConfig.cjs} +5 -5
  14. package/dist/extractor/getPrefixLogs.cjs +1 -1
  15. package/dist/extractor/getStaticBindingsForScope.cjs +2 -2
  16. package/dist/extractor/{loadGui.cjs → loadHanzogui.cjs} +97 -141
  17. package/dist/extractor/regenerateConfig.cjs +20 -20
  18. package/dist/extractor/{watchGuiConfig.cjs → watchHanzoguiConfig.cjs} +15 -15
  19. package/dist/getPragmaOptions.cjs +6 -6
  20. package/dist/helpers/{requireGuiCore.cjs → requireHanzoguiCore.cjs} +12 -12
  21. package/dist/registerRequire.cjs +21 -21
  22. package/dist/worker.cjs +3 -3
  23. package/package.json +22 -22
  24. package/src/check-dep-versions.ts +1 -5
  25. package/src/checkDeps.ts +28 -30
  26. package/src/constants.ts +2 -2
  27. package/src/exports.ts +2 -2
  28. package/src/extractor/bundle.ts +11 -13
  29. package/src/extractor/bundleConfig.ts +57 -57
  30. package/src/extractor/createEvaluator.ts +2 -2
  31. package/src/extractor/createExtractor.ts +62 -55
  32. package/src/extractor/createLogger.ts +5 -3
  33. package/src/extractor/esbuildTsconfigPaths.ts +1 -1
  34. package/src/extractor/extractHelpers.ts +15 -12
  35. package/src/extractor/extractMediaStyle.ts +19 -13
  36. package/src/extractor/extractToClassNames.ts +11 -11
  37. package/src/extractor/extractToNative.ts +13 -13
  38. package/src/extractor/{getGuiConfigPathFromOptionsConfig.ts → getHanzoguiConfigPathFromOptionsConfig.ts} +3 -3
  39. package/src/extractor/getPrefixLogs.ts +3 -3
  40. package/src/extractor/getStaticBindingsForScope.ts +2 -2
  41. package/src/extractor/{loadGui.ts → loadHanzogui.ts} +86 -83
  42. package/src/extractor/regenerateConfig.ts +34 -24
  43. package/src/extractor/{watchGuiConfig.ts → watchHanzoguiConfig.ts} +10 -10
  44. package/src/getPragmaOptions.ts +6 -6
  45. package/src/helpers/requireHanzoguiCore.ts +28 -0
  46. package/src/registerRequire.ts +34 -36
  47. package/src/server.ts +2 -2
  48. package/src/types.ts +13 -10
  49. package/src/worker.ts +7 -7
  50. package/types/check-dep-versions.d.ts.map +1 -1
  51. package/types/checkDeps.d.ts.map +1 -1
  52. package/types/constants.d.ts.map +1 -1
  53. package/types/exports.d.ts +2 -2
  54. package/types/exports.d.ts.map +1 -1
  55. package/types/extractor/bundle.d.ts +2 -2
  56. package/types/extractor/bundle.d.ts.map +1 -1
  57. package/types/extractor/bundleConfig.d.ts +12 -12
  58. package/types/extractor/bundleConfig.d.ts.map +1 -1
  59. package/types/extractor/createEvaluator.d.ts +2 -2
  60. package/types/extractor/createEvaluator.d.ts.map +1 -1
  61. package/types/extractor/createExtractor.d.ts +5 -5
  62. package/types/extractor/createExtractor.d.ts.map +1 -1
  63. package/types/extractor/createLogger.d.ts +2 -2
  64. package/types/extractor/createLogger.d.ts.map +1 -1
  65. package/types/extractor/extractHelpers.d.ts +8 -8
  66. package/types/extractor/extractHelpers.d.ts.map +1 -1
  67. package/types/extractor/extractMediaStyle.d.ts +4 -4
  68. package/types/extractor/extractMediaStyle.d.ts.map +1 -1
  69. package/types/extractor/extractToClassNames.d.ts +2 -2
  70. package/types/extractor/extractToClassNames.d.ts.map +1 -1
  71. package/types/extractor/extractToNative.d.ts +3 -3
  72. package/types/extractor/extractToNative.d.ts.map +1 -1
  73. package/types/extractor/getHanzoguiConfigPathFromOptionsConfig.d.ts +3 -0
  74. package/types/extractor/getHanzoguiConfigPathFromOptionsConfig.d.ts.map +1 -0
  75. package/types/extractor/getPrefixLogs.d.ts +2 -2
  76. package/types/extractor/getPrefixLogs.d.ts.map +1 -1
  77. package/types/extractor/loadHanzogui.d.ts +22 -0
  78. package/types/extractor/loadHanzogui.d.ts.map +1 -0
  79. package/types/extractor/regenerateConfig.d.ts +4 -4
  80. package/types/extractor/regenerateConfig.d.ts.map +1 -1
  81. package/types/extractor/watchHanzoguiConfig.d.ts +5 -0
  82. package/types/extractor/watchHanzoguiConfig.d.ts.map +1 -0
  83. package/types/helpers/requireHanzoguiCore.d.ts +3 -0
  84. package/types/helpers/requireHanzoguiCore.d.ts.map +1 -0
  85. package/types/registerRequire.d.ts +3 -3
  86. package/types/registerRequire.d.ts.map +1 -1
  87. package/types/server.d.ts +2 -2
  88. package/types/server.d.ts.map +1 -1
  89. package/types/types.d.ts +10 -10
  90. package/types/types.d.ts.map +1 -1
  91. package/types/worker.d.ts +4 -4
  92. package/types/worker.d.ts.map +1 -1
  93. package/src/helpers/requireGuiCore.ts +0 -28
  94. package/types/extractor/getGuiConfigPathFromOptionsConfig.d.ts +0 -3
  95. package/types/extractor/getGuiConfigPathFromOptionsConfig.d.ts.map +0 -1
  96. package/types/extractor/loadGui.d.ts +0 -22
  97. package/types/extractor/loadGui.d.ts.map +0 -1
  98. package/types/extractor/watchGuiConfig.d.ts +0 -5
  99. package/types/extractor/watchGuiConfig.d.ts.map +0 -1
  100. package/types/helpers/requireGuiCore.d.ts +0 -3
  101. package/types/helpers/requireGuiCore.d.ts.map +0 -1
@@ -7,17 +7,17 @@ import { basename, dirname, extname, join, relative, sep } from 'node:path'
7
7
  import { pathToFileURL } from 'node:url'
8
8
  // @ts-ignore why
9
9
  import { Color, colorLog } from '@hanzogui/cli-color'
10
- import { type StaticConfig, type GuiInternalConfig } from '@hanzogui/web'
10
+ import { type StaticConfig, type HanzoguiInternalConfig } from '@hanzogui/web'
11
11
  import esbuild from 'esbuild'
12
12
  import * as FS from 'fs-extra'
13
13
  import { readFile } from 'node:fs/promises'
14
14
  import { registerRequire, setRequireResult } from '../registerRequire'
15
- import type { GuiOptions } from '../types'
15
+ import type { HanzoguiOptions } from '../types'
16
16
  import { babelParse } from './babelParse'
17
- import { esbuildLoaderConfig, esbundleGuiConfig } from './bundle'
18
- import { getGuiConfigPathFromOptionsConfig } from './getGuiConfigPathFromOptionsConfig'
17
+ import { esbuildLoaderConfig, esbundleHanzoguiConfig } from './bundle'
18
+ import { getHanzoguiConfigPathFromOptionsConfig } from './getHanzoguiConfigPathFromOptionsConfig'
19
19
  import { hasTopLevelAwait } from './hasTopLevelAwait'
20
- import { requireGuiCore } from '../helpers/requireGuiCore'
20
+ import { requireHanzoguiCore } from '../helpers/requireHanzoguiCore'
21
21
  import { detectModuleFormat } from './detectModuleFormat'
22
22
 
23
23
  // track temp files for cleanup on exit
@@ -33,7 +33,7 @@ function getDynamicEvalOutfile(name: string, format: 'esm' | 'cjs', contents: st
33
33
  .update(contents)
34
34
  .digest('hex')
35
35
  .slice(0, 10)
36
- return join(process.cwd(), '.gui', `dynamic-eval-${hash}-${basename(name)}.${ext}`)
36
+ return join(process.cwd(), '.hanzogui', `dynamic-eval-${hash}-${basename(name)}.${ext}`)
37
37
  }
38
38
 
39
39
  function getEsbuildStdinLoader(filePath: string): esbuild.Loader {
@@ -99,9 +99,9 @@ export type LoadedComponents = {
99
99
  >
100
100
  }
101
101
 
102
- export type GuiProjectInfo = {
102
+ export type HanzoguiProjectInfo = {
103
103
  components?: LoadedComponents[]
104
- guiConfig?: GuiInternalConfig | null
104
+ hanzoguiConfig?: HanzoguiInternalConfig | null
105
105
  nameToPaths?: NameToPaths
106
106
  cached?: boolean
107
107
  }
@@ -134,7 +134,7 @@ const handleEsmFeaturesPlugin: esbuild.Plugin = {
134
134
  }
135
135
 
136
136
  // skip most node_modules
137
- if (args.path.includes('node_modules') && !args.path.includes('@gui')) {
137
+ if (args.path.includes('node_modules') && !args.path.includes('@hanzogui')) {
138
138
  return null
139
139
  }
140
140
 
@@ -161,8 +161,8 @@ const handleEsmFeaturesPlugin: esbuild.Plugin = {
161
161
 
162
162
  // stub files with top-level await - they're typically runtime-only
163
163
  if (hasTopLevelAwait(contents, args.path)) {
164
- if (process.env.DEBUG?.startsWith('@hanzo/gui')) {
165
- console.info(`[hanzo-gui] stubbing file with top-level await: ${args.path}`)
164
+ if (process.env.DEBUG?.startsWith('hanzogui')) {
165
+ console.info(`[hanzogui] stubbing file with top-level await: ${args.path}`)
166
166
  }
167
167
  return {
168
168
  // Keep this as an ESM-shaped stub so esbuild doesn't inline a top-level
@@ -226,11 +226,11 @@ export function hasBundledConfigChanged() {
226
226
  return true
227
227
  }
228
228
 
229
- let loadedConfig: GuiInternalConfig | null = null
229
+ let loadedConfig: HanzoguiInternalConfig | null = null
230
230
 
231
231
  export const getLoadedConfig = () => loadedConfig
232
232
 
233
- export async function getBundledConfig(props: GuiOptions, rebuild = false) {
233
+ export async function getBundledConfig(props: HanzoguiOptions, rebuild = false) {
234
234
  if (isBundling) {
235
235
  await new Promise((res) => {
236
236
  waitForBundle.add(res)
@@ -241,11 +241,11 @@ export async function getBundledConfig(props: GuiOptions, rebuild = false) {
241
241
  return currentBundle
242
242
  }
243
243
 
244
- global.guiLastLoaded ||= 0
244
+ global.hanzoguiLastLoaded ||= 0
245
245
 
246
246
  function updateLastLoaded(config: any) {
247
- global.guiLastLoaded = Date.now()
248
- global.guiLastBundledConfig = config
247
+ global.hanzoguiLastLoaded = Date.now()
248
+ global.hanzoguiLastBundledConfig = config
249
249
  }
250
250
 
251
251
  let hasBundledOnce = false
@@ -255,24 +255,24 @@ let hasBundledOnce = false
255
255
  // that's acceptable - better than nothing
256
256
  let hasLoggedBuild = false
257
257
 
258
- export async function bundleConfig(props: GuiOptions) {
258
+ export async function bundleConfig(props: HanzoguiOptions) {
259
259
  // webpack is calling this a ton for no reason
260
- if (global.guiLastBundledConfig && Date.now() - global.guiLastLoaded < 3000) {
260
+ if (global.hanzoguiLastBundledConfig && Date.now() - global.hanzoguiLastLoaded < 3000) {
261
261
  // just loaded recently
262
- return global.guiLastBundledConfig
262
+ return global.hanzoguiLastBundledConfig
263
263
  }
264
264
 
265
265
  try {
266
266
  isBundling = true
267
267
 
268
268
  const configEntry = props.config
269
- ? getGuiConfigPathFromOptionsConfig(props.config)
269
+ ? getHanzoguiConfigPathFromOptionsConfig(props.config)
270
270
  : ''
271
- const tmpDir = join(process.cwd(), '.gui')
271
+ const tmpDir = join(process.cwd(), '.hanzogui')
272
272
  // detect module format from config entry point
273
273
  const configFormat = configEntry ? detectModuleFormat(configEntry) : 'cjs'
274
274
  const configExt = configFormat === 'esm' ? '.mjs' : '.cjs'
275
- const configOutPath = join(tmpDir, `gui.config${configExt}`)
275
+ const configOutPath = join(tmpDir, `hanzogui.config${configExt}`)
276
276
  const baseComponents = (props.components || []).filter((x) => x !== '@hanzogui/core')
277
277
  // detect format per component module
278
278
  const componentFormats: Array<'esm' | 'cjs'> = baseComponents.map((mod) => {
@@ -297,7 +297,7 @@ export async function bundleConfig(props: GuiOptions) {
297
297
 
298
298
  if (
299
299
  process.env.NODE_ENV === 'development' &&
300
- process.env.DEBUG?.startsWith('@hanzo/gui')
300
+ process.env.DEBUG?.startsWith('hanzogui')
301
301
  ) {
302
302
  console.info(`Building config entry`, configEntry)
303
303
  }
@@ -336,7 +336,7 @@ export async function bundleConfig(props: GuiOptions) {
336
336
 
337
337
  await Promise.all([
338
338
  props.config
339
- ? esbundleGuiConfig(
339
+ ? esbundleHanzoguiConfig(
340
340
  {
341
341
  entryPoints: [configEntry],
342
342
  external,
@@ -349,7 +349,7 @@ export async function bundleConfig(props: GuiOptions) {
349
349
  )
350
350
  : null,
351
351
  ...baseComponents.map((componentModule, i) => {
352
- return esbundleGuiConfig(
352
+ return esbundleHanzoguiConfig(
353
353
  {
354
354
  entryPoints: [componentModule],
355
355
  resolvePlatformSpecificEntries: true,
@@ -371,10 +371,10 @@ export async function bundleConfig(props: GuiOptions) {
371
371
  colorLog(
372
372
  Color.FgYellow,
373
373
  `
374
- ➡ [hanzo-gui] built config, components, prompt (${Date.now() - start}ms)`
374
+ ➡ [hanzogui] built config, components, prompt (${Date.now() - start}ms)`
375
375
  )
376
376
 
377
- if (process.env.DEBUG?.startsWith('@hanzo/gui')) {
377
+ if (process.env.DEBUG?.startsWith('hanzogui')) {
378
378
  colorLog(
379
379
  Color.Dim,
380
380
  `
@@ -427,20 +427,20 @@ export async function bundleConfig(props: GuiOptions) {
427
427
  // check for ProxyWorm - indicates a module loading error
428
428
  if (config._isProxyWorm) {
429
429
  throw new Error(
430
- `Got a proxied config - likely a module loading error. Set DEBUG=hanzo-gui for details.`
430
+ `Got a proxied config - likely a module loading error. Set DEBUG=hanzogui for details.`
431
431
  )
432
432
  }
433
433
 
434
434
  loadedConfig = config
435
435
 
436
436
  if (!config.parsed) {
437
- const { createGui } = requireGuiCore(props.platform || 'web')
437
+ const { createHanzogui } = requireHanzoguiCore(props.platform || 'web')
438
438
  // need to create it
439
- config = createGui(config)
439
+ config = createHanzogui(config)
440
440
  }
441
441
 
442
442
  if (props.outputCSS) {
443
- await writeGuiCSS(props.outputCSS, config)
443
+ await writeHanzoguiCSS(props.outputCSS, config)
444
444
  }
445
445
 
446
446
  let components = await loadComponents({
@@ -459,7 +459,7 @@ export async function bundleConfig(props: GuiOptions) {
459
459
  component.moduleName
460
460
 
461
461
  if (!component.moduleName) {
462
- if (process.env.DEBUG?.includes('@hanzo/gui') || process.env.IS_GUI_DEV) {
462
+ if (process.env.DEBUG?.includes('hanzogui') || process.env.IS_TAMAGUI_DEV) {
463
463
  console.warn(
464
464
  `⚠️ no module name found: ${component.moduleName} ${JSON.stringify(
465
465
  baseComponents
@@ -471,7 +471,7 @@ export async function bundleConfig(props: GuiOptions) {
471
471
 
472
472
  if (
473
473
  process.env.NODE_ENV === 'development' &&
474
- process.env.DEBUG?.startsWith('@hanzo/gui')
474
+ process.env.DEBUG?.startsWith('hanzogui')
475
475
  ) {
476
476
  console.info('Loaded components', components)
477
477
  }
@@ -479,7 +479,7 @@ export async function bundleConfig(props: GuiOptions) {
479
479
  const res = {
480
480
  components,
481
481
  nameToPaths: {},
482
- guiConfig: config,
482
+ hanzoguiConfig: config,
483
483
  }
484
484
 
485
485
  currentBundle = res
@@ -488,9 +488,9 @@ export async function bundleConfig(props: GuiOptions) {
488
488
  return res
489
489
  } catch (err: any) {
490
490
  console.error(
491
- `Error bundling gui config: ${err?.message} (run with DEBUG=hanzo-gui to see stack)`
491
+ `Error bundling hanzogui config: ${err?.message} (run with DEBUG=hanzogui to see stack)`
492
492
  )
493
- if (process.env.DEBUG?.includes('@hanzo/gui')) {
493
+ if (process.env.DEBUG?.includes('hanzogui')) {
494
494
  console.error(err.stack)
495
495
  }
496
496
  } finally {
@@ -500,9 +500,9 @@ export async function bundleConfig(props: GuiOptions) {
500
500
  }
501
501
  }
502
502
 
503
- export async function writeGuiCSS(outputCSS: string, config: GuiInternalConfig) {
503
+ export async function writeHanzoguiCSS(outputCSS: string, config: HanzoguiInternalConfig) {
504
504
  const flush = async () => {
505
- colorLog(Color.FgYellow, ` ➡ [hanzo-gui] output css: ${outputCSS}`)
505
+ colorLog(Color.FgYellow, ` ➡ [hanzogui] output css: ${outputCSS}`)
506
506
  await FS.writeFile(outputCSS, css)
507
507
  }
508
508
 
@@ -521,19 +521,19 @@ export async function writeGuiCSS(outputCSS: string, config: GuiInternalConfig)
521
521
  }
522
522
  }
523
523
 
524
- export async function loadComponents(props: GuiOptions, forceExports = false) {
524
+ export async function loadComponents(props: HanzoguiOptions, forceExports = false) {
525
525
  const coreComponents = getCoreComponentsSync(props)
526
526
  const otherComponents = await loadComponentsInner(props, forceExports)
527
527
  return [...coreComponents, ...(otherComponents || [])]
528
528
  }
529
529
 
530
- export function loadComponentsSync(props: GuiOptions, forceExports = false) {
530
+ export function loadComponentsSync(props: HanzoguiOptions, forceExports = false) {
531
531
  const coreComponents = getCoreComponentsSync(props)
532
532
  const otherComponents = loadComponentsInnerSync(props, forceExports)
533
533
  return [...coreComponents, ...(otherComponents || [])]
534
534
  }
535
535
 
536
- function getCoreComponentsSync(props: GuiOptions) {
536
+ function getCoreComponentsSync(props: HanzoguiOptions) {
537
537
  const loaded = loadComponentsInnerSync({
538
538
  ...props,
539
539
  components: ['@hanzogui/core'],
@@ -553,7 +553,7 @@ function getCoreComponentsSync(props: GuiOptions) {
553
553
  }
554
554
 
555
555
  export async function loadComponentsInner(
556
- props: GuiOptions,
556
+ props: HanzoguiOptions,
557
557
  forceExports = false
558
558
  ): Promise<null | LoadedComponents[]> {
559
559
  const componentsModules = props.components || []
@@ -624,7 +624,7 @@ export async function loadComponentsInner(
624
624
  })
625
625
  }
626
626
 
627
- if (process.env.DEBUG === '@hanzo/gui') {
627
+ if (process.env.DEBUG === 'hanzogui') {
628
628
  console.info(`loadModule`, loadModule, format)
629
629
  }
630
630
 
@@ -666,16 +666,16 @@ export async function loadComponentsInner(
666
666
  } catch (err) {
667
667
  console.info('babel err', err, writtenContents)
668
668
  writtenContents = fileContents
669
- if (process.env.DEBUG?.startsWith('@hanzo/gui')) {
669
+ if (process.env.DEBUG?.startsWith('hanzogui')) {
670
670
  console.info(`Error parsing babel likely`, err)
671
671
  }
672
672
 
673
673
  try {
674
674
  loaded = await attemptLoad({ forceExports: false })
675
675
  } catch (err2) {
676
- if (process.env.GUI_ENABLE_WARN_DYNAMIC_LOAD) {
676
+ if (process.env.TAMAGUI_ENABLE_WARN_DYNAMIC_LOAD) {
677
677
  console.info(
678
- `\nGui attempted but failed to dynamically optimize components in:\n ${name}\n`
678
+ `\nHanzogui attempted but failed to dynamically optimize components in:\n ${name}\n`
679
679
  )
680
680
  console.info(err2)
681
681
  console.info(
@@ -703,7 +703,7 @@ export async function loadComponentsInner(
703
703
  cacheComponents[key] = results
704
704
  return results
705
705
  } catch (err: any) {
706
- console.info(`Gui error bundling components`, err.message, err.stack)
706
+ console.info(`Hanzogui error bundling components`, err.message, err.stack)
707
707
  return null
708
708
  } finally {
709
709
  unregister()
@@ -712,7 +712,7 @@ export async function loadComponentsInner(
712
712
 
713
713
  // sync version - uses cjs format for buildSync (no plugin support)
714
714
  export function loadComponentsInnerSync(
715
- props: GuiOptions,
715
+ props: HanzoguiOptions,
716
716
  forceExports = false
717
717
  ): null | LoadedComponents[] {
718
718
  const componentsModules = props.components || []
@@ -779,7 +779,7 @@ export function loadComponentsInnerSync(
779
779
  })
780
780
  }
781
781
 
782
- if (process.env.DEBUG === '@hanzo/gui') {
782
+ if (process.env.DEBUG === 'hanzogui') {
783
783
  console.info(`loadModule`, loadModule, require.resolve(loadModule))
784
784
  }
785
785
 
@@ -814,7 +814,7 @@ export function loadComponentsInnerSync(
814
814
  } catch (err) {
815
815
  console.info('babel err', err, writtenContents)
816
816
  writtenContents = fileContents
817
- if (process.env.DEBUG?.startsWith('@hanzo/gui')) {
817
+ if (process.env.DEBUG?.startsWith('hanzogui')) {
818
818
  console.info(`Error parsing babel likely`, err)
819
819
  }
820
820
  } finally {
@@ -824,9 +824,9 @@ export function loadComponentsInnerSync(
824
824
  try {
825
825
  return attemptLoad({ forceExports: false })
826
826
  } catch (err) {
827
- if (process.env.GUI_ENABLE_WARN_DYNAMIC_LOAD) {
827
+ if (process.env.TAMAGUI_ENABLE_WARN_DYNAMIC_LOAD) {
828
828
  console.info(
829
- `\nGui attempted but failed to dynamically optimize components in:\n ${name}\n`
829
+ `\nHanzogui attempted but failed to dynamically optimize components in:\n ${name}\n`
830
830
  )
831
831
  console.info(err)
832
832
  console.info(
@@ -846,7 +846,7 @@ export function loadComponentsInnerSync(
846
846
  cacheComponents[key] = info
847
847
  return info
848
848
  } catch (err: any) {
849
- console.info(`Gui error bundling components`, err.message, err.stack)
849
+ console.info(`Hanzogui error bundling components`, err.message, err.stack)
850
850
  return null
851
851
  } finally {
852
852
  unregister()
@@ -874,7 +874,7 @@ function getComponentStaticConfigByName(name: string, exported: any) {
874
874
  }
875
875
 
876
876
  for (const key in exported) {
877
- const found = getGuiComponent(key, exported[key])
877
+ const found = getHanzoguiComponent(key, exported[key])
878
878
  if (found) {
879
879
  // remove non-stringifyable
880
880
  const { Component, ...sc } = found.staticConfig
@@ -882,9 +882,9 @@ function getComponentStaticConfigByName(name: string, exported: any) {
882
882
  }
883
883
  }
884
884
  } catch (err) {
885
- if (process.env.GUI_ENABLE_WARN_DYNAMIC_LOAD) {
885
+ if (process.env.TAMAGUI_ENABLE_WARN_DYNAMIC_LOAD) {
886
886
  console.error(
887
- `Gui failed getting components from ${name} (Disable error by setting environment variable GUI_ENABLE_WARN_DYNAMIC_LOAD=1)`
887
+ `Hanzogui failed getting components from ${name} (Disable error by setting environment variable TAMAGUI_ENABLE_WARN_DYNAMIC_LOAD=1)`
888
888
  )
889
889
  console.error(err)
890
890
  }
@@ -892,7 +892,7 @@ function getComponentStaticConfigByName(name: string, exported: any) {
892
892
  return components
893
893
  }
894
894
 
895
- function getGuiComponent(
895
+ function getHanzoguiComponent(
896
896
  name: string,
897
897
  Component: any
898
898
  ): undefined | { staticConfig: StaticConfig } {
@@ -6,7 +6,7 @@ import * as t from '@babel/types'
6
6
  import esbuild from 'esbuild'
7
7
 
8
8
  import { FAILED_EVAL } from '../constants'
9
- import type { GuiOptionsWithFileInfo } from '../types'
9
+ import type { HanzoguiOptionsWithFileInfo } from '../types'
10
10
  import { evaluateAstNode } from './evaluateAstNode'
11
11
 
12
12
  export function createEvaluator({
@@ -16,7 +16,7 @@ export function createEvaluator({
16
16
  traversePath,
17
17
  shouldPrintDebug,
18
18
  }: {
19
- props: GuiOptionsWithFileInfo
19
+ props: HanzoguiOptionsWithFileInfo
20
20
  staticNamespace: Record<string, any>
21
21
  sourcePath?: string
22
22
  traversePath?: NodePath<t.JSXElement>