create-oc 1.1.35 → 1.1.37

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/index.js CHANGED
@@ -25,7 +25,8 @@ function createOcJson(cwd, importmap) {
25
25
  if (!oc.$schema) {
26
26
  oc.$schema = 'https://opencomponents.github.io/schema.json';
27
27
  }
28
- oc.importmap = oc.importmap?.imports
28
+ oc.development = {};
29
+ oc.development.importmap = oc.importmap?.imports
29
30
  ? {
30
31
  imports: {
31
32
  ...oc.importmap.imports,
@@ -167,12 +168,8 @@ const imports = (() => {
167
168
  };
168
169
  case 'esm.remix':
169
170
  return {
170
- '@remix-run/dom':
171
- 'https://esm.sh/@remix-run/dom@0.0.0-experimental-remix-jam.6',
172
- '@remix-run/events':
173
- 'https://esm.sh/@remix-run/events@0.0.0-experimental-remix-jam.5',
174
- '@remix-run/events/':
175
- 'https://esm.sh/@remix-run/events@0.0.0-experimental-remix-jam.5/',
171
+ '@remix-run/component': 'https://esm.sh/@remix-run/component@0.5.0',
172
+ '@remix-run/component/': 'https://esm.sh/@remix-run/component@0.5.0/',
176
173
  };
177
174
  default:
178
175
  return undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-oc",
3
- "version": "1.1.35",
3
+ "version": "1.1.37",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "main": "index.js",
@@ -21,4 +21,4 @@
21
21
  "index.js",
22
22
  "templates"
23
23
  ]
24
- }
24
+ }
@@ -22,8 +22,7 @@
22
22
  }
23
23
  },
24
24
  "devDependencies": {
25
- "@remix-run/dom": "^0.0.0-experimental-remix-jam.6",
26
- "@remix-run/events": "^0.0.0-experimental-remix-jam.5",
25
+ "@remix-run/component": "^0.5.0",
27
26
  "happy-dom": "^18.0.1",
28
27
  "oc-server": "^4.0.2",
29
28
  "oc-template-esm-compiler": "^4.0.1",
@@ -3,14 +3,13 @@ import {
3
3
  type ActionOutput,
4
4
  getInitialData,
5
5
  } from 'oc-server/client';
6
- import type { Remix } from '@remix-run/dom';
7
- import { press } from '@remix-run/events/press';
6
+ import { on, type Handle } from '@remix-run/component';
8
7
  import styles from './styles.module.css';
9
8
  import logo from '../public/logo.png';
10
9
 
11
10
  type AdditionalData = ActionOutput<'funFact'>;
12
11
 
13
- export default function App(this: Remix.Handle) {
12
+ export default function App(handle: Handle) {
14
13
  const { firstName, lastName, born, hobbies } = getInitialData();
15
14
  let additionalData: AdditionalData | null = null;
16
15
  let error = '';
@@ -23,7 +22,7 @@ export default function App(this: Remix.Handle) {
23
22
  } catch (err) {
24
23
  error = String(err);
25
24
  } finally {
26
- this.update();
25
+ handle.update();
27
26
  }
28
27
  };
29
28
 
@@ -45,7 +44,12 @@ export default function App(this: Remix.Handle) {
45
44
  </div>
46
45
  </div>
47
46
  {additionalData && <div>{additionalData.funFact}</div>}
48
- <button className={styles.button} on={press(getFunFact)}>
47
+ <button
48
+ className={styles.button}
49
+ on={{
50
+ click: getFunFact,
51
+ }}
52
+ >
49
53
  Fun year fact
50
54
  </button>
51
55
  </div>
@@ -1,5 +1,5 @@
1
1
  import { createComponent } from 'oc-template-esm-compiler/renderer';
2
- import { createRoot } from '@remix-run/dom';
2
+ import { createRoot } from '@remix-run/component';
3
3
  import App from './App';
4
4
 
5
5
  export default createComponent(() => {
@@ -11,7 +11,7 @@ export default createComponent(() => {
11
11
  root.render(<App />);
12
12
  },
13
13
  unmount() {
14
- root?.remove();
14
+ root?.dispose();
15
15
  },
16
16
  };
17
17
  });
@@ -17,7 +17,7 @@
17
17
  "resolveJsonModule": true,
18
18
  "isolatedModules": true,
19
19
  "jsx": "react-jsx",
20
- "jsxImportSource": "@remix-run/dom"
20
+ "jsxImportSource": "@remix-run/component"
21
21
  },
22
22
  "include": ["src"],
23
23
  "exclude": ["src/_package"]
@@ -6,7 +6,7 @@ export default defineConfig({
6
6
  plugins: [oc()],
7
7
  build: {
8
8
  rollupOptions: {
9
- external: ['@remix-run/dom', '@remix-run/events'],
9
+ external: ['@remix-run/component'],
10
10
  },
11
11
  },
12
12
  });
@@ -29,7 +29,7 @@
29
29
  "@vue/tsconfig": "^0.7.0",
30
30
  "jsdom": "^21.1.1",
31
31
  "oc-server": "^4.0.2",
32
- "oc-template-vue-compiler": "^4.0.0",
32
+ "oc-template-vue-compiler": "^4.0.1",
33
33
  "typescript": "5.8.2",
34
34
  "vite": "^7.1.12",
35
35
  "vitest": "^0.29.7",