Skip to content
Merged
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
5 changes: 0 additions & 5 deletions .changeset/rename-to-linked-scope.md

This file was deleted.

7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @\_linked/xsd

## 1.0.3

### Patch Changes

- [`ad197b0`](https://github.com/linked-cm/xsd/commit/ad197b07d376047e698f01066c20deaab989b71d) - First release under `@_linked/xsd`. Package was previously published as `lincd-xsd`; content is the same, namespace migrated to the `@_linked` scope.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@_linked/xsd",
"displayName": "XML Schema (XSD)",
"license": "UNLICENSED",
"version": "1.0.2",
"version": "1.0.3",
"linkedPackage": true,
"author": {
"name": "René Verheij",
Expand Down
4 changes: 4 additions & 0 deletions src/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import './types.js';
import './ontologies/xsd.js';
import './shapes/Boolean.js';
import './shapes/XSDDate.js';
7 changes: 7 additions & 0 deletions src/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

59 changes: 59 additions & 0 deletions src/ontologies/xsd.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
export declare const loadData: () => Promise<{
"@context": {
xsd: string;
rdf: string;
rdfs: string;
owl: string;
dc: string;
};
"@graph": ({
"@id": string;
"@type": string;
"dc:title": string;
"dc:description": string;
"rdfs:subClassOf"?: undefined;
"rdfs:isDefinedBy"?: undefined;
"rdfs:label"?: undefined;
} | {
"@id": string;
"@type": string;
"rdfs:subClassOf": {
"@id": string;
};
"rdfs:isDefinedBy": {
"@id": string;
};
"rdfs:label": string;
"dc:title"?: undefined;
"dc:description"?: undefined;
})[];
}>;
export declare const ns: (term: string) => import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
export declare const _ontologyResource: import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
export declare const Bytes: import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
export declare const string: import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
export declare const boolean: import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
export declare const date: import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
export declare const long: import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
export declare const integer: import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
export declare const time: import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
export declare const duration: import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
export declare const decimal: import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
export declare const gYear: import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
export declare const dateTime: import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
export declare const anyURI: import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
export declare const xsd: {
_ontologyResource: import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
Bytes: import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
string: import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
boolean: import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
date: import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
long: import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
integer: import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
time: import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
duration: import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
decimal: import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
gYear: import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
dateTime: import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
anyURI: import("@_linked/core/utils/NodeReference.js").NodeReferenceValue;
};
82 changes: 82 additions & 0 deletions src/ontologies/xsd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/ontologies/xsd.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/package.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { getPackageShape, linkedOntology, linkedShape, linkedUtil, packageExports, registerPackageExport, registerPackageModule } from '@_linked/core/package';
export declare const packageName: string;
export { getPackageShape, linkedOntology, linkedShape, linkedUtil, packageExports, registerPackageExport, registerPackageModule, };
13 changes: 13 additions & 0 deletions src/package.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/package.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions src/shapes/Boolean.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Shape } from '@_linked/core/shapes/Shape';
import type { NodeReferenceValue } from '@_linked/core/utils/NodeReference';
export declare class Boolean extends Shape {
static targetClass: NodeReferenceValue;
static true(): boolean;
static false(): boolean;
static toLiteral(value: boolean): boolean;
static isTrue(value: boolean | string | {
value?: string;
}): boolean;
static isFalse(value: boolean | string | {
value?: string;
}): boolean;
/**
* Updates a boolean value of the given node with the opposite of its current boolean value.
* Will be set to true if not set yet.
* @param resource
* @param property
*/
static negate(_resource: NodeReferenceValue | Boolean, _property: unknown): void;
}
68 changes: 68 additions & 0 deletions src/shapes/Boolean.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/shapes/Boolean.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions src/shapes/XSDDate.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Minimal shim for backward compatibility.
* XSDDate was removed because @_linked/core queries return native JS dates,
* making a literal-wrapping Shape unnecessary. This shim provides the static
* utility methods so unmigrated packages (e.g. irlcg) can still import them.
*/
export declare class XSDDate {
static toNativeDate(literal: {
value?: string;
} | string | null): Date | null;
static fromNativeDate(nativeDate: Date): {
node: string;
value: string;
} | null;
static fromTimestamp(timestamp: string | number): {
node: string;
value: string;
};
}
32 changes: 32 additions & 0 deletions src/shapes/XSDDate.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/shapes/XSDDate.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions src/types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
declare module '*.module.css' {
const classes: {
[key: string]: string;
};
export default classes;
}
declare module '*.module.scss' {
const classes: {
[key: string]: string;
};
export default classes;
}
1 change: 1 addition & 0 deletions src/types.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/types.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.