Skip to content

✨ feat(SSR): add for next projects #1478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ packages/core/icons
packages/core/components
packages/core/loader
packages/core/wwww
packages/core/hydrate
packages/core/config/custom-elements/all.js
packages/core/config/custom-elements/all.d.ts
packages/core/**/theming.md
Expand Down
123 changes: 0 additions & 123 deletions libs/output-target-angular/package-lock.json

This file was deleted.

2 changes: 1 addition & 1 deletion libs/output-target-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"private": true,
"dependencies": {
"@stencil/core": "~4.11.0",
"@stencil/core": "~4.19.0",
"tslib": "~2.3.0"
},
"type": "commonjs",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { dirname, join } from 'path'
import type { OutputTargetAngular, ValueAccessorTypes } from './types'
import type { CompilerCtx, ComponentCompilerMeta, Config } from '@stencil/core/internal'
import type { CompilerCtx, ComponentCompilerMeta, Config, CopyTask } from '@stencil/core/internal'

interface ValueAccessor {
elementSelectors: string[]
Expand Down Expand Up @@ -78,12 +78,13 @@ function copyResources(config: Config, resourcesFilesToCopy: string[], directory
if (!config.sys || !config.sys.copy) {
throw new Error('stencil is not properly intialized at this step. Notify the developer')
}
const copyTasks = resourcesFilesToCopy.map(rf => {
const copyTasks: Required<CopyTask>[] = resourcesFilesToCopy.map(rf => {
return {
src: join(__dirname, '../../../resources/control-value-accessors/', rf),
dest: join(directory, rf),
keepDirStructure: false,
warn: false,
ignore: [],
}
})
return config.sys.copy(copyTasks, join(directory))
Expand Down
5 changes: 4 additions & 1 deletion libs/output-target-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
"private": true,
"dependencies": {
"tslib": "~2.3.0",
"@stencil/core": "~4.11.0"
"@stencil/core": "~4.19.0",
"@lit/react": "^1.0.4",
"html-react-parser": "^5.1.10",
"ts-morph": "18.0.0"
},
"peerDependencies": {
"react": "~18.2.0",
Expand Down
210 changes: 210 additions & 0 deletions libs/output-target-react/react-component-lib/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
/**
* Copied from https://github.com/facebook/react/blob/7771d3a7972cc2483c45fde51b7ec2d926cba097/packages/react-dom-bindings/src/shared/possibleStandardNames.js
* and amended accordingly to remove duplicates and entries where key value pairs are the same.
*/
export const possibleStandardNames = {
acceptCharset: 'accept-charset',
accessKey: 'accesskey',
allowFullScreen: 'allowfullscreen',
autoCapitalize: 'autocapitalize',
autoComplete: 'autocomplete',
autoCorrect: 'autocorrect',
autoFocus: 'autofocus',
autoPlay: 'autoplay',
autoSave: 'autosave',
cellPadding: 'cellpadding',
cellSpacing: 'cellspacing',
charSet: 'charset',
className: 'class',
classID: 'classid',
colSpan: 'colspan',
contentEditable: 'contenteditable',
contextMenu: 'contextmenu',
controlsList: 'controlslist',
crossOrigin: 'crossorigin',
dangerouslySetInnerHTML: 'dangerouslysetinnerhtml',
dateTime: 'datetime',
defaultChecked: 'defaultchecked',
defaultValue: 'defaultvalue',
disablePictureInPicture: 'disablepictureinpicture',
disableRemotePlayback: 'disableremoteplayback',
encType: 'enctype',
enterKeyHint: 'enterkeyhint',
fetchPriority: 'fetchpriority',
htmlFor: 'for',
formMethod: 'formmethod',
formAction: 'formaction',
formEncType: 'formenctype',
formNoValidate: 'formnovalidate',
formTarget: 'formtarget',
frameBorder: 'frameborder',
hrefLang: 'hreflang',
httpEquiv: 'http-equiv',
imageSizes: 'imagesizes',
imageSrcSet: 'imagesrcset',
inputMode: 'inputmode',
itemID: 'itemid',
itemProp: 'itemprop',
itemRef: 'itemref',
itemScope: 'itemscope',
itemType: 'itemtype',
keyParams: 'keyparams',
keyType: 'keytype',
marginWidth: 'marginwidth',
marginHeight: 'marginheight',
maxLength: 'maxlength',
mediaGroup: 'mediagroup',
noModule: 'nomodule',
noValidate: 'novalidate',
playsInline: 'playsinline',
radioGroup: 'radiogroup',
readOnly: 'readonly',
referrerPolicy: 'referrerpolicy',
rowSpan: 'rowspan',
spellCheck: 'spellcheck',
srcDoc: 'srcdoc',
srcLang: 'srclang',
srcSet: 'srcset',
tabIndex: 'tabindex',
useMap: 'usemap',
accentHeight: 'accent-height',
alignmentBaseline: 'alignment-baseline',
arabicForm: 'arabic-form',
attributeName: 'attributename',
attributeType: 'attributetype',
autoReverse: 'autoreverse',
baseFrequency: 'basefrequency',
baselineShift: 'baseline-shift',
baseProfile: 'baseprofile',
calcMode: 'calcmode',
capHeight: 'cap-height',
clipPath: 'clip-path',
clipPathUnits: 'clippathunits',
clipRule: 'clip-rule',
colorInterpolation: 'color-interpolation',
colorInterpolationFilters: 'color-interpolation-filters',
colorProfile: 'color-profile',
colorRendering: 'color-rendering',
contentScriptType: 'contentscripttype',
contentStyleType: 'contentstyletype',
diffuseConstant: 'diffuseconstant',
dominantBaseline: 'dominant-baseline',
enableBackground: 'enable-background',
externalResourcesRequired: 'externalresourcesrequired',
fillOpacity: 'fill-opacity',
fillRule: 'fill-rule',
filterRes: 'filterres',
filterUnits: 'filterunits',
floodOpacity: 'flood-opacity',
floodColor: 'flood-color',
fontFamily: 'font-family',
fontSize: 'font-size',
fontSizeAdjust: 'font-size-adjust',
fontStretch: 'font-stretch',
fontStyle: 'font-style',
fontVariant: 'font-variant',
fontWeight: 'font-weight',
glyphName: 'glyph-name',
glyphOrientationHorizontal: 'glyph-orientation-horizontal',
glyphOrientationVertical: 'glyph-orientation-vertical',
gradientTransform: 'gradienttransform',
gradientUnits: 'gradientunits',
horizAdvX: 'horiz-adv-x',
horizOriginX: 'horiz-origin-x',
imageRendering: 'image-rendering',
kernelMatrix: 'kernelmatrix',
kernelUnitLength: 'kernelunitlength',
keyPoints: 'keypoints',
keySplines: 'keysplines',
keyTimes: 'keytimes',
lengthAdjust: 'lengthadjust',
letterSpacing: 'letter-spacing',
lightingColor: 'lighting-color',
limitingConeAngle: 'limitingconeangle',
markerEnd: 'marker-end',
markerHeight: 'markerheight',
markerMid: 'marker-mid',
markerStart: 'marker-start',
markerUnits: 'markerunits',
markerWidth: 'markerwidth',
maskContentUnits: 'maskcontentunits',
maskUnits: 'maskunits',
numOctaves: 'numoctaves',
overlinePosition: 'overline-position',
overlineThickness: 'overline-thickness',
paintOrder: 'paint-order',
panose1: 'panose-1',
pathLength: 'pathlength',
patternContentUnits: 'patterncontentunits',
patternTransform: 'patterntransform',
patternUnits: 'patternunits',
pointerEvents: 'pointer-events',
pointsAtX: 'pointsatx',
pointsAtY: 'pointsaty',
pointsAtZ: 'pointsatz',
preserveAlpha: 'preservealpha',
preserveAspectRatio: 'preserveaspectratio',
primitiveUnits: 'primitiveunits',
refX: 'refx',
refY: 'refy',
renderingIntent: 'rendering-intent',
repeatCount: 'repeatcount',
repeatDur: 'repeatdur',
requiredExtensions: 'requiredextensions',
requiredFeatures: 'requiredfeatures',
shapeRendering: 'shape-rendering',
specularConstant: 'specularconstant',
specularExponent: 'specularexponent',
spreadMethod: 'spreadmethod',
startOffset: 'startoffset',
stdDeviation: 'stddeviation',
stitchTiles: 'stitchtiles',
stopColor: 'stop-color',
stopOpacity: 'stop-opacity',
strikethroughPosition: 'strikethrough-position',
strikethroughThickness: 'strikethrough-thickness',
strokeDasharray: 'stroke-dasharray',
strokeDashoffset: 'stroke-dashoffset',
strokeLinecap: 'stroke-linecap',
strokeLinejoin: 'stroke-linejoin',
strokeMiterlimit: 'stroke-miterlimit',
strokeWidth: 'stroke-width',
strokeOpacity: 'stroke-opacity',
suppressContentEditableWarning: 'suppresscontenteditablewarning',
suppressHydrationWarning: 'suppresshydrationwarning',
surfaceScale: 'surfacescale',
systemLanguage: 'systemlanguage',
tableValues: 'tablevalues',
targetX: 'targetx',
targetY: 'targety',
textAnchor: 'text-anchor',
textDecoration: 'text-decoration',
textLength: 'textlength',
textRendering: 'text-rendering',
transformOrigin: 'transform-origin',
underlinePosition: 'underline-position',
underlineThickness: 'underline-thickness',
unicodeBidi: 'unicode-bidi',
unicodeRange: 'unicode-range',
unitsPerEm: 'units-per-em',
vectorEffect: 'vector-effect',
vertAdvY: 'vert-adv-y',
vertOriginX: 'vert-origin-x',
vertOriginY: 'vert-origin-y',
wordSpacing: 'word-spacing',
writingMode: 'writing-mode',
xChannelSelector: 'xchannelselector',
xHeight: 'x-height',
xlinkActuate: 'xlink:actuate',
xlinkArcrole: 'xlink:arcrole',
xlinkHref: 'xlink:href',
xlinkRole: 'xlink:role',
xlinkShow: 'xlink:show',
xlinkTitle: 'xlink:title',
xlinkType: 'xlink:type',
xmlBase: 'xml:base',
xmlLang: 'xml:lang',
xmlnsXlink: 'xmlns:xlink',
yChannelSelector: 'ychannelselector',
zoomAndPan: 'zoomandpan',
}
Loading
Loading