create-oc 1.1.39 → 1.1.41

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
@@ -58,7 +58,7 @@ const templates = templateChoices.map((t) => t.value);
58
58
 
59
59
  const esmVariantChoices = [
60
60
  { title: 'React', value: 'esm.react' },
61
- { title: 'Remix (Experimental)', value: 'esm.remix' },
61
+ { title: 'Remix', value: 'esm.remix' },
62
62
  ];
63
63
  const esmVariants = esmVariantChoices.map((t) => t.value);
64
64
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-oc",
3
- "version": "1.1.39",
3
+ "version": "1.1.41",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "main": "index.js",
@@ -22,7 +22,7 @@
22
22
  }
23
23
  },
24
24
  "devDependencies": {
25
- "@remix-run/component": "^0.5.0",
25
+ "@remix-run/ui": "^0.4.0",
26
26
  "happy-dom": "^18.0.1",
27
27
  "oc-server": "^4.0.2",
28
28
  "oc-template-esm-compiler": "^4.0.3",
@@ -3,7 +3,7 @@ import {
3
3
  type ActionOutput,
4
4
  getInitialData,
5
5
  } from 'oc-server/client';
6
- import { type Handle } from '@remix-run/component';
6
+ import { on, type Handle } from '@remix-run/ui';
7
7
  import styles from './styles.module.css';
8
8
  import logo from '../public/logo.png';
9
9
 
@@ -26,32 +26,32 @@ export default function App(handle: Handle) {
26
26
  }
27
27
  };
28
28
 
29
- if (error) {
30
- return <div>Something wrong happened!</div>;
31
- }
29
+ return () => {
30
+ if (error) {
31
+ return <div>Something wrong happened!</div>;
32
+ }
32
33
 
33
- return () => (
34
- <div className={styles.container}>
35
- <img width="50" height="50" src={logo} alt="Logo" />
36
- <h1 style={{ margin: '0 0 20px 0' }}>
37
- Hello, <span style={{ textDecoration: 'underline' }}>{firstName}</span>{' '}
38
- {lastName}
39
- </h1>
40
- <div className={styles.info}>
41
- <div className={styles.block}>Born: {born}</div>
42
- <div className={styles.block}>
43
- Hobbies: {hobbies.map((x) => x.toLowerCase()).join(', ')}
34
+ return (
35
+ <div className={styles.container}>
36
+ <img width="50" height="50" src={logo} alt="Logo" />
37
+ <h1 style={{ margin: '0 0 20px 0' }}>
38
+ Hello, <span style={{ textDecoration: 'underline' }}>{firstName}</span>{' '}
39
+ {lastName}
40
+ </h1>
41
+ <div className={styles.info}>
42
+ <div className={styles.block}>Born: {born}</div>
43
+ <div className={styles.block}>
44
+ Hobbies: {hobbies.map((x) => x.toLowerCase()).join(', ')}
45
+ </div>
44
46
  </div>
47
+ {additionalData && <div>{additionalData.funFact}</div>}
48
+ <button
49
+ className={styles.button}
50
+ mix={[on<HTMLButtonElement>('click', getFunFact)]}
51
+ >
52
+ Fun year fact
53
+ </button>
45
54
  </div>
46
- {additionalData && <div>{additionalData.funFact}</div>}
47
- <button
48
- className={styles.button}
49
- on={{
50
- click: getFunFact,
51
- }}
52
- >
53
- Fun year fact
54
- </button>
55
- </div>
56
- );
55
+ );
56
+ };
57
57
  }
@@ -1,5 +1,5 @@
1
1
  import { createComponent } from 'oc-template-esm-compiler/renderer';
2
- import { createRoot } from '@remix-run/component';
2
+ import { createRoot } from '@remix-run/ui';
3
3
  import App from './App';
4
4
 
5
5
  export default createComponent(() => {
@@ -16,8 +16,9 @@
16
16
  "moduleResolution": "bundler",
17
17
  "resolveJsonModule": true,
18
18
  "isolatedModules": true,
19
+ "types": [],
19
20
  "jsx": "react-jsx",
20
- "jsxImportSource": "@remix-run/component"
21
+ "jsxImportSource": "@remix-run/ui"
21
22
  },
22
23
  "include": ["src"],
23
24
  "exclude": ["src/_package"]
@@ -6,7 +6,7 @@ export default defineConfig({
6
6
  plugins: [oc()],
7
7
  build: {
8
8
  rollupOptions: {
9
- external: ['@remix-run/component'],
9
+ external: ['@remix-run/ui'],
10
10
  },
11
11
  },
12
12
  });