Skip to content

Commit

Permalink
update files
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-bromann committed Sep 30, 2024
1 parent bb1deb2 commit 8236c27
Show file tree
Hide file tree
Showing 13 changed files with 393 additions and 615 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ function copyResources(config: Config, resourcesFilesToCopy: string[], directory
dest: path.join(directory, rf),
keepDirStructure: false,
warn: false,
ignore: [],
};
});
return config.sys.copy(copyTasks, path.join(directory));
Expand Down
1 change: 1 addition & 0 deletions packages/angular-output-target/src/output-angular.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ async function copyResources(config: Config, outputTarget: OutputTargetAngular)
dest: destDirectory,
keepDirStructure: false,
warn: false,
ignore: [],
},
],
srcDirectory
Expand Down
12 changes: 5 additions & 7 deletions packages/example-project/component-library-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,11 @@
},
"types": "./dist/index.d.ts",
"devDependencies": {
"@types/jest": "^26.0.23",
"@vue/server-renderer": "~3.1.1",
"@vue/test-utils": "^2.0.0-rc.6",
"jest": "^26.1.0",
"rimraf": "^5.0.0",
"typescript": "^4.3.2",
"vue": "~3.1.1"
"@vue/server-renderer": "~3.5.10",
"@vue/test-utils": "^2.4.6",
"rimraf": "^6.0.1",
"typescript": "^5.6.2",
"vue": "~3.5.10"
},
"dependencies": {
"component-library": "workspace:*",
Expand Down
2 changes: 2 additions & 0 deletions packages/example-project/component-library-vue/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export const MyComponent = /*@__PURE__*/ globalThis.window
'last',
'age',
'kidsNames',
'favoriteKidName',
'myCustomEvent',
])
: defineStencilSSRComponent({
Expand All @@ -88,6 +89,7 @@ export const MyComponent = /*@__PURE__*/ globalThis.window
last: String,
age: Number,
kidsNames: String,
favoriteKidName: String,
onMyCustomEvent: Function,
},
});
Expand Down
141 changes: 0 additions & 141 deletions packages/example-project/component-library-vue/src/proxies.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"sourceMap": true,
"jsx": "react",
"target": "esnext",
"types": ["jest"],
"skipLibCheck": true
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
Expand Down
93 changes: 93 additions & 0 deletions packages/example-project/next-app/src/app/components.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,21 @@ export const MyButton: StencilReactComponent<MyButtonElement, MyButtonEvents> =
})
: /*@__PURE__*/ createSSRComponent<MyButtonElement, MyButtonEvents>({
tagName: 'my-button',
properties: {
color: 'color',
buttonType: 'button-type',
disabled: 'disabled',
expand: 'expand',
fill: 'fill',
download: 'download',
href: 'href',
rel: 'rel',
shape: 'shape',
size: 'size',
strong: 'strong',
target: 'target',
type: 'type'
},
hydrateModule: import('component-library/hydrate')
});

Expand All @@ -62,6 +77,14 @@ export const MyCheckbox: StencilReactComponent<MyCheckboxElement, MyCheckboxEven
})
: /*@__PURE__*/ createSSRComponent<MyCheckboxElement, MyCheckboxEvents>({
tagName: 'my-checkbox',
properties: {
color: 'color',
name: 'name',
checked: 'checked',
indeterminate: 'indeterminate',
disabled: 'disabled',
value: 'value'
},
hydrateModule: import('component-library/hydrate')
});

Expand All @@ -77,6 +100,13 @@ export const MyComponent: StencilReactComponent<MyComponentElement, MyComponentE
})
: /*@__PURE__*/ createSSRComponent<MyComponentElement, MyComponentEvents>({
tagName: 'my-component',
properties: {
first: 'first',
middle: 'middle',
last: 'last',
age: 'age',
favoriteKidName: 'favorite-kid-name'
},
hydrateModule: import('component-library/hydrate')
});

Expand All @@ -102,6 +132,34 @@ export const MyInput: StencilReactComponent<MyInputElement, MyInputEvents> = typ
})
: /*@__PURE__*/ createSSRComponent<MyInputElement, MyInputEvents>({
tagName: 'my-input',
properties: {
color: 'color',
accept: 'accept',
autocapitalize: 'autocapitalize',
autocomplete: 'autocomplete',
autocorrect: 'autocorrect',
autofocus: 'autofocus',
clearInput: 'clear-input',
clearOnEdit: 'clear-on-edit',
disabled: 'disabled',
enterkeyhint: 'enterkeyhint',
inputmode: 'inputmode',
max: 'max',
maxlength: 'maxlength',
min: 'min',
minlength: 'minlength',
multiple: 'multiple',
name: 'name',
pattern: 'pattern',
placeholder: 'placeholder',
readonly: 'readonly',
required: 'required',
spellcheck: 'spellcheck',
step: 'step',
size: 'size',
type: 'type',
value: 'value'
},
hydrateModule: import('component-library/hydrate')
});

Expand All @@ -127,6 +185,16 @@ export const MyPopover: StencilReactComponent<MyPopoverElement, MyPopoverEvents>
})
: /*@__PURE__*/ createSSRComponent<MyPopoverElement, MyPopoverEvents>({
tagName: 'my-popover',
properties: {
component: 'component',
keyboardClose: 'keyboard-close',
cssClass: 'css-class',
backdropDismiss: 'backdrop-dismiss',
event: 'event',
showBackdrop: 'show-backdrop',
translucent: 'translucent',
animated: 'animated'
},
hydrateModule: import('component-library/hydrate')
});

Expand All @@ -150,6 +218,12 @@ export const MyRadio: StencilReactComponent<MyRadioElement, MyRadioEvents> = typ
})
: /*@__PURE__*/ createSSRComponent<MyRadioElement, MyRadioEvents>({
tagName: 'my-radio',
properties: {
color: 'color',
name: 'name',
disabled: 'disabled',
value: 'value'
},
hydrateModule: import('component-library/hydrate')
});

Expand All @@ -165,6 +239,11 @@ export const MyRadioGroup: StencilReactComponent<MyRadioGroupElement, MyRadioGro
})
: /*@__PURE__*/ createSSRComponent<MyRadioGroupElement, MyRadioGroupEvents>({
tagName: 'my-radio-group',
properties: {
allowEmptySelection: 'allow-empty-selection',
name: 'name',
value: 'value'
},
hydrateModule: import('component-library/hydrate')
});

Expand All @@ -188,5 +267,19 @@ export const MyRange: StencilReactComponent<MyRangeElement, MyRangeEvents> = typ
})
: /*@__PURE__*/ createSSRComponent<MyRangeElement, MyRangeEvents>({
tagName: 'my-range',
properties: {
color: 'color',
debounce: 'debounce',
name: 'name',
dualKnobs: 'dual-knobs',
min: 'min',
max: 'max',
pin: 'pin',
snaps: 'snaps',
step: 'step',
ticks: 'ticks',
disabled: 'disabled',
value: 'value'
},
hydrateModule: import('component-library/hydrate')
});
Original file line number Diff line number Diff line change
Expand Up @@ -230,12 +230,15 @@ export const MyComponent: StencilReactComponent<MyComponentElement, MyComponentE
{
tagName: 'my-component',
componentClassName: 'MyComponent',
properties: [{
name: 'hasMaxLength',
attribute: 'max-length'
}, {
name: 'links'
}],
properties: [
{
name: 'hasMaxLength',
attribute: 'max-length',
},
{
name: 'links',
},
],
events: [
{
originalName: 'my-event',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,7 @@ import type { EventName, StencilReactComponent } from '@stencil/react-output-tar
*/
.filter((prop) => Boolean(prop.attribute))
.map((e) => `${e.name}: '${e.attribute}'`)
.join(',\n')
}},
.join(',\n')}},
hydrateModule: import('${hydrateModule}')
})`;

Expand Down
2 changes: 1 addition & 1 deletion packages/react-output-target/src/react/ssr.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const createComponentForServerSideRendering = <I extends HTMLElement, E e
if (!propName) {
console.warn(
`${LOG_PREFIX} ignore component property "${key}" for ${options.tagName} ` +
'- property type is unknown or not a primitive and can\'t be serialized'
"- property type is unknown or not a primitive and can't be serialized"
);
continue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const MyComponent = /*@__PURE__*/ defineContainer<Components.MyComponent>
event: 'ionChange',
targetAttr: 'value',
},
]
],
});
const output = generateComponentDefinition({
properties: [
Expand Down
Loading

0 comments on commit 8236c27

Please sign in to comment.