aleman 1.1.1 → 1.1.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.
@@ -0,0 +1,7 @@
1
+ export const importmap = {
2
+ imports: {
3
+ 'putout': 'https://esm.sh/@putout/bundle',
4
+ '@putout/processor-html': 'https://esm.sh/@putout/processor-html@14.1.1',
5
+ 'fullstore': 'https://esm.sh/fullstore',
6
+ },
7
+ };
package/menu/menu.js CHANGED
@@ -1,13 +1,15 @@
1
+ import {importmap} from './importmap.js';
2
+ import {hydrateMenu} from './hydrate-menu.js';
3
+
1
4
  const {stringify} = JSON;
2
5
 
3
6
  export const createMenu = async (element, options, menuData) => {
4
7
  const hydrateElement = createHydrate();
5
8
 
6
- await createMap();
9
+ createMap();
7
10
  await createLink();
8
11
 
9
12
  createStateElement();
10
- const {hydrateMenu} = await import('./hydrate-menu.js');
11
13
 
12
14
  hydrateMenu(hydrateElement, options, menuData);
13
15
  };
@@ -45,16 +47,11 @@ function createStateElement() {
45
47
  document.body.append(section);
46
48
  }
47
49
 
48
- async function createMap() {
49
- const {default: importmap} = await import('./importmap.json?module', {
50
- with: {
51
- type: 'json',
52
- },
53
- });
54
-
50
+ function createMap() {
55
51
  const script = document.createElement('script');
56
52
 
57
53
  script.type = 'importmap';
58
54
  script.innerHTML = stringify(importmap, null, 4);
59
55
  document.body.append(script);
60
56
  }
57
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aleman",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊Putout-based framework for web",
@@ -1,9 +0,0 @@
1
- {
2
- "imports": {
3
- "putout": "https://esm.sh/@putout/bundle",
4
- "@putout/processor-html": "https://esm.sh/@putout/processor-html@14.1.1",
5
- "html-escaper": "https://esm.sh/html-escaper",
6
- "once": "https://esm.sh/once",
7
- "fullstore": "https://esm.sh/fullstore"
8
- }
9
- }