create-oc 1.1.34 → 1.1.36
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 +2 -1
- package/package.json +2 -2
- package/templates/elm/package.json +1 -1
- package/templates/es6/package.json +1 -1
- package/templates/esm.react/package.json +1 -1
- package/templates/esm.remix/package.json +2 -3
- package/templates/esm.remix/src/App.tsx +7 -5
- package/templates/esm.remix/src/entry.client.tsx +2 -2
- package/templates/esm.remix/tsconfig.json +1 -1
- package/templates/esm.remix/vite.config.ts +1 -1
- package/templates/preact/package.json +1 -1
- package/templates/react/package.json +1 -1
- package/templates/solid/package.json +1 -1
- package/templates/svelte/package.json +1 -1
- package/templates/vue/package.json +3 -3
- package/templates/vue/src/App.vue +1 -1
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.
|
|
28
|
+
oc.development = {};
|
|
29
|
+
oc.development.importmap = oc.importmap?.imports
|
|
29
30
|
? {
|
|
30
31
|
imports: {
|
|
31
32
|
...oc.importmap.imports,
|
package/package.json
CHANGED
|
@@ -22,10 +22,9 @@
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@remix-run/
|
|
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
|
-
"oc-server": "^4.0.
|
|
27
|
+
"oc-server": "^4.0.2",
|
|
29
28
|
"oc-template-esm-compiler": "^4.0.1",
|
|
30
29
|
"typescript": "5.8.3",
|
|
31
30
|
"vite": "^7.1.12",
|
|
@@ -3,14 +3,13 @@ import {
|
|
|
3
3
|
type ActionOutput,
|
|
4
4
|
getInitialData,
|
|
5
5
|
} from 'oc-server/client';
|
|
6
|
-
import type
|
|
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(
|
|
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
|
-
|
|
25
|
+
handle.update();
|
|
27
26
|
}
|
|
28
27
|
};
|
|
29
28
|
|
|
@@ -45,7 +44,10 @@ export default function App(this: Remix.Handle) {
|
|
|
45
44
|
</div>
|
|
46
45
|
</div>
|
|
47
46
|
{additionalData && <div>{additionalData.funFact}</div>}
|
|
48
|
-
<button
|
|
47
|
+
<button
|
|
48
|
+
className={styles.button}
|
|
49
|
+
mix={[on('click', () => getFunFact())]}
|
|
50
|
+
>
|
|
49
51
|
Fun year fact
|
|
50
52
|
</button>
|
|
51
53
|
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createComponent } from 'oc-template-esm-compiler/renderer';
|
|
2
|
-
import { createRoot } from '@remix-run/
|
|
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?.
|
|
14
|
+
root?.dispose();
|
|
15
15
|
},
|
|
16
16
|
};
|
|
17
17
|
});
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@testing-library/jest-dom": "^6.5.0",
|
|
27
27
|
"@types/testing-library__jest-dom": "^5.14.5",
|
|
28
28
|
"jsdom": "^21.1.1",
|
|
29
|
-
"oc-server": "^4.0.
|
|
29
|
+
"oc-server": "^4.0.2",
|
|
30
30
|
"oc-template-solid-compiler": "^4.0.0",
|
|
31
31
|
"solid-js": "^1.9.5",
|
|
32
32
|
"typescript": "5.5.4",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"@testing-library/jest-dom": "^5.16.5",
|
|
26
26
|
"@testing-library/vue": "^8.0.0",
|
|
27
27
|
"@types/testing-library__jest-dom": "^5.14.5",
|
|
28
|
-
"@vitejs/plugin-vue": "^
|
|
28
|
+
"@vitejs/plugin-vue": "^6.0.2",
|
|
29
29
|
"@vue/tsconfig": "^0.7.0",
|
|
30
30
|
"jsdom": "^21.1.1",
|
|
31
|
-
"oc-server": "^4.0.
|
|
32
|
-
"oc-template-vue-compiler": "^4.0.
|
|
31
|
+
"oc-server": "^4.0.2",
|
|
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",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { ref } from 'vue'
|
|
3
3
|
import logo from '../public/logo.png';
|
|
4
|
-
import { serverClient, ActionOutput } from 'oc-server'
|
|
4
|
+
import { serverClient, ActionOutput } from 'oc-server/client'
|
|
5
5
|
const props = defineProps<{ firstName: string, lastName: string, born: number, hobbies: string[] }>()
|
|
6
6
|
|
|
7
7
|
const additionalData = ref<ActionOutput<'funFact'> | null>(null);
|