@xylabs/react-rich-result 5.2.1 → 5.2.3
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/jsonld/ActionStatusType.ts","../../src/jsonld/ContactPointOption.ts","../../src/jsonld/ItemAvailability.ts","../../src/jsonld/MapCategoryType.ts","../../src/RichResult.tsx"],"sourcesContent":["enum ActionStatusType {\n ActiveActionStatus = 'ActiveActionStatus',\n CompletedActionStatus = 'CompletedActionStatus',\n FailedActionStatus = 'FailedActionStatus',\n PotentialActionStatus = 'PotentialActionStatus',\n}\n\nexport { ActionStatusType }\n","enum ContactPointOption {\n HearingImpairedSupported = 'HearingImpairedSupported',\n TollFree = 'TollFree',\n}\n\nexport { ContactPointOption }\n","enum ItemAvailability {\n /** Indicates that the item has been discontinued. */\n Discontinued = 'https://schema.org/Discontinued',\n /** Indicates that the item is in stock. */\n InStock = 'https://schema.org/InStock',\n /** Indicates that the item is available only at physical locations. */\n InStoreOnly = 'https://schema.org/InStoreOnly',\n /** Indicates that the item has limited availability. */\n LimitedAvailability = 'https://schema.org/LimitedAvailability',\n /** Indicates that the item is available only online. */\n OnlineOnly = 'https://schema.org/OnlineOnly',\n /** Indicates that the item is out of stock. */\n OutOfStock = 'https://schema.org/OutOfStock',\n /** Indicates that the item is available for pre-order. */\n PreOrder = 'https://schema.org/PreOrder',\n /** Indicates that the item is available for ordering and delivery before general availability. */\n PreSale = 'https://schema.org/PreSale',\n /** Indicates that the item has sold out. */\n SoldOut = 'https://schema.org/SoldOut',\n}\n\nexport { ItemAvailability }\n","enum MapCategoryType {\n ParkingMap = 'ParkingMap',\n SeatingMap = 'SeatingMap',\n TransitMap = 'TransitMap',\n VenueMap = 'VenueMap',\n}\n\nexport { MapCategoryType }\n","import React from 'react'\n\nimport type { Base, Thing } from './jsonld/index.ts'\n\ntype WithContext<T extends Base> = T & {\n '@context': 'https://schema.org'\n}\n\nexport interface RichResultProps {\n thing: Thing\n}\n\nexport const RichResult: React.FC<RichResultProps> = (props) => {\n const { thing } = props\n const thingWithContext = thing as WithContext<Thing>\n thingWithContext['@context'] = 'https://schema.org'\n return <script type=\"application/ld+json\">{JSON.stringify(thingWithContext)}</script>\n}\n"],"mappings":";;;;IAAKA,mBAAAA,yBAAAA,mBAAAA;;;;;SAAAA;EAAAA,oBAAAA,CAAAA,CAAAA;;;
|
|
1
|
+
{"version":3,"sources":["../../src/jsonld/ActionStatusType.ts","../../src/jsonld/ContactPointOption.ts","../../src/jsonld/ItemAvailability.ts","../../src/jsonld/MapCategoryType.ts","../../src/RichResult.tsx"],"sourcesContent":["enum ActionStatusType {\n ActiveActionStatus = 'ActiveActionStatus',\n CompletedActionStatus = 'CompletedActionStatus',\n FailedActionStatus = 'FailedActionStatus',\n PotentialActionStatus = 'PotentialActionStatus',\n}\n\nexport { ActionStatusType }\n","enum ContactPointOption {\n HearingImpairedSupported = 'HearingImpairedSupported',\n TollFree = 'TollFree',\n}\n\nexport { ContactPointOption }\n","enum ItemAvailability {\n /** Indicates that the item has been discontinued. */\n Discontinued = 'https://schema.org/Discontinued',\n /** Indicates that the item is in stock. */\n InStock = 'https://schema.org/InStock',\n /** Indicates that the item is available only at physical locations. */\n InStoreOnly = 'https://schema.org/InStoreOnly',\n /** Indicates that the item has limited availability. */\n LimitedAvailability = 'https://schema.org/LimitedAvailability',\n /** Indicates that the item is available only online. */\n OnlineOnly = 'https://schema.org/OnlineOnly',\n /** Indicates that the item is out of stock. */\n OutOfStock = 'https://schema.org/OutOfStock',\n /** Indicates that the item is available for pre-order. */\n PreOrder = 'https://schema.org/PreOrder',\n /** Indicates that the item is available for ordering and delivery before general availability. */\n PreSale = 'https://schema.org/PreSale',\n /** Indicates that the item has sold out. */\n SoldOut = 'https://schema.org/SoldOut',\n}\n\nexport { ItemAvailability }\n","enum MapCategoryType {\n ParkingMap = 'ParkingMap',\n SeatingMap = 'SeatingMap',\n TransitMap = 'TransitMap',\n VenueMap = 'VenueMap',\n}\n\nexport { MapCategoryType }\n","import React from 'react'\n\nimport type { Base, Thing } from './jsonld/index.ts'\n\ntype WithContext<T extends Base> = T & {\n '@context': 'https://schema.org'\n}\n\nexport interface RichResultProps {\n thing: Thing\n}\n\nexport const RichResult: React.FC<RichResultProps> = (props) => {\n const { thing } = props\n const thingWithContext = thing as WithContext<Thing>\n thingWithContext['@context'] = 'https://schema.org'\n return <script type=\"application/ld+json\">{JSON.stringify(thingWithContext)}</script>\n}\n"],"mappings":";;;;AAAA,IAAKA,mBAAAA,yBAAAA,mBAAAA;;;;;SAAAA;EAAAA,oBAAAA,CAAAA,CAAAA;;;ACAL,IAAKC,qBAAAA,yBAAAA,qBAAAA;;;SAAAA;EAAAA,sBAAAA,CAAAA,CAAAA;;;ACAL,IAAKC,mBAAAA,yBAAAA,mBAAAA;AACgD,EAAAA,kBAAA,cAAA,IAAA;AAEV,EAAAA,kBAAA,SAAA,IAAA;AAE4B,EAAAA,kBAAA,aAAA,IAAA;AAEf,EAAAA,kBAAA,qBAAA,IAAA;AAEA,EAAAA,kBAAA,YAAA,IAAA;AAET,EAAAA,kBAAA,YAAA,IAAA;AAEW,EAAAA,kBAAA,UAAA,IAAA;AAEwC,EAAAA,kBAAA,SAAA,IAAA;AAEtD,EAAAA,kBAAA,SAAA,IAAA;SAjBvCA;EAAAA,oBAAAA,CAAAA,CAAAA;;;ACAL,IAAKC,kBAAAA,yBAAAA,kBAAAA;;;;;SAAAA;EAAAA,mBAAAA,CAAAA,CAAAA;;;ACAL,OAAOC,WAAW;AAYX,IAAMC,aAAwC,wBAACC,UAAAA;AACpD,QAAM,EAAEC,MAAK,IAAKD;AAClB,QAAME,mBAAmBD;AACzBC,mBAAiB,UAAA,IAAc;AAC/B,SAAO,sBAAA,cAACC,UAAAA;IAAOC,MAAK;KAAuBC,KAAKC,UAAUJ,gBAAAA,CAAAA;AAC5D,GALqD;","names":["ActionStatusType","ContactPointOption","ItemAvailability","MapCategoryType","React","RichResult","props","thing","thingWithContext","script","type","JSON","stringify"]}
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
declare enum ItemAvailability {
|
|
2
|
+
/** Indicates that the item has been discontinued. */
|
|
2
3
|
Discontinued = "https://schema.org/Discontinued",
|
|
4
|
+
/** Indicates that the item is in stock. */
|
|
3
5
|
InStock = "https://schema.org/InStock",
|
|
6
|
+
/** Indicates that the item is available only at physical locations. */
|
|
4
7
|
InStoreOnly = "https://schema.org/InStoreOnly",
|
|
8
|
+
/** Indicates that the item has limited availability. */
|
|
5
9
|
LimitedAvailability = "https://schema.org/LimitedAvailability",
|
|
10
|
+
/** Indicates that the item is available only online. */
|
|
6
11
|
OnlineOnly = "https://schema.org/OnlineOnly",
|
|
12
|
+
/** Indicates that the item is out of stock. */
|
|
7
13
|
OutOfStock = "https://schema.org/OutOfStock",
|
|
14
|
+
/** Indicates that the item is available for pre-order. */
|
|
8
15
|
PreOrder = "https://schema.org/PreOrder",
|
|
16
|
+
/** Indicates that the item is available for ordering and delivery before general availability. */
|
|
9
17
|
PreSale = "https://schema.org/PreSale",
|
|
18
|
+
/** Indicates that the item has sold out. */
|
|
10
19
|
SoldOut = "https://schema.org/SoldOut"
|
|
11
20
|
}
|
|
12
21
|
export { ItemAvailability };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemAvailability.d.ts","sourceRoot":"","sources":["../../../src/jsonld/ItemAvailability.ts"],"names":[],"mappings":"AAAA,aAAK,gBAAgB;
|
|
1
|
+
{"version":3,"file":"ItemAvailability.d.ts","sourceRoot":"","sources":["../../../src/jsonld/ItemAvailability.ts"],"names":[],"mappings":"AAAA,aAAK,gBAAgB;IACnB,qDAAqD;IACrD,YAAY,oCAAoC;IAChD,2CAA2C;IAC3C,OAAO,+BAA+B;IACtC,uEAAuE;IACvE,WAAW,mCAAmC;IAC9C,wDAAwD;IACxD,mBAAmB,2CAA2C;IAC9D,wDAAwD;IACxD,UAAU,kCAAkC;IAC5C,+CAA+C;IAC/C,UAAU,kCAAkC;IAC5C,0DAA0D;IAC1D,QAAQ,gCAAgC;IACxC,kGAAkG;IAClG,OAAO,+BAA+B;IACtC,4CAA4C;IAC5C,OAAO,+BAA+B;CACvC;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xylabs/react-rich-result",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.3",
|
|
4
4
|
"description": "Common React library for all XY Labs projects that use React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"utility",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"packages/*"
|
|
38
38
|
],
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@types/react": "^18.3.
|
|
41
|
-
"@xylabs/ts-scripts-yarn3": "^4.2.
|
|
42
|
-
"@xylabs/tsconfig-react": "^4.2.
|
|
40
|
+
"@types/react": "^18.3.12",
|
|
41
|
+
"@xylabs/ts-scripts-yarn3": "^4.2.3",
|
|
42
|
+
"@xylabs/tsconfig-react": "^4.2.3",
|
|
43
43
|
"react": "^18.3.1",
|
|
44
44
|
"typescript": "^5.6.3"
|
|
45
45
|
},
|